You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Manuel Lenz <Lz...@viessmann.com> on 2003/04/16 16:08:07 UTC
Antwort: Setting request Parameter
Hi Renato,
why don´t you use this way:
For example:
HttpSession session = request.getSession();
session.setAttribute(Globals.LOCALE_KEY, new Locale("en", "UK"));
Greetings,
Manuel
|---------+---------------------------->
| | |
| | |
| | |
| |"Renato Romano" |
| |<r....@set-network.com> |
| |16.04.2003 16:11 |
| |Bitte antworten an "Struts |
| |Users Mailing List" |
| | |
|---------+---------------------------->
>----------------------------------------------------------------------------------------------------------------------------|
| |
| An: "'Struts Users Mailing List'" <st...@jakarta.apache.org> |
| Kopie: |
| Thema: Setting request Parameter |
>----------------------------------------------------------------------------------------------------------------------------|
I need to replace a request parameter inside an Action perform method,
based on runtime operations, before giving control to the view, that is
before returning mapping.findForward("forward"); I obviously cannot set
the parameter inside struts-config, because its value is run-time
computed, and cannot find a way to set it run-time... What I'd need is a
request.setParameter() method... Is there a way to do this ?
Thanks
Renato
____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA
e-mail: r.romano@set-network.com
Tel.: 010 2712603
_____________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Antwort: Setting request Parameter
Posted by Greg Dunn <gr...@mo.nisc.cc>.
You said it was for use in the view, an attribute works as well as a
parameter there. Sorry, but "why?" is a valid question. We're just trying
to help you accomplish your ultimate goal.
Greg
-----Original Message-----
From: Renato Romano [mailto:r.romano@set-network.com]
Sent: Wednesday, April 16, 2003 9:55 AM
To: 'Struts Users Mailing List'
Subject: RE: Antwort: Setting request Parameter
Sorry but I don't understand how may I use the session ... I have a page
expecting a parameter, say "param"; from the browser yoy'd invoke it
like http://myhost/myapp/mypage.jsp?param=value
In effect the page is forwarded to by an Action, so (please don't ask me
why!!) I need to set that parameter inside the perform method of the
Action object.
Renato
____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA
e-mail: r.romano@set-network.com
Tel.: 010 2712603
_____________________________________
-----Original Message-----
From: Manuel Lenz [mailto:LzM@viessmann.com]
Sent: mercoledì 16 aprile 2003 16.08
To: Struts Users Mailing List
Subject: Antwort: Setting request Parameter
Hi Renato,
why don´t you use this way:
For example:
HttpSession session = request.getSession();
session.setAttribute(Globals.LOCALE_KEY, new Locale("en", "UK"));
Greetings,
Manuel
|---------+---------------------------->
| | |
| | |
| | |
| |"Renato Romano" |
| |<r....@set-network.com> |
| |16.04.2003 16:11 |
| |Bitte antworten an "Struts |
| |Users Mailing List" |
| | |
|---------+---------------------------->
>-----------------------------------------------------------------------
-----------------------------------------------------|
|
|
| An: "'Struts Users Mailing List'"
<st...@jakarta.apache.org>
|
| Kopie:
|
| Thema: Setting request Parameter
|
>-----------------------------------------------------------------------
-----------------------------------------------------|
I need to replace a request parameter inside an Action perform method,
based on runtime operations, before giving control to the view, that is
before returning mapping.findForward("forward"); I obviously cannot set
the parameter inside struts-config, because its value is run-time
computed, and cannot find a way to set it run-time... What I'd need is a
request.setParameter() method... Is there a way to do this ? Thanks
Renato
____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA
e-mail: r.romano@set-network.com
Tel.: 010 2712603
_____________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Antwort: Setting request Parameter
Posted by Renato Romano <r....@set-network.com>.
Sorry but I don't understand how may I use the session ... I have a page
expecting a parameter, say "param"; from the browser yoy'd invoke it
like http://myhost/myapp/mypage.jsp?param=value
In effect the page is forwarded to by an Action, so (please don't ask me
why!!) I need to set that parameter inside the perform method of the
Action object.
Renato
____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA
e-mail: r.romano@set-network.com
Tel.: 010 2712603
_____________________________________
-----Original Message-----
From: Manuel Lenz [mailto:LzM@viessmann.com]
Sent: mercoledì 16 aprile 2003 16.08
To: Struts Users Mailing List
Subject: Antwort: Setting request Parameter
Hi Renato,
why don´t you use this way:
For example:
HttpSession session = request.getSession();
session.setAttribute(Globals.LOCALE_KEY, new Locale("en", "UK"));
Greetings,
Manuel
|---------+---------------------------->
| | |
| | |
| | |
| |"Renato Romano" |
| |<r....@set-network.com> |
| |16.04.2003 16:11 |
| |Bitte antworten an "Struts |
| |Users Mailing List" |
| | |
|---------+---------------------------->
>-----------------------------------------------------------------------
-----------------------------------------------------|
|
|
| An: "'Struts Users Mailing List'"
<st...@jakarta.apache.org>
|
| Kopie:
|
| Thema: Setting request Parameter
|
>-----------------------------------------------------------------------
-----------------------------------------------------|
I need to replace a request parameter inside an Action perform method,
based on runtime operations, before giving control to the view, that is
before returning mapping.findForward("forward"); I obviously cannot set
the parameter inside struts-config, because its value is run-time
computed, and cannot find a way to set it run-time... What I'd need is a
request.setParameter() method... Is there a way to do this ? Thanks
Renato
____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA
e-mail: r.romano@set-network.com
Tel.: 010 2712603
_____________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org