[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

servlets not found on second load

hi I am moving over from jetty 4.2 to jetty 6.1.0 embeded web server -  and in my web.xml I am using the following bit of xml

    <servlet>
        <servlet-name>invoker</servlet-name>
        <servlet-class>org.mortbay.jetty.servlet.Invoker</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>invoker</servlet-name>
        <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>


According to everything I read this should allow dynamic loading of all my servlets

BUT IT DOESNT !!!!

All my servlets work first time but some appear as error 404 when I try to reload them.


This is what I have tried.

Servlet A works
Servlet B does not
Copyy Servlet A over Servlet B - Change class name to Servlet A
recompile
No effect.

All my servlets live in the same directory.
Some servlets use POSt, some use GET , some use Ajax but the ones that do not work have nothing specifically in common.

Some Ajax work
Some POST work
some GET work


I seem to be able to statically add certain servlets in my web.xml and that solves some of them BUT not others and I am running out of ideas what this could be

Does anyone know why this could be.

All answers apreciatcted.
0
WhatIsTheJava
Asked:
WhatIsTheJava
  • 5
  • 4
1 Solution
 
matthew016Commented:
Did you declared all your servlets in the config ?
0
 
WhatIsTheJavaAuthor Commented:
Sorry, what config ?

Have not done that for any of my servlets
0
 
matthew016Commented:
For invoker servlet you did :

    <servlet>
        <servlet-name>invoker</servlet-name>
        <servlet-class>org.mortbay.jetty.servlet.Invoker</servlet-class>
    </servlet>


Do the same for the other servlets
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
WhatIsTheJavaAuthor Commented:
in reply to 2
I did that and it works if I do that BUT the invoker class should allow me not to have to specify each servlet individually.

Really looking for the reason some servlets worked and others did not ?

0
 
matthew016Commented:
Where di you have this information ?
Let me take a look ?
0
 
WhatIsTheJavaAuthor Commented:

The servlets are in the web.xml

See below
    <servlet>
        <servlet-name>SurveyBinningServlet</servlet-name>
        <servlet-class>SurveyBinningServlet</servlet-class>
    </servlet>

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

    <servlet>
        <servlet-name>invoker</servlet-name>
        <servlet-class>org.mortbay.jetty.servlet.Invoker</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>invoker</servlet-name>
        <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>


I thought the invoker should prevent me from having to list my servlets as above ?

0
 
matthew016Commented:
No, I have never heard about this anywhere.
0
 
WhatIsTheJavaAuthor Commented:
Ok well its working if I list all my servlets but this is a new change in jetty 6.1.5 as jetty 4 I did not need to list my servlets.

Seems a step back for jetty ?

0
 
mrcoffee365Commented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup Zone:
Accept matthew016 comment as answer.

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

mrcoffee365 Experts Exchange Cleanup Volunteer
0
 
matthew016Commented:
Sorry, didn't see your reply,

For further details try their mailing list.

http://www.nabble.com/Jetty-Support-f61.html
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now