aspose file tools*
The moose likes Websphere and the fly likes Problem in WAS 40 Deployment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Problem in WAS 40 Deployment" Watch "Problem in WAS 40 Deployment" New topic
Author

Problem in WAS 40 Deployment

Milind Naik
Greenhorn

Joined: Dec 17, 2001
Posts: 8
I am deploying iton WAS 4.0 .I get error while I deploy servlets I get error no 404..File not foound..While the JSp work fine...I guess its the problem with Path.
But I don't know what all those terms mean.
1) context..
2) Webpath..
3)Servlet name(This is instance name)..
4) Display name of servlet (I don't know what does that mean)??
Lastly What links does it bear with Document root and physical Directory structure.
I am also sending my directory structre.
RootFolder
|
|_ _ HTML FOLDER( Inside this Some Image and JavaScript folder)..
|
|_ _ JSP FOLDER
|
|_ _ Servlet Classes
|
|_ _ Beans Folder(Not EJB).
Please do the needful,
Kiran Kumar
Ranch Hand

Joined: May 18, 2001
Posts: 107
how did u deploy the servlets
did u use the Application Assembly Tool for preparing the war file???.

if u want to access ur html/jsp by giving url like http://localhost/home.html
the context web root should be just "/"
but for doing this u will have to undeploy the sample application that comes with the server.
the display name of the servlet can be anything but the url pattern for the servlet mapped should be given the way u want to call the servlet.
like /MainServlet/*;
i am putting a sample web.xml file for ur reference which was generated using Application Assembley Tool for WebSphere 4.0
<?xml version="1.0" encoding="UTF-8"?>
< !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 id="WebApp_ID">
<servlet id="Servlet_1">
<servlet-name>frontcomp</servlet-name>
<servlet-class>MainServlet</servlet-class>
<init-param id="InitParam_1">
<param-name>xmlpath</param-name>
<param-value>C:\SonnetXML\</param-value>
</init-param>
<init-param id="InitParam_2">
<param-name>xmlfile</param-name>
<param-value>Mapping.xml</param-value>
</init-param>
</servlet>
<servlet-mapping id="ServletMapping_1">
<servlet-name>frontcomp</servlet-name>
<url-pattern>/MainServlet/*</url-pattern>
</servlet-mapping>
<ejb-ref id="EjbRef_1">
<ejb-ref-name>loginfacade</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>useme.loginHome</home>
<remote>useme.login</remote>
</ejb-ref>
</web-app>
this is the application.xml generated for the ear file using the same tool
<?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
<application id="Application_ID">
<display-name>New_Application1.ear</display-name>
<module id="WebModule_1">
<web>
<web-uri>frontcomp.war</web-uri>
<context-root>/sonnet</context-root>
</web>
</module>
<module id="EjbModule_8">
<ejb>package.jar</ejb>
</module>
</application>
hope this will solve ur problem

Thanks<br /> <br />Kiran <br /> <br />SCEA, SCJP 1.4,<br /> <br />"First they ignore u, then they laugh at u, then they fight u, <br />then u will win<br /> <br />Mahatma Gandhi"
Milind Naik
Greenhorn

Joined: Dec 17, 2001
Posts: 8
Thanks kiran. Now the problem is solved.

Originally posted by kiran sonata:
how did u deploy the servlets
did u use the Application Assembly Tool for preparing the war file???.

if u want to access ur html/jsp by giving url like http://localhost/home.html
the context web root should be just "/"
but for doing this u will have to undeploy the sample application that comes with the server.
the display name of the servlet can be anything but the url pattern for the servlet mapped should be given the way u want to call the servlet.
like /MainServlet/*;
i am putting a sample web.xml file for ur reference which was generated using Application Assembley Tool for WebSphere 4.0
<?xml version="1.0" encoding="UTF-8"?>
< !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 id="WebApp_ID">
<servlet id="Servlet_1">
<servlet-name>frontcomp</servlet-name>
<servlet-class>MainServlet</servlet-class>
<init-param id="InitParam_1">
<param-name>xmlpath</param-name>
<param-value>C:\SonnetXML\</param-value>
</init-param>
<init-param id="InitParam_2">
<param-name>xmlfile</param-name>
<param-value>Mapping.xml</param-value>
</init-param>
</servlet>
<servlet-mapping id="ServletMapping_1">
<servlet-name>frontcomp</servlet-name>
<url-pattern>/MainServlet/*</url-pattern>
</servlet-mapping>
<ejb-ref id="EjbRef_1">
<ejb-ref-name>loginfacade</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>useme.loginHome</home>
<remote>useme.login</remote>
</ejb-ref>
</web-app>
this is the application.xml generated for the ear file using the same tool
<?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
<application id="Application_ID">
<display-name>New_Application1.ear</display-name>
<module id="WebModule_1">
<web>
<web-uri>frontcomp.war</web-uri>
<context-root>/sonnet</context-root>
</web>
</module>
<module id="EjbModule_8">
<ejb>package.jar</ejb>
</module>
</application>
hope this will solve ur problem

 
 
subject: Problem in WAS 40 Deployment