Re: Bean:message with args
I'm rather new to JSP/tags, so I don't know how difficult it would be to implement your solution. I tend to prefer my solution because it doesn't require as much typing. Stephen - Original Message - From: "Chris Butler" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, May 08, 2001 9:02 AM Subject: RE: Bean:message with args > just curious... what about a minor enhancement to do it like this: > > > > > > > the listed internal body tags would be handled as > arg0, arg1, arg2, etc. > > not that this is how yours works, but i kinda think > the above would be desirable because you could set > anything into the arguments... just a thought tho. > > thoughts? > > Chris > > At 10:34 AM 5/8/2001 +0100, Jon.Ridgway wrote: > >Hi Stephen, > > > >Your solution sounds like its just what I'm after. I would greatly > >appreciate a look at the code. > > > >Jon. > > > >-Original Message- > >From: Stephen Schaub [mailto:[EMAIL PROTECTED]] > >Sent: 04 May 2001 23:34 > >To: [EMAIL PROTECTED] > >Subject: Re: Bean:message with args > > > > > > > Is there a way to acheive the following : > > > "/> > > > without resorting to scriplets > > > >I was looking for a way to do this a while back; currently > >you have to resort to a scriptlet. I proposed and created an > >implementation that allows you to do this: > > > > > > > >The { } in argX parameters tell my modified bean:message tag > >to use the bean introspection to insert the value of the > >bean. If you're interested in the code, I'll be glad to > >share it. > > > >Stephen > > > >- Original Message - > >From: "Jon.Ridgway" <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Sent: Friday, May 04, 2001 10:36 AM > >Subject: Bean:message with args > > > > > >Hi all, > > > >Is there a way to acheive the following : > > > >"/> > > > >without resorting to scriplets, ie : > > > > > > > > > >would work but just doesn't sit right with me. > > > >Any ideas. > > > >Jon. > >
RE: Bean:message with args
just curious... what about a minor enhancement to do it like this: the listed internal body tags would be handled as arg0, arg1, arg2, etc. not that this is how yours works, but i kinda think the above would be desirable because you could set anything into the arguments... just a thought tho. thoughts? Chris At 10:34 AM 5/8/2001 +0100, Jon.Ridgway wrote: >Hi Stephen, > >Your solution sounds like its just what I'm after. I would greatly >appreciate a look at the code. > >Jon. > >-Original Message- >From: Stephen Schaub [mailto:[EMAIL PROTECTED]] >Sent: 04 May 2001 23:34 >To: [EMAIL PROTECTED] >Subject: Re: Bean:message with args > > > > Is there a way to acheive the following : > > "/> > > without resorting to scriplets > >I was looking for a way to do this a while back; currently >you have to resort to a scriptlet. I proposed and created an >implementation that allows you to do this: > > > >The { } in argX parameters tell my modified bean:message tag >to use the bean introspection to insert the value of the >bean. If you're interested in the code, I'll be glad to >share it. > >Stephen > >- Original Message - >From: "Jon.Ridgway" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Friday, May 04, 2001 10:36 AM >Subject: Bean:message with args > > >Hi all, > >Is there a way to acheive the following : > >"/> > >without resorting to scriplets, ie : > > > > >would work but just doesn't sit right with me. > >Any ideas. > >Jon.
RE: Bean:message with args
Hi Stephen, Your solution sounds like its just what I'm after. I would greatly appreciate a look at the code. Jon. -Original Message- From: Stephen Schaub [mailto:[EMAIL PROTECTED]] Sent: 04 May 2001 23:34 To: [EMAIL PROTECTED] Subject: Re: Bean:message with args > Is there a way to acheive the following : > "/> > without resorting to scriplets I was looking for a way to do this a while back; currently you have to resort to a scriptlet. I proposed and created an implementation that allows you to do this: The { } in argX parameters tell my modified bean:message tag to use the bean introspection to insert the value of the bean. If you're interested in the code, I'll be glad to share it. Stephen - Original Message - From: "Jon.Ridgway" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 04, 2001 10:36 AM Subject: Bean:message with args Hi all, Is there a way to acheive the following : "/> without resorting to scriplets, ie : would work but just doesn't sit right with me. Any ideas. Jon.
Re: Bean:message with args
> Is there a way to acheive the following : > "/> > without resorting to scriplets I was looking for a way to do this a while back; currently you have to resort to a scriptlet. I proposed and created an implementation that allows you to do this: The { } in argX parameters tell my modified bean:message tag to use the bean introspection to insert the value of the bean. If you're interested in the code, I'll be glad to share it. Stephen - Original Message - From: "Jon.Ridgway" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 04, 2001 10:36 AM Subject: Bean:message with args Hi all, Is there a way to acheive the following : "/> without resorting to scriplets, ie : would work but just doesn't sit right with me. Any ideas. Jon.
RE: Bean:message with args
Hello everybody, I am trying to test the iterate tag and i am getting the following error.. Can somebody point out as to what i am doing wrong ? Thanks a lot. I am including the jsp code also. I am using Tomcat 3.2 and struts 1.0 cheers, Amar.. ERROR - javax.servlet.ServletException: Cannot create iterator for this collection at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:459) at _0002fpagerTest_0002ejsppagerTest_jsp_0._jspService(_0002fpagerTest_0002ejsp pagerTest_jsp_0.java, Compiled Code) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja va:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) BEAN public class StatesBean { // stores an array list of states private ArrayList states = new ArrayList() ; public StatesBean() { states.add("ALABAMA"); states.add("ALASKA"); states.add("ARIZONA"); states.add("ARKANSAS" ) ; states.add("CALIFORNIA") ; states.add("COLORADO") ; states.add("CONNECTICUT") ; } public Iterator getStates() { return states.iterator() ; } } JSP: <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@ page import = "com.agilquest.onboard.presentation.actionforms.StatesBean" %> <% { com.agilquest.onboard.presentation.actionforms.StatesBean statesBean = new com.agilquest.onboard.presentation.actionforms.StatesBean() ; pageContext.setAttribute("statesBean", statesBean, PageContext.PAGE_SCOPE); } %>