You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dave <sn...@gmail.com> on 2007/08/04 00:07:49 UTC

Problems migrating Roller to Struts 2.0.9

We've been on Struts 2.0.6 and a Tiles 2.0 pre-release
(2.0-20070207.130156-4) for a while now in the Roller trunk. After
seeing the recent news about XSS dangers we decided to upgrade to
2.0.9. before we make our next release.

So I downloaded 2.0.9. First, I found that the old Tiles listener
"org.apache.tiles.listener.TilesListener" is gone. After some
googling, I changed the listener to this:

    <listener>
        <listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
    </listener>

That worked and once I made that change, Tomcat was able to deploy
Roller. I could view blog pages, but when I tried to access a Struts
page I got this error in the logs (on a page that worked perfectly
before the upgrade). And the page is unable to find any of its tiles.

DEBUG 2007-08-03 17:34:03,725 BasicTilesContainer:render - Dispatching
to definition path '/WEB-INF/jsps/tiles/tiles-simplepage.jsp '
ERROR 2007-08-03 17:34:05,180 RoleSecurityTagSupport:doEndTag - Error
executing tag: Attribute 'head' not found.
org.apache.tiles.TilesException: Attribute 'head' not found.
        at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:112)
        at org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport.java:171)
...

After some more googling and gnashing of teeth, I tried changing the
root package in my Struts config file to extend "tiles-default"
instead of "struts-default" like so:

<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
    <!-- Weblogger default package -->
    <package name="weblogger" namespace="/roller-ui" extends="tiles-default">
...

But I got the same result.

Any idea what I might be doing wrong?

- Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problems migrating Roller to Struts 2.0.9

Posted by Antonio Petrelli <an...@gmail.com>.
2007/8/5, Dave <sn...@gmail.com>:
> On 8/4/07, Antonio Petrelli <an...@gmail.com> wrote:
> > > So I downloaded 2.0.9. First, I found that the old Tiles listener
> > > "org.apache.tiles.listener.TilesListener" is gone.
> >
> > Wrong, it has been renamed to org.apache.tiles.web.startup.TilesListener.
>
> Thanks. I changed my web.xml accordingly. Unfortunately that did not
> fix the problem.
>
>
> > > DEBUG 2007-08-03 17:34:03,725 BasicTilesContainer:render - Dispatching
> > > to definition path '/WEB-INF/jsps/tiles/tiles-simplepage.jsp '
> > > ERROR 2007-08-03 17:34:05,180 RoleSecurityTagSupport:doEndTag - Error
> > > executing tag: Attribute 'head' not found.
> >
> > Err... did you upgrade your Tiles definitions files and JSP pages?
>
> Yes.

I meant, did you upgrade the Tiles definition files and JSP pages to
the final version?
I noticed that you used an old version of the Tiles 2.0 definition files DTD.
See the new structure at:
http://tiles.apache.org/framework/tiles-core/dtddoc/index.html
and
http://tiles.apache.org/framework/tiles-jsp/tlddoc/index.html

HTH
Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problems migrating Roller to Struts 2.0.9

Posted by Dave <sn...@gmail.com>.
Thanks to Antonio and Elias, Roller is now working fine with Struts 2.0.9.

- Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problems migrating Roller to Struts 2.0.9

Posted by eliasthayer <el...@gmail.com>.
I ran into the same problem and was able to resolve it by changing the <put>
tags to <put-attribute> in my tiles.xml file.


