• 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

Tomcat Not Recognizing Servlets

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good Day All,
I'd much appreciate any help with this issue. I've installed Apache and Tomcat, and the Tomcat example servlets are functioning perfectly. My projects servlets however aren't. The errors I receive are:
Exception Report:
javax.servlet.ServletException: Class pweb.UserLoginServlet is not a Servlet
at org.apache.catalina.core.StandardWrapper.load
... <snip, snip>
Root Cause:
java.lang.ClassCastException web.UserLoginServlet
at org.apache.catalina.core.StandardWrapper.load(Unknown Source)
... <snip, snip>
I'm using JDK1.3, and I've got JSDK in the WEB-INF/lib folder for my application.
Thank you all in advance,
Sylvia
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why did you put a JSDK in the WEB-INF/lib folder?
 
Sylvia H Charbonneau
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ooops. I moved it and that did it. Thanks for your help !
Sylvia
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have been having the same problem - what causes this?
My Servlet used to work until I tried to move the Servlet and associated classes into a separate jar file.
I did this because I wanted to package the servlet together with a web service in an ear file.
I now have the web service in one war file and the servlet web app in another war file, and in both war files, I specify the common jar file in the "Class-Path" property of the manifest file.
Both war files and the common jar file are assembled into an ear file with an application.xml deployment descriptor in the META-INF directory of the ear file.
Anyone know if this can work?

Thanks
Adrian Wilford
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic