JETTY PROBLEM IN FORWARDING FROM A SERVLET TO A JSP, WHEN JSP CONTAINS JSTL-XML-TAGS

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

JETTY PROBLEM IN FORWARDING FROM A SERVLET TO A JSP, WHEN JSP CONTAINS JSTL-XML-TAGS

tengelmann
Messagehallo, I'm using the newest Jetty5-Version,
here is the line of my forwarding navigation-servlet:
###############
getServletContext().getRequestDispatcher("/frame.jsp").forward(request, response);
###############

here is frame.jsp
###############
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/xml"  prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn" %>
<html>
<x:parse varDom="doc">
    <users>
        <user id="997">
            <first-name>George</first-name>
            <last-name>Burdell</last-name>
        </user>
        <user id="998">
            <first-name>Joseph</first-name>
            <last-name>Blough</last-name>
        </user>
    </users>
</x:parse>
<h1>First name of user 997 is <x:out select="$doc//user[@id=997]/first-name" /></h1>
<hr>
<hr>
  </body>
</html>
###################

if I call:
http://myApplicationBaseURL/frame.jsp
everything is fine,

but if I use the Servlet:
http://myApplicationBaseURL/my-navigation-servlet?path=index
then I receive the following error:

############################
2005-12-09 12:56:09 P1-19 ERROR org.mycore.frontend.jsp.TestServlet - catched er
ror:
javax.servlet.ServletException: javax.servlet.jsp.JspTagException: org.apache.ta
glibs.standard.tag.common.xml.UnresolvableException: $requestScope:javax.servlet
.forward.path_info
        at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageC
ontextImpl.java:821)
        at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon
textImpl.java:758)
        at org.apache.jsp.frame_jsp._jspService(frame_jsp.java:77)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:324)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
92)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428
)
        at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:473)
        at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:286)
        at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:171)
        at org.mycore.frontend.jsp.TestServlet.doGetPost(TestServlet.java:19)
        at org.mycore.frontend.servlets.MCRServlet.doGet(MCRServlet.java:118)
        at org.mycore.frontend.servlets.MCRServlet.doGetPost(MCRServlet.java:244
)
        at org.mycore.frontend.servlets.MCRServlet.doGet(MCRServlet.java:114)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428
)
        at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:473)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
68)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
        at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
Context.java:633)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
        at org.mortbay.http.HttpServer.service(HttpServer.java:909)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
244)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
####################################

Can anybody help me, in Tomcat everything works fine...

greetings, dieter


--
Reply | Threaded
Open this post in threaded view
|

Re: JETTY PROBLEM IN FORWARDING FROM A SERVLET TO A JSP, WHEN JSP CONTAINS JSTL-XML-TAGS

Greg Wilkins-5

Hi,

I believe this is problem is probably a jakarta jasper issue.

It is legal for javax.servlet.forward.path_info to be null and it
is null because your match is exact /my-navigation-servlet

Try

  http://myApplicationBaseURL/my-navigation-servlet/info?path=index

and see if that works.

It may be an issue that Jetty lists this attribute in the
attribute names, but provides a null value.  Again I think this
is legal.   I'll create a patch that does not do this and see if this
helps.

regards




[hidden email] wrote:

> hallo, I'm using the newest Jetty5-Version,
> here is the line of my forwarding navigation-servlet:
> ###############
> getServletContext().getRequestDispatcher("/frame.jsp").forward(request, response);
> ###############
>
> here is frame.jsp
> ###############
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/xml"  prefix="x" %>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn" %>
> <html>
> <x:parse varDom="doc">
>     <users>
>         <user id="997">
>             <first-name>George</first-name>
>             <last-name>Burdell</last-name>
>         </user>
>         <user id="998">
>             <first-name>Joseph</first-name>
>             <last-name>Blough</last-name>
>         </user>
>     </users>
> </x:parse>
> <h1>First name of user 997 is <x:out select="$doc//user[@id=997]/first-name" /></h1>
> <hr>
> <hr>
>   </body>
> </html>
> ###################
>
> if I call:
> http://myApplicationBaseURL/frame.jsp 
> everything is fine,
>
> but if I use the Servlet:
> http://myApplicationBaseURL/my-navigation-servlet?path=index
> then I receive the following error:
>
> ############################
> 2005-12-09 12:56:09 P1-19 ERROR org.mycore.frontend.jsp.TestServlet - catched er
> ror:
> javax.servlet.ServletException: javax.servlet.jsp.JspTagException: org.apache.ta
> glibs.standard.tag.common.xml.UnresolvableException: $requestScope:javax.servlet
> .forward.path_info
>         at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageC
> ontextImpl.java:821)
>         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon
> textImpl.java:758)
>         at org.apache.jsp.frame_jsp._jspService(frame_jsp..java:77)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
> .java:324)
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
> 92)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428
> )
>         at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
> onHandler.java:473)
>         at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:286)
>         at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:171)
>         at org.mycore.frontend.jsp.TestServlet.doGetPost(TestServlet.java:19)
>         at org.mycore.frontend.servlets.MCRServlet.doGet(MCRServlet.java:118)
>         at org.mycore.frontend.servlets.MCRServlet.doGetPost(MCRServlet.java:244
> )
>         at org.mycore.frontend.servlets.MCRServlet.doGet(MCRServlet.java:114)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428
> )
>         at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
> onHandler.java:473)
>         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
> 68)
>         at org.mortbay.http.HttpContext..handle(HttpContext.java:1530)
>         at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
> Context.java:633)
>         at org..mortbay.http.HttpContext.handle(HttpContext.java:1482)
>         at org.mortbay.http.HttpServer.service(HttpServer.java:909)
>         at org.mortbay..http.HttpConnection.service(HttpConnection.java:816)
>         at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
>         at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
>         at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
> 244)
>         at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
>         at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
> ####################################
>
> Can anybody help me, in Tomcat everything works fine...
>
> greetings, dieter
>
>
> 1 Million Singles in Ihrer Nahe. Finden Sie Ihren Traumpartner
> bei Deutschlands beliebtester Partnerboerse:
> http://singles.freenet.de/index.html?pid=11512
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: JETTY PROBLEM IN FORWARDING FROM A SERVLET TO A JSP, WHEN JSP CONTAINS JSTL-XML-TAGS

Greg Wilkins-5
In reply to this post by tengelmann

OK,

there is a patch in CVS that does not list null attributes in the
attributes name list.  Perhaps this will help?  Can you try with
your application.

thanks


[hidden email] wrote:

> hallo, I'm using the newest Jetty5-Version,
> here is the line of my forwarding navigation-servlet:
> ###############
> getServletContext().getRequestDispatcher("/frame.jsp").forward(request, response);
> ###############
>
> here is frame.jsp
> ###############
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/xml"  prefix="x" %>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn" %>
> <html>
> <x:parse varDom="doc">
>     <users>
>         <user id="997">
>             <first-name>George</first-name>
>             <last-name>Burdell</last-name>
>         </user>
>         <user id="998">
>             <first-name>Joseph</first-name>
>             <last-name>Blough</last-name>
>         </user>
>     </users>
> </x:parse>
> <h1>First name of user 997 is <x:out select="$doc//user[@id=997]/first-name" /></h1>
> <hr>
> <hr>
>   </body>
> </html>
> ###################
>
> if I call:
> http://myApplicationBaseURL/frame.jsp 
> everything is fine,
>
> but if I use the Servlet:
> http://myApplicationBaseURL/my-navigation-servlet?path=index
> then I receive the following error:
>
> ############################
> 2005-12-09 12:56:09 P1-19 ERROR org.mycore.frontend.jsp.TestServlet - catched er
> ror:
> javax.servlet.ServletException: javax.servlet.jsp.JspTagException: org.apache.ta
> glibs.standard.tag.common.xml.UnresolvableException: $requestScope:javax.servlet
> .forward.path_info
>         at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageC
> ontextImpl.java:821)
>         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon
> textImpl.java:758)
>         at org.apache.jsp.frame_jsp._jspService(frame_jsp..java:77)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
> .java:324)
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
> 92)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428
> )
>         at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
> onHandler.java:473)
>         at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:286)
>         at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:171)
>         at org.mycore.frontend.jsp.TestServlet.doGetPost(TestServlet.java:19)
>         at org.mycore.frontend.servlets.MCRServlet.doGet(MCRServlet.java:118)
>         at org.mycore.frontend.servlets.MCRServlet.doGetPost(MCRServlet.java:244
> )
>         at org.mycore.frontend.servlets.MCRServlet.doGet(MCRServlet.java:114)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428
> )
>         at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
> onHandler.java:473)
>         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
> 68)
>         at org.mortbay.http.HttpContext..handle(HttpContext.java:1530)
>         at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
> Context.java:633)
>         at org..mortbay.http.HttpContext.handle(HttpContext.java:1482)
>         at org.mortbay.http.HttpServer.service(HttpServer.java:909)
>         at org.mortbay..http.HttpConnection.service(HttpConnection.java:816)
>         at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
>         at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
>         at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
> 244)
>         at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
>         at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
> ####################################
>
> Can anybody help me, in Tomcat everything works fine...
>
> greetings, dieter
>
>
> 1 Million Singles in Ihrer Nahe. Finden Sie Ihren Traumpartner
> bei Deutschlands beliebtester Partnerboerse:
> http://singles.freenet.de/index.html?pid=11512
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: JETTY PROBLEM IN FORWARDING FROM A SERVLET TO A JSP, WHEN JSP CONTAINS JSTL-XML-TAGS

tengelmann
Greg Wilkins <gregw <at> mortbay.com> writes:

>
>
> OK,
>
> there is a patch in CVS that does not list null attributes in the
> attributes name list.  Perhaps this will help?  Can you try with
> your application.
>
> thanks
>

hallo greg,

it seems, that now everything works fine...
thank you very much...

CU, dieter




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support