Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem in running servlets  RSS feed

 
shabbir zakir
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi!
as stated in the documents i stored all my class filesin C:\jsdk2.1\examples\web-inf\serevlets. But i ma not able to execute this file through the webbrowser. please explain me how to start servlets in the the web-browser.it will be great if explained in detail
 
vaibhav punekar
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Shabbir,
For running servlets you need to register them in the properties file.I think JSDK and Tomcat have similar directory structure.
So there will be "Servlet.properties" file in which you will find the servlets registered You need to register additional servlets there.
Suppose your servlet class is "MyServlet"So you will he to give any "alias" name to refer to this class file.So
myserv=MyServlet
Then only your server will recognize this servlet class.
 
shabbir zakir
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks vaibhav for your reply.
But i did the same thing but agin it is giving me the same error.Now wht to do? tahnks in advance
 
Maky Chopra
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please be specific about the error that you get and about how you tried to invoke it via your browser
 
shabbir zakir
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it says whether to connect the page offline or online. when i choose offline it says server not found.
 
Maky Chopra
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has nothing to do with servlets.. You have to be "online" (not necessarily connected to the internet) in IE to be even able to browse intranet sites.
Once you start tomcat, can you browse http://localhost:8080 fine or not ?
 
shabbir zakir
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tahnks for your reply.yes i can browse pages http://localhost:8080 .it doesn't ask me for online or offline
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!