• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Problem in WAS 40 Deployment

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Milind Naik
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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


 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic