You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Yaman Kumar <ya...@nous.soft.net> on 2002/06/03 11:15:04 UTC

Using hidden variable without form

Hi,
I have a jsp file without a form and has got one image and target of this is
one action class which requires 2 parameters, When i click on this button
i do not want  these parameternames and values to appear in
  querystring in browser address location,
Can i avoid these showing in querystring?, like
<action path="/myfile"
	  type="myaction"
        scope="request"

        SOMETHING HERE  that will have paramname and paramValues reached
here
	  without writing a FormBean with 2 properties.  >.
</action>

or any other way to avoid to show these parameters.

TIA
rayaku




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


several jsps using 1 action class and avoiding several action statements in struts-config.xml

Posted by Yaman Kumar <ya...@nous.soft.net>.
Hi,

I have 4 jsp files using one action class and action class forwards to
the page which called this action class.Becoz i would like user
to go back to same page from which he visited.

Can i  avoid writing 4 action mappings and all 4 mappings have only same
action
class but  forward value is different to each.

First.jsp calls /first.do
<action path="/first" type="MyCentral" >
	  <forward name="success" path="/First.jsp" />
</action>

Second.jsp calls /second.do
<action path="/second" type="MyCentral" >
	  <forward name="success" path="/Second.jsp" />
</action>

Third.jsp calls /third.do
<action path="/third" type="MyCentral" >
	  <forward name="success" path="/Third.jsp" />
</action>

Fourth.jsp calls /fourth.do
<action path="/fourth" type="MyCentral" >
	  <forward name="success" path="/Fourth.jsp" />
</action>

In all above action mappings the action class is same but only path and
success
pages are different, Is there any technique to change these paths and
forward paths
dynamically.

TIA
Yaman


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Using hidden variable without form

Posted by Nicolas De Loof <ni...@cgey.com>.
To avoid parametres to be shown in request you must use POST method inside a
form (links in href="... use only GET). You can use hidden type inputs.

I don't understand why you don't want to define a FormBean for this action,
since you need to get your parameters value ?

Nico

> Hi,
> I have a jsp file without a form and has got one image and target of this
is
> one action class which requires 2 parameters, When i click on this button
> i do not want  these parameternames and values to appear in
>   querystring in browser address location,
> Can i avoid these showing in querystring?, like
> <action path="/myfile"
>   type="myaction"
>         scope="request"
>
>         SOMETHING HERE  that will have paramname and paramValues reached
> here
>   without writing a FormBean with 2 properties.  >.
> </action>
>
> or any other way to avoid to show these parameters.
>
> TIA
> rayaku



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>