This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes Executing Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Executing Servlet" Watch "Executing Servlet" New topic
Author

Executing Servlet

Nischal Tanna
Ranch Hand

Joined: Aug 19, 2003
Posts: 182
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..?


Thnx
Malhar Barai
Author
Ranch Hand

Joined: Aug 17, 2001
Posts: 399
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

Joined: Feb 09, 2002
Posts: 174
hi Nischal ,
Write : http://localhost:8080/ContextName/servlet/servlet1
'ContextName' is the name of you directory in the webapps directory .
Nischal Tanna
Ranch Hand

Joined: Aug 19, 2003
Posts: 182
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
 
 
subject: Executing Servlet