You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Chaganti, Manoj" <Ma...@troweprice.com> on 2002/12/28 03:38:41 UTC

Struts with display taglib

Hi,

I am getting the following exception with display taglib. I would really
appreicate if any one gives me a tip.

		<!-- Start Display Tag -->
		<display:table 
		   		width="100%"
		   		list="<%= historyList %>"
		   		pagesize="1"
		   		requestURI="/history"
		 		styleClass="tableBorder"
				border="0"
		   		cellspacing="0"
		   		cellpadding="0"
		  		align="center"
	
decorator="com.trp.fst.mfs.decorators.HistoryDecorator">

			<display:column property="record" title=""
align="center" styleClass=""/>
			<display:setProperty name="paging.banner.group_size"
value="0"/>
			<display:setProperty name="paging.banner.placement"
value="both"/>				
		</display:table>
	
		<!--   End Display Tag  -->

[12/27/02 20:23:54:802 EST] 68c27bb2 WebGroup      X Servlet Error:
org/apache/commons/beanutils/PropertyUtils: java.lang.Exception:
org/apache/commons/beanutils/PropertyUtils
	at jsp._History_jsp_29._jspService(_History_jsp_29.java:342)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:300)
	at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:430)
	at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:565)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
.java:827)
	at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
eServlet.java:167)
	at
com.ibm.servlet.engine.webapp.ServicingServletState.service(StrictLifecycleS
ervlet.java:317)
	at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
Servlet.java:110)
	at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:47
2)
	at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
ager.java:1012)
	at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
er.java:913)
	at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W
ebAppRequestDispatcher.java:523)
	at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest
Dispatcher.java:282)
	at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
ispatcher.java:112)
	at
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
	at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
java:184)
	at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
vocation.java:67)
	at
com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheabl
eInvocationContext.java:106)
	at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
estProcessor.java:125)
	at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
.java:315)
	at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.ja
va:60)
	at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
	at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
	at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)

Thanks,
Manoj


Re: question/problem

Posted by Larry Young <ly...@dalmatian.com>.
Ilya,

         I was fighting the same problem yesterday, and finally got it 
working.  Here's a pretty good example from the new "Struts in Action" book 
(I found this snipet on-line).  Take a look at 
<http://husted.com/struts/tips/007.html>husted.com/struts/tips/007.html.

--- good luck ---
Larry Young


At 10:47 PM 12/27/02 -0500, you wrote:
>Can someone point me to an example of using an <html:multibox>.  I've posted
>earlier with no response:-), hoping maybe I can catch someone's attention
>this time.  A search on google, brought up nothing useful and the two books,
>one by Manning, have no examples of that either.
>
>I'd like to see how to use html:multibox with values and labels, which are
>different.  I tried an example which was the only one I found at...
>http://www.jguru.com/faq/view.jsp?EID=756568
>
>but that returns an error...
>
>java.lang.NullPointerException
>         at java.util.Hashtable.get(Hashtable.java:329)
>
>though I'm not using the Hashtable, evidentaly it requires it, though I
>don't understand where:-)
>
>Sorry if this is obvious.
>
>Thanks.
>
>Ilya
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>

--------------------------
Larry Young
The Dalmatian Group
www.dalmatian.com 

RE: Struts with display taglib

Posted by James Mitchell <jm...@apache.org>.
This may not have anything to do with your display tag example.

Open up "_History_jsp_29.java" and go to line 342, there is something
happening there.

Sorry I couldn't be more specific, but you didn't exactly give a lot of
details about your scenario.



--
James Mitchell
Software Engineer/Open Source Evangelist
http://www.open-tools.org

"C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg." 
- Bjarne Stroustrup


> -----Original Message-----
> From: Chaganti, Manoj [mailto:Manoj_Chaganti@troweprice.com] 
> Sent: Friday, December 27, 2002 9:39 PM
> To: 'struts-user@jakarta.apache.org'
> Subject: Struts with display taglib
> 
> 
> Hi,
> 
> I am getting the following exception with display taglib. I 
> would really
> appreicate if any one gives me a tip.
> 
> 		<!-- Start Display Tag -->
> 		<display:table 
> 		   		width="100%"
> 		   		list="<%= historyList %>"
> 		   		pagesize="1"
> 		   		requestURI="/history"
> 		 		styleClass="tableBorder"
> 				border="0"
> 		   		cellspacing="0"
> 		   		cellpadding="0"
> 		  		align="center"
> 	
> decorator="com.trp.fst.mfs.decorators.HistoryDecorator">
> 
> 			<display:column property="record" title=""
> align="center" styleClass=""/>
> 			<display:setProperty 
> name="paging.banner.group_size"
> value="0"/>
> 			<display:setProperty 
> name="paging.banner.placement"
> value="both"/>				
> 		</display:table>
> 	
> 		<!--   End Display Tag  -->
> 
> [12/27/02 20:23:54:802 EST] 68c27bb2 WebGroup      X Servlet Error:
> org/apache/commons/beanutils/PropertyUtils: java.lang.Exception:
> org/apache/commons/beanutils/PropertyUtils
> 	at jsp._History_jsp_29._jspService(_History_jsp_29.java:342)
> 	at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at
> org.apache.jasper.runtime.JspServlet$JspServletWrapper.service
> (JspServlet.ja
> va:300)
> 	at
> org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet
> .java:430)
> 	at 
> org.apache.jasper.runtime.JspServlet.service(JspServlet.java:565)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at
> com.ibm.servlet.engine.webapp.StrictServletInstance.doService(
> ServletManager
> .java:827)
> 	at
> com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(
> StrictLifecycl
> eServlet.java:167)
> 	at
> com.ibm.servlet.engine.webapp.ServicingServletState.service(St
> rictLifecycleS
> ervlet.java:317)
> 	at
> com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(S
> trictLifecycle
> Servlet.java:110)
> 	at
> com.ibm.servlet.engine.webapp.ServletInstance.service(ServletM
> anager.java:47
> 2)
> 	at
> com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispa
> tch(ServletMan
> ager.java:1012)
> 	at
> com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatc
> h(ServletManag
> er.java:913)
> 	at
> com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWe
> bAppDispatch(W
> ebAppRequestDispatcher.java:523)
> 	at
> com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch
> (WebAppRequest
> Dispatcher.java:282)
> 	at
> com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(
> WebAppRequestD
> ispatcher.java:112)
> 	at
> com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvok
> er.java:91)
> 	at
> com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(
> WebAppInvoker.
> java:184)
> 	at
> com.ibm.servlet.engine.invocation.CachedInvocation.handleInvoc
> ation(CachedIn
> vocation.java:67)
> 	at
> com.ibm.servlet.engine.invocation.CacheableInvocationContext.i
> nvoke(Cacheabl
> eInvocationContext.java:106)
> 	at
> com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByU
> RI(ServletRequ
> estProcessor.java:125)
> 	at
> com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.servi
> ce(OSEListener
> .java:315)
> 	at
> com.ibm.servlet.engine.http11.HttpConnection.handleRequest(Htt
> pConnection.ja
> va:60)
> 	at
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnec
> tion.java:323)
> 	at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
> 	at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
> 
> Thanks,
> Manoj
> 
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: question/problem

