Search the web
Sign In
New User? Sign Up
struts-xsl · Struts for Transforming XML with XSL
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Struts tiles and Stxx   Message List  
Reply | Forward Message #2644 of 2669 |
Re: [struts-xsl] Re: Struts tiles and Stxx

Interesting...I've never used stxx within a Tile before, so I'm afraid I won't
be of much help. When I stated stxx was compatible with Tiles, I meant the two
request processors could co-exist, allowing you to use stxx forwards in a
Tiles-based app. If you come up with any patches to make the integration
better, create a ticket and let me know.

Don

Rajesh Sundar wrote:
>
>
> Don,
>
> My template.jsp looks like this.
>
> <body>
> <table class="tilestyle1">
> <tr><td ><tiles:insert attribute="header"/></td></tr>
> <tr><td class="menu"><tiles:insert attribute="menu"/></td>
> <td><tiles:insert attribute="body"/></td></tr>
> <tr><td class="valign_center"><tiles:insert
> attribute="bottom"/></td></tr>
> </table></body>
>
> my struts-config.xml looks this
>
> <action-mappings>
> <action path="/mainpage"
> type="com.enrg.work.action.MainInformationAction">
> <forward name="success" path="jsp/left.dox"/>
> </action>
>
> <action path="/Reports"
> type="com.enrg.work.action.MainInformationAction">
> <forward name="success" path="enrg.reports" />
> <forward name="Failure" path="enrg.error" />
> </action>
>
>
> My tiles-def is
>
> <definition name="enrg.reports" page="/template.jsp">
> <put name="title" type="string" value="Hello world" />
> <put name="header" value="/top.jsp" />
> <put name="menu" value="/reportsmenu.jsp" />
> <put name="body" value="jsp/left.dox" />
> <put name="bottom" value="/bottom.jsp" />
> </definition>
>
> I'm using tiles-config_1_1.dtd.
>
> Now, In the above mentioned struts config,for the "mainpage" action,
> Its working perfectly fine.when i call the "Reports" action, the
> template.jsp page displays fine except the left.dox saying it cant
> be found.
>
> Also, i replaced the value by page in the put tag for left.dox and
> no change in the output.
>
> I modified the tiles by calling "mainpage" action and included the
> tiles inside the left.jsp(where the tranformation takes place)and i
> got the error mentioned below.
>
> Regards,
> Rajesh.
>
> --- In struts-xsl@yahoogroups.com <mailto:struts-xsl%40yahoogroups.com>,
> Don Brown <mrdon@...> wrote:
> >
> > What does your struts-config.xml look like? It looks like the
> tiles
> > forward is somehow going to stxx. Are you sure that forward is
> using
> > the correct tiles extension?
> >
> > Don
> >
> > Rajesh Sundar wrote:
> > >
> > > Hi,
> > > Thank you very much for the reply. I did the way you mentioned
> > > and i don't get this error.
> > >
> > > If i try to insert a struts tiles insert tag inside the jsp, i'm
> > > getting the following error.
> > >
> > > com.oroad.stxx.transform.TransformerException:
> > > javax.servlet.ServletException: JSP compilation of /left.jsp
> failed:
> > > webl
> > > ogic.utils.ParsingException: Could not complete parsing,
> unmatched
> > > tags: insert
> > > at com.oroad.stxx.transform.DOMWriteTransformer.transform
> > > (Lcom/oroad/stxx/action/ActionTransform;Ljavax/servlet/
> > > http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)
> V
> > > (DOMWriteTransformer.java:201)
> > > at
> > >
> com.oroad.stxx.transform.TransformerHandler.processActionTransform
> > > (Lcom/oroad/stxx/action/ActionTransform;Lja
> > >
> vax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletRe
> > > sponse;)V(TransformerHandler.java:203)
> > > at
> > >
> com.oroad.stxx.plugin.RequestProcessorHelper.processStxxDefinition
> > > (Ljava/lang/String;ZLjavax/servlet/http/Htt
> > > pServletRequest;Ljavax/servlet/http/HttpServletResponse;)Z
> > > (RequestProcessorHelper.java:260)
> > > at
> > >
> com.oroad.stxx.plugin.StxxTilesRequestProcessor.processForwardConfig
> > > (Ljavax/servlet/http/HttpServletRequest;L
> > >
> javax/servlet/http/HttpServletResponse;Lorg/apache/struts/config/Forw
> > > ardConfig;)V(StxxTilesRequestProcessor.java:133)
> > > at org.apache.struts.action.RequestProcessor.process
> > > (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/
> > > HttpServletResponse;)V(RequestProcessor.java:279)
> > > at org.apache.struts.action.ActionServlet.process
> > > (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/Htt
> > > pServletResponse;)V(ActionServlet.java:1482)
> > > at org.apache.struts.action.ActionServlet.doGet
> > > (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpS
> > > ervletResponse;)V(ActionServlet.java:507)
> > > at javax.servlet.http.HttpServlet.service
> > >
> (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServl
> > > et
> > > Response;)V(HttpServlet.java:740)
> > > at javax.servlet.http.HttpServlet.service
> > > (Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V
> > > (HttpSe
> > > rvlet.java:853)
> > > at
> > >
> weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
> > > ()Ljava/lang/Object;(ServletStubImpl.jav
> > > a:1072)
> > > at weblogic.servlet.internal.ServletStubImpl.invokeServlet
> > > (Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletR
> > > esponse;Lweblogic/servlet/internal/FilterChainImpl;)V
> > > (ServletStubImpl.java:465)
> > > at weblogic.servlet.internal.ServletStubImpl.invokeServlet
> > > (Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletR
> > > esponse;)V(ServletStubImpl.java:348)
> > > at
> > >
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
> > > n.run()Ljava/lang/Object;(WebAppServletC
> > > ontext.java:6981)
> > > at weblogic.security.acl.internal.AuthenticatedSubject.doAs
> > > (Lweblogic/security/subject/AbstractSubject;Ljava/sec
> > > urity/PrivilegedAction;)Ljava/lang/Object;
> > > (AuthenticatedSubject.java:321)
> > > at weblogic.security.service.SecurityManager.runAs
> > > (Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogi
> > >
> c/security/acl/internal/AuthenticatedSubject;Ljava/security/Privilege
> > > dAction;)Ljava/lang/Object;(SecurityManager.java:12
> > > 1)
> > > at
> > > weblogic.servlet.internal.WebAppServletContext.invokeServlet
> > > (Lweblogic/servlet/internal/ServletRequestImpl;Lw
> > > eblogic/servlet/internal/ServletResponseImpl;)V
> > > (WebAppServletContext.java:3892)
> > > at weblogic.servlet.internal.ServletRequestImpl.execute
> > > (Lweblogic/kernel/ExecuteThread;)V(ServletRequestImpl.jav
> > > a:2766)
> > > at weblogic.kernel.ExecuteThread.execute
> > > (Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:224)
> > > at weblogic.kernel.ExecuteThread.run()V
> > > (ExecuteThread.java:183)
> > > at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V
> > > (Unknown Source)
> > >
> > > Please can you correct me if i'm doing wrong way of implementing
> > > tiles with Stxx.
> > >
> > > Regards,
> > > Rajesh.
> > >
> > > --- In struts-xsl@yahoogroups.com
> <mailto:struts-xsl%40yahoogroups.com>
> > > <mailto:struts-xsl%40yahoogroups.com>, Don Brown <mrdon@> wrote:
> > > >
> > > > You need to use the StxxTilesRequestProcessor. IIRC, you need
> to
> > > put the Tiles
> > > > plugin before the Stxx one, so Stxx knows to load the correct
> > > version of its
> > > > RequestProcessor.
> > > >
> > > > Don
> > > >
> > > > Rajesh Sundar wrote:
> > > > >
> > > > >
> > > > > Don,
> > > > > I'm getting the jsp output using the Stxx.
> > > > >
> > > > > If i try to include the TilesPlugin of Struts1.1 in my
> struts-
> > > > > config.xml, Im getting the following error.
> > > > >
> > > > > - Initializing,
> > > config='org.apache.struts.action.ActionResources',
> > > > > returnNull=true
> > > > > - Loading the stxx request processor without Tiles support
> > > > > - TilesPlugin : Specified RequestProcessor not compatible
> with
> > > > > TilesRequestProcessor
> > > > > <Jun 23, 2006 3:08:14 PM BST> <Error> <HTTP> <BEA-101018> <
> > > > > [ServletContext(id=6952394,name=StxxDemo,context-
> path=/StxxDemo)]
> > > > > Servlet failed with ServletException
> > > > > javax.servlet.ServletException: TilesPlugin : Specified
> > > > > RequestProcessor not compatible with TilesRequestProcessor
> > > > > at
> > > > > org.apache.struts.tiles.TilesPlugin.initRequestProcessorClass
> > > > > (TilesPlugin.java:360)
> > > > > at org.apache.struts.tiles.TilesPlugin.init
> > > > > (TilesPlugin.java:164)
> > > > > at org.apache.struts.action.ActionServlet.initModulePlugIns
> > > > > (ActionServlet.java:1158)
> > > > > at org.apache.struts.action.ActionServlet.init
> > > > > (ActionServlet.java:473)
> > > > > at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> > > > > at
> > > > >
> weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run
> > > > > (ServletStubImpl.java:1028)
> > > > > at weblogic.security.acl.internal.AuthenticatedSubject.doAs
> > > > > (AuthenticatedSubject.java:321)
> > > > > at weblogic.security.service.SecurityManager.runAs
> > > > > (SecurityManager.java:121)
> > > > > at weblogic.servlet.internal.ServletStubImpl.createServlet
> > > > > (ServletStubImpl.java:904)
> > > > > at weblogic.servlet.internal.ServletStubImpl.createInstances
> > > > > (ServletStubImpl.java:883)
> > > > > at weblogic.servlet.internal.ServletStubImpl.prepareServlet
> > > > > (ServletStubImpl.java:822)
> > > > > at weblogic.servlet.internal.ServletStubImpl.getServlet
> > > > > (ServletStubImpl.java:535)
> > > > > at weblogic.servlet.internal.ServletStubImpl.invokeServlet
> > > > > (ServletStubImpl.java:373)
> > > > > at weblogic.servlet.internal.ServletStubImpl.invokeServlet
> > > > > (ServletStubImpl.java:315)
> > > > > at
> > > > >
> > >
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
> > > n
> > > > > .run(WebAppServletContext.java:6718)
> > > > > at weblogic.security.acl.internal.AuthenticatedSubject.doAs
> > > > > (AuthenticatedSubject.java:321)
> > > > > at weblogic.security.service.SecurityManager.runAs
> > > > > (SecurityManager.java:121)
> > > > > at
> > > > > weblogic.servlet.internal.WebAppServletContext.invokeServlet
> > > > > (WebAppServletContext.java:3764)
> > > > > at weblogic.servlet.internal.ServletRequestImpl.execute
> > > > > (ServletRequestImpl.java:2644)
> > > > > at weblogic.kernel.ExecuteThread.execute
> > > > > (ExecuteThread.java:219)
> > > > > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
> > > > >
> > > > > I read in the Stxx "changes" link that as of Stxx1.3.1a
> support
> > > to
> > > > > tiles frame work was added.
> > > > >
> > > > > My project insist on using Struts tiles framework. Please
> can you
> > > > > tell me how to use Struts tiles along with Stxx?
> > > > >
> > > > > Have a nice day!
> > > > >
> > > > > Regards,
> > > > > Rajesh
> > > > >
> > > > > --- In struts-xsl@yahoogroups.com
> <mailto:struts-xsl%40yahoogroups.com>
> > > <mailto:struts-xsl%40yahoogroups.com> <mailto:struts-xsl%
> > > 40yahoogroups.com>,
> > > > > Don Brown <mrdon@> wrote:
> > > > > >
> > > > > > Tiles is tied to JSP, so I'm not sure how or even why you'd
> > > use it
> > > > > with Stxx.
> > > > > > I've found Sitemesh to fulfill a similar goal, but with
> much
> > > less
> > > > > work and
> > > > > > better features.
> > > > > >
> > > > > > Don
> > > > > >
> > > > > > Rajesh Sundar wrote:
> > > > > > >
> > > > > > >
> > > > > > > Hi,
> > > > > > > I was able to run Stxx successfully.
> > > > > > >
> > > > > > > Now i'm trying to do Stxx with Struts tiles.Is there any
> > > example
> > > > > for
> > > > > > > Stxx with Struts?
> > > > > > >
> > > > > > > Regards,
> > > > > > > Rajesh
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
>
>




Mon Jun 26, 2006 6:57 pm

mrdon42
Offline Offline
Send Email Send Email

Forward
Message #2644 of 2669 |
Expand Messages Author Sort by Date

Hi, I was able to run Stxx successfully. Now i'm trying to do Stxx with Struts tiles.Is there any example for Stxx with Struts? Regards, Rajesh...
Rajesh Sundar
rajeshsun69
Offline Send Email
Jun 22, 2006
2:50 pm

Tiles is tied to JSP, so I'm not sure how or even why you'd use it with Stxx. I've found Sitemesh to fulfill a similar goal, but with much less work and better...
Don Brown
mrdon42
Offline Send Email
Jun 22, 2006
8:14 pm

Don, I'm getting the jsp output using the Stxx. If i try to include the TilesPlugin of Struts1.1 in my struts- config.xml, Im getting the following error. -...
Rajesh Sundar
rajeshsun69
Offline Send Email
Jun 23, 2006
2:24 pm

You need to use the StxxTilesRequestProcessor. IIRC, you need to put the Tiles plugin before the Stxx one, so Stxx knows to load the correct version of its ...
Don Brown
mrdon42
Offline Send Email
Jun 23, 2006
4:16 pm

Hi, Thank you very much for the reply. I did the way you mentioned and i don't get this error. If i try to insert a struts tiles insert tag inside the jsp, i'm...
Rajesh Sundar
rajeshsun69
Offline Send Email
Jun 24, 2006
5:46 pm

What does your struts-config.xml look like? It looks like the tiles forward is somehow going to stxx. Are you sure that forward is using the correct tiles...
Don Brown
mrdon42
Offline Send Email
Jun 25, 2006
4:44 am

Don, My template.jsp looks like this. <body> <table class="tilestyle1"> <tr><td ><tiles:insert attribute="header"/></td></tr> <tr><td...
Rajesh Sundar
rajeshsun69
Offline Send Email
Jun 25, 2006
10:02 am

Interesting...I've never used stxx within a Tile before, so I'm afraid I won't be of much help. When I stated stxx was compatible with Tiles, I meant the two ...
Don Brown
mrdon42
Offline Send Email
Jun 26, 2006
7:13 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help