Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem inmy Servlets

 
Nadeem Ahmad
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I m new to servlet...
I wrote the servlet and put it in the classes directory of Jrun.And run it directly from the URL with out compiling..it is running fine..and made the class file HelloWorld.class.
Now If i do some changes in the Servlets and then trying to running it then it is whowing the old Result only.
and If I do restart the Server again then it shows the changes if there is no ERROR in the Server.
But if i left any ERROR in the Servlets and try to run it..Then it does not Show the ERROR.
It shows this message
"
Oops! We couldn't find your document.
The file that you requested could not be found on this server. "
and one more thing..I am running it by giving "http://localhost:8100/servlet/HelloWorld"
What I hv to do if want to run i from my own directory.
Thank in advance
Nadeem
 
lali virdi
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i think that after making changes you are not saving your servlet
save the servlet and then call it
it will run fine
 
Nadeem Ahmad
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am saving it after making changes..and if restart the server then it shows the changes on the brwoser.but if there is any ERROR in the servlet then it does not show any Error on the browser.
 
Satheesh Chandra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
What version of Jrun u are using??? In JRun ver 4, there is a option called Dynamically reload the class. If the Option is checked as 'Yes' then you dont need to restart the server. Or else otherwise you should load restart the server to make the effect on your new compiled class.
Satheesh Chandra....
 
Ravikumar Jambunathan
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi nadeem
and one more thing..I am running it by giving "http://localhost:8100/servlet/HelloWorld"
What I hv to do if want to run i from my own directory

you must type your context directory in the url, under which your WEB-INF/classes directory exits.
try out using this url http://localhost:8001/<context-path>/servlet/HelloWrold
good luck.
ravi.
SCJP,SCWCD
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic