Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Executing Servlet

 
Nischal Tanna
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..
I have kept my servlet class file in the location as..
/WEB-INF/classes/servlet1.class
Now..How can i execute the servlet file from the browser..
is it..
Is any mapping required to be done in th web.xml file..?
 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..
What is the context name, the folder where WEB-INF is located...??
You indeed have to make entries in web.xml to run it...
hth
MB
 
Engin Okucu
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Nischal ,
Write : http://localhost:8080/ContextName/servlet/servlet1
'ContextName' is the name of you directory in the webapps directory .
 
Nischal Tanna
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i got my answer...
I changed the web.xml settings...I created a name for my servlet and mapped the servlet with a url pattern..
neways thanx for ur replies...
regards,
Nischal
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic