On Saturday 10 April 2004 18:36, Marc Tinnemeyer wrote:

Hi, 

didn't check if your overall configuration is correct, but
the first thing I'd suggest is moving the <global-forward>
part to a normal ForwardAction like this

<action path="/login" forward="tiles.login"/>

and refer to that in your index.jsp:

<jsp:forward page="/login.do" />

This should work. I never researched why Struts global
forwards don't behave like normal forwards, but one thing
I can say is that they work well when specified inside another
action declaration, but not when being directly invoked.
AFAIK the <html:link> tag can cope with global forwards,
but well, we use the JSTL throughout nowadays.

HTH,
-- Chris.  

> Hi,
>
> After diving into the world of struts I decided also to include tiles
> in my app. But there seems to be something that keeps me from doing
> this. Here are the steps I have taken so far:
>
> checked struts-config.xml for tiles-stuff (as I copied that file from
> struts-blank everything was already there):
>
> <controller
> processorClass="org.apache.struts.tiles.TilesRequestProcessor" />
>
> <plug-in className="org.apache.struts.tiles.TilesPlugin">
>  <set-property property="definitions-config"
> value="/WEB-INF/tiles-defs.xml" />
>  <set-property property="definitions-debug" value="6" />
>  <set-property property="definitions-parser-details" value="6" />
>  <set-property property="moduleAware" value="true" />
>  <set-property property="definitions-parser-validate" value="true" />
> </plug-in>
>
> From what the docs say that part seems ok (at least to me).
>
> Step 2 (tile-defs.xml):
>
> <tiles-definitions>
> <definition name="tiles.login"
> path="/pages/layouts/default_layout.jsp"> <put name="header"
> value="/pages/header.html" />
> <put name="content" value="/pages/Login.jsp" />
> </definition>
> </tiles-definitions>
>
> all the files mentioned here are where they belong.
>
> Step 3 (global-forward):
>
> As I want my startpage (index.jsp) to forward to a tiles-page I
> created a global-forward in struts-config.xml:
>
> <forward name="login2" path="tiles.login" /> also tried
> <forward name="login2" path="/tiles.login" />
>
> and added a <logic:redirect forward="login2" /> to my index.jsp.
>
> So far so "good". When I try to access the app. (via index.jsp) I
> receive the following message:
> "type Status report
> message /portal/tiles.login
> description The requested resource (/portal/tiles.login) is not
> available."
>
> btw. "portal" is the context.
>
> To me this seems as if struts does not know the tiles definition (or
> at least does not handle it correctly).
>
> The application runs in a Tomcat 5.0.19 container (struts 1.1), and
> no further error-messages are sent to the logs.
>
>
> Maybe somebody knows how to get out of this trouble.
>
> Thanks in advance.
>
> Kind regards,
> Marc Tinnemeyer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to