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 Weis <dj...@sjdjweis.com> on 2002/02/15 18:33:33 UTC

Struts 1.1 and Tiles

How are the two shaping up? Are there still problems using a newer version
of struts with tiles? There are some features of 1.1 that I need such as
the dynamic forms. Also, would a nightly Struts download be in the 1.1
series or will it be 1.0.2 with some additional fixes?

Thanks
dave


-- 
Dave Weis             "I believe there are more instances of the abridgement
djweis@sjdjweis.com   of the freedom of the people by gradual and silent
                      encroachments of those in power than by violent 
                      and sudden usurpations."- James Madison


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: exception in action

Posted by Ted Husted <hu...@apache.org>.
The Struts tags should be passing the original exception in the request
under the key Action.EXCEPTION_KEY so you can retrieve it from there on
your error page. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Ivan Siviero wrote:
> 
> hi everyone.
> 
> I have an errorpage to which all the exceptions are forwarded.
> This errorpage emails me the exception details and display a user friendly
> message instead of the complete exception details.
> Everything works fine when the exception occurs in some custom tag, i get
> the exception by pageContext.getException().
> Now let's suppose the exception occurs in some Action.
> The pageContext.getException() in the errorpage returns null.
> So i do not know both the exception detail and the action who raised it.
> How can i get this information?
> Bye
> IVan.
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


exception in action

Posted by Ivan Siviero <iv...@concept.it>.
hi everyone.

I have an errorpage to which all the exceptions are forwarded.
This errorpage emails me the exception details and display a user friendly
message instead of the complete exception details.
Everything works fine when the exception occurs in some custom tag, i get
the exception by pageContext.getException().
Now let's suppose the exception occurs in some Action.
The pageContext.getException() in the errorpage returns null.
So i do not know both the exception detail and the action who raised it.
How can i get this information?
Bye
IVan.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts 1.1 and Tiles

Posted by Dave Weis <dj...@sjdjweis.com>.
On Tue, 19 Feb 2002, Cedric Dumoulin wrote:
> Dave Weis wrote:
> > On Tue, 19 Feb 2002, Cedric Dumoulin wrote:
> > >   TilesRequestProcessor has been committed with Tiles for Struts1.1
> > > since 18/02. It should be now in latest Struts nightly build. Also,
> > > you can download Tiles from its main site, and choose development
> > > version. It is in it (I have just check it ;-) ). Try to play with
> > > tiles-doc.war.
> > >   You need TilesRequestProcessor only if you use latest Struts1.1.
> > This is what I'm trying to do, use Struts 1.1. How do I specify in the
> > config that TilesRequestProcessor is necessary?
> at the end of struts-config.xml, after </action-mappings> write :
>   <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor">
>   </controller>
>  Can you confirm that you have similar settings in the
> struts-config.xml from the downloaded tiles-doc.war ? Otherwise, you
> have a wrong version.

I recopied all of the tiles examples but not the docs. Oops, it works
great now. It might be good to move those lines up to the top of the file
so they are more noticable.

Thanks for the help, this looks great. It will save lots of time for me.

dave

-- 
Dave Weis             "I believe there are more instances of the abridgement
djweis@sjdjweis.com   of the freedom of the people by gradual and silent
                      encroachments of those in power than by violent 
                      and sudden usurpations."- James Madison


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts 1.1 and Tiles

Posted by Cedric Dumoulin <ce...@lifl.fr>.

Dave Weis wrote:

> On Tue, 19 Feb 2002, Cedric Dumoulin wrote:
> >   TilesRequestProcessor has been committed with Tiles for Struts1.1
> > since 18/02. It should be now in latest Struts nightly build. Also,
> > you can download Tiles from its main site, and choose development
> > version. It is in it (I have just check it ;-) ). Try to play with
> > tiles-doc.war.
> >   You need TilesRequestProcessor only if you use latest Struts1.1.
>
> This is what I'm trying to do, use Struts 1.1. How do I specify in the
> config that TilesRequestProcessor is necessary?

at the end of struts-config.xml, after </action-mappings> write :

  <!-- ========== Associated Request Processor settings =================== -->
  <!-- Here we specified the tiles processor -->
  <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor">
  </controller>

 Can you confirm that you have similar settings in the struts-config.xml from the
downloaded tiles-doc.war ? Otherwise, you have a wrong version.

> I downloaded tiles.tar.gz
> from your site yesterday at 4:44 pm CST.

  Looks like the good one (my site report 11h44 -1 GMT).

>

>
>
> Thanks
> dave
>
> > > On Tue, 19 Feb 2002, Cedric Dumoulin wrote:
> > > >   Do you use appropriate ComponentActionServlet and
> > > > TilesRequestProcessor (if Struts1.1) ? If not, specify the first in
> > > > web.xml and second in struts-config.xml. Check tiles-doc or
> > > > struts-tiles example to know the syntax.
> > >
> > > Sorry to be dense, but I can't find an example anywhere. This is what I
> > > have in the web.xml action:
> > > <servlet-name>action</servlet-name>
> > > <servlet-class>org.apache.struts.tiles.ActionComponentServlet</servlet-class>
> > >
> > > I can't find where to specify TilesRequestProcessor, searching the list
> > > archive didn't find any hits for that string.
> > >
> > > >   If you write modified ForwardAction, I will make it available in the
> > > > distribution.
> > >
> > > Once I figure out how to get this going, I probably will.
> > >
> > > Thank
> > > dave
> > >
> > > --
> > > Dave Weis             "I believe there are more instances of the abridgement
> > > djweis@sjdjweis.com   of the freedom of the people by gradual and silent
> > >                       encroachments of those in power than by violent
> > >                       and sudden usurpations."- James Madison
> > >
> > > --
> > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
>
> --
> Dave Weis             "I believe there are more instances of the abridgement
> djweis@sjdjweis.com   of the freedom of the people by gradual and silent
>                       encroachments of those in power than by violent
>                       and sudden usurpations."- James Madison
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts 1.1 and Tiles

Posted by Dave Weis <dj...@sjdjweis.com>.
On Tue, 19 Feb 2002, Cedric Dumoulin wrote:
>   TilesRequestProcessor has been committed with Tiles for Struts1.1
> since 18/02. It should be now in latest Struts nightly build. Also,
> you can download Tiles from its main site, and choose development
> version. It is in it (I have just check it ;-) ). Try to play with
> tiles-doc.war.
>   You need TilesRequestProcessor only if you use latest Struts1.1.

This is what I'm trying to do, use Struts 1.1. How do I specify in the
config that TilesRequestProcessor is necessary? I downloaded tiles.tar.gz
from your site yesterday at 4:44 pm CST.

Thanks
dave


> > On Tue, 19 Feb 2002, Cedric Dumoulin wrote:
> > >   Do you use appropriate ComponentActionServlet and
> > > TilesRequestProcessor (if Struts1.1) ? If not, specify the first in
> > > web.xml and second in struts-config.xml. Check tiles-doc or
> > > struts-tiles example to know the syntax.
> >
> > Sorry to be dense, but I can't find an example anywhere. This is what I
> > have in the web.xml action:
> > <servlet-name>action</servlet-name>
> > <servlet-class>org.apache.struts.tiles.ActionComponentServlet</servlet-class>
> >
> > I can't find where to specify TilesRequestProcessor, searching the list
> > archive didn't find any hits for that string.
> >
> > >   If you write modified ForwardAction, I will make it available in the
> > > distribution.
> >
> > Once I figure out how to get this going, I probably will.
> >
> > Thank
> > dave
> >
> > --
> > Dave Weis             "I believe there are more instances of the abridgement
> > djweis@sjdjweis.com   of the freedom of the people by gradual and silent
> >                       encroachments of those in power than by violent
> >                       and sudden usurpations."- James Madison
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

-- 
Dave Weis             "I believe there are more instances of the abridgement
djweis@sjdjweis.com   of the freedom of the people by gradual and silent
                      encroachments of those in power than by violent 
                      and sudden usurpations."- James Madison


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts 1.1 and Tiles

Posted by Cedric Dumoulin <ce...@lifl.fr>.
  TilesRequestProcessor has been committed with Tiles for Struts1.1 since 18/02.
