in web.xml please confirm these entries-

    <servlet>
        <servlet-name>HelloWorldExample</servlet-name>
        <servlet-class>HelloWorldExample</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>HelloWorldExample</servlet-name>
        <url-pattern>/servlet/HelloWorldExample</url-pattern>
    </servlet-mapping>

M-
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "Mark Eggers" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Thursday, August 24, 2006 11:54 PM
Subject: Re: Apache 5.5 HelloWorldExample 404 error


> If you're talking about the regular Hello World
> example in :
> 
> http://localhost:8080/servlets-examples/servlet/HelloWorldExample
> 
> I don't know why it wouldn't work.  I have a very
> vanilla Tomcat 5.5.17 install on Windows/2000
> Professional with JDK 1.5.0_08 (just rebuilt the
> system), and everything works out of the box.
> 
> What changes have you made to the stock Tomcat?  Can
> you install a completely changed Tomcat somewhere and
> see what happens?
> 
> I don't use the invoker servlet.  I edit the web
> application's web.xml and reload the application or
> build another war file and upgrade the application.
> 
> That way when I go to production, there are no
> surprises - like forgetting a servlet definition in
> web.xml and wondering why things don't work . . . .
> 
> Just some random thoughts . . . .
> 
> /mde/
> 
> --- David Smith <[EMAIL PROTECTED]> wrote:
> 
>> My only guess is packageless classes are not
>> officially supported.  
>> Reality is packageless classes sometime work and
>> sometimes not.  If it 
>> were in a package, it */might/* work.
>> 
>> --David
>> 
>> Steve Willett (Initiative Computing) wrote:
>> 
>> >Thanks, David, that seems to have got it.
>> >
>> >Any idea why the default "Hello World (down one)"
>> example is not working?
>> >
>> >Steve 
>> >
>> >-----Original Message-----
>> >From: David Smith [mailto:[EMAIL PROTECTED] 
>> >Sent: Thursday, August 24, 2006 10:59 AM
>> >To: Tomcat Users List
>> >Subject: Re: Apache 5.5 HelloWorldExample 404 error
>> >
>> >We have a winner.  Take a look at
>> >http://faq.javaranch.com/view?InvokerServlet.
>> >
>> >The form tag should be:
>> >
>> ><form
>> action="servlet/elsewise.ui.user.LoginServlet"
>> method=POST>
>> >
>> >
>> >If the package of LoginServlet.class is
>> elsewise.ui.user.
>> >
>> >--David
>> >
>> >Steve Willett (Initiative Computing) wrote:
>> >
>> >  
>> >
>> >>Thanks again, David.
>> >>
>> >>Since I restarted, the localhost log has:
>> >>
>> >> Aug 24, 2006 9:31:17 AM
>> org.apache.catalina.core.ApplicationContext
>> >>log
>> >> SEVERE: Error loading WebappClassLoader
>> >>   delegate: false
>> >>   repositories:
>> >>     /WEB-INF/classes/
>> >> ----------> Parent Classloader:
>> >>
>>
> [EMAIL PROTECTED]
>> >> ui
>> >> java.lang.ClassNotFoundException: ui
>> >> ... 
>> >> Aug 24, 2006 9:31:17 AM
>> org.apache.catalina.core.ApplicationContext
>> >>log
>> >> SEVERE: invoker: Cannot allocate servlet instance
>> for path 
>> >>/elsewise/servlet/ui/user/LoginServlet
>> >> javax.servlet.ServletException: Wrapper cannot
>> find servlet class ui
>> >>    
>> >>
>> >
>> >  
>> >
>> >>or a class it depends on
>> >> ...
>> >>
>> >>And
>> >>
>> >> Aug 24, 2006 9:32:00 AM
>> org.apache.catalina.core.ApplicationContext
>> >>log
>> >> SEVERE: Error loading WebappClassLoader
>> >>   delegate: false
>> >>   repositories:
>> >>     /WEB-INF/classes/
>> >> ----------> Parent Classloader:
>> >>
>>
> [EMAIL PROTECTED]
>> >> elsewise
>> >> java.lang.ClassNotFoundException: elsewise
>> >> ...
>> >> Aug 24, 2006 9:32:00 AM
>> org.apache.catalina.core.ApplicationContext
>> >>log
>> >> SEVERE: invoker: Cannot allocate servlet instance
>> for path 
>> >>/elsewise/servlet/elsewise/ui/user/LoginServlet
>> >> javax.servlet.ServletException: Wrapper cannot
>> find servlet class 
>> >>elsewise or a class it depends on
>> >> ...
>> >>
>> >>However, I shut Tomcat down again, restarted it,
>> and tried to access 
>> >>the "Hello World (down one)" Servlet Example from
>> the default Tomcat home
>> >>    
>> >>
>> >page.
>> >  
>> >
>> >>I got no error messages in the log, even though it
>> still gives me the 
>> >>404, not found error.
>> >>
>> >>So I guess these two 404 errors are from a
>> different cause?
>> >>
>> >>Steve
>> >>
>> >>-----Original Message-----
>> >>From: David Smith [mailto:[EMAIL PROTECTED]
>> >>Sent: Thursday, August 24, 2006 10:03 AM
>> >>To: Tomcat Users List
>> >>Subject: Re: Apache 5.5 HelloWorldExample 404
>> error
>> >>
>> >>Ok.
>> >>
>> >>Have you taken a look at the logs generated by
>> tomcat from startup 
>> >>through the request?  May have some insight as to
>> what's happening (or 
>> >>not happening).
>> >>
>> >>--David
>> >>
>> >>Steve Willett (Initiative Computing) wrote:
>> >>
>> >> 
>> >>
>> >>    
>> >>
>> >>>David, thanks for your quick response to my post!
>> >>>
>> >>>My reading of the dire warnings about enabling
>> the invoker servlet 
>> >>>lead me to believe that I should not do so in a
>> production environment.
>> >>>However, this is a development environment, and I
>> don't want to have 
>> >>>to modify a web.xml file every time I create a
>> new Servlet class.  Am 
>> >>>I reading this wrong?
>> >>>
>> >>>As to the problem - my servlet was in package
>> "elsewise.ui.user" (not
>> >>>"ui.user") and my class file was in the directory
>> you specified.
>> >>>
>> >>>I just tried moving the class tree down one
>> level:
>> >>>
>> >>>
>>
> webapps/elsewise/WEB-INF/classes/elsewise/ui/user/LoginServlet.class
>> >>>
>> >>>and changed the form tag to:
>> >>>
>> >>>    <form
>> action="servlet/elsewise/ui/user/LoginServlet"
>> method=POST>
>> >>>
>> >>>I got a similar error:
>> >>>
>> >>> The requested resource
>> >>>(/elsewise/servlet/elsewise/ui/user/LoginServlet)
>> is not available.
>> >>>
>> >>>In my original post I pointed out that I was
>> having a similar problem 
>> >>>with the default Tomcat home page "Hello World"
>> example.  Since I did 
>> >>>not change the location of these files from the
>> original installation, 
>> >>>I assume there is a configuration error.  If I
>> get that working, I can 
>> >>>compare my attempts to set up my own application
>> to that example.
>> >>>
>> >>>Any thoughts?  
>> >>>
>> >>>Steve
>> >>>
>> >>>-----Original Message-----
>> >>>From: David Smith [mailto:[EMAIL PROTECTED]
>> >>>Sent: Thursday, August 24, 2006 4:24 AM
>> >>>To: Tomcat Users List
>> >>>Subject: Re: Apache 5.5 HelloWorldExample 404
>> error
>> >>>
>> >>>I won't comment (too much) on the implications of
>> enabling the invoker 
>> 
> === message truncated ===
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Reply via email to