You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Nanduri, Amarnath" <Am...@Agilquest.com> on 2001/06/20 20:04:38 UTC

creating ActionError inside a jsp page

Hi All,

 Is it possible to create an Action Error object inside a jsp page. When i
am trying to forward the user from one page to an other page, i need to show
a confirmation message to the user (in the new page) and i was thinking of
using an Action Error object. thanks.


cheers,
Amar..

Re: creating ActionError inside a jsp page

Posted by Roland Huss <Ro...@consol.de>.
Hi,

>  Is it possible to create an Action Error object inside a jsp page. When i
> am trying to forward the user from one page to an other page, i need to show
> a confirmation message to the user (in the new page) and i was thinking of
> using an Action Error object. thanks.

I would recommend to use an own tag for informational messages to make
the separation clean between errors and messages.

For example, you could have a method in your (base) action for setting
info messages into the session under some ID.  A custom tag checks for
the existence of a session attribute ID and prints the stored info
message (and finally cleans up the session, of course).

cu...
-- 
							...roland huss
						             consol.de

Re: creating ActionError inside a jsp page

Posted by Martin Cooper <ma...@tumbleweed.com>.
Are you forwarding directly from one JSP to another? That would seem to be
mixing controller functionality with the view. On the other hand, if you're
not doing that, then the Action between the pages is the place to create
your ActionError.

--
Martin Cooper


----- Original Message -----
From: "Nanduri, Amarnath" <Am...@Agilquest.com>
To: <st...@jakarta.apache.org>
Sent: Wednesday, June 20, 2001 11:04 AM
Subject: creating ActionError inside a jsp page


>
> Hi All,
>
>  Is it possible to create an Action Error object inside a jsp page. When i
> am trying to forward the user from one page to an other page, i need to
show
> a confirmation message to the user (in the new page) and i was thinking of
> using an Action Error object. thanks.
>
>
> cheers,
> Amar..



Re: simple question

Posted by Rama Krishna <kr...@hotmail.com>.
what is we have an index of type int??? how do we refer to it???

means suppose i have <% int index=0; %>

how can i check this with logic:equal

thanks,
rama


----- Original Message ----- 
From: "Norman Timmler" <no...@neteye.de>
To: <st...@jakarta.apache.org>
Sent: Tuesday, July 03, 2001 1:13 PM
Subject: AW: <logic:equal> simple question


> you can compare a property to an int value, but you have to quote it:
> 
> <logic:equal name="myForm" property="MyProperty" value="3">
> 
> 
> -----Ursprungliche Nachricht-----
> Von: gdelgado@www.neteye.de [mailto:gdelgado@www.neteye.de]Im Auftrag
> von gdelgado
> Gesendet: Dienstag, 3. Juli 2001 21:27
> An: struts-user@jakarta.apache.org
> Betreff: <logic:equal> simple question
> 
> 
> > can I use the tag <logic:equal name="myForm" property="MyProperty"
> value=3>
> 
> in other words can i use an int ?
> 
> how about a boolean?
> 
> thanks in advance.
> 
> Gus
> 
> 
> 

AW: simple question

Posted by Norman Timmler <no...@neteye.de>.
you can compare a property to an int value, but you have to quote it:

<logic:equal name="myForm" property="MyProperty" value="3">


-----Ursprungliche Nachricht-----
Von: gdelgado@www.neteye.de [mailto:gdelgado@www.neteye.de]Im Auftrag
von gdelgado
Gesendet: Dienstag, 3. Juli 2001 21:27
An: struts-user@jakarta.apache.org
Betreff: <logic:equal> simple question


> can I use the tag <logic:equal name="myForm" property="MyProperty"
value=3>

in other words can i use an int ?

how about a boolean?

thanks in advance.

Gus



simple question

Posted by gdelgado <gu...@netquotient.com>.
> can I use the tag <logic:equal name="myForm" property="MyProperty" value=3>

in other words can i use an int ?

how about a boolean?

thanks in advance.

Gus



Re: creating ActionError inside a jsp page

Posted by Ted Husted <hu...@apache.org>.
It should be possible, but you would also have to replicate the Action
classes's SaveError method to expose the error collection to the next
page in the request.

See David Winterfeldt's validation package for tags that seperate errors
and other messages. 

< http://www.husted.com/about/struts/ >

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/

"Nanduri, Amarnath" wrote:
> 
> Hi All,
> 
>  Is it possible to create an Action Error object inside a jsp page. When i
> am trying to forward the user from one page to an other page, i need to show
> a confirmation message to the user (in the new page) and i was thinking of
> using an Action Error object. thanks.
> 
> cheers,
> Amar..