Struts Layout problem: NPE with layout:checkboxes???
Hi all, Im experimenting with Struts Layout and having a problem with the layout:checkboxes tag. The jsp Im replacing uses the multibox tag backed by a DynaActionForm with a String[] property and works fine. But with Struts Layout, the layout:checkboxes grabs the collection properly out of the request and populates the form with checkboxes, but I get an NPE on form submit. Ive wracked my brains and cant diagnose the problem. Any hints appreciated! Heres the form: layout:form action=/newteamsave.do?method=newteamsave focus=teamname key=newteam.title styleClass=FORM Snip layout:checkboxes key=prompt.selectcats property=cats layout:options collection=categories property=categoryname/ /layout:checkboxes layout:formActions layout:submit property=submit value=Submit/ layout:reset/ /layout:formActions /layout:form And heres the NPE. Ive tried my own form class with an ArrayList() property insteadstill get the same exception. java.lang.NullPointerException at org.apache.commons.beanutils.PropertyUtils.setIndexedProperty(PropertyUt ils.java:1458) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:928) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:729) --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.502 / Virus Database: 300 - Release Date: 7/18/2003
RE: ActionForm Design Question
| Question 1: Do I use conventional ActionForm? | Map-backed ActionForm? or DynaActionForm for this | project? | |If I were you, I would use the conventional ActionForm if |most of the properties are Strings. If your data is fixed on form, then it is good to have ActionForm. More, you may use DynaActionForm if you don't wish to write a ActionForm file ;-) | | Question 2: Which strategy should I use to transfer | values between tiers? Setting an immutable value | object? or transferring values by reflection | (BeanUtil)? or passing a Map? | |Then I would use the transerring mechanism in the BeanUtil package. If your app is simple enough, you can use Map. If you know your app is gonna expand like hell, invest time on BeanUtil. Navjot Singh | | I highly value your opinions and advices. Thanks. | | |Jing |Netspread Carrier |http://www.netspread.com | | | __ | Do you Yahoo!? | Yahoo! SiteBuilder - Free, easy-to-use web site design software | http://sitebuilder.yahoo.com | | - | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | | | |- |To unsubscribe, e-mail: [EMAIL PROTECTED] |For additional commands, e-mail: [EMAIL PROTECTED] | | - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
display using bean-write
hi, I have a problem in dispaying the values in my JSP. I have values like Langugae: Java Language: C Language: C++ XXX : tyu I'm using mutator methods and displaying the values in my JSP using bean-wite. But My problem is if I have the word 'Language' coming more than once/ if there are more than one languages I have to show it only once...like Language : Java C C++ XXX : tyu but I'm not able to dislay in this manner...I cant do it in my Action class as I ahve some constarints...so how can I do this when I displaying it in JSP...I'm using bean-write.. can anybody plez help me... Thanks you ___ Download the hottest happening ringtones here! OR SMS: Top tone to 7333 Click here now: http://sms.rediff.com/cgi-bin/ringtone/ringhome.pl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Resultsets with struts 1.1
I am looking for an example showing the use of resultsets preferably with struts 1.1. thanks. _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Resultsets with struts 1.1 IGNORE
Sorry , I found what I wanted!!! From: message message [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Resultsets with struts 1.1 Date: Sat, 02 Aug 2003 12:28:46 +0400 I am looking for an example showing the use of resultsets preferably with struts 1.1. thanks. _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
unsubcribe
message message wrote: Sorry , I found what I wanted!!! From: message message [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Resultsets with struts 1.1 Date: Sat, 02 Aug 2003 12:28:46 +0400 I am looking for an example showing the use of resultsets preferably with struts 1.1. thanks. _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unsubcribe
Are you telling me to unsubcribe ? From: Axel Sachmann [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: unsubcribe Date: Sat, 02 Aug 2003 11:03:58 +0200 message message wrote: Sorry , I found what I wanted!!! From: message message [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Resultsets with struts 1.1 Date: Sat, 02 Aug 2003 12:28:46 +0400 I am looking for an example showing the use of resultsets preferably with struts 1.1. thanks. _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot find bean error in any scope
Why don't u use html:errors instead?? Just give /html:errors -Original Message- From: Altug B. Altintas [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 4:07 PM To: 'Struts Users Mailing List' Subject: RE: Cannot find bean error in any scope Strange ! Now i have got no custom validation *** public ActionErrors validate(ActionMapping mapping, javax.servlet.http.HttpServletRequest request) { ActionErrors errors = null ; errors = super.validate(mapping,request); return errors; } *** only call parent's validation method, but again it gives me javax.servlet.jsp.JspException: Cannot find bean error in any scope Error occurs because of the code below, but why ? *** logic:messagesPresent UL html:messages id=error LIbean:write name=error//LI /html:messages /UL /logic:messagesPresent *** if change above code like this *** html:errors/ *** Everything works fine.. -Original Message- From: Altug B. Altintas [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 12:16 PM To: 'Struts Users Mailing List' Subject: Cannot find bean error in any scope Hi, My form extends ValidationForm, and of course i have got validator-rules and validation.xml. But when i want to make a custom valition in validate() method , i took javax.servlet.jsp.JspException: Cannot find bean error in any scope My jsp page includes the code below to show the errors: * logic:messagesPresent UL html:messages id=error LIbean:write name=error//LI /html:messages /UL /logic:messagesPresent * overriding validate() method * public ActionErrors validate(ActionMapping mapping, javax.servlet.http.HttpServletRequest request) { ActionErrors errors = null ; errors = super.validate(mapping,request); try { if (errors == null) { errors = new ActionErrors(); } Calendar c1 = dUtils.str2Calendar(startdate); Calendar c2 = dUtils.str2Calendar(enddate); // if enddate bigger then startdate then add error if ( !c1.before(c2) ) { // custom validation errors.add(ActionErrors.GLOBAL_ERROR ,new ActionError(errors.dateerror,test); } // print out the errors Iterator it = errors.get(); while ( it.hasNext() ) { ActionError ae = (ActionError) it.next(); System.out.println(Errors : + ae.getKey() + ); int length = ae.getValues().length; Object[] o = ae.getValues(); for (int i=0; ilength ; i++) { System.out.println( : + o[i] + ); } System.out.println( ); } } catch ( Exception ex ) { System.out.println(Ex: + ex); } finally { if (errors.isEmpty()) { return null; } return (errors); } } * Any idea ? Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:radio
Hello Group, I have a JSP page in which i have 4 radio buttons . I have to select any one of them when the page is loaded. Is there any way out of this. Best Regards, Prashant S. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: unsubcribe
Axel, if you want to unsubscribe scroll down to the lowest part of any email of this mailing list... -Original Message- From: Axel Sachmann [mailto:[EMAIL PROTECTED] Sent: Saturday, August 02, 2003 2:34 PM To: Struts Users Mailing List Subject: unsubcribe message message wrote: Sorry , I found what I wanted!!! From: message message [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Resultsets with struts 1.1 Date: Sat, 02 Aug 2003 12:28:46 +0400 I am looking for an example showing the use of resultsets preferably with struts 1.1. thanks. _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot find bean error in any scope
I had the same problem. When I wrote 'errors' it worked for me. Try html:messages id=errors and bean:write name=errors/! Hope it helps. Koni Swaroop George wrote: Why don't u use html:errors instead?? Just give /html:errors -Original Message- From: Altug B. Altintas [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 4:07 PM To: 'Struts Users Mailing List' Subject: RE: Cannot find bean error in any scope Strange ! Now i have got no custom validation *** public ActionErrors validate(ActionMapping mapping, javax.servlet.http.HttpServletRequest request) { ActionErrors errors = null ; errors = super.validate(mapping,request); return errors; } *** only call parent's validation method, but again it gives me javax.servlet.jsp.JspException: Cannot find bean error in any scope Error occurs because of the code below, but why ? *** logic:messagesPresent UL html:messages id=error LIbean:write name=error//LI /html:messages /UL /logic:messagesPresent *** if change above code like this *** html:errors/ *** Everything works fine.. -Original Message- From: Altug B. Altintas [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 12:16 PM To: 'Struts Users Mailing List' Subject: Cannot find bean error in any scope Hi, My form extends ValidationForm, and of course i have got validator-rules and validation.xml. But when i want to make a custom valition in validate() method , i took javax.servlet.jsp.JspException: Cannot find bean error in any scope My jsp page includes the code below to show the errors: * logic:messagesPresent UL html:messages id=error LIbean:write name=error//LI /html:messages /UL /logic:messagesPresent * overriding validate() method * public ActionErrors validate(ActionMapping mapping, javax.servlet.http.HttpServletRequest request) { ActionErrors errors = null ; errors = super.validate(mapping,request); try { if (errors == null) { errors = new ActionErrors(); } Calendar c1 = dUtils.str2Calendar(startdate); Calendar c2 = dUtils.str2Calendar(enddate); // if enddate bigger then startdate then add error if ( !c1.before(c2) ) { // custom validation errors.add(ActionErrors.GLOBAL_ERROR ,new ActionError(errors.dateerror,test); } // print out the errors Iterator it = errors.get(); while ( it.hasNext() ) { ActionError ae = (ActionError) it.next(); System.out.println(Errors : + ae.getKey() + ); int length = ae.getValues().length; Object[] o = ae.getValues(); for (int i=0; ilength ; i++) { System.out.println( : + o[i] + ); } System.out.println( ); } } catch ( Exception ex ) { System.out.println(Ex: + ex); } finally { if (errors.isEmpty()) { return null; } return (errors); } } * Any idea ? Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
getting value of html:multibox
Hello everybody, I want to get the value of the checkbox which i have clicked. For that i am building the following JSP page html:form action=/returnsUpdateAction html:multibox name=vTRReturnsUpdateForm property=statusCheckBox value=prashant/ html:link action=returnsUpdateAction?statusId=1009some image/html:link /html:form When i click the link, the framework calls the Action class(Shown below) but print blank on the console. But if i use html:submit,than everything works fine. How can i retrieve the value of checkbox by clicking on the link. My struts confif file is as follows action path=/returnsUpdateAction type=com.mphasis.mvtrproto.returns.VTRReturnsUpdateAction name=vTRReturnsUpdateForm scope=request forward name=STATUSCHANGED path=/changesReturnStatusSuccess.jsp / exception key=global.error.invalidLogin path=/a.jsp scope=request type=java.lang.SQLException/ /action !-- For Acception and Rejecting Returns-- form-bean name=vTRReturnsUpdateForm type=org.apache.struts.validator.DynaValidatorForm form-property name=statusCheckBox type=java.lang.String[] / /form-bean My Action class is as follows public class VTRReturnsUpdateAction extends Action { public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)throws Exception { try { String returnId[] = (String[])((DynaActionForm)form).get(statusCheckBox); System.out.println(Value is +returnId[0]); return mapping.findForward(STATUSCHANGED); } catch(Exception e) { e.printStackTrace(); throw e; } } } Best Regards, Prashant S. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP Exception - URGENT!!!
Hello All, This is a real strange exception am getting. I have a main page which has 6 links. First time I can select any of the link and the page is rendered. Once I come back the main page and select any other link, I get the following message: === javax.servlet.jsp.JspException: No getter method for property accountNo of bean org.apache.struts.taglib.html.BEAN accountNo attribute is declared and even the methods are present. When I close and open a new instance of Explorer, I dont get this message, but this repeats for other pages!! Please could anybody help me? Thanx in advance. Regards, Samanth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: getting value of html:multibox
If you are just linking, then you are not submitting your form, that contains your checkbox. You need to rethikn your design. The only way your checkbox vaulue gets to the server thru you submitting the form, clicking the link does not do it, unless your link has some javascript that goes something like: myForm.submit ();return false; Alex. -Original Message- From: Prashant Samant [mailto:[EMAIL PROTECTED] Sent: Saturday, August 02, 2003 6:03 AM To: Struts Users Mailing List (E-mail) Subject: getting value of html:multibox Hello everybody, I want to get the value of the checkbox which i have clicked. For that i am building the following JSP page html:form action=/returnsUpdateAction html:multibox name=vTRReturnsUpdateForm property=statusCheckBox value=prashant/ html:link action=returnsUpdateAction?statusId=1009some image/html:link /html:form When i click the link, the framework calls the Action class(Shown below) but print blank on the console. But if i use html:submit,than everything works fine. How can i retrieve the value of checkbox by clicking on the link. My struts confif file is as follows action path=/returnsUpdateAction type=com.mphasis.mvtrproto.returns.VTRReturnsUpdateAction name=vTRReturnsUpdateForm scope=request forward name=STATUSCHANGED path=/changesReturnStatusSuccess.jsp / exception key=global.error.invalidLogin path=/a.jsp scope=request type=java.lang.SQLException/ /action !-- For Acception and Rejecting Returns-- form-bean name=vTRReturnsUpdateForm type=org.apache.struts.validator.DynaValidatorForm form-property name=statusCheckBox type=java.lang.String[] / /form-bean My Action class is as follows public class VTRReturnsUpdateAction extends Action { public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)throws Exception { try { String returnId[] = (String[])((DynaActionForm)form).get(statusCheckBox); System.out.println(Value is +returnId[0]); return mapping.findForward(STATUSCHANGED); } catch(Exception e) { e.printStackTrace(); throw e; } } } Best Regards, Prashant S. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:radio
Not sure what you mean by any way out of this. Can you be more detailed? -Original Message- From: Prashant Samant [mailto:[EMAIL PROTECTED] Sent: Saturday, August 02, 2003 5:42 AM To: Struts Users Mailing List (E-mail) Subject: html:radio Hello Group, I have a JSP page in which i have 4 radio buttons . I have to select any one of them when the page is loaded. Is there any way out of this. Best Regards, Prashant S. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:radio
i mean,is there any way,if i could keep any of the radio button selected(or checked) when the page is loaded. T R, Prashant S -Original Message- From: Alex Shneyderman [mailto:[EMAIL PROTECTED] Sent: Saturday, August 02, 2003 5:45 PM To: 'Struts Users Mailing List' Subject: RE: html:radio Not sure what you mean by any way out of this. Can you be more detailed? -Original Message- From: Prashant Samant [mailto:[EMAIL PROTECTED] Sent: Saturday, August 02, 2003 5:42 AM To: Struts Users Mailing List (E-mail) Subject: html:radio Hello Group, I have a JSP page in which i have 4 radio buttons . I have to select any one of them when the page is loaded. Is there any way out of this. Best Regards, Prashant S. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:radio
Sure you need to process your url thru an action, struts will create your form bean, you will set the values of your formbean attribute that is rendered as a radio button, and then you redirect your request to the presentation page that has your html:form. Alex. -Original Message- From: Prashant Samant [mailto:[EMAIL PROTECTED] Sent: Saturday, August 02, 2003 8:18 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: html:radio i mean,is there any way,if i could keep any of the radio button selected(or checked) when the page is loaded. T R, Prashant S -Original Message- From: Alex Shneyderman [mailto:[EMAIL PROTECTED] Sent: Saturday, August 02, 2003 5:45 PM To: 'Struts Users Mailing List' Subject: RE: html:radio Not sure what you mean by any way out of this. Can you be more detailed? -Original Message- From: Prashant Samant [mailto:[EMAIL PROTECTED] Sent: Saturday, August 02, 2003 5:42 AM To: Struts Users Mailing List (E-mail) Subject: html:radio Hello Group, I have a JSP page in which i have 4 radio buttons . I have to select any one of them when the page is loaded. Is there any way out of this. Best Regards, Prashant S. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP Exception - URGENT!!!
When you come back to the page, you are probably not going through an action-mapping that instantiates the bean with the accountNo property, which is probably set to request scope. Once the page is rendered and waiting for input, the JSP engine and Struts are out of the picture. It's just a plain HTML page sitting in your browser's cache. So, the error would be coming form whatever mapping or page to which the link points. The term org.apache.struts.taglib.html.BEAN indicates that the error is coming from within a html:form tag. This would imply that the page to which the link points contains a form. The target of that form would be another ActionMapping, and that mapping is the one that needs to specify an ActionForm with an accountNo property. html:link action=/mapping1 - action path=/mapping1 - {another page} - html:form target=/mapping2 mapping2 is the one that needs to name an ActionForm with an accountNo property. -Ted. Samanth Athrey wrote: Hello All, This is a real strange exception am getting. I have a main page which has 6 links. First time I can select any of the link and the page is rendered. Once I come back the main page and select any other link, I get the following message: === javax.servlet.jsp.JspException: No getter method for property accountNo of bean org.apache.struts.taglib.html.BEAN accountNo attribute is declared and even the methods are present. When I close and open a new instance of Explorer, I dont get this message, but this repeats for other pages!! Please could anybody help me? Thanx in advance. Regards, Samanth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ted Husted, Junit in Action - http://www.manning.com/massol/, Struts in Action - http://husted.com/struts/book.html, JSP Site Design - http://www.amazon.com/exec/obidos/ISBN=1861005512. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tiles definition and multiple roles
I have a need to assign multiple roles to a tile definition but the attribute role only will take one. What do I need to do if I need multiple roles able to have access to the tile? Thanks, Alex. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
error in writing message on JSP using bean:message key=errors.header/
Hi, While using tag bean:message key=errors.header/ I am getting following error on my server console. java.lang.ClassCastException: java.lang.String at org.apache.struts.util.RequestUtils.message(RequestUtils.java:930) at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:294) Can any one tell me why I am getting this error Thanks Sunil
dyna form property size.
Can anyone help me with some nice ways of changing the length (size attribute in stuts-config) for a form property.. James Turner;s primer is great on this subject apart from the details of how to do this are skipped over.. quote You can even dynamically specify the size of the form (and prepopulate it) at run time. I've recently used this technique with an insurance application where the user has to choose various parameters such as copays and deductables for a claim modeling system. by using an Action instead of a forward to precreate the form-property value, and leaving the size parameter out. The actual can then create an array of the appropriate size and prepopulate values. The only trick is that the form must be placed in session scope, because it needs to be available and of the right size to accept the submitted values. /quote http://developer.com/java/ejb/article.php/2233591 Now I've an action that populates my form, but I see no obvious way of reseting the length of the form property array (not array of form properties). The only way I've thought of is to create another dynabean and copy the properties to the new one. any ideas appreciated.. Cheers Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Action Chaining BeanUtils.populate() Exception after first Action
I have a sequence of actions (a chain), action A input page - request - action A - action B - action A input page. *Note action A and action B use different form classes. Action A receives the initial request from the client, the request contains a collection of elements of which Action A does some processing on them. (No Problem) After doing it's processing action A returns an ActionForward which goes to action B. At this point an IndexOutOfBoundsException occurs within BeanUtils.populate() and action B's execute() method is never reached. My question is, aren't the request parameters supposed to be gone for the request to action B, thus the attempt to populate those parameters into action B's form should never be performed? I'm really at a loss here, can someone explain this a little more throughly? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Form action url get rewritten.
Greetings!! I am getting this strange behavior in my forms. Within my jsp form I have my action written as the following: action=/student/update.do However, when the form is displayed via the browser, and a doing a view source, I see the following: action=/sesm/student/update.do It seems that my web application root directory gets tacked onto the logical url. Can someone explain to me why this is happening. Thanks, Curtney - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Form action url get rewritten.
Oopse, I forge to add that my action is no longer being called. It was working fine two days ago. I don't know what broke it. The only thing I notice was what I have written below. Also, I have pasted the relevant parts of my struts-config.xml file. The funny thing is that all of my other actions works fine. I have just notice that the logical url of the other actions for my forms are also being re-written, attaching the application root, but seems to work OK. Help Please. _CJ form-bean name=StudentForm type=com.jacobs.sesm.struts.form.StudentForm / action path=/student/update type=com.jacobs.sesm.struts.action.UpdateStudentAction name=StudentForm scope=session input=/struts/jspform/StudentForm.jsp parameter=id forward name=success path=/content/page/student.jsp?Student redirect=true / /action On Friday 25 July 2003 11:47 am, Curtney Jacobs wrote: Greetings!! I am getting this strange behavior in my forms. Within my jsp form I have my action written as the following: action=/student/update.do However, when the form is displayed via the browser, and a doing a view source, I see the following: action=/sesm/student/update.do It seems that my web application root directory gets tacked onto the logical url. Can someone explain to me why this is happening. Thanks, Curtney - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]