You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Chin, Ed" <ed...@lmco.com> on 2003/04/16 21:20:35 UTC

RE: coming from .do file stops further template proce ssing. Only possible to use .jsp?

I don't think that a ".do" file is really a file. I thought it was just an
extension to signal 
the Struts ActionServlet to process the request. It almost seems like you
want Struts to reprocess the 
same request. But it doesn't make sense that you want to use an ActionForm
to process the XML file. An ActionForm should be used to validate form data
coming from the user. What you should be doing, (what you probably are
already doing), is use XSLT in an Action class to parse your XML file and
spit out HTML. 


Don't take my word on it though, I'm a beginner.

-----Original Message-----
From: mech [mailto:mech@rz.fh-augsburg.de]
Sent: Wednesday, April 16, 2003 2:58 PM
To: struts-user@jakarta.apache.org
Subject: <TILES:PUT> coming from .do file stops further template
processing. Only possible to use .jsp?


Hi,

I wonder, if it is possible to use a .do file as source for a
<tiles:put>. I only had it done with .jsp so far. I would like to use
the MVC pattern also with tiles to retrieve the content for <tiles:put>.


I want to check if this is theoretically possible. If yes what setup
needs to be done, because I can't get it work with just loading a .do
file.

To explain it more in detail:


I use the TILES taglib for a common layout which contains of two
navigation areas, some content, header, footer etc.
So I have two files for every view, I only replace the file
"my_content.jsp" and some of the string fields.

<tiles:insert page="/template/layout.jsp" flush="false">
	<tiles:put name="title" value="blabla" type="string"/>
	<tiles:put name="titlebar" value="/template/def_titlebar.jsp"
type="page"/>
	<tiles:put name="topnavi" value="/template/def_topnavi.jsp (or
.do)" type="page"/>
	<tiles:put name="leftnavi" value="/template/def_leftnavi.jsp (or
.do)" type="page"/>
	<tiles:put name="header" value="<b><u>Headline:</u></b>"
type="string"/>
	<tiles:put name="status" value="/template/def_status.jsp"
type="page"/> 
	<tiles:put name="maincontent" value="/info/my_content.jsp"
type="page"/>
	<tiles:put name="footer" value="/template/def_footer.jsp"
type="page"/>
</tiles:insert>

In my layout.jsp I have all the html tables and <tiles:get> tags, of
course.



Recently I tried to replace "/def_topnavi.jsp" and "/def_leftnavi.jsp"
with two .do files... Mainly I want to process a xml file containing my
navigation links, put it into an ActionForm and give it to a JSP to
display. Until now I did that in the JSPs with the help of "normal"
JavaBeans. But I think using .do might be more convenient.

My Action.execute() should forward to the view which is displaying the
top area...  Unfortuntely after "/def_topnavi.do" the TILES tags seems
to stop processing any further.

I can only suggest that this is due to flushing the output stream after
.do or it's view has been executed. But no idea.
I even tried 	redirect="true"	in the "view"-forward of my
struts-config.xml. Then I get a complete layout, but the navigation area
is simply empty, as if the view never did anything.


Generally speaking. Is it possible to use .do files with <tiles:put>.
Anyone having success with it?
If yes, what to setup. Maybe in struts-config.xml?

Thanks
Michael



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

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