Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty 7.0.2 Invoker issue

Jan,

Here are the steps I took:

- fresh checkout of http://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk
- built code
- extracted jetty-distribution/target/jetty-distribution-7.0.2-SNAPSHOT.zip
- uncommented
Invoker in jetty-distribution-7.0.2-SNAPSHOT/etc/webdefault.xml
- extracted
jetty-distribution-7.0.2-SNAPSHOT/webapps/test.war
- removed Hello servlet mapping from
jetty-distribution-7.0.2-SNAPSHOT/webapps/test/WEB-INF/web.xml
- changed WAR path in
jetty-distribution-7.0.2-SNAPSHOT/context/text.xml to point to "test" dir instead of "test.war"
- java -jar start.jar

A little different than what you describe but, seems like we are doing the same things.

- hit http://localhost:8080/
- clicked the "Hello World Servlet" link just to make sure it fails, and it failed as expected
- hit
http://localhost:8080/servlet/com.acme.HelloWorld, works the first time but fails any time after that

- I removed all of the filters and the one listener (since is seemed like it may load its own filter) from
jetty-distribution-7.0.2-SNAPSHOT/webapps/test/WEB-INF/web.xml

- hit http://localhost:8080/servlet/com.acme.HelloWorld, works every time

Sorry for the verbosity but I wanted to make sure I am not doing something stupid.
Tony



Jan Bartel wrote:
Tony,

I tested the Invoker servlet with jetty-7 trunk and couldn't reproduce
a problem. Let me describe what I did. I uncommented the Invoker servlet
in etc/web-defaults.xml, and then commented out the definition of the
HelloWorld servlet from webapps/test/WEB-INF/web.xml. Hitting localhost:8080/test/servlet/com.acme.HelloWorld worked properly. Note
that the web.xml defines a number of filters at /*.

Can you try doing the same and see if it works? If it does I suspect
the filters ...

cheers
Jan

Tony Thompson wrote:
I still have this issue and one other with the 7.0.2 code that I have not heard anything about.  Any chance someone can help me figure out if this is just me or if the Jetty code can be fixed?

Thanks
Tony

Tony Thompson wrote:
Some additional information...if I remove all of the filters from the context, the servlet works fine.  If I add even one filter back, it behaves the way I described below.

Tony

Tony Thompson wrote:
I am using the dynamic servlet Invoker (org.eclipse.jetty.servlet.Invoker) and I have issues with a non-mapped servlet.  The first time I request the servlet, Invoker finds and executes it.  The second and subsequent times I request the servlet, I get a 404.  I have tracked it down to this are in the Invoker code:

        String path_info = (String)request.getAttribute(Dispatcher.INCLUDE_PATH_INFO);  <--- This is always null for every request
        if (path_info==null)
            path_info=request.getPathInfo();  <--- on second and subsequent requests, this is null as well and obviously shouldn't be.
              // Get the servlet class
        String servlet = path_info;
        if (servlet==null || servlet.length()<=1 )
        {
            response.sendError(404);
            return;
        }



If I create a mapping for this servlet and use the mapping, it works every time.

Thoughts?

Thanks
Tony
 
This message (and any associated files) is intended only for the
use of the individual or entity to which it is addressed and may
contain information that is confidential, subject to copyright or
constitutes a trade secret. If you are not the intended recipient
you are hereby notified that any dissemination, copying or
distribution of this message, or files associated with this message,
is strictly prohibited. If you have received this message in error,
please notify us immediately by replying to the message and deleting
it from your computer. Messages sent to and from Stoneware, Inc.
may be monitored.

------------------------------------------------------------------------

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users
 
 
This message (and any associated files) is intended only for the
use of the individual or entity to which it is addressed and may
contain information that is confidential, subject to copyright or
constitutes a trade secret. If you are not the intended recipient
you are hereby notified that any dissemination, copying or
distribution of this message, or files associated with this message,
is strictly prohibited. If you have received this message in error,
please notify us immediately by replying to the message and deleting
it from your computer. Messages sent to and from Stoneware, Inc.
may be monitored.

------------------------------------------------------------------------

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users
 
 
This message (and any associated files) is intended only for the
use of the individual or entity to which it is addressed and may
contain information that is confidential, subject to copyright or
constitutes a trade secret. If you are not the intended recipient
you are hereby notified that any dissemination, copying or
distribution of this message, or files associated with this message,
is strictly prohibited. If you have received this message in error,
please notify us immediately by replying to the message and deleting
it from your computer. Messages sent to and from Stoneware, Inc.
may be monitored.


------------------------------------------------------------------------

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users

 
This message (and any associated files) is intended only for the
use of the individual or entity to which it is addressed and may
contain information that is confidential, subject to copyright or
constitutes a trade secret. If you are not the intended recipient
you are hereby notified that any dissemination, copying or
distribution of this message, or files associated with this message,
is strictly prohibited. If you have received this message in error,
please notify us immediately by replying to the message and deleting
it from your computer. Messages sent to and from Stoneware, Inc.
may be monitored.


Back to the top