AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

struts: passare valore nella request

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java (Italian)
View previous topic :: View next topic  
Author Message
Generale Cluster
Guest





PostPosted: Fri Sep 23, 2005 12:52 pm    Post subject: struts: passare valore nella request Reply with quote



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





PostPosted: Sat Sep 24, 2005 9:59 am    Post subject: Re: struts: passare valore nella request Reply with quote



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





PostPosted: Mon Sep 26, 2005 2:41 pm    Post subject: Re: struts: passare valore nella request Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.