Bonjour à vous tous,
je dois faire une migration d'une application web de Websphere 5 vers Jboss 4.
J'ai un problème avec des variables déclarées dans une jsp (Header.jsp) et utilisées par une jsp mère (CFF_F1_VERSION4.jsp) et jsp fille (actions.jsp).
ma jsp Header.jsp la ou les variables sont déclarées
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106 <%@ page import="renault.ewf.bean.User" %> <%@ page import="renault.ewf.bean.EnhancedActivity" %> <%@ page import="renault.ewf.bean.EnhancedData" %> <%@ page import="renault.ewf.form.DelegationForm" %> <%@ page import="renault.ewf.common.Constant"%> <%@ page import="renault.ewf.action.ActivityAction"%> <%@ page import="renault.ewf.utils.HTMLUtils"%> <%@ page import="renault.ewf.utils.JSPUtils"%> <%@ page import="java.util.Arrays"%> <%@ page import="java.util.ArrayList"%> <%@ page import="java.util.Hashtable"%> <%@ page import="java.util.Enumeration"%> <%@ page import="renault.ewf.utils.IdGenerator"%> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@ page import="java.util.Calendar"%> <%@ page import="java.util.GregorianCalendar"%> <%@ page import="java.util.Date"%> <jsp:useBean id="usersession" class="renault.ewf.session.SessionDataManager" scope="session"/> <head> <link href="<%=request.getContextPath()%>/forms/CFF/version4/jsp/cff.css" rel="stylesheet" type="text/css"> <%-- inclusion des fonction javascript --%> <script language="javascript" src="<%=request.getContextPath()%>/forms/CFF/version4/jsp/cff.js"></script> <% boolean isAdmin = false; String processName = usersession.getSelectedProcess(); User userInfo = usersession.getUser(); if (userInfo != null) { isAdmin = userInfo.isAdmin() || userInfo.isLocalAdmin(processName); } %> <% EnhancedActivity enhancedActivity = (EnhancedActivity) usersession.getEnhancedActivity(); Hashtable datas = enhancedActivity.getEnhancedDatas(); String data1 = JSPUtils.getJSPDataFeed(enhancedActivity); String strJs=JSPUtils.getArrayJs(enhancedActivity); String activityName = enhancedActivity.getName(); String fileName = enhancedActivity.getFileName(); String ra = ""; IdGenerator gen = new IdGenerator(); String requestNumber=""; String startDate=""; String BUNDLE = "CFF-4"; //variable général String blocTitle = ""; String titleAvis = ""; // variable intermediaire String actor = ""; String ll = ""; String[] structToShow = new String[10]; boolean showCond = false; String href = ""; String key=""; String style =""; String styleClass = ""; String libelle = ""; String localResult=""; String msgAttach = ""; String demandTitle=""; boolean isReadOnly = false; boolean isDelete= false; boolean isClear=false; boolean isSend = true; boolean isCancel = true; boolean isSuspend = true; boolean isClose = false; boolean isMandatory = false; boolean isDisabled=false; boolean radioDefault=true; boolean annuaireOn = false; boolean afficheSynth = false; boolean isF2 = false; boolean isF1 = false; boolean isF3 = false; boolean isF4 = false; boolean isF5 = false; boolean isF6 = false; String[] structAccord= {}; //variable du bloc réponse String YES = ""; String NO = ""; String DISTANTLY = ""; String WAIT = ""; //variable du bloc circuit String[] tabTitles = {}; String[] tabActors = {}; Boolean[] tabMandatory = {}; String[] actorsName={}; String syntheseTitle =""; String opinion =""; boolean toHide = false; String syntheseActor =""; String[] syntheseFields = {"VALIDATION_COD", "VALIDATION_DATE", "LASTNAME", "FIRSTNAME", "TITLE", "VALIDATION_COMMENT"}; String[] fields = {"VALIDATION_COD", "VALIDATION_DATE", "LASTNAME", "FIRSTNAME", "TITLE", "VALIDATION_COMMENT"}; String t = ""; String CGIM; // //table de nom de libellé de champ (F3 VALIDER (1et2)) String[] tablibelle = {}; String[] libelleTitle = {}; %> </head>
la jsp mère CFF_F1_VERSION4.jsp, qui include la jsp Header.jsp
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68 <%@include file="header.jsp"%> <table style="border:1px solid;" width="100%"> <tr> <td width="95%"><bean:message bundle="<%=BUNDLE%>" key="cff.help.message"/></td> <td width="5%"><div class="RnoActionButtonsData"><a href="<bean:message bundle="<%=BUNDLE%>" key="cff.help.url"/>" target="_blank"><bean:message bundle="<%=BUNDLE%>" key="cff.help"/></a></div></td> </tr> </table> <html:form action="/submitForm.do" styleId="form"> <html:hidden property="value(jspAction)" styleId="jspAction" /> <html:hidden property="value(arcaActorId)" styleId="arcaActorId" /> <html:hidden property="value(attachmentGroup)" styleId="attachmentGroup" /> <html:hidden property="value(attachmentMode)" styleId="attachmentMode" /> <html:hidden property="value(fieldFocus)" styleId="fieldFocus" /> <% request.setAttribute("cff.isreadonly",new Boolean(false)); request.setAttribute("cff.isF2",new Boolean(false)); request.setAttribute("cff.isF1",new Boolean(true)); request.setAttribute("cff.isF3",new Boolean(false)); %> <jsp:include page="identificationFournisseur.jsp"/> <% request.setAttribute("cff.isreadonly",new Boolean(false)); %> <jsp:include page="piloteValideur.jsp"/> <% isDelete = true; isSend = true; isCancel = true; isClose = false; isSuspend = true; %> <%@include file="actions.jsp"%> <script> addRequired("NOM_FOURNISSEUR"); addRequired("value(FRANCE)"); addRequired("value(PANEL)"); //addRequired("COMPTE"); addRequired("COTATION_FINANCIERE_NOTE"); addRequired("value(STRATEGIQUE)"); addRequired("cff_compte"); addRequired("ACTEUR[0].LASTNAME"); addRequired("ACTEUR[0].FIRSTNAME"); addRequired("ACTEUR[0].IPN"); </script> <html:text property="value(POSITION)" styleId="POSITION" value="Cotation - CAPGEST - " style="visibility:hidden"/> </html:form> <script> //LOAD F1 loadF1(); </script>
la jsp fille actions.jsp utilisée par CFF_F1_VERSION4.jsp, et qui ne fait pas l'include de la jsp Header.jsp.
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 <span id="errText" style="visibility:hidden"><bean:message bundle="<%=BUNDLE%>" key="cff.warn.obligatoire"/></span> <table style="margin-top:2px;"> <tr> <td width="40%" style="border-right:none;"/><!-- Pour décaler à droite--> <td style="border-left:none;text-align:right;"> <div class="RnoActionButtonsData"> <ul> <% if(isSend){ %> <li> <a onclick="submitForm()" href="javascript:sendAction()"><bean:message bundle="<%=BUNDLE%>" key="forms.action.send"/></a> </li> <%}%> <% if(isDelete){ %> <li> <a onclick="submitForm()" href="javascript:cancelDemandAction()"><bean:message bundle="<%=BUNDLE%>" key="forms.action.delete"/></a> </li> <% } %> <% if(isCancel){ %> <li> <a onclick="submitForm()" href="javascript:cancelAction()"><bean:message bundle="<%=BUNDLE%>" key="forms.action.cancel"/></a> </li> <%}%> <% if(isClose){ %> <li> <a onclick="submitForm()" href="javascript:closeMe()"><bean:message bundle="<%=BUNDLE%>" key="forms.action.close"/></a> </li> <% } %> <% if(isClear){ %> <li> <a onclick="submitForm()" href="javascript:cancelDemandAction()"><bean:message bundle="<%=BUNDLE%>" key="forms.action.clear"/></a> </li> <% } %> <% if(isSuspend){ %> <li> <a onclick="submitForm()" href="javascript:suspendAction()"><bean:message bundle="<%=BUNDLE%>" key="forms.action.suspend"/></a> </li> <%}%> <li> <a href="#" OnClick="javascript:printForm()"><bean:message bundle="<%=BUNDLE%>" key="forms.action.print"/></a> </li> </ul> </div> </td> </tr> </table >
Mon problème est que les variables de la jsp fille actions.jsp ne sont pas reconnus.
je tiens à noté que ce code avec ce type de déclaration de variable fonctionne correctement sous Websphere (WSAD).
J'utilise Jboss developper studio 4 comme IDE.
Avez vous une explication ou une idée pour ce problème SVP.
je vous remercie d'avance
Partager