Hi Joyce,
the problem taht am facing si somewhat similar to the current
thread. I'm written a jsp (Welcome) calling another one (Login.jsp). Once the login details are furnished in Login.jsp, it transfers control to ValidateServlet.
Validateservlet in turn calls a couple of other
java user-defined classes.
The problem is as follows:
I placed the Welcome.jsp and Login.jsp in the webapps/root folder (Tomcat 5.0.24) I placed the ValidateServlet.java, User.java, DBConnection.java in C:\jakarta-tomcat-5.0.24\webapps\ROOT\WEB-INF\classes folder.
If i try to place the servlet details in the web.xml in the corresponding WEB-INF, while running the jsp with the command in IE browse
http://localhost:8080/Welcome.jsp the response is "/Welcome.jsp resource not found"
if i remove the amendments that i did to web.xml, the jsp leads to Login.jsp without any problem, but further fails to locate ValidateServlet.
could ther ebe any problem with Login.jsp calling ValidateServlet. for ur ref. attaching the login.jsp code here.
<Html>
<body>
<%@ page language ="java"%>
<%@ page import="java.io.*"%>
<%@ page import="java.sql.*"%>
<form action = "http://localhost:8080/servlet/ValidateServlet"
method = "POST">
<title> <head>Login Details</title></head>
<form>
<% if((request.getParameter("reply")).equals("yes"))
{ %>
<br> USERNAME
<input type = "text" name = "loginname" size = "10" > </br>
<br> PASSWORD
<input type = "password" name = "password" size = "10" > </br>
<br><input type = "submit" name = "submit" value = "SUBMIT" > </br>
<% }
else {
out.println("Thanks for visiting this page");
}
%>
</form>
</body>
</html>
sorry for such a verbose explanation, but need help badly.
Thanks,
Prasoona.