Struts 1.0.2, Nested 1.0 and Standard Tags 1.0.2

2002-11-06 Thread edgar
Are people actively doing things with the JSTL / Struts combination?

The first JSTL tag I attempted to use was the c:set.  I attempted to
use it with a nested:write body but when I ran the page I got a null
pointer exception.  The only workaround I could find was to re-write the
c:set as a very simple tag.

As you can see from the attached I have also modified some of the struts
tags so I assumed someone would assume I botched them.  In this trace I
have modified NestedWriteTag (the only change was to make it a subclass
of my WriteTag, which I have heavily modified) but that has not been
executed.

Thanks for your help.

Regards

Edgar




Diff for my NestedWriteTag
60c60
 package tags;
---
 package org.apache.struts.taglib.nested.bean;
63d62
 import org.apache.struts.taglib.nested.bean.*;
66c65
 
---
 import org.apache.struts.taglib.bean.WriteTag;



A sample piece of code which fails.

html:form action='myaction' method='post'
nested:iterate property='myarraylist'
c:set var=myChoiceValue scope='request'
nested:write property='myNestedChoiceValue'
/c:set
c:set var=myChoiceLabel scope='request'
nested:write property='myNestedChoiceLabel'
/c:set
nested:select property='myChoice'
html:options 
name='%=(String)
request.getAttribute(myChoiceValue)%'
labelName='%=(String)
request.getAttribute(myChoiceValue)%'
/
/nested:select
/nested:iterate
/html:form



Stack trace - from the browser since this was a jsp runtime error

500 Servlet Exception
java.lang.NullPointerException
at
org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(N
estedPropertyHelper.java:174)
at
org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(N
estedPropertyHelper.java:195)
at
org.apache.struts.taglib.nested.NestedPropertyHelper.setNestedProperties
(NestedPropertyHelper.java:242)
at tags.NestedWriteTag.doStartTag(NestedWriteTag.java:90)
at
_web_22dinf._jsp._reportfilters__jsp._jspService(/WEB-INF/jsp/reportFilt
ers.jsp:193)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.subservice(Page.java:485)
at
com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182
)
at
com.caucho.server.http.Invocation.service(Invocation.java:311)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at
com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.jav
a:213)
at
com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.jav
a:100)
at
com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.jav
a:77)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServle
t.java:1759)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1596)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.ja
va:96)
at filters.programSecurity.doFilter(programSecurity.java:84)
at
com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java
:88)
at filters.checkLogon.doFilter(checkLogon.java:81)
at
com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java
:88)
at
com.caucho.server.http.Invocation.service(Invocation.java:311)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at
com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:34
2)
at
com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java
:272)
at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
at java.lang.Thread.run(Thread.java:484)





--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Struts 1.0.2, Nested 1.0 and Standard Tags 1.0.2

2002-11-05 Thread Edgar Dollin
Has anyone gotten JSTL c:set to work with  Struts nested:write.
 
I get a null pointer exception in NestedPropertyHelper line 174.
 
Thanks
 
Edgar P. Dollin
Blue Moose Software, LLC
P/O Box 3865
Union, NJ  07083
908-688-0823
Fax 908-688-0671
[EMAIL PROTECTED] mailto:edgar;blue-moose.net 
http://www.blue-moose.net