Prasoona Rr

Greenhorn
+ Follow
since Nov 25, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prasoona Rr

Well well, within a few hrs of irritating my pc,I achieved my way. The code is working now. All that I had to do was follow the instructions as in Tomcat installation, specifically the "uncommenting of invoker" in web.xml in conf folder.

But the concept that I dont understand is "why should it not identify the first jsp at all, if i try to map the servlet in the corresponding web.xml file"

Please could anyone clarify this?

Thanks
Prasoona.
19 years ago
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.
19 years ago
Thanks Jeff, but got it set right in the mean time!!!
19 years ago
I've been trying, but in vain to deploy a HelloWorld Servlet. Could someone plzzzzz guide me as to how to go abt it.

I tried installing Ant, and the HelloWorld directory structure wa slike this:
HelloWorld
src
HelloWorld
config
web.xml
build.xml(ant.dtd)

when i run the build file, it gives the error ant.dtd is not found. how do i go abt it. I need to show this in anotehr couple of hrs...else am dead !!! plz help asap



Thanks
Prasoona.
19 years ago