You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Greg Hess <gh...@wrappedapps.com> on 2002/08/27 15:32:26 UTC
Sub-apps using Tiles/SecureRequestProcessor
Hi All,
I am currently preparing to migrate one of my Struts apps to separate
modules as it is currently developed in modules and I would love to simplify
the integration of the modules.
My application consists of two modules. The main application module is using
the SecureRequestProcessor plug-in to handle http/https switching and the
Struts template tags for view layout. The second module is the
administrative module and it has recently incorporated the use of Tiles.
As far as I can see from the archives the Tiles distribution from jakarta is
compatible with sub-apps. I am wondering if all the sub-apps must use Tiles
and if the SecureRequestProcessor supports sub-apps as I have experienced
some errors with some quick tests with the SecureRequestProcessor as a
sub-app? The following error occurred with the SecureRequestProcessor being
used as a plug in in the sub-app and parent app.
500 Servlet Exception
java.lang.ClassCastException: org.apache.struts.action.ActionMapping
at
org.apache.struts.action.SecureRequestProcessor.processPreprocess(D:/CvsProj
ects/StrutsExtTry11/src/org/apache/struts/action/SecureRequestProcessor.java
:42)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:227)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:452)
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:9
6)
at com.caucho.server.http.Invocation.service(Invocation.java:311)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:221)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
at java.lang.Thread.run(Thread.java:536)
When I removed SecureRequestProcessor plugin from the sub-app all worked
fine except for my http/https switching. I am looking for a some wisdom that
might help me in this module integration.
Many Thanks,
Greg
Re: Sub-apps using Tiles/SecureRequestProcessor
Posted by Cedric Dumoulin <ce...@apache.org>.
Hi,
Tiles doesn't require that all your subapps use them. But, you need to
use the TilesRequestProcessor, or a subclass of it, for each subapps
using tiles. The
TilesRequestProcessor is set by the tiles plug-in. So, if you want to
use tiles and SecureRequestProcessor in the same subapps, you need to
provide a compatible RequestProcessor. I don't know if
SecureRequestProcessor is compatible with subapps.
Let us know if you success or not in your approach. This can help
other users !
Cedric
Greg Hess wrote:
>Hi All,
>
>I am currently preparing to migrate one of my Struts apps to separate
>modules as it is currently developed in modules and I would love to simplify
>the integration of the modules.
>
>My application consists of two modules. The main application module is using
>the SecureRequestProcessor plug-in to handle http/https switching and the
>Struts template tags for view layout. The second module is the
>administrative module and it has recently incorporated the use of Tiles.
>
>As far as I can see from the archives the Tiles distribution from jakarta is
>compatible with sub-apps. I am wondering if all the sub-apps must use Tiles
>and if the SecureRequestProcessor supports sub-apps as I have experienced
>some errors with some quick tests with the SecureRequestProcessor as a
>sub-app? The following error occurred with the SecureRequestProcessor being
>used as a plug in in the sub-app and parent app.
>
>500 Servlet Exception
>
>java.lang.ClassCastException: org.apache.struts.action.ActionMapping
>
>at
>
>org.apache.struts.action.SecureRequestProcessor.processPreprocess(D:/CvsProj
>
>ects/StrutsExtTry11/src/org/apache/struts/action/SecureRequestProcessor.java
>
>:42)
>
>at
>
>org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:227)
>
>at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
>
>at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:452)
>
>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:9
>
>6)
>
>at com.caucho.server.http.Invocation.service(Invocation.java:311)
>
>at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
>
>at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:221)
>
>at
>
>com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
>
>at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
>
>at java.lang.Thread.run(Thread.java:536)
>
>When I removed SecureRequestProcessor plugin from the sub-app all worked
>fine except for my http/https switching. I am looking for a some wisdom that
>might help me in this module integration.
>
>Many Thanks,
>
>Greg
>
>
>
>
>
>
>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>