aspose file tools*
The moose likes Servlets and the fly likes Regarding loading of servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Regarding loading of servlets" Watch "Regarding loading of servlets" New topic
Author

Regarding loading of servlets

Gaurav Chikara
Ranch Hand

Joined: Jun 09, 2000
Posts: 410
In my case on click of a submit button I am invloking a servlet which after doing some validations has to pass the control to another servlet or jap
I am using res.sendRedirect(servlet_or_jsp_path)
But problem I am facing is that on my first attempt on clicking of submit button It says "file not found"
and on my second attempt it happily finds th servlet or jsp
Am i lacking something in my approach regarding loading of servlets or jsps ?

SCJP,SCWCD,SCBCD<br />If Opportunity doesn't knock then build the door
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Gaurav,
Just to find the servlet/jsp resource, the request routed from web server to servlet container shouldn't take much time.
Have you noticed this, "web site found......" message at the bottom of the browser! The time taken is less if the servlet/jsp/html is found than , when the resource is not found.
Did you stop and restart the servlet engine? Before the servlet engine is fully loaded into memory, did you try to click on the 'submit' button? (Your first try! ). In this case the browser will not be able to get the resource.
I have done these (silly) things many times. Just wanted to share the experince.
If this is not the case please post the relavent code here.
regds
maha anna
[This message has been edited by maha anna (edited March 31, 2001).]
Gaurav Chikara
Ranch Hand

Joined: Jun 09, 2000
Posts: 410
Thnkx a ton Maha Anna
u r great
I expected that no one will reply to my this post
but u replied
I solved this problem
but I posted nother problem in which my servlet is not being able to locate a packaged bean
which i have kept in
directory
c:/javawebserver2.0/classes/sunexamples/beans
and i have written package name after import statements like
package sunexamples.beans;
Now my servlet class file is trying to acesss that bean say ConBeam
Complier is complaining
I tried setting classpath also to beans directory but of no avail
even trying to acees it thr this way
sunexamples.beans.conbean c = new sunexamples.beans.conbean();
is not helping
I have posted this problem and one reply has come regarding setting classpath but setting it is not helping
will u Pls help me with some morcel od ur immense knowledge?

Originally posted by maha anna:
Gaurav,
Just to find the servlet/jsp resource, the request routed from web server to servlet container shouldn't take much time.
Have you noticed this, "web site found......" message at the bottom of the browser! The time taken is less if the servlet/jsp/html is found than , when the resource is not found.
Did you stop and restart the servlet engine? Before the servlet engine is fully loaded into memory, did you try to click on the 'submit' button? (Your first try! ). In this case the browser will not be able to get the resource.
I have done these (silly) things many times. Just wanted to share the experince.
If this is not the case please post the relavent code here.
regds
maha anna
[This message has been edited by maha anna (edited March 31, 2001).]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding loading of servlets
 
Similar Threads
prevent to pass parameter in the url
checkbox
executing servlets in Tomcat
How to validate user's session while accessing other pages?
setting the value to a form of html