RE: Newbie-Q regarding tiles

2004-06-05 Thread David Friedman
Sangeetha,

Your error suggests a redirect is 
occurring, not a forward.  A tile
cannot be seen from the web, only
from inside the struts framework,
hence that error messager.

I recommend you replace the contents
of your welcome file with code to 
pull in and insert the tile, which
goes something like this, but don't
quote me on it. 
(I'd posted about this in the archives months ago):

%@ taglib uri=/tags/struts-tiles prefix=tiles %
tiles:insert definition=LoginPage/

Regards,
David


-Original Message-
From: vpsangeetha [mailto:[EMAIL PROTECTED]
Sent: Friday, June 04, 2004 12:43 PM
To: [EMAIL PROTECTED]
Subject: Newbie-Q regarding tiles


Hi,

I have a very basic question wrt tiles. I have a tiles-def.xml 
defined in the /WEB-INF/ directory with 1 of the definitions being

definition name=LoginPage extends=baseDef
put name=body value=/login.jsp/
/definition

I want the first page of my application to use this definition. So in 
my web.xml, I define the welcome file and all this file has is 

logic:forward name=login /

In the struts-config.xml, I have 

global-forwards
forward name=login path=LoginPage /
/global-forwards

But I get the error
HTTP ERROR: 404 /alarmagent/LoginPage Not Found

Any idea why this is happening? And does anyone know a way around it?

Thanks  sorry if the q is very trivial.
Sangeetha.


-
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]



Re: Newbie-Q regarding tiles

2004-06-05 Thread Christian Bollmeyer
On Friday 04 June 2004 18:42, vpsangeetha wrote:

You can't directly access Tiles definitions from
your JSPs, but have to wrap them into Struts
actions (in struts-config.xml) like this:

action path=/login forward=loginPage/

Then call login.do, and it will work.

HTH, 
-- Chris.

 Hi,

 I have a very basic question wrt tiles. I have a tiles-def.xml
 defined in the /WEB-INF/ directory with 1 of the definitions being

 definition name=LoginPage extends=baseDef
 put name=body value=/login.jsp/
 /definition

 I want the first page of my application to use this definition. So in
 my web.xml, I define the welcome file and all this file has is

 logic:forward name=login /

 In the struts-config.xml, I have

 global-forwards
   forward name=login path=LoginPage /
 /global-forwards

 But I get the error
 HTTP ERROR: 404 /alarmagent/LoginPage Not Found

 Any idea why this is happening? And does anyone know a way around it?

 Thanks  sorry if the q is very trivial.
 Sangeetha.


 -
 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]