Desktop

How to determine a given web page/site is using HTML5 and not its older versions

Posted on

  Requirement: You are a programmer/web developer/QA tester, you require to ensure that web page designed/tested is using HTML5.  How to find HTML version of Web page: Any browser detects the HTML version of the web pages by reading the very first line of a web page that is a declaration of <!DOCTYPE>.  The <!DOCTYPE> is not an HTML tag. It’s the very first instruction to the browser about what version of HTML the page is written in and/or what version of HTML to be used to render the page correctly. Example:  In below case the web page is using […]

Advertisements
Web

How to access Database from JSP Web page running in Tomcat

Posted on

Configure Database connection strings for Tomcat via Server.xml configuration file: …TomcatConfServer.xml   Configure DB connection entry in GlobalNamingResources and Realm tags   <?xml version=”1.0″ encoding=”UTF-8″?> <Server> <Listener className=”org.apache.catalina.mbeans.GlobalResourcesLifecycleListener”/> <Listener className=”org.apache.catalina.mbeans.ServerLifecycleListener”/> <GlobalNamingResources> <Environment name=”simpleValue” type=”java.lang.Integer” value=”30″/> <Resource auth=”Container” description=”User database that can be updated and saved” name=”UserDatabase” type=”org.apache.catalina.UserDatabase” pathname=”conf/tomcat-users.xml” factory=”org.apache.catalina.users.MemoryUserDatabaseFactory”/> <Resource name=”jdbc/myprod” type=”javax.sql.DataSource” driverClassName=”oracle.jdbc.driver.OracleDriver” password=”myP@ssw0rD” maxIdle=”5″ maxWait=”5000″ username=”myprod” url=”jdbc:oracle:oci8:@inst03″ maxActive=”60″/> </GlobalNamingResources> <Service name=”Catalina”> <Connector port=”8080″ redirectPort=”8443″ minSpareThreads=”25″ connectionTimeout=”20000″ maxSpareThreads=”75″ maxThreads=”150″> </Connector> <Connector port=”8009″ redirectPort=”8443″ connectionTimeout=”-1″ protocol=”AJP/1.3″> </Connector> <Engine defaultHost=”localhost” name=”Catalina”> <Realm className=”com.myprod.security.tomcat.JDBCRealm2″ connectionName=”myproddb” connectionPassword=”myP@ssw0rD” connectionURL=”jdbc:oracle:oci8:@inst03″ driverName=”oracle.jdbc.driver.OracleDriver” roleNameCol=”rolename” userCredCol=”password” userNameCol=”login” userRoleTable=”my_user_rolelist_v” userTable=”my_users_auth_v” validate=”true”/> <Host appBase=”webapps” name=”localhost”> <Valve className=”org.apache.catalina.valves.AccessLogValve” directory=”logs” prefix=”access_log-www.” suffix=”.txt” pattern=”%h […]

DataBase

Understanding how user usernames and passwords are saved, retrieved and verified on websites

Posted on

Environment: Lets consider you have a web site that is developed in PHP with MySQL DB in the backend and pages being served via the Apache Web Server.  All are freeware technologies with appropriate licensing terms.   End User input to Webpage and Webpage to Php script: A user login and/or registration page will prompt user for providing the username and password to access the site content.  The Login page form, will pass the user provided username and password to the appropriate php script.   Php Script to/from DB and back to Web page form: The php script will make […]