Dave Johnson-8 wrote:
> 
> On 8/4/07, Antonio Petrelli <an...@gmail.com> wrote:
>> > So I downloaded 2.0.9. First, I found that the old Tiles listener
>> > "org.apache.tiles.listener.TilesListener" is gone.
>>
>> Wrong, it has been renamed to org.apache.tiles.web.startup.TilesListener.
> 
> Thanks. I changed my web.xml accordingly. Unfortunately that did not
> fix the problem.
> 
> 
>> > DEBUG 2007-08-03 17:34:03,725 BasicTilesContainer:render - Dispatching
>> > to definition path '/WEB-INF/jsps/tiles/tiles-simplepage.jsp '
>> > ERROR 2007-08-03 17:34:05,180 RoleSecurityTagSupport:doEndTag - Error
>> > executing tag: Attribute 'head' not found.
>>
>> Err... did you upgrade your Tiles definitions files and JSP pages?
> 
> Yes.
> 
> We migrated to Tiles 2.0 a couple of months ago using a Tiles
> 2.0-20070207.130156-4 (a snapshot release?) and things have been
> working fine until now when we try to upgrade to Struts 2.0.9. The
> problem is migrating from Tiles 2.0-20070207.130156-4 to Tiles 2.0.
> 
> We already converted our tiles.xml file over and the log files
> indicate that it is being loaded. We also migrated our JSP pages over.
> 
> Here are the JSP pages involved in the error above:
> * tiles.xml file: http://tinyurl.com/2o4cyr
> * tiles-simplepage.jsp http://tinyurl.com/2dr8g4
> * login.jsp - http://tinyurl.com/yp5cut
> 
> Any other ideas what I might be dong wrong?
> 
> - Dave
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problems-migrating-Roller-to-Struts-2.0.9-tf4214987.html#a12025215
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problems migrating Roller to Struts 2.0.9

Posted by Dave <sn...@gmail.com>.
On 8/4/07, Antonio Petrelli <an...@gmail.com> wrote:
> > So I downloaded 2.0.9. First, I found that the old Tiles listener
> > "org.apache.tiles.listener.TilesListener" is gone.
>
> Wrong, it has been renamed to org.apache.tiles.web.startup.TilesListener.

Thanks. I changed my web.xml accordingly. Unfortunately that did not
fix the problem.


> > DEBUG 2007-08-03 17:34:03,725 BasicTilesContainer:render - Dispatching
> > to definition path '/WEB-INF/jsps/tiles/tiles-simplepage.jsp '
> > ERROR 2007-08-03 17:34:05,180 RoleSecurityTagSupport:doEndTag - Error
> > executing tag: Attribute 'head' not found.
>
> Err... did you upgrade your Tiles definitions files and JSP pages?

Yes.

We migrated to Tiles 2.0 a couple of months ago using a Tiles
2.0-20070207.130156-4 (a snapshot release?) and things have been
working fine until now when we try to upgrade to Struts 2.0.9. The
problem is migrating from Tiles 2.0-20070207.130156-4 to Tiles 2.0.

We already converted our tiles.xml file over and the log files
indicate that it is being loaded. We also migrated our JSP pages over.

Here are the JSP pages involved in the error above:
* tiles.xml file: http://tinyurl.com/2o4cyr
* tiles-simplepage.jsp http://tinyurl.com/2dr8g4
* login.jsp - http://tinyurl.com/yp5cut

Any other ideas what I might be dong wrong?

- Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problems migrating Roller to Struts 2.0.9

Posted by Antonio Petrelli <an...@gmail.com>.
2007/8/4, Dave <sn...@gmail.com>:
> We've been on Struts 2.0.6 and a Tiles 2.0 pre-release
> (2.0-20070207.130156-4) for a while now in the Roller trunk. After
> seeing the recent news about XSS dangers we decided to upgrade to
> 2.0.9. before we make our next release.
>
> So I downloaded 2.0.9. First, I found that the old Tiles listener
> "org.apache.tiles.listener.TilesListener" is gone.

Wrong, it has been renamed to org.apache.tiles.web.startup.TilesListener.


> DEBUG 2007-08-03 17:34:03,725 BasicTilesContainer:render - Dispatching
> to definition path '/WEB-INF/jsps/tiles/tiles-simplepage.jsp '
> ERROR 2007-08-03 17:34:05,180 RoleSecurityTagSupport:doEndTag - Error
> executing tag: Attribute 'head' not found.
> org.apache.tiles.TilesException: Attribute 'head' not found.
>         at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:112)
>         at org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport.java:171)

Err... did you upgrade your Tiles definitions files and JSP pages?
Anyway here is the place to look:
http://tiles.apache.org/

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org