Showing posts with label webserver. Show all posts
Showing posts with label webserver. Show all posts

Tuesday, October 9, 2007

Deployment of Servlet in Webserver

For deploying Servlet in webserver we need to follow some rules.
The steps are

1.Create a root directory(for ex: Webapp)

2.under this directory we need to create a sub directory called WEB-INF(as it is we need to create)

3 Under WEB-INF u need to create two sub directories called (classes and lib)and one file(web.xml) called deployment descriptor.

In classes directory u need to place Servlet .class which u want to deploy. And in web.xml u need to provide the information about the servlet by using the tags

1. in this tag u need to write two subtags called Serv1and Servlet

2. in this tag u need two write two sub tags called Serv1 and /MyServ.

Using the URL pattern u will access the servlet from the browser (for ex: URL of servlet is /MyServ then in browser u will write in URL like this

http://localhost:7001/Webapp/MyServ

if it is a weblogic server.this the url of weblogic

http://localhost:7001/ (if u are using tomcat it will be differ)

I think u will get it from this how to deploy a servlet in webserverthis is the directory structure u need to follow

Webapp\WEB-INF\classes
WEB-INF\lib
WEB-INF\ web.xml

ss_blog_claim=c13f76186cf2adb148e987e774eb9d5f ss_blog_claim=c13f76186cf2adb148e987e774eb9d5f