It should be now in latest Struts nightly build. Also, you can download Tiles
from its main site, and choose development version. It is in it (I have just
check it ;-) ). Try to play with tiles-doc.war.
  You need TilesRequestProcessor only if you use latest Struts1.1.

    Cedric



Dave Weis wrote:

> On Tue, 19 Feb 2002, Cedric Dumoulin wrote:
> >   Do you use appropriate ComponentActionServlet and
> > TilesRequestProcessor (if Struts1.1) ? If not, specify the first in
> > web.xml and second in struts-config.xml. Check tiles-doc or
> > struts-tiles example to know the syntax.
>
> Sorry to be dense, but I can't find an example anywhere. This is what I
> have in the web.xml action:
> <servlet-name>action</servlet-name>
> <servlet-class>org.apache.struts.tiles.ActionComponentServlet</servlet-class>
>
> I can't find where to specify TilesRequestProcessor, searching the list
> archive didn't find any hits for that string.
>
> >   If you write modified ForwardAction, I will make it available in the
> > distribution.
>
> Once I figure out how to get this going, I probably will.
>
> Thank
> dave
>
> --
> Dave Weis             "I believe there are more instances of the abridgement
> djweis@sjdjweis.com   of the freedom of the people by gradual and silent
>                       encroachments of those in power than by violent
>                       and sudden usurpations."- James Madison
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts 1.1 and Tiles

Posted by Dave Weis <dj...@sjdjweis.com>.
On Tue, 19 Feb 2002, Cedric Dumoulin wrote:
>   Do you use appropriate ComponentActionServlet and
> TilesRequestProcessor (if Struts1.1) ? If not, specify the first in
> web.xml and second in struts-config.xml. Check tiles-doc or
> struts-tiles example to know the syntax.

Sorry to be dense, but I can't find an example anywhere. This is what I
have in the web.xml action:
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.tiles.ActionComponentServlet</servlet-class>

I can't find where to specify TilesRequestProcessor, searching the list
archive didn't find any hits for that string.

>   If you write modified ForwardAction, I will make it available in the
> distribution.

Once I figure out how to get this going, I probably will.

Thank
dave


-- 
Dave Weis             "I believe there are more instances of the abridgement
djweis@sjdjweis.com   of the freedom of the people by gradual and silent
                      encroachments of those in power than by violent 
                      and sudden usurpations."- James Madison


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts 1.1 and Tiles

Posted by Cedric Dumoulin <ce...@lifl.fr>.
  Do you use appropriate ComponentActionServlet and TilesRequestProcessor (if Struts1.1) ? If
not, specify the first in web.xml and second in struts-config.xml. Check tiles-doc or
struts-tiles example to know the syntax.

  If you write modified ForwardAction, I will make it available in the distribution.

    Cedric

Dave Weis wrote:

