Bonjour Tous le monde
j'ai une variable javascript et je veux l'envoyer en request session a une action java struts
merci de votre aide
Bonjour Tous le monde
j'ai une variable javascript et je veux l'envoyer en request session a une action java struts
merci de votre aide
bonjour si quelqu'un a quelque chose, qu'il la montre qui ce qu'il va faire avec elle.
d'accord vas y, montre comment
hiho bonjour,
j'ai trouvé la solution.
si quelqu'un a besoin de cette solution. je suis là
bay
bonjour,
voilà la solution de cette problématique:
en jsp------>
<html:form action="/affiche.do" method="post" >
<html:hidden property='method' value="show" />
<html:hidden property='Personnalise' styleId='Personnalise' value="${Personnalise}" />
<input disabled="disabled" type="submit" class="button" id="btnLancerSimulatin" value="Rechercher" onClick="javascript:affiche(this.form);"/>
</html:form>
.
.
.
function affiche(form){
document.getElementById('Personnalise').value=strPersonnalise;
form.submit();
}
en struts-config----->
<action path="/affiche"
type="org.springframework.web.struts.DelegatingActionProxy"
name="afficheForm" scope="request" parameter="method">
<forward name="showSearch" path="/WEB-INF/jsp/../affichesimulation.jsp" />
</action>
.
.
.
<form-bean name="afficheForm"
type="org.apache.struts.action.DynaActionForm" dynamic="true">
<form-property name="methode" type="java.lang.String" />
<form-property name="Personnalise" type="java.lang.String" />
</form-bean>
en Action-servlet------>
DynaActionForm affForm = (DynaActionForm) form;
String Personnalise = (String) affForm.get("Personnalise");
request.getSession().setAttribute("Personnalise",Personnalise);
à +,
et bonne chance.
Partager