Hi,
I was studying my web app and I have got the problem. It is in the class DefinitionTag
that extends SimpleTagSupport. In the method,
| public void doTag() {
| try {
| getJspBody()
| .invoke(null);
|
| Definition definition = new Definition();
| PageContext context = (PageContext) getJspContext();
| setScreen(screenId);
| ArrayList params = (ArrayList) screens.get(this.screenId);
| Iterator ir = null;
|
| if (params != null) {
| ir = params.iterator();
|
| int cont = 0;
| while (ir.hasNext()){
| definition.setParam((Parameter) ir.next());
| cont ++;
| }
| Debug.println("DefinitionTag: params defined: " + cont);
|
| // put the definition in the page context
| context.setAttribute(definitionName, definition,
| PageContext.APPLICATION_SCOPE);
| } else {
| Debug.println("DefinitionTag: params are not defined.");
| }
| } catch (Exception ex) {
| ex.printStackTrace();
| }
| }
|
the line ArrayList params = (ArrayList) screens.get(this.screenId); returns null, so the
rest of the code
| if (params != null) {
| ir = params.iterator();
|
| int cont = 0;
| while (ir.hasNext()){
| definition.setParam((Parameter) ir.next());
| cont ++;
| }
| Debug.println("DefinitionTag: params defined: " + cont);
|
| // put the definition in the page context
| context.setAttribute(definitionName, definition,
| PageContext.APPLICATION_SCOPE);
| } else {
| Debug.println("DefinitionTag: params are not defined.");
| }
|
returns, on the console, the message: "DefinitionTag: params are not defined."
And it is because the value of this.screenId is,
"${requestScope['javax.servlet.forward.servlet_path']}"
that belong to screendefinitions.jspf as follow,
| <%@ taglib uri="SimpleTagLibrary" prefix="tt" %>
| <tt:definition name="bank"
screen="${requestScope['javax.servlet.forward.servlet_path']}">
| <tt:screen screenId="/main">
| <tt:parameter name="title" value="Duke's Bank"
direct="true"/>
| <tt:parameter name="banner" value="/template/banner.jsp"
direct="false"/>
| <tt:parameter name="links" value="/template/links.jsp"
direct="false"/>
| <tt:parameter name="body" value="/main.jsp"
direct="false"/>
| </tt:screen>
|
| <tt:screen screenId="/transferAck">
| <tt:parameter name="title" direct="true">
| <jsp:attribute name="value" >
| <fmt:message key="TitleTransferSucceeded"/>
| </jsp:attribute>
| </tt:parameter>
| <tt:parameter name="banner" value="/template/banner.jsp"
direct="false"/>
| <tt:parameter name="links" value="/template/links.jsp"
direct="false"/>
| <tt:parameter name="body" value="/transferAck.jsp"
direct="false"/>
| </tt:screen>
|
| <tt:screen screenId="/transferFunds">
| <tt:parameter name="title" direct="true">
| <jsp:attribute name="value" >
| <fmt:message key="TitleTransferFunds"/>
| </jsp:attribute>
| </tt:parameter>
| <tt:parameter name="banner" value="/template/banner.jsp"
direct="false"/>
| <tt:parameter name="links" value="/template/links.jsp"
direct="false"/>
| <tt:parameter name="body" value="/transferFunds.jsp"
direct="false"/>
| </tt:screen>
|
| <tt:screen screenId="/atmAck">
| <tt:parameter name="title" direct="true">
| <jsp:attribute name="value" >
| <fmt:message key="TitleWDSucceeded"/>
| </jsp:attribute>
| </tt:parameter>
| <tt:parameter name="banner" value="/template/banner.jsp"
direct="false"/>
| <tt:parameter name="links" value="/template/links.jsp"
direct="false"/>
| <tt:parameter name="body" value="/atmAck.jsp"
direct="false"/>
| </tt:screen>
|
| <tt:screen screenId="/atm">
| <tt:parameter name="title" direct="true">
| <jsp:attribute name="value" >
| <fmt:message key="TitleWD"/>
| </jsp:attribute>
| </tt:parameter>
| <tt:parameter name="banner" value="/template/banner.jsp"
direct="false"/>
| <tt:parameter name="links" value="/template/links.jsp"
direct="false"/>
| <tt:parameter name="body" value="/atm.jsp"
direct="false"/>
| </tt:screen>
|
| <tt:screen screenId="/accountHist">
| <tt:parameter name="title" direct="true">
| <jsp:attribute name="value" >
| <fmt:message key="TitleAccountHistory"/>
| </jsp:attribute>
| </tt:parameter>
| <tt:parameter name="banner" value="/template/banner.jsp"
direct="false"/>
| <tt:parameter name="links" value="/template/links.jsp"
direct="false"/>
| <tt:parameter name="body" value="/accountHist.jsp"
direct="false"/>
| </tt:screen>
|
| <tt:screen screenId="/accountList">
| <tt:parameter name="title" direct="true">
| <jsp:attribute name="value" >
| <fmt:message key="TitleAccountList"/>
| </jsp:attribute>
| </tt:parameter>
| <tt:parameter name="banner" value="/template/banner.jsp"
direct="false"/>
| <tt:parameter name="links" value="/template/links.jsp"
direct="false"/>
| <tt:parameter name="body" value="/accountList.jsp"
direct="false"/>
| </tt:screen>
|
| <tt:screen screenId="/logoff">
| <tt:parameter name="title" direct="true">
| <jsp:attribute name="value" >
| <fmt:message key="TitleLogoff" />
| </jsp:attribute>
| </tt:parameter>
| <tt:parameter name="banner" value="/template/banner.jsp"
direct="false"/>
| <tt:parameter name="links" value="/template/nolinks.jsp"
direct="false"/>
| <tt:parameter name="body" value="/logoff.jsp"
direct="false"/>
| </tt:screen>
| </tt:definition>
|
I think the value might to be "/main", "/transferFunds", etc...
and this is my problem.
Will you help me?
Merry Christmas,
Jose Alvarez de Lara(Oggie Svennson)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198510#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...