• Post Reply Bookmark Topic Watch Topic
  • New Topic

web.xml configuration Problem

 
Pawan Rawal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • 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
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
410
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
qingwu wang
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
 
Pawan Rawal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your advice
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!