You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Beuck, Torsten" <To...@otto.de> on 2001/02/21 16:25:35 UTC

Struts, WebLogic 6.0 and template tags

Hi, we like to use Struts with Bea WLS 6.0 for a B2B application. Currently
I am developing a prototype and the first tests under Tomcat worked fine. I
used the Struts template tags for a page design with header, navigation menu
and content. An example:

<%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %>

<template:insert template='/pageTemplate.jsp'>
  <template:put name='logo' content='/logo.jsp' />
  <template:put name='header' content='/header.jsp' />
  <template:put name='menu' content='/menu.jsp' />
  <template:put name='content' content='/content.jsp'/>
</template:insert>

Now, when I deploy the web application to WLS I get the following:

<21.02.2001 13:21:12 GMT+01:00> <Error> <HTTP>
<[WebAppServletContext(5574888,b2bweb)] Servlet failed with Exception
java.lang.NullPointerException
        at org.apache.struts.taglib.template.PutTag.hasBody(PutTag.java:198)
        at
org.apache.struts.taglib.template.PutTag.getContent(PutTag.java:181)
        at
org.apache.struts.taglib.template.PutTag.doEndTag(PutTag.java:152)
        at jsp_servlet._loginpage._jspService(_loginpage.java:111)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1127)
        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1529)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>

I tried to debug the application an it seems as if the setBodyContent()
method of class PutTag is not invoked, so that the bodyContent member
variable is null. This leads to a NullPointerException in the method
hasBody().
Is that right? Is there a workaround? I like the template tags, so i don't
want to give them up.

By the way: Is the problem described in msg01892 (PropertyResource problem
on WebLogic 6.0) fixed?

Thanks, Torsten
---------------
Torsten Beuck
OTTO Versand
Abteilung IT-SP-WQ
Wandsbeker Str. 3 - 7
22172 Hamburg

Tel.: ++49 40 6461 5351
Fax: ++49 40 6464 5351
eMail: torsten.beuck@otto.de

Re: Struts, WebLogic 6.0 and template tags

Posted by David Geary <sa...@tri-lakesonline.net>.
"Craig R. McClanahan" wrote:

> Maya Muchnik wrote:
>
> > Hello, Torsen,
> >
> > It is not an answer to your question. But I would like to use this email and
> > ask the struts development team about compatibility template library and
> > components library (http://www.lifl.fr/~dumoulin/components/). Components allow
> > to define "instances" to reuse them with different parameter values. They have
> > good examples how to use them for implementation. They do not have a "role"
> > attribute yet. Both components and templates have a lot of common. Why not
> > combine the best parts both of them and put under struts project before 1.0
> > release?
> >
>
> There is no end to good ideas for improvements to Struts, and the components
> library is one of them.  However, if we kept adding new functionality we'd never
> have a 1.0 release, and that's not good either.
>
> This is definitely high on my personal priority list to look at for 1.1.

Me too. As soon as I get my book out the door, I'll take a look at adding components
to Struts.


david (the Struts templates guy)


Re: Struts, WebLogic 6.0 and template tags

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Maya Muchnik wrote:

> Hello, Torsen,
>
> It is not an answer to your question. But I would like to use this email and
> ask the struts development team about compatibility template library and
> components library (http://www.lifl.fr/~dumoulin/components/). Components allow
> to define "instances" to reuse them with different parameter values. They have
> good examples how to use them for implementation. They do not have a "role"
> attribute yet. Both components and templates have a lot of common. Why not
> combine the best parts both of them and put under struts project before 1.0
> release?
>

There is no end to good ideas for improvements to Struts, and the components
library is one of them.  However, if we kept adding new functionality we'd never
have a 1.0 release, and that's not good either.

This is definitely high on my personal priority list to look at for 1.1.

Craig



Re: Struts, WebLogic 6.0 and template tags

Posted by Maya Muchnik <mm...@pumatech.com>.
Hello, Torsen,

It is not an answer to your question. But I would like to use this email and
ask the struts development team about compatibility template library and
components library (http://www.lifl.fr/~dumoulin/components/). Components allow
to define "instances" to reuse them with different parameter values. They have
good examples how to use them for implementation. They do not have a "role"
attribute yet. Both components and templates have a lot of common. Why not
combine the best parts both of them and put under struts project before 1.0
release?

"Beuck, Torsten" wrote:

> Hi, we like to use Struts with Bea WLS 6.0 for a B2B application. Currently
> I am developing a prototype and the first tests under Tomcat worked fine. I
> used the Struts template tags for a page design with header, navigation menu
> and content. An example:
>
> <%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %>
>
> <template:insert template='/pageTemplate.jsp'>
>   <template:put name='logo' content='/logo.jsp' />
>   <template:put name='header' content='/header.jsp' />
>   <template:put name='menu' content='/menu.jsp' />
>   <template:put name='content' content='/content.jsp'/>
> </template:insert>
>