> On Tue, 19 Feb 2002, Cedric Dumoulin wrote:
> >   The normal way to use Tiles with Struts is to write your own action forwarding to a
> > logical name. This logical name can be linked to a Tile definition name :
> >   <action     path="/test/testAction"
> >            type="org.apache.struts.example.tiles.test.TestActionTileAction">
> >       <forward  name="success"        path="test.struts.action"/>
> >       <forward  name="failure"           path="test.struts.action.fail"/>
> >   </action>
> >   Check examples coming with Tiles to know more.
>
> I have set up an action like this:
>
> public class DaveAction extends Action {
>     public ActionForward perform(ActionMapping mapping,
>                                  ActionForm form,
>                                  HttpServletRequest request,
>                                  HttpServletResponse response)
>         throws IOException, ServletException {
>         ActionErrors errors = new ActionErrors();
>         return (mapping.findForward("success"));
>     } // perform
> }
>
> With this in struts-config.xml
> <action path="/dave"
>         type="com.foo.test.DaveAction">
>         <forward name="success" path="forward.dave.test.page" />
> </action>
>
> and this is my componentDefinitions.xml
> <definition name="forward.dave.test.page" extends="mainLayout" >
>   <put name="title" value="Dave Testing" />
>   <put name="body" value="/dave.jsp" />
> </definition>
>
> But I still get a 500 error:
> java.lang.IllegalArgumentException: path must be
> absolute: `forward.dave.test.page'
>         at
> com.caucho.server.http.Application.getRequestDispatcher(Application.java:1805)
>         at
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:957)
>         at
> org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:398)
>         at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:263)
>         at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1049)
>         at
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:442)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:126)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
>         at
> com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:82)
>         at com.caucho.server.http.Invocation.service(Invocation.java:272)
>         at
> com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:128)
>         at
> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
>         at
> com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
>         at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
>         at java.lang.Thread.run(Thread.java:484)
>
> I'm using the resin servlet engine, so is there something in tiles that is
> specific to tomcat?
>
> >   The "org.apache.struts.actions.ForwardAction" do itself the forward to the page, and
> > is actually not designed to run with Tiles. It is easy to write a similar class to run
> > with Tiles : copy method processForward(...) in
> > org.apache.struts.tiles.ActionComponentServlet
> > to your new class. Copy method perform(...) from ForwardAction, and modify this later
> > to call processForward(...) rather than doing rd.forward().
>
> If I write such a class, would you consider including it in the
> distribution? It is very useful, and would be even better with tiles.
>
> Thanks for the help
>
> dave
>
> > Dave Weis wrote:
> > > Hi Cedric
> > > I just downloaded tiles from your site and am proceeding to learn a few
> > > things. Is org.apache.struts.actions.ForwardAction updated to use the
> > > tiles functionality? I tried the line below and got an error:
> > >
> > > <action path="/admin/message/read"
> > >         type="org.apache.struts.actions.ForwardAction"
> > >         parameter="dave.test" />
> > >
> > > Error:
> > > java.lang.IllegalArgumentException: path must be absolute: `dave.test'
> > >
> > > Is this a known problem or am I doing something incorrectly?
> > >
> > > dave
> > >
> > > >
> > > > Dave Weis wrote:
> > > >
> > > > > How are the two shaping up? Are there still problems using a newer version
> > > > > of struts with tiles? There are some features of 1.1 that I need such as
> > > > > the dynamic forms. Also, would a nightly Struts download be in the 1.1
> > > > > series or will it be 1.0.2 with some additional fixes?
> > > > >
> > > > > Thanks
> > > > > dave
> > > > >
> > > > > --
> > > > > Dave Weis             "I believe there are more instances of the abridgement
> > > > > djweis@sjdjweis.com   of the freedom of the people by gradual and silent
> > > > >                       encroachments of those in power than by violent
> > > > >                       and sudden usurpations."- James Madison
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> > > >
> > >
> > > --
> > > Dave Weis             "I believe there are more instances of the abridgement
> > > djweis@sjdjweis.com   of the freedom of the people by gradual and silent
> > >                       encroachments of those in power than by violent
> > >                       and sudden usurpations."- James Madison
> > >
> > > --
> > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
>
> --
> Dave Weis             "I believe there are more instances of the abridgement
> djweis@sjdjweis.com   of the freedom of the people by gradual and silent
>                       encroachments of those in power than by violent
>                       and sudden usurpations."- James Madison
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts 1.1 and Tiles

Posted by Dave Weis <dj...@sjdjweis.com>.
On Tue, 19 Feb 2002, Cedric Dumoulin wrote:
>   The normal way to use Tiles with Struts is to write your own action forwarding to a
> logical name. This logical name can be linked to a Tile definition name :
>   <action     path="/test/testAction"
>            type="org.apache.struts.example.tiles.test.TestActionTileAction">
>       <forward  name="success"        path="test.struts.action"/>
>       <forward  name="failure"           path="test.struts.action.fail"/>
>   </action>
>   Check examples coming with Tiles to know more.

I have set up an action like this:

public class DaveAction extends Action {
    public ActionForward perform(ActionMapping mapping,
                                 ActionForm form,
                                 HttpServletRequest request,
                                 HttpServletResponse response)
        throws IOException, ServletException {
        ActionErrors errors = new ActionErrors();
        return (mapping.findForward("success"));
    } // perform
}

With this in struts-config.xml
<action path="/dave"
        type="com.foo.test.DaveAction">
        <forward name="success" path="forward.dave.test.page" />
</action>

and this is my componentDefinitions.xml
<definition name="forward.dave.test.page" extends="mainLayout" >
  <put name="title" value="Dave Testing" />
  <put name="body" value="/dave.jsp" />
</definition>

But I still get a 500 error:
java.lang.IllegalArgumentException: path must be
absolute: `forward.dave.test.page'
	at
com.caucho.server.http.Application.getRequestDispatcher(Application.java:1805)
	at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:957)
	at
org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:398)
	at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:263)
	at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1049)
	at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:442)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:126)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
	at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:82)
	at com.caucho.server.http.Invocation.service(Invocation.java:272)
	at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:128)
	at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
	at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
	at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
	at java.lang.Thread.run(Thread.java:484)

I'm using the resin servlet engine, so is there something in tiles that is
specific to tomcat? 

>   The "org.apache.struts.actions.ForwardAction" do itself the forward to the page, and
> is actually not designed to run with Tiles. It is easy to write a similar class to run
> with Tiles : copy method processForward(...) in
> org.apache.struts.tiles.ActionComponentServlet
> to your new class. Copy method perform(...) from ForwardAction, and modify this later
> to call processForward(...) rather than doing rd.forward().

If I write such a class, would you consider including it in the
distribution? It is very useful, and would be even better with tiles.

Thanks for the help

dave

> Dave Weis wrote:
> > Hi Cedric
> > I just downloaded tiles from your site and am proceeding to learn a few
> > things. Is org.apache.struts.actions.ForwardAction updated to use the
> > tiles functionality? I tried the line below and got an error:
> >
> > <action path="/admin/message/read"
> >         type="org.apache.struts.actions.ForwardAction"
> >         parameter="dave.test" />
> >
> > Error:
> > java.lang.IllegalArgumentException: path must be absolute: `dave.test'
> >
> > Is this a known problem or am I doing something incorrectly?
> >
> > dave
> >
> > >
> > > Dave Weis wrote:
> > >
> > > > How are the two shaping up? Are there still problems using a newer version
> > > > of struts with tiles? There are some features of 1.1 that I need such as
> > > > the dynamic forms. Also, would a nightly Struts download be in the 1.1
> > > > series or will it be 1.0.2 with some additional fixes?
> > > >
> > > > Thanks
> > > > dave
> > > >
> > > > --
> > > > Dave Weis             "I believe there are more instances of the abridgement
> > > > djweis@sjdjweis.com   of the freedom of the people by gradual and silent
> > > >                       encroachments of those in power than by violent
> > > >                       and sudden usurpations."- James Madison
> > > >
> > > > --
> > > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> > >
> >
> > --
> > Dave Weis             "I believe there are more instances of the abridgement
> > djweis@sjdjweis.com   of the freedom of the people by gradual and silent
> >                       encroachments of those in power than by violent
> >                       and sudden usurpations."- James Madison
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

-- 
Dave Weis             "I believe there are more instances of the abridgement
djweis@sjdjweis.com   of the freedom of the people by gradual and silent
                      encroachments of those in power than by violent 
                      and sudden usurpations."- James Madison


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts 1.1 and Tiles

Posted by Cedric Dumoulin <ce...@lifl.fr>.
  Hi Dave,

  The normal way to use Tiles with Struts is to write your own action forwarding to a
logical name. This logical name can be linked to a Tile definition name :
  <action     path="/test/testAction"
           type="org.apache.struts.example.tiles.test.TestActionTileAction">
      <forward  name="success"        path="test.struts.action"/>
      <forward  name="failure"           path="test.struts.action.fail"/>
  </action>
  Check examples coming with Tiles to know more.

  The "org.apache.struts.actions.ForwardAction" do itself the forward to the page, and
is actually not designed to run with Tiles. It is easy to write a similar class to run
with Tiles : copy method processForward(...) in
org.apache.struts.tiles.ActionComponentServlet
to your new class. Copy method perform(...) from ForwardAction, and modify this later
to call processForward(...) rather than doing rd.forward().

  Cedric


Dave Weis wrote:

> Hi Cedric
>
> I just downloaded tiles from your site and am proceeding to learn a few
> things. Is org.apache.struts.actions.ForwardAction updated to use the
> tiles functionality? I tried the line below and got an error:
>
> <action path="/admin/message/read"
>         type="org.apache.struts.actions.ForwardAction"
>         parameter="dave.test" />
>
> Error:
> java.lang.IllegalArgumentException: path must be absolute: `dave.test'
>
> Is this a known problem or am I doing something incorrectly?
>
> dave
>
> >
> > Dave Weis wrote:
> >
> > > How are the two shaping up? Are there still problems using a newer version
> > > of struts with tiles? There are some features of 1.1 that I need such as
> > > the dynamic forms. Also, would a nightly Struts download be in the 1.1
> > > series or will it be 1.0.2 with some additional fixes?
> > >
> > > Thanks
> > > dave
> > >
> > > --
> > > Dave Weis             "I believe there are more instances of the abridgement
> > > djweis@sjdjweis.com   of the freedom of the people by gradual and silent
> > >                       encroachments of those in power than by violent
> > >                       and sudden usurpations."- James Madison
> > >
> > > --
> > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
>
> --
> Dave Weis             "I believe there are more instances of the abridgement
> djweis@sjdjweis.com   of the freedom of the people by gradual and silent
>                       encroachments of those in power than by violent
>                       and sudden usurpations."- James Madison
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts 1.1 and Tiles

Posted by Dave Weis <dj...@sjdjweis.com>.
On Mon, 18 Feb 2002, Cedric Dumoulin wrote:
>   I have just updated Tiles to let them run with latest Struts nightly build
> (1.1dev). This update add a new TilesRequestProcessor class. The struts-tiles.war
> (or tiles-doc.war) are modified in order to take into account the new struts1.1
> mechanism.
>   You can download new Tiles distributions from Tiles home site (choose
> development version), or wait for Struts next nightly build.

Hi Cedric

I just downloaded tiles from your site and am proceeding to learn a few
things. Is org.apache.struts.actions.ForwardAction updated to use the
tiles functionality? I tried the line below and got an error:

<action path="/admin/message/read"
        type="org.apache.struts.actions.ForwardAction"
        parameter="dave.test" />

Error:
java.lang.IllegalArgumentException: path must be absolute: `dave.test'

Is this a known problem or am I doing something incorrectly?

dave

> 
> Dave Weis wrote:
> 
> > How are the two shaping up? Are there still problems using a newer version
> > of struts with tiles? There are some features of 1.1 that I need such as
> > the dynamic forms. Also, would a nightly Struts download be in the 1.1
> > series or will it be 1.0.2 with some additional fixes?
> >
> > Thanks
> > dave
> >
> > --
> > Dave Weis             "I believe there are more instances of the abridgement
> > djweis@sjdjweis.com   of the freedom of the people by gradual and silent
> >                       encroachments of those in power than by violent
> >                       and sudden usurpations."- James Madison
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

-- 
Dave Weis             "I believe there are more instances of the abridgement
djweis@sjdjweis.com   of the freedom of the people by gradual and silent
                      encroachments of those in power than by violent 
                      and sudden usurpations."- James Madison


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts 1.1 and Tiles

Posted by Cedric Dumoulin <ce...@lifl.fr>.
  I have just updated Tiles to let them run with latest Struts nightly build
(1.1dev). This update add a new TilesRequestProcessor class. The struts-tiles.war
(or tiles-doc.war) are modified in order to take into account the new struts1.1
mechanism.

  You can download new Tiles distributions from Tiles home site (choose
development version), or wait for Struts next nightly build.

    Cedric

Dave Weis wrote:

> How are the two shaping up? Are there still problems using a newer version
> of struts with tiles? There are some features of 1.1 that I need such as
> the dynamic forms. Also, would a nightly Struts download be in the 1.1
> series or will it be 1.0.2 with some additional fixes?
>
> Thanks
> dave
>
> --
> Dave Weis             "I believe there are more instances of the abridgement
> djweis@sjdjweis.com   of the freedom of the people by gradual and silent
>                       encroachments of those in power than by violent
>                       and sudden usurpations."- James Madison
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>