bon je m'incruste avec mon problème on sait jamais![]()
Donc j'obtiens bien null lorsque j'utilise request alors idArticle a bien une valeur 10 lignes plus haut quand je l'affiche
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 <%@ page language="java" import="java.util.*" import= "com.webGPI.GPI.web.*"%> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <html> <head> <title> Veuillez Choisir vos articles </title> </head> <body> <h1 align="center">Veuillez Choisir vos articles</H1> <div align="center"> Id de l'article: <bean:write name="ChooseForm" property="idArticle" /> <BR/> Marque: <bean:write name="ChooseForm" property="article.marque" /> <BR/> Designation: <bean:write name="ChooseForm" property="article.designation" /> <BR/> Prix unitaire: <bean:write name="ChooseForm" property="article.price" /> <BR/> <% String sarticle = (String)request.getAttribute("idArticle"); int idarticle = 1; if (request.getAttribute("idArticle") == null) { out.print("champ null"); } %> <BR /> <a href="Choose.do?idArticle=<%= idarticle - 1 %>">Précédent</a> <a href="Choose.do?idArticle=<%= idarticle + 1 %>">Suivant</a> </div> </body> </html>
Partager