• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

web.xml configuration Problem

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All

I am facing problem in Websphere 5.1, in my web application all servlets are packaged in jar file which i put in wed-inf\lib folder. In web.xml i mentioned about servlet and its mapping.But, i am getting error 404. when i call servleteither by Servlet name or through package.

Pls. help me in this. or tell me some ref. example which i can download and test.

Regards
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now on to your question. Can I assume "wed-inf\lib" has "WEB-INF" as a typo just in this post and not in your configuration.

Are there any error messages in the WebSphere console?
 
Pawan Rawal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jeanne for suggesting for Name change which i already done to Pawan Rawal.

It is WEB-INF, the problem which i am facing, how to configure servlets which are lying in WEB-INF\lib as jar files.

The steps i followed e.g as follows:-


1.Compile my servlets and packaging in jar format through jbuilder
2.Put jar in WEB-INF\lib
3.Configure web.xml file as follows (in ServLib.jar contains EcomPrintServlet class)

<servlet>
<servlet-name>/EcomPrint</servlet-name>
<init-param>
<param-name>initParam1</param-name>
<param-value>value1</param-value></init-param>
<init-param>
<param-name>initParam2</param-name>
<param-value>value2</param-value></init-param>
<servlet-class>ServLib.EcomPrintServlet</servlet-class>
<display-name />
<description /></servlet>

<servlet-mapping>
<url-pattern>/EcomPrint</url-pattern>
<servlet-name>ServLib.EcomPrintServlet</servlet-name></servlet-mapping>


Error which i face at the time of running Websphere App Server Error Creating Component Null : Open Failure.

First tell me about my approach and what error i am doing. This is working fine with JRun 4.0

Regards

Pawan Rawal
 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey,which package is your servlet class in?Don't use your jar package name.for example,my servlet class com.bestone.app.TestServlet in my app.jar, <servlet-class>com.bestone.TestServlet</servlet-class>not<servlet-class>app.TestServlet</servlet-class>.
 
qingwu wang
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Pawan Rawal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your advice
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic