i am new to jsp and my doubt may seem very funny to you all but without clarifying it i can't move on with my project .
i wrote a simple jsp program which accepts the name and password values from the user and compares them with the values in the database and displays 'correct' if they match and 'wrong' if they doesn't match.
i am not using any IDE. i am writing the programs in notepad files and executing them
here's the html page that reads values from the user
here's the jsp program
<form action="check.jsp" method=get>
uname:<input type="text" name="name"><br>
<input type="password" name="pass"><br>
<input type="submit" value="submit">
here's the html page that displays the message correct
<%@ page import="java.sql.*"%>
<%@ page import="java.io.*"%>
Connection con = null;
String connectionURL = "jdbc:mysql://localhost:3306/pms";;
con = DriverManager.getConnection(connectionURL, "root", "root");
rs = stmt.executeQuery("select * from login where name='"+name+"' and password='"+pass+"'");
here's the html page that displays the message
here's the web.xml file
when i enter name and password fields and press enter, a blank page is displayed and i cant get the output. the address bar contains "http://localhost:8080/pms/check.jsp?name=abc&pass=abc"
what is the problem with my program ?
pls anyone help me guys...
its important for me
This is not the sort of thing a JSP is for.
JSPs display the results of processing done by a servlet.
So your above should be in a servlet, and that should forward to the relevant HTML page.
Servlets are a lot easier to debug.
Anyway, are you sure there is an entry in your database for username abc and password abc?