Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WebLogic Server 7.0: Including another JSP from within a custom tag

0 views
Skip to first unread message

Niko Schmuck

unread,
Sep 10, 2002, 12:18:57 PM9/10/02
to
Hi all,

has anyone made experience with including (ie. processing) a dynamic
resource (JSP) from within a custom JSP tag?

Using the following code inside doEndTag():

pageContext.include("/templates/blub.jsp");

throws a ServletException (Note: the JSP is a part of the web app
which is deployed as war). Does it make a difference if the web
application is warred up into and therefore include cannot resolve the
specified relative URL?
[Tomcat 4.1.10 doesn't have problems for that matter]

The full stack trace is:

javax.servlet.ServletException: java.lang.NullPointerException
at com.foo.taglibs.template.InsertTag.doEndTag(InsertTag.java:55)
at jsp_servlet._models.__index._jspService(__index.java:774)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:945)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:332)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:376)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5360)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:721)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3043)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2468)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)

TIA,
niko.

Rajesh Mirchandani

unread,
Sep 10, 2002, 4:45:27 PM9/10/02
to
Try the same code from an exploded web app.

Niko Schmuck wrote:

--
Rajesh Mirchandani
Developer Relations Engineer
BEA Support


Niko Schmuck

unread,
Sep 11, 2002, 6:59:18 AM9/11/02
to
Rajesh Mirchandani wrote:
>
> Try the same code from an exploded web app.

Thanks for your hint. I actually have done this right after posting my
question to the newsgroup and figured out that I get the completely
same ServletException thrown. That made me think that the JSP makes
trouble which is include from the tag, and that really was the case.

Conclusion: it would be very nice (and easier to debug) if WebLogic
wouldn't hide the exception stack that arouse the problem when
PageContext.include(resourcePath) was invoked.

Cheers,
Niko.

0 new messages