struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Erickson" <derick...@cmcflex.com>
Subject Tiles Modules Problem
Date Tue, 27 Jul 2004 00:50:15 GMT
Ok so as far as struts is concerned, if your within a module, say /user, all
actions defined in struts-config-user.xml will resolve to that directory,
for example:
        <action path="/editPage" type="user.PageAction" attribute="pageForm"
parameter="edit" scope="session">
            <forward name="success" path=".user.page"/>
        </action>

would resolve to /(AppContext)/user/editPage.do

However this same functionality does not appear to exist within a tiles
module.  Here is my config:
 <plug-in className="org.apache.struts.tiles.TilesPlugin">
  <set-property property="definitions-config"
value="/WEB-INF/tiles-defs/tiles-defs-user.xml"/>
  <set-property property="moduleAware" value="true"/>
  <set-property property="definitions-parser-validate" value="true"/>
 </plug-in>

since I used .user.page as my forward in the action above we'll examine
that.  Here's the definition:
    <definition name=".user.page" extends=".base">
        <put name="body" value="/user/page.jsp"/>
    </definition>

Notice I still have to prepend the 'module' onto the url, ie the /user in
/user/page.jsp.  Should this not function similarly to the struts modules?
IE I should only need to put /page.jsp?  For true modularity I believe it
should, and is currently not.  Now I recognize there are instances where
this kind of functionality would not be desirable, for instance when you
need to reference a common header.jsp, or when you have JSPs organized under
WEB-INF..  but shouldnt there be an attribute to set that? perhaps
moduleRelative="true/false", where by default its set to true?  As is its
not really modularized at all because you couldn't just pick it up and put
it somewhere else and expect it to work..

Comments/Ideas?
-David


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


Mime
View raw message