• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding loading of servlets

 
Gaurav Chikara
Ranch Hand
Posts: 412
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 412
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic