Re: problem with adding ActionMessage to ActionErrors
Use *html:messages id=msg message=false bean:write name=msg/ /html:messages* instead of *html:errors* Bradford M. Ayers wrote: I noticed in the documentation that ActionError is deprecated, so I was trying to be a good doobie and use ActionMessage like the docs say to. So in my code, when I go from this: errors.add( ActionErrors.GLOBAL_ERROR, new ActionMessage( error.password.mismatch )); to this: errors.add( ActionErrors.GLOBAL_ERROR, new ActionError( error.password.mismatch )); when my page tries to resolve html:errors/ I get: java.lang.ClassCastException at org.apache.struts.taglib.html.ErrorsTag.doStartTag(ErrorsTag.java:215)... Has anyone seen this? I'm using JBoss 3.2.2 (which uses Tomcat 4.1). Brad Ayers Senior Programmer Analyst Granite State Management and Resources [EMAIL PROTECTED] 603-225-5867 ext. 308 603-224-2581 Fax number CONFIDENTIALITY NOTICE This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ClassPath Problem
Place your classes in WEB-INF\classes folder. Prakasan OK wrote: Hi, I am a new bie to struts..I have a problem with my classpath. Instead of putting my ActionForm and Action class in the classes folder of my web application I am getting 'ClassnotFoundError'. I have put the required clases in a folder and edited the setclasspath.bat to put the class path to this folder. I am using Tomcat 4.1. I am getting all the other classes that is in the folder except the struts related classes like the Action class and ActionForm class created by me.. can any one help me to sort out this.. Thanks in advance Prakasan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Collection inside a collection
Hope this helps. logic:iterate name=/your bean name/ property=/propertyname/ id=group type=java.util.ArrayList logic:iterate collection=%= group% id=/column/ type=java.lang.Object %= row% /logic:iterate br /logic:iterate --Yoge Selim Hendrickson wrote: Hi, I have a bean which holds an Arraylist containing objects. Each object also holds another collection as a variable. What I would like to do is iterate both of the collections. Can anybody suggest a resource that shows an example or suggest a clue? Selim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: optionsCollection struts 1.1
html:select property=*name* html:optionsCollection property=*conditions* / /html:select For the above to work, your FormBean should have a property *conditions* with type as Collection. The coditions should be collection of properties and each should have two property Label and Value for display and value for the option tag. In short , conditions property should contain collection of JavaBean given below public class Option { String label =; String value = ; public String getLabel() { return label; } public String getValue() { return value; } public void setLabel(String temp) { this.label=temp; } public void setValue(String temp) { this.value=temp; } } Hope this helps --Yoge bojke wrote: Hi, I don't see optionsCollection in struts1.1 Is there optionsCollection in struts1.1? I have ArrayList as property of FormBean. ArrayList is collection of beans. Beans of course has a propreties. Does anybody know how to dislpay e.g bean property beanName using html:options in drop-down list. Thanks, Bojan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting the real request url
Dear Hen, Write a servletFilter and include the below code snippet in your doFilter method *String uri=(String)((HttpServletRequest)request).getAttribute(uri); if(uri==null) { System.out.println(Inside uri==null ); String requestURL=((HttpServletRequest)request).getRequestURI(); ((HttpServletRequest)request).setAttribute(uri,requestURL); }* Then u can get the requestURL in the jsp using request.getAttribute(uri); --Thanks Yogendrababu Henri Yandell wrote: [more a generic servlet question than struts specific, but no jsr user lists] I've a page which wants to know the url that was used to request it. If I use the servlet API, all I find is the jsp file in question and not the .do [or in use of tiles, I presume the top-most .do]. Is this impossible or does something get stored in the request scope to specify the original request? Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reload Action Classes
Hi, Iam using Tomcat 4.1.26 for my webapplication. All the actions classes are present in WEB-INF/classes folder. I have made the webapplication reloadable by using attribute reloadable=true in server.xml file. Whenever I recompile the Action classes the server throws ERROR 503 on subsequent requests. What should I do to make the Action classes reloadable so that I dont have to restart my tomcat server for each and every modification in my action classes. Thanks for your Help --Yoge - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]