 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Generale Cluster Guest
|
Posted: Fri Sep 23, 2005 12:52 pm Post subject: struts: passare valore nella request |
|
|
Ciao,
ho una Action in struts 1.1, nella quale eseguo un
request.setAttribute("nome", stringa) e poi l'ActionForward a una jsp.
Nella jsp di destinazione eseguo un request.getAttribute("nome"), ma
sembra che non venga assegnato il valore che ho messo nella Action.
Da cosa potrebbe dipendere?
Questo è il frammento dello struts-config relativo all'action:
<action path="/jsp/listEntries"
type="it.neonetwork.imin.bus.action.ListEntriesAction" scope="request"
validate="false" >
<forward name="success" path="/jsp/listEntries.jsp"
forward="true" />
<forward name="failure" path="/jsp/common/error.jsp" />
</action>
Grazie
Ciao
--
elimina carraro per rispondere via email
|
|
| Back to top |
|
 |
filp Guest
|
Posted: Sat Sep 24, 2005 9:59 am Post subject: Re: struts: passare valore nella request |
|
|
| Quote: | sembra che non venga assegnato il valore che ho messo nella Action.
sei sicuro che non ci sia in request? Prova a fare un dump dello scope |
nella jsp con i tag di log, così sei sicuro se c'è o meno; in caso
affermativo potresti sbagliarti nel codice jsp prelevando l'oggetto con
la chiave sbagliata.
Ciao
|
|
| Back to top |
|
 |
Generale Cluster Guest
|
Posted: Mon Sep 26, 2005 2:41 pm Post subject: Re: struts: passare valore nella request |
|
|
filp wrote:
| Quote: | sembra che non venga assegnato il valore che ho messo nella Action.
sei sicuro che non ci sia in request? Prova a fare un dump dello scope
nella jsp con i tag di log, così sei sicuro se c'è o meno; in caso
affermativo potresti sbagliarti nel codice jsp prelevando l'oggetto con
la chiave sbagliata.
|
facendo request.getParameter("nome_parametro") sono riuscito a recuperarlo.
Grazie
Bye!
--
elimina carraro per rispondere via email
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|