Archive for the ‘JSP’ Category

How to fetch values from a table in a database using JSP?

var fbShare = {url: ‘http://sree.cc/java-server-page/how-to-fetch-values-from-a-table-in-a-database-using-jsp’,size:’large’} To connect with a database, you need the following things.
1. A Database System.
2. A Database Connector
3. Apache Tomcat
4. jdk
The database system we use is MySQL. You can download it from the following location.
http://www.filehippo.com/download_mysql/
At the time of installation, you can configure the username and password.
After installation, you can go to [...]

How to create a simple application in JSP?

var fbShare = {url: ‘http://sree.cc/java-server-page/how-to-create-a-simple-application-in-jsp-2′,size:’large’} To work with a J2EE application, you need two things in your system.
1. jdk
2. Apache Tomcat
Since both of them are open source you can download it from the Net. You can try the links below:
http://java.com/en/download/
http://tomcat.apache.org/download-60.cgi
After installing jdk 1.5 or latest version, you can also install Apache Tomcat of versions [...]

How to create a login script in JSP without any database

var fbShare = {url: ‘http://sree.cc/java-server-page/how-to-create-a-login-script-in-jsp-without-any-database’,size:’large’} First of all, you have to  create a simple login form with plain html tags and name it as login.jsp or any-name.jsp and
save it in your apache-tomcat’s webapps folder. The script for creating login.jsp given below:
[sourcecode language="html"]
<html>
<head><title>Login</title>
</head>
<body>
<form action="main_page.jsp">
<table>
<tr><th colspan="2">Login</th></tr>
<tr>
<td>Username</td><td>:<input type="text" name="username" id="username" /></td>
</tr>
<tr>
<td>Password</td><td>:<input type="password" name="password" id="password" /></td>
</tr>
<tr>
<td>&nbsp;</td><td><input type="submit" name="btn_submit" [...]