404 - servlet not found (7.0.52)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

404 - servlet not found (7.0.52)

Christoph P.U. Kukulies
I'm pulling my hairs at the moment for a servlet is not being found
which worked before.

I have a class in webapps/servlets/WEB-INF/classes/My.class and sections
in web.xml for this:

     <servlet>
         <servlet-name>My</servlet-name>
         <servlet-class>My</servlet-class>
     </servlet>

and a mapping:

     <servlet-mapping>
         <servlet-name>My</servlet-name>
         <url-pattern>/servlet/My</url-pattern>
     </servlet-mapping>


What I did last was to add another class Mytest in the same directory.
But it gave an error 404 (found later that I forgot the mapping for that
class), deleted the lines for the servlet section for that again .

I also deleted ~/work/Catalina and reverted everything back to the old
state (where only My was defined).


Now work/Catalina/localhost/servlets is empty (!?).

The invoking page is:

<!DOCTYPE html>
<html>
<frameset cols="50%,50%">
    <frame name="left" src="/servlets/servlet/My" />
    <frame name="right" />
</frameset>
</html>



I'm clueless at the moment.

--

Christoph





---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 404 - servlet not found (7.0.52)

Christoph P.U. Kukulies
Argh. I solved it. I had a dangling servlet-mapping section in my
web.xml. Weird, that tomcat doesn't report on this, or does it?

Am 01.08.2017 um 12:09 schrieb Christoph Kukulies:

> I'm pulling my hairs at the moment for a servlet is not being found
> which worked before.
>
> I have a class in webapps/servlets/WEB-INF/classes/My.class and
> sections in web.xml for this:
>
>     <servlet>
>         <servlet-name>My</servlet-name>
>         <servlet-class>My</servlet-class>
>     </servlet>
>
> and a mapping:
>
>     <servlet-mapping>
>         <servlet-name>My</servlet-name>
>         <url-pattern>/servlet/My</url-pattern>
>     </servlet-mapping>
>
>
> What I did last was to add another class Mytest in the same directory.
> But it gave an error 404 (found later that I forgot the mapping for
> that class), deleted the lines for the servlet section for that again .
>
> I also deleted ~/work/Catalina and reverted everything back to the old
> state (where only My was defined).
>
>
> Now work/Catalina/localhost/servlets is empty (!?).
>
> The invoking page is:
>
> <!DOCTYPE html>
> <html>
> <frameset cols="50%,50%">
>    <frame name="left" src="/servlets/servlet/My" />
>    <frame name="right" />
> </frameset>
> </html>
>
>
>
> I'm clueless at the moment.
>
> --
>
> Christoph
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 404 - servlet not found (7.0.52)

zemiandeng
Tomcat should emit a parse error during deployment / startup of your
application something like

"SEVERE [localhost-startStop-1]
org.apache.tomcat.util.descriptor.web.WebXmlParser.parseWebXml Parse error
in application web.xml"

However the Tomcat server itself will continue to load and run. It just
that your webapp alone will failed to deploy.


On Tue, Aug 1, 2017 at 6:39 AM, Christoph Kukulies <[hidden email]>
wrote:

> Argh. I solved it. I had a dangling servlet-mapping section in my web.xml.
> Weird, that tomcat doesn't report on this, or does it?
>
>
> Am 01.08.2017 um 12:09 schrieb Christoph Kukulies:
>
>> I'm pulling my hairs at the moment for a servlet is not being found which
>> worked before.
>>
>> I have a class in webapps/servlets/WEB-INF/classes/My.class and sections
>> in web.xml for this:
>>
>>     <servlet>
>>         <servlet-name>My</servlet-name>
>>         <servlet-class>My</servlet-class>
>>     </servlet>
>>
>> and a mapping:
>>
>>     <servlet-mapping>
>>         <servlet-name>My</servlet-name>
>>         <url-pattern>/servlet/My</url-pattern>
>>     </servlet-mapping>
>>
>>
>> What I did last was to add another class Mytest in the same directory.
>> But it gave an error 404 (found later that I forgot the mapping for that
>> class), deleted the lines for the servlet section for that again .
>>
>> I also deleted ~/work/Catalina and reverted everything back to the old
>> state (where only My was defined).
>>
>>
>> Now work/Catalina/localhost/servlets is empty (!?).
>>
>> The invoking page is:
>>
>> <!DOCTYPE html>
>> <html>
>> <frameset cols="50%,50%">
>>    <frame name="left" src="/servlets/servlet/My" />
>>    <frame name="right" />
>> </frameset>
>> </html>
>>
>>
>>
>> I'm clueless at the moment.
>>
>> --
>>
>> Christoph
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Loading...