Posted by "Sterin, Ilya" <Is...@ciber.com>.
Thanks, I found it and testing:-)

Ilya

-----Original Message-----
From: Eddie Bush [mailto:ekbush@swbell.net]
Sent: Saturday, December 28, 2002 12:19 AM
To: Struts Users Mailing List
Subject: Re: <html:multibox> question/problem


Check out http://www.husted.com/struts/ and
http://www.husted.com/struts/tips.  Ted has at least one tip (if memory
serves) which deals specifically with using a multi-box.

HTH,

Eddie

Sterin, Ilya wrote:

>Can someone point me to an example of using an <html:multibox>.  I've
posted
>earlier with no response:-), hoping maybe I can catch someone's attention
>this time.  A search on google, brought up nothing useful and the two
books,
>one by Manning, have no examples of that either.
>
>I'd like to see how to use html:multibox with values and labels, which are
>different.  I tried an example which was the only one I found at...
>http://www.jguru.com/faq/view.jsp?EID=756568
>
>but that returns an error...
>
>java.lang.NullPointerException
>	at java.util.Hashtable.get(Hashtable.java:329)
>
>though I'm not using the Hashtable, evidentaly it requires it, though I
>don't understand where:-)
>
>Sorry if this is obvious.
>
>Thanks.
>
>Ilya
>

--
Eddie Bush





--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


example problem (NullPointerException)

Posted by "Sterin, Ilya" <Is...@ciber.com>.
Ok, I now have this in my ActionForm class


private String[] selectedItems = {"UPS"};
	private String[] items = {"UPS", "FedEx", "Airborne"};
	public String[] getSelectedItems()
	{
		return this.selectedItems;
	}
	public void setSelectedItems(String[] selectedItems)
	{
		this.selectedItems = selectedItems;
	}


and this in my jsp page...


<logic:iterate id="item" property="items">
<html:multibox property="selectedItems">
<bean:write name="item"/>
</html:multibox>
<bean:write name="item"/><br>
</logic:iterate>


I get this error...

org.apache.jasper.JasperException
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
48)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
	at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:432)

.........


root cause

java.lang.NullPointerException



If I take the tags out of the jsp page, it works fine, which means something
within the tags process is throwing the exception, but I can't get to the
bottom of it.  Can someone please point me in the right direction of
debuggin this.

Thanks.

Ilya

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: question/problem

Posted by Eddie Bush <ek...@swbell.net>.
Check out http://www.husted.com/struts/ and 
http://www.husted.com/struts/tips.  Ted has at least one tip (if memory 
serves) which deals specifically with using a multi-box.

HTH,

Eddie

Sterin, Ilya wrote:

>Can someone point me to an example of using an <html:multibox>.  I've posted
>earlier with no response:-), hoping maybe I can catch someone's attention
>this time.  A search on google, brought up nothing useful and the two books,
>one by Manning, have no examples of that either.
>
>I'd like to see how to use html:multibox with values and labels, which are
>different.  I tried an example which was the only one I found at...
>http://www.jguru.com/faq/view.jsp?EID=756568
>
>but that returns an error...
>
>java.lang.NullPointerException
>	at java.util.Hashtable.get(Hashtable.java:329)
>
>though I'm not using the Hashtable, evidentaly it requires it, though I
>don't understand where:-)
>
>Sorry if this is obvious.
>
>Thanks.
>
>Ilya
>

-- 
Eddie Bush





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


question/problem

Posted by "Sterin, Ilya" <Is...@ciber.com>.
Can someone point me to an example of using an <html:multibox>.  I've posted
earlier with no response:-), hoping maybe I can catch someone's attention
this time.  A search on google, brought up nothing useful and the two books,
one by Manning, have no examples of that either.

I'd like to see how to use html:multibox with values and labels, which are
different.  I tried an example which was the only one I found at...
http://www.jguru.com/faq/view.jsp?EID=756568

but that returns an error...

java.lang.NullPointerException
	at java.util.Hashtable.get(Hashtable.java:329)

though I'm not using the Hashtable, evidentaly it requires it, though I
don't understand where:-)

Sorry if this is obvious.

Thanks.

Ilya

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>