aspose file tools*
The moose likes Tomcat and the fly likes New Wep app servlets don't work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "New Wep app servlets don Watch "New Wep app servlets don New topic
Author

New Wep app servlets don't work

Nick Delauney
Ranch Hand

Joined: Sep 28, 2002
Posts: 43
Hello all,
I need some help with a new webapp(JMOVIES) I installed.
Some background:
-------------------------------------------------
Im using Tomcat4.1.29 with j2sdk1.4.2_03
I had everything working fine under my friends JRUN Server.
I copied the directory structure to tomcat/webapps/
I have no web.xml file (didn't think i needed one because of the default mapping)
Started tomcat ...

All the jsp's work under tomcat/webapps/JMOVIES/ but for some reason the servlets don't work. So I figured, why not copy HelloWorldExample into the
WEB-INF/classes directory, restart tomcat and see If that works.
Hello world does not work
Everything works fine for tomcats index example servlets and jsp's
Is there something I'm missing here ?
Why would my jsp's work but not my servlets ?
Below is an example of the return I get after entering http://localhost:8080/JMOVIES/servlet/HelloWorldExample
----------------------------------------------------------
HTTP Status 404 - /JMOVIES/servlet/HelloWorldExample
--------------------------------------------------------------------------------
type Status report
message /JMOVIES/servlet/HelloWorldExample
description The requested resource (/JMOVIES/servlet/HelloWorldExample) is not available.

--------------------------------------------------------------------------------
Apache Tomcat/4.1.29

Any help on this would be appreciated.
Thank you,


N.D:"Anything worth having, takes time to get"
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
This is probably the well known "invoker" servlet problem. Do a search for "invoker" here to see lots of horror stories. In the default web.xml found in the conf directory, you will find a set of comments and instructions.
This handy FAQ would be a good place to start.
Bill
[ January 24, 2004: Message edited by: William Brogden ]
Nick Delauney
Ranch Hand

Joined: Sep 28, 2002
Posts: 43
Thanks
I uncommented this area
----------------------------------
<!-- The mapping for the invoker servlet -->
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
---------------------------------------
Now I get error 500 messages.
I Tried copying HelloWorldExample and then
RequestServerInfo from examples and get this response for both.
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.util.MissingResourceException: Can't find bundle for base name LocalStrings, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:511)
at RequestInfoExample.(RequestInfoExample.java:22)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:903)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:416)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
at java.lang.Thread.run(Thread.java:534)

Does anyone have any suggestions ?
Thank You
Nick Delauney
Ranch Hand

Joined: Sep 28, 2002
Posts: 43
Well, I got it on my own.
Can't just copy a class that refers to a non existing resource bundle.
everything works now.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: New Wep app servlets don't work