What are the steps that I need to follow to deploy my servlet in WebLogic 6.1?

Samiul Karim

1. Create a folder with any name of ur choice (say MyAssignment).

2. Create inside this the structure reqd. as per Servlet 2.2 API viz.

MyAssignment
 |
 --WEB-INF
     |
     --classes

3. Place ur HTML,JSP files in MyAssignment folder(or any folder inside it but outside WEB-INF folder).

4. Place your compiled servlet class file inside classes folder (or any folder inside it. Just use packages in that case).

5. Place the web.xml and weblogic.xml files in the WEB-INF folder.

6. Edit web.xml to read as:
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
  <display-name>My Web Assignment</display-name>
  <servlet>
    <servlet-name>CounterServlet</servlet-name>
    <servlet-class>CounterServlet</servlet-class>
  </servlet>
  
  <servlet-mapping>
    <servlet-name>CounterServlet</servlet-name>
    <url-pattern>/CounterServlet/*</url-pattern>
  </servlet-mapping>

</web-app>

7. Copy the entire structure and place it inside the applications folder of Weblogic.

8. Deploy the web-app (see docs).

9. You can now access the servlet as: http://127.0.0.1:7001/MyAssignment/CounterServlet"

[You can also cd to your project directory ("MyAssignment") and use jar, as
jar cf ../myassignment.war *
Then use the WebLogic deploy tool inside the console to deploy the WAR (the console is available in http://localhost:7001/console/ -A]
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact