Tiles configuration question!
Hi! I have tested some examples with Tiles but encounters some problem when trying to use a configuration file with my definitions. As far as I see from the logs it loads the defintions from the tiles-defs.xml but it doesn't add it to I can reach it. I post my setup below. Thanks in advance Roland Carlsson My setup: --/WEB-INF/tiles-defs.xml- ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD Tiles Configuration//EN tiles-config.dtd !-- Definitions for Tiles documentation -- tiles-definitions definition name=123 page=/layout3/page.jsp put name=header value=/layout3/header.jsp / put name=footer value=/layout3/footer.jsp / put name=menu value=/layout3/menu.jsp / put name=body value=/layout3/body.jsp / /definition /tiles-definitions ---/WEB-INF/struts-config.xml-- ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN struts-config_1_1.dtd struts-config plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tiles-defs.xml / set-property property=definitions-debug value=2 / set-property property=definitions-parser-details value=1 / set-property property=definitions-parser-validate value=true / /plug-in /struts-config /WEB-INF/web.xml--- ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- Action Servlet Configuration -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namedefinitions-config/param-name param-value/WEB-INF/tiles-defs.xml/param-value /init-param init-param param-namedefinitions-debug/param-name param-value0/param-value /init-param init-param param-namedefinitions-parser-details/param-name param-value0/param-value /init-param init-param param-namedefinitions-parser-validate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- The Welcome File List -- welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list !-- Struts Tag Library Descriptor -- taglib taglib-uri/WEB-INF/struts-tiles.tld/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib /web-app --layout3/page.jsp %page contentType=text/html% % taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % tiles:insert beanName=123 flush=true / --Log-- Starting service Tomcat-Netbeans Apache Tomcat/4.0.1 2002-okt-29 09:12:30 org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true 2002-okt-29 09:12:30 org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true factory loaded : {123={name=123, path=/layout3/page.jsp, role=null, controller=null, controllerType=null, controllerInstance=null, attributes={footer=/layout3/footer.jsp, header=/layout3/header.jsp, menu=/layout3/menu.jsp, body=/layout3/body.jsp}} } Factory initialized from file '/WEB-INF/tiles-defs.xml'. MonitorFilter::ServletException MonitorFilter::A web application object caused an exception MonitorFilter::javax.servlet.ServletException: Error - Tag Insert : No value defined for bean '123' with property 'null' in scope 'null'. at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:457) at org.apache.jsp.page$jsp._jspService(page$jsp.java:88) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper .service(IDEJspServlet.java:173) at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(ID EJspServlet.java:246) at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspSer
how to use tokens?
Is there out on the web some description, howto or manual about how to use tokens in struts, and what are they good for? I searched a while, and did not find any resource. Tia, Tib -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Resource temporarily unavailable
All, This is probably off topic and if so I apologize. I shifted my hosts from a non JSP one to a JSP one short time ago. The deal was 500 MB disk space, 15GB transfer, and private JVM and Resin for 235 USD a year. Too good to be true? Probably is?? Anyways, this is the problem: I deployed my Struts specific test war file ( which opens up 10 connections to the database ) on the server and as soon as I restarted Resin, I started getting these messages on the screen whenever I tried running a command: [: =: unary operator expected bash: fork: Resource temporarily unavailable Tech support tells me that it is because I have over stepped my allocated processes (30). Now my question is, would Struts start something behind the scenes that could make these processes? I have been taking the high stand and saying that it is not possible that Struts would do such a thing but I dont know for sure. Tech support just refuses to believe that and think that is my code. On a side note, does anybody know of a decent host that would give you a private JVM for a decent price and good tech support and runs Struts without problems? Thanks for any help on this. Regards, Vikram -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Select html tag and it's property
Hi All I am using html:select tag which needs to be multi - select. DO I need to define properties( getter/setter ) to return/set arrays or can write ( getter/setter ) which return/set ArrayList instead of Array. Any help would be greatly appreciated. Thanx Rajesh Kanade -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Tiles configuration question!
Roland Carlsson wrote: Hi! I have tested some examples with Tiles but encounters some problem when trying to use a configuration file with my definitions. As far as I see from the logs it loads the defintions from the tiles-defs.xml but it doesn't add it to I can reach it. I post my setup below. Thanks in advance Roland Carlsson My setup: ... --layout3/page.jsp %page contentType=text/html% % taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % tiles:insert beanName=123 flush=true / You try to access a definition store as a bean in a jsp scope. As you haven't defined one, an error is reported: MonitorFilter::javax.servlet.ServletException: Error - Tag Insert : No value defined for bean '123' with property 'null' in scope 'null'. at To access definition from the definition config file, use the attribute 'name': tiles:insert name=123 flush=true / This should work. Cedric -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [JSTL] c:out and DynaBeanClass
JSTL supports dynabeans transparently Could you please supply a scenario and sample code that proves this? well.. I thought dynabeans were supported cause I'm using them without problem, since in the JSTL ML told me the full support will be added in the 2.x release I can at least say the OUT and various FMT tags work fine with them % page language=java import=org.apache.commons.beanutils.* % % taglib prefix=c uri=http://java.sun.com/jstl/core; % % DynaProperty[] props = new DynaProperty[2]; BasicDynaClass dClass = null; props[0] = new DynaProperty(ciccio); props[1] = new DynaProperty(pippo); try {dClass = new BasicDynaClass(flare, Class.forName(org.apache.commons.beanutils.BasicDynaBean), props); } catch (Exception e) { e.printStackTrace(); } DynaBean dbean = dClass.newInstance(); dbean.set(ciccio,uno); dbean.set(pippo,due); pageContext.setAttribute(flare,dbean); % c:out value=${flare.ciccio}/ %=((DynaBean)pageContext.getAttribute(flare)).get(pippo)% -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Tiles configuration question!
Hi Cedric! Thanks for the help. You made me look in the right direction. Name didn't work though. Definition works. My page.jsp looks like this and now it works. -- %@page contentType=text/html% %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % tiles:insert definition=123 / --- Thanks again Roland - Original Message - From: Cedric Dumoulin [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 10:22 AM Subject: Re: Tiles configuration question! Roland Carlsson wrote: Hi! I have tested some examples with Tiles but encounters some problem when trying to use a configuration file with my definitions. As far as I see from the logs it loads the defintions from the tiles-defs.xml but it doesn't add it to I can reach it. I post my setup below. Thanks in advance Roland Carlsson My setup: ... --layout3/page.jsp %@page contentType=text/html% %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % tiles:insert beanName=123 flush=true / You try to access a definition store as a bean in a jsp scope. As you haven't defined one, an error is reported: MonitorFilter::javax.servlet.ServletException: Error - Tag Insert : No value defined for bean '123' with property 'null' in scope 'null'. at To access definition from the definition config file, use the attribute 'name': tiles:insert name=123 flush=true / This should work. Cedric -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: VerifyError creating action bean in tomcat4 (not tomcat 3.3)
Steinar Bang [EMAIL PROTECTED]: Platform: Intel PIII, RedHat 7.2, apache 1.3.20, ajp1.3 tomcat 4.1.12, BlackDown Java SDK 1.3.1, Struts 1.1-b2, xerces-j 1.4.4 When I run with tomcat 3.3 my webapp run as expected, but when I try it with tomcat 4.1.12, I get a VerifyError when creating one of the webapp's Action beans. The error output is attached to the end of this message. [snip!] The action definition from struts-config.xml, is: actionpath=/main type=no.dod.TPS.corba.stb.WelcomeAction scope=request forward name=success path=/stb/main.jsp/ /action [snip!] [ERROR] RequestProcessor - -No action instance for path /main could be created java.lang.VerifyError: (class: no/dod/TPS/corba/stb/WelcomeAction, method: doPerform signature: (Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lno/dod/T The problem is releated to the use of org.apache.xerces.parsers.SAXParser in the Action bean it can't create. A call to SAXParser.setContentHandler(), can be left in place, but when I remove the calls to SAXParser.reset() and SAXParser.parse(), (I have to remove both) the VerifyError problem goes away. But of course the Action bean isn't very functional. I thought this might have something to do with colliding versions of xerces.jar, so I've replaced pathelement location=${deploy.home}/WEB-INF/lib/xerces.jar/ with pathelement location=/usr/share/java/xerces.jar/ ,removed xerces.jar from the WEB-INF/lib directory of the compiled webapp, and done a complete rebuild of the webapp, but I still get the VerifyError. I belive /usr/share/java/xerces.jar, which is the the version installed by the xerces-j 1.4.4 RPM, is the version used by tomcat 4.1.12 (is there a way to find out what xerces.jar file it loads?). Any hints and guesses that might shed some light on this problem, are appreciated! Thanx! - Steinar -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Help needed with Indexed Tags, Contributor taglib by Dave Hays
Hi! I'm using the indexed tag lib written by Dave Hays. On my jsp page I have the following code: logic:iterate id=mondayEvent name=calendarForm property=mondayEventList td class=input width=30%html:text name=mondayEvent property=subject indexed=true//td /logic:iterate In my formbean I have a the following getters: public List getMondayEventList() { return mondayEventList; } public CalendarEvent getMondayEvent(int index) { return (CalendarEvent) mondayEventList.get(index); } In my CalendarEvent class I have the following getter: public String getSubject() { return subject; } Still, I get the following error message: javax.servlet.ServletException: No getter method for property subject of bean mondayEvent The 'mondayEvent' is found correctly I guess but the subject getter can't be reached. Have anyone experienced the same problem?? Thankful for help!! /Linnéa Linnéa Ahlbeck - Software Engineer phone +46 40 664 29 70 fax +46 40 30 32 62 mobile +46 708 96 14 56 Appium AB - Adelgatan 5, SE-211 22 Malmö, Sweden www.appium.com
defining style class with the iterate tag
hi all, I'm using the iterate tag to display my arrayList element like this. logic:iterate name=mailFilterForm property=registredList id=mailView tr class=paire td align=centerbean:write name=mailView property=code//td tdbean:write name=mailView property=sender//td tdbean:write name=mailView property=dateStart//td tdbean:write name=mailView property=dateEnd//td tdbean:write name=mailView property=targetDir//td /tr /logic:iterate and it works fine. But I would like to define row style class in bold according to the index value of the iterated element. without using the tag is looked like this tr class=%= (index%2 == 0)?paire:impaire% where index is the index value of the iterated element. But I don't know how to perform this inside the iterate tag. The mailView object has a property named index could be used to perform some comparison. But I don't know how to use it. Can some one helps ? thanks. Meissa -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
package not found Error
A strange error keeps persisting when I am using any layout:X tag in my JSP running in Tomcat 4.1. It doesnt seem to be ableto find the Struts-Layout classes although I have placed the Struts-Layout.jar in the lib directory and defined and placed the TLDs at the proper places. It says: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file C:\tomcat\work\Standalone\localhost\_\webpages\viewCategory_jsp.java:152: package fr.improve.struts.taglib.layout.treeview does not exist fr.improve.struts.taglib.layout.treeview.TreeViewTag _jspx_th_layout_treeview_0 = (fr.improve.struts.taglib.layout.treeview.TreeViewTag) _jspx_tagPool_layout_treeview_name.get(fr.improve.struts.taglib.layout.treev iew.TreeViewTag.class); ^ C:\tomcat\work\Standalone\localhost\_\webpages\viewCategory_jsp.java:152: package fr.improve.struts.taglib.layout.treeview does not exist fr.improve.struts.taglib.layout.treeview.TreeViewTag _jspx_th_layout_treeview_0 = (fr.improve.struts.taglib.layout.treeview.TreeViewTag) _jspx_tagPool_layout_treeview_name.get(fr.improve.struts.taglib.layout.treev iew.TreeViewTag.class); ^ C:\tomcat\work\Standalone\localhost\_\webpages\viewCategory_jsp.java:152: package fr.improve.struts.taglib.layout.treeview does not exist fr.improve.struts.taglib.layout.treeview.TreeViewTag _jspx_th_layout_treeview_0 = (fr.improve.struts.taglib.layout.treeview.TreeViewTag) _jspx_tagPool_layout_treeview_name.get(fr.improve.struts.taglib.layout.treev iew.TreeViewTag.class); ^ 3 errors Any help would be appreciated. Thanks a lot. Affan -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: defining style class with the iterate tag
You can do it this way logic:iterate name=mailFilterForm property=registredList id=mailView bean:define id=index name=mailView property=index/ tr td class=%= (Integer.parseInt(index)%2 == 0)?paire:impaire% bean:write name=mailView property=sender/ /td /tr /logic:iterate - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 4:02 PM Subject: defining style class with the iterate tag hi all, I'm using the iterate tag to display my arrayList element like this. logic:iterate name=mailFilterForm property=registredList id=mailView tr class=paire td align=centerbean:write name=mailView property=code//td tdbean:write name=mailView property=sender//td tdbean:write name=mailView property=dateStart//td tdbean:write name=mailView property=dateEnd//td tdbean:write name=mailView property=targetDir//td /tr /logic:iterate and it works fine. But I would like to define row style class in bold according to the index value of the iterated element. without using the tag is looked like this tr class=%= (index%2 == 0)?paire:impaire% where index is the index value of the iterated element. But I don't know how to perform this inside the iterate tag. The mailView object has a property named index could be used to perform some comparison. But I don't know how to use it. Can some one helps ? thanks. Meissa -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: package not found Error
Hi, This is very strange, could you double check that Struts-Layout.jar is in the lib directory, that it contains the required classes, and that the jar is added to the classpath ? Are you trying to precompile the jsp ? In this case do you need to do some extra configuration to add the jar to the classpath ? HTH, Jean-Noel At 11:38 29/10/2002, Affan Qureshi wrote: A strange error keeps persisting when I am using any layout:X tag in my JSP running in Tomcat 4.1. It doesnt seem to be ableto find the Struts-Layout classes although I have placed the Struts-Layout.jar in the lib directory and defined and placed the TLDs at the proper places. It says: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file C:\tomcat\work\Standalone\localhost\_\webpages\viewCategory_jsp.java:152: package fr.improve.struts.taglib.layout.treeview does not exist fr.improve.struts.taglib.layout.treeview.TreeViewTag _jspx_th_layout_treeview_0 = (fr.improve.struts.taglib.layout.treeview.TreeViewTag) _jspx_tagPool_layout_treeview_name.get(fr.improve.struts.taglib.layout.treev iew.TreeViewTag.class); ^ C:\tomcat\work\Standalone\localhost\_\webpages\viewCategory_jsp.java:152: package fr.improve.struts.taglib.layout.treeview does not exist fr.improve.struts.taglib.layout.treeview.TreeViewTag _jspx_th_layout_treeview_0 = (fr.improve.struts.taglib.layout.treeview.TreeViewTag) _jspx_tagPool_layout_treeview_name.get(fr.improve.struts.taglib.layout.treev iew.TreeViewTag.class); ^ C:\tomcat\work\Standalone\localhost\_\webpages\viewCategory_jsp.java:152: package fr.improve.struts.taglib.layout.treeview does not exist fr.improve.struts.taglib.layout.treeview.TreeViewTag _jspx_th_layout_treeview_0 = (fr.improve.struts.taglib.layout.treeview.TreeViewTag) _jspx_tagPool_layout_treeview_name.get(fr.improve.struts.taglib.layout.treev iew.TreeViewTag.class); ^ 3 errors Any help would be appreciated. Thanks a lot. Affan -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org --__/ \__- improve Jean-Noël Ribette --/-\-- Ingénieur études et développement -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
How to use Templates efficently ?
Sorry this might be a dumb question, but I can't really figure out how to use struts templates efficently. I already had a look at Struts-Docu: http://localhost:8080/struts-documentation/api/org/apache/struts/taglib/template/package-summary.html#package_description If i figured it out correctly, You got for example a header file a content file a footer file a template file: trtdtemplate:get name='header'//td/tr trtdtemplate:get name='content'//td/tr trtdtemplate:get name='footer'//td/tr a jsp that uses those templates: template:put name='title' content='Templates' direct='true'/ template:put name='header' content='/header.html' / template:put name='sidebar' content='/sidebar.jsp' / template:put name='content' content='/introduction.html'/ template:put name='footer' content='/footer.html' / Asuming I would have 100 different jsp content files, I would have: 1 header file 1 footer file 1 template file 100 content files 100 jsp files that are using the other files. so I would have 203 files instead of 100 !!! For this example: wouldn't it make more sense, to have one introduction.jsp file, and at the begining you insert your header file, at the end you insert your footer file. 1 header file 1 footer file 100 Content files. 102 Files (not 203!) Am I correct ? Is this possible ? thx, marcus -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Problem with action messages....
Hi, I´ve read just about everything I could find, unfortunately I still haven´t managed to get this to work. In my action I define an ActionMessage as follows: ActionMessages messages = new ActionMessages(); ActionMessage message = new ActionMessage(shop.cart.isempty); messages.add(shop.cart.message, message); saveMessages(request, messages); When trying to output the message shop.cart.message using: bean:message key=shop.cart.message/ I get the following output: ???de.shop.cart.message??? What could be the reason for this? Is there something that I am missing here? Any help would be very appreciated. Rergards, Michael -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Help needed with Indexed Tags, Contributor taglib by Dave Hays
Try doing this logic:iterate id=mondayEvent name=calendarForm property=mondayEventList bean:define id=txtSubject name=mondayEvent property=subject/ td class=input width=30% html:text property=txtSubject indexed=true/ /td /logic:iterate - Original Message - From: Linnea Ahlbeck [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 3:55 PM Subject: Help needed with Indexed Tags, Contributor taglib by Dave Hays Hi! I'm using the indexed tag lib written by Dave Hays. On my jsp page I have the following code: logic:iterate id=mondayEvent name=calendarForm property=mondayEventList td class=input width=30%html:text name=mondayEvent property=subject indexed=true//td /logic:iterate In my formbean I have a the following getters: public List getMondayEventList() { return mondayEventList; } public CalendarEvent getMondayEvent(int index) { return (CalendarEvent) mondayEventList.get(index); } In my CalendarEvent class I have the following getter: public String getSubject() { return subject; } Still, I get the following error message: javax.servlet.ServletException: No getter method for property subject of bean mondayEvent The 'mondayEvent' is found correctly I guess but the subject getter can't be reached. Have anyone experienced the same problem?? Thankful for help!! /Linnéa Linnéa Ahlbeck - Software Engineer phone +46 40 664 29 70 fax +46 40 30 32 62 mobile +46 708 96 14 56 Appium AB - Adelgatan 5, SE-211 22 Malmö, Sweden www.appium.com -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: How to use Templates efficently ?
Take a look at Tiles - you can avoid the second page by defining the page definition in the struts config or if the pages do not need their own Action you can use one Action to resolve the definitions using a parameter. Cal http://www.calandva.com/ -Original Message- From: Marcus Biel [mailto:Marcus.Biel;bmw.de] Sent: Tuesday, October 29, 2002 06:11 To: [EMAIL PROTECTED] Subject: How to use Templates efficently ? Sorry this might be a dumb question, but I can't really figure out how to use struts templates efficently. I already had a look at Struts-Docu: http://localhost:8080/struts-documentation/api/org/apache/struts/taglib/temp late/package-summary.html#package_description If i figured it out correctly, You got for example a header file a content file a footer file a template file: trtdtemplate:get name='header'//td/tr trtdtemplate:get name='content'//td/tr trtdtemplate:get name='footer'//td/tr a jsp that uses those templates: template:put name='title' content='Templates' direct='true'/ template:put name='header' content='/header.html' / template:put name='sidebar' content='/sidebar.jsp' / template:put name='content' content='/introduction.html'/ template:put name='footer' content='/footer.html' / Asuming I would have 100 different jsp content files, I would have: 1 header file 1 footer file 1 template file 100 content files 100 jsp files that are using the other files. so I would have 203 files instead of 100 !!! For this example: wouldn't it make more sense, to have one introduction.jsp file, and at the begining you insert your header file, at the end you insert your footer file. 1 header file 1 footer file 100 Content files. 102 Files (not 203!) Am I correct ? Is this possible ? thx, marcus -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: How to use Templates efficently ?
Hi Cal, as far as I know tiles are only supported since 1.1, but I am strictly forced to use 1.02 at work. Any other suggestions ? E.g. how to simple import other jsp's ? Marcus [EMAIL PROTECTED] schrieb: Take a look at Tiles - you can avoid the second page by defining the page definition in the struts config or if the pages do not need their own Action you can use one Action to resolve the definitions using a parameter. Cal http://www.calandva.com/ -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Struts parameters and JavaScript
Hi all, I have a little problem and a question. Here is a piece of code: xmlop:renderSelect collectionName=tableNames selectName=table actionType=onchange= actionName=JavaScript:xmlopSQLForm.submit(); / xmlop:renderSelect collectionName=field selectName=field / td xmlop:renderTextbox collectionName=tableNames textBox=text actionType=onfocus= actionName=JavaScript:checkSelect(name of the select to be checked );/ /td /tr What I need to do is the check if user has selected some value in these 2 select elements. If yes then he shouldn't be allowed to enter any values in text box and given an alert window saying that. So I wanted to write a javascript function doing that... but how do I pass dynamically generated elements (select) names to the function as a parameters? Something like: onFocus=checkSelect(selectName1); onFocus=checkSelect(selectName2); onFocus=checkSelect(selectName3); and so on... for each text box that's being generated by jsp. Regards -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: VerifyError creating action bean in tomcat4 (not tomcat 3.3)
Steinar Bang [EMAIL PROTECTED]: Platform: Intel PIII, RedHat 7.2, apache 1.3.20, ajp1.3 tomcat 4.1.12, BlackDown Java SDK 1.3.1, Struts 1.1-b2, xerces-j 1.4.4 When I run with tomcat 3.3 my webapp run as expected, but when I try it with tomcat 4.1.12, I get a VerifyError when creating one of the webapp's Action beans. [snip!] [ERROR] RequestProcessor - -No action instance for path /main could be created java.lang.VerifyError: (class: no/dod/TPS/corba/stb/WelcomeAction, method: doPerform signature: (Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lno/dod/T When I replaced pathelement location=${deploy.home}/WEB-INF/lib/xerces.jar/ with pathelement location=/var/tomcat4/common/endorsed/jaxp_parser_impl.jar/ in the classpath element in the javac task of the ant build file, the problem went away. This is replacing (an unknown version of) xerces.jar in our CVS, with the version 2-something of xerces distributed with tomcat 4.1.12. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
How can I use Token !!!!
Can I save Token using org.apache.struts.actions.ForwardAction ? I wouldn't like to make a Action only to saveAction and forward to a page !!! There are another way ? _ MSN Hotmail, o maior webmail do Brasil. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Struts parameters and JavaScript
My example is with struts tags, but I had a similar problem when trying to use dynamic JSP expressions in the tag attributes. I created one string and passed that: % String onClickFunction = javascript:setValue( + strVehIndex + ); % html:radio name=SomeForm property=someProp onclick='%=onClickFunction%' value=true/Yes html:radio name=SomeForm property=SomeProp onclick='%=onClickFunction%' value=false/No Hope that helps -Original Message- From: pk [mailto:pkreglicki;wp.pl] Sent: Tuesday, October 29, 2002 7:08 AM To: [EMAIL PROTECTED] Subject: Struts parameters and JavaScript Hi all, I have a little problem and a question. Here is a piece of code: xmlop:renderSelect collectionName=tableNames selectName=table actionType=onchange= actionName=JavaScript:xmlopSQLForm.submit(); / xmlop:renderSelect collectionName=field selectName=field / td xmlop:renderTextbox collectionName=tableNames textBox=text actionType=onfocus= actionName=JavaScript:checkSelect(name of the select to be checked );/ /td /tr What I need to do is the check if user has selected some value in these 2 select elements. If yes then he shouldn't be allowed to enter any values in text box and given an alert window saying that. So I wanted to write a javascript function doing that... but how do I pass dynamically generated elements (select) names to the function as a parameters? Something like: onFocus=checkSelect(selectName1); onFocus=checkSelect(selectName2); onFocus=checkSelect(selectName3); and so on... for each text box that's being generated by jsp. Regards -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return email and delete this communication and destroy all copies. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: defining style class with the iterate tag
If you are using 1.1b2 then the iterate tag has an indexed attribute. For you example below: logic:iterate name=mailFilterForm property=registredList id=mailView indexId=index Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: [EMAIL PROTECTED] [mailto:meissa.Sakho;bpam.fr] Sent: Tuesday, October 29, 2002 5:32 AM To: [EMAIL PROTECTED] Subject: defining style class with the iterate tag hi all, I'm using the iterate tag to display my arrayList element like this. logic:iterate name=mailFilterForm property=registredList id=mailView tr class=paire td align=centerbean:write name=mailView property=code//td tdbean:write name=mailView property=sender//td tdbean:write name=mailView property=dateStart//td tdbean:write name=mailView property=dateEnd//td tdbean:write name=mailView property=targetDir//td /tr /logic:iterate and it works fine. But I would like to define row style class in bold according to the index value of the iterated element. without using the tag is looked like this tr class=%= (index%2 == 0)?paire:impaire% where index is the index value of the iterated element. But I don't know how to perform this inside the iterate tag. The mailView object has a property named index could be used to perform some comparison. But I don't know how to use it. Can some one helps ? thanks. Meissa -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
A newbie question.
I have just recently begun using Struts for a job at work. This is my first JSP project, so if I ask something that is more appropriately learned in the basics of JSP let me know. I saw the hint about linking to actions, but have one slight gripe. I made all of my actions end in .do, as per the original examples I saw. Ordinarily, this would cause no problem; however, whenever I create a link or forward I have to end them in .do. Big deal, I realize, but it gets a little inconsistant when I do NOT have to include the .do in the action parameter of a form. Is there a way to make these more consistant? I would prefer if a link goes to an action, that it would look the same as the name of the action. Perhaps add an action attribute to the link tag? Would that be all that is needed? Is this old news? My other stumbling block was in using a DataSource. I was able to setup the DataSource using Struts, but was not happy with the way that it required doing the database access actually in the Action classes. Instead, I was wanting the action class to be a checklist. Basically, I try to keep my actions as a simple series of calls into some business classes I wrote. In order to do this, I went through the extra effort of setting up a JNDI dataSource in Tomcat so that my business classes could all get to it. Was there another way I should have done this? Does what I am saying make sense? And, finally, I know this is offtopic but does anyone have a good recommendation for a free email client for windows that would allow me to view threaded messages? As it is right now, I just get a long list of these emails everytime I log in. In fact, this is one of the reasons I used to avoid mailing lists, as it is less the comfortable to read. I believe mutt would do what I want, but I can't use that during the day as I don't believe it is available for windows. Thanks for any help, and I do apologize for the incredibly long email. -josh -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Select html tag and it's property
A String[] will work. We use a string array to represent the id's of some objects and then in our model assign the objects according to the ids in the array. Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Rajesh Kanade [mailto:rkanade;bigates.com] Sent: Tuesday, October 29, 2002 4:24 AM To: 'Struts Users Mailing List' Subject: Select html tag and it's property Hi All I am using html:select tag which needs to be multi - select. DO I need to define properties( getter/setter ) to return/set arrays or can write ( getter/setter ) which return/set ArrayList instead of Array. Any help would be greatly appreciated. Thanx Rajesh Kanade -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Struts Validator for multiple Selects
Anyone use multi-selects with Struts Validation? Oh yeah, the jsp is: html:javascript formName=milestoneDetailForm dynamicJavascript=true/ html:form action=/addmilestone onsubmit=return validateMilestoneDetailForm(this); table class=form html:hidden property=mrevdate/ tr td align=left valign=center FONT class=labelBMilestone Description:/B/FONT /td td align=left valign=center html:textarea property=description rows=3 cols=80/html:errors property=description / /td /tr tr td align=left valign=center FONT class=labelBDOE Manager(s):/B/FONT /td td align=left valign=center html:select property=mspersonsIds size=4 multiple=true html:options collection=managerList property=id labelProperty=name / /html:selecthtml:errors property=mspersonsIds / /td /tr /table html:link href=# onclick=javascript:if (document.forms[0].onsubmit())document.forms[0].submit() Add /html:link /html:form Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Madel,Kurt [mailto:kmadel;csmi.com] Sent: Monday, October 28, 2002 4:24 PM To: 'Struts Users Mailing List' Subject: Struts Validator for multiple Selects We have a multiple select that is required. The following works on server side, but not client side: form name=milestoneDetailForm field property=mspersonsIds[0] depends=required arg0 key=label.milestone.mspersonsIds/ /field /form If changed to the following, it is caught on the server side, but no message is printed: form name=milestoneDetailForm field property=mspersonsIds depends=required arg0 key=label.milestone.mspersonsIds/ /field /form Any ideas? Thanks Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Struts 1.0.2, Tomcat 4.1.12 Web-App start-up funny
Thanks for the answer. I've checked the contents of the HTTP Request and, the first time I attempt to display the Form the Request is empty (as I would expect). There is no org.apache.struts.taglib.html.BEAN object that I can see using the request.getAttributes() method. I appear to be having different behaviour entering the same JSP page with the same Request contents (i.e. nothing) depending upon whether or not the WAR file was unpacked when Tomcat was started. I've tried explicitly creating an instance of the Form Bean in the JSP page using jsp:useBean. If I create it in the Request then I get this exception every time I visit the page regardless of whether the WAR file was unpacked or not. If I put it in the Session I get the initial behaviour. I'm sure that there must be Struts pages using FormBeans running under Tomcat 4.1.12 out there so what am I doing wrong? One route would be to upgrade to Struts 1.1b2 but I'm a bit reluctant to deploy an application using Beta version software. Any suggestions anyone? -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: 28 October 2002 17:28 To: [EMAIL PROTECTED] Subject: Re: Struts 1.0.2, Tomcat 4.1.12 Web-App start-up funny I suggest you develop with tomcat 4.1.12 since you're deploying on that version. It will make your life easier with less surprises. You should check what object is stored under org.apache.struts.taglib.html.BEAN in the request. It may not be the bean you think it is. David From: Axtell, Neil [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: Struts 1.0.2, Tomcat 4.1.12 Web-App start-up funny Date: Mon, 28 Oct 2002 17:23:21 - A plea for help to the great Struts User community. I'm in the process of deploying our first Struts-enabled Web-App onto a separate Staging Server. This is running Win 2K SP3, JDK 1.4.1 Tomcat 4.1.12. Everything works fine when I first deploy my WAR file and start Tomcat. It is unpacked correctly and the Web-App runs fine. If I stop and re-start Tomcat I get the following error message when I attempt to access an Admin Page using an HTML form with an associated Struts Form Bean :- javax.servlet.jsp.JspException: No getter method available for property archiveServer for bean under name org.apache.struts.taglib.html.BEAN at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:304) at org.apache.jsp.ResultArchiveAdmin_jsp._jspService(ResultArchiveAdmin_jsp.ja v a:265) The relevant part of my Struts-config.xml is :- form-beans form-bean name=ResultArchiveAdminFormBean type=com.anritsu.eu.Expresso.Beans.ResultArchiveAdminFormBean/ /form-beans ... !-- Add Result Archive -- actionpath=/AddArchive type=com.anritsu.eu.Expresso.ActAddResultArchive name=ResultArchiveAdminFormBean scope=request validate=true input=/ResultArchiveAdmin.jsp forward name=success path=/ResultArchiveAdmin.jsp/ /action I think that this exception is telling me that the Struts TagLib could not find a matching getArchiveServer() method in the Form Bean. But why did it work the first time I ran up Tomcat? I have checked that the Bean does have a matching method. Is it significant that the exception does not mention the ResultArchiveAdminFormBean by name? This is a bit frustrating as the same WAR file runs fine on my development machine, but this is using JBuilder 6 Tomcat 4.0.1. I would prefer to use a later version of Tomcat for deployment. Obviously I must have missed something out from either the Struts-config.xml, web.xml or in the JSP for this page. As this happens the first time I attempt to access this page could it be a problem with an instance of the FormBean being created? I've not explicitly added a jsp:useBean ... statement into the JSP page as I thought that Struts would sort this all out for me. Do I need one? Any ideas would be gratefully received. Many thanks. Neil. Neil Axtell Principal Engineer (MMI/Web Technologies) ANRITSU LIMITED European Measurement Division - Engineering 200 Capability Green Luton, UK Tel: +44 (0) 1582 433347 Fax: +44 (0) 1582 433276 E-Mail: [EMAIL PROTECTED] mailto:Neil.Axtell;eu.anritsu.com - This email message, together with any attachments, is for the exclusive and confidential use of the addressee(s). If you have received this message in error, please notify the sender by email immediately, then delete the message and any copies. Any views or opinions presented herein are solely those of the author and do not necessarily represent those of the Anritsu group of companies. - -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Help needed with Indexed Tags, Contributor taglib by Dave Hays
Hi! Thanks for your tip! Unfortunaltey it did not solve my problem. The line: bean:define id=txtSubject name=mondayEvent property=subject/ causes the same error as before: javax.servlet.ServletException: No getter method for property subject of bean mondayEvent In the class the mondayEvent is an instance of - should there be anything else than a setter and a getter for the value I want to show on my jsp page? Thanks! /Linnéa -Original Message- From: deepak [mailto:deepak;ltp.soft.net] Sent: Tuesday, October 29, 2002 12:48 PM To: Struts Users Mailing List Subject: Re: Help needed with Indexed Tags, Contributor taglib by Dave Hays Try doing this logic:iterate id=mondayEvent name=calendarForm property=mondayEventList bean:define id=txtSubject name=mondayEvent property=subject/ td class=input width=30% html:text property=txtSubject indexed=true/ /td /logic:iterate - Original Message - From: Linnea Ahlbeck [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 3:55 PM Subject: Help needed with Indexed Tags, Contributor taglib by Dave Hays Hi! I'm using the indexed tag lib written by Dave Hays. On my jsp page I have the following code: logic:iterate id=mondayEvent name=calendarForm property=mondayEventList td class=input width=30%html:text name=mondayEvent property=subject indexed=true//td /logic:iterate In my formbean I have a the following getters: public List getMondayEventList() { return mondayEventList; } public CalendarEvent getMondayEvent(int index) { return (CalendarEvent) mondayEventList.get(index); } In my CalendarEvent class I have the following getter: public String getSubject() { return subject; } Still, I get the following error message: javax.servlet.ServletException: No getter method for property subject of bean mondayEvent The 'mondayEvent' is found correctly I guess but the subject getter can't be reached. Have anyone experienced the same problem?? Thankful for help!! /Linnéa Linnéa Ahlbeck - Software Engineer phone +46 40 664 29 70 fax +46 40 30 32 62 mobile +46 708 96 14 56 Appium AB - Adelgatan 5, SE-211 22 Malmö, Sweden www.appium.com -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: How to use Templates efficently ?
Hi, You can use tiles in 1.02. You need to use the separate tilesForStruts1-0.jar file. You can find it in the distrib from the original tiles site. Then check under lib/tiles1.0. Cedric Marcus Biel wrote: Hi Cal, as far as I know tiles are only supported since 1.1, but I am strictly forced to use 1.02 at work. Any other suggestions ? E.g. how to simple import other jsp's ? Marcus [EMAIL PROTECTED] schrieb: Take a look at Tiles - you can avoid the second page by defining the page definition in the struts config or if the pages do not need their own Action you can use one Action to resolve the definitions using a parameter. Cal http://www.calandva.com/ -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Javascripting
Hello All, I am facing problem in using javascript. The cases: 1) I have a select box. 2) OnChange a javascript method is called. 3) In this method a Form is submitted and an action class is called. 4) on finishing with the action class same jsp is called. Problem:: 5) if now again step 2 is repeated I am getting the error object not found?? On seeing the URL of the page before submitting it was a jsp page and after submitting it is a .do page. Please help me with it.
Re: A newbie question.
Josh Berry wrote: I have just recently begun using Struts for a job at work. This is my first JSP project, so if I ask something that is more appropriately learned in the basics of JSP let me know. I saw the hint about linking to actions, but have one slight gripe. I made all of my actions end in .do, as per the original examples I saw. Ordinarily, this would cause no problem; however, whenever I create a link or forward I have to end them in .do. Big deal, I realize, but it gets a little inconsistant when I do NOT have to include the .do in the action parameter of a form. Is there a way to make these more consistant? I would prefer if a link goes to an action, that it would look the same as the name of the action. Perhaps add an action attribute to the link tag? Would that be all that is needed? Is this old news? My other stumbling block was in using a DataSource. I was able to setup the DataSource using Struts, but was not happy with the way that it required doing the database access actually in the Action classes. Instead, I was wanting the action class to be a checklist. Basically, I try to keep my actions as a simple series of calls into some business classes I wrote. In order to do this, I went through the extra effort of setting up a JNDI dataSource in Tomcat so that my business classes could all get to it. Was there another way I should have done this? Does what I am saying make sense? I think so. By having a data source available to your BO you can now unit test those outside of web app and they are available to other apps. And, finally, I know this is offtopic but does anyone have a good recommendation for a free email client for windows that would allow me to view threaded messages? As it is right now, I just get a long list of these emails everytime I log in. In fact, this is one of the reasons I used to avoid mailing lists, as it is less the comfortable to read. I believe mutt would do what I want, but I can't use that during the day as I don't believe it is available for windows. news.basebeans.com has Struts and other good mail lists available to a news reader like Outlook or NetScape. hth, .V Thanks for any help, and I do apologize for the incredibly long email. -josh -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: How to use Templates efficently ?
I found this helpful as well Sample chapter on tiles from Ted's up coming book http://www.manning.com/getpage.html?project=hustedfilename=chapters.html Marcus Biel [EMAIL PROTECTED] on 10/29/2002 05:11:26 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:[EMAIL PROTECTED] cc: Subject:How to use Templates efficently ? Sorry this might be a dumb question, but I can't really figure out how to use struts templates efficently. I already had a look at Struts-Docu: http://localhost:8080/struts-documentation/api/org/apache/struts/taglib/template/package-summary.html#package_description If i figured it out correctly, You got for example a header file a content file a footer file a template file: trtdtemplate:get name='header'//td/tr trtdtemplate:get name='content'//td/tr trtdtemplate:get name='footer'//td/tr a jsp that uses those templates: template:put name='title' content='Templates' direct='true'/ template:put name='header' content='/header.html' / template:put name='sidebar' content='/sidebar.jsp' / template:put name='content' content='/introduction.html'/ template:put name='footer' content='/footer.html' / Asuming I would have 100 different jsp content files, I would have: 1 header file 1 footer file 1 template file 100 content files 100 jsp files that are using the other files. so I would have 203 files instead of 100 !!! For this example: wouldn't it make more sense, to have one introduction.jsp file, and at the begining you insert your header file, at the end you insert your footer file. 1 header file 1 footer file 100 Content files. 102 Files (not 203!) Am I correct ? Is this possible ? thx, marcus -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: form and action in struts-config
I checked the struts-config.xml and here is the piece of code.. form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / The issue I am facing is I don't see the values in my ACTION class after I submit my jsp page and go to action class and retreive them by saying cultureform.get(xxx) and all I see in the formbean values are nulls... I know I am missing something very silly but can't figure it out... Any idea ... Naga Phone: 860-686-1643 -Original Message- From: Marcus Biel [mailto:Marcus.Biel;bmw.de] Sent: Tuesday, October 29, 2002 2:33 AM To: [EMAIL PROTECTED] Subject: Re: form and action in struts-config Would need to see some of your code... The only idea I got without seeing your code: check your struts-config.xml form-bean name=yourFormMappingName type=YourFormClass/ action path=/doAction type=YourActionClassName name=yourFormMappingName scope=session validate=true input=/yourJSP.jsp forward name=yourLocalForwardName path=/yourSecondJSP.jsp / /action Or even better: Download James Holmes Struts Console to edit your struts-config. (search google) hope this helps, marcus [EMAIL PROTECTED] schrieb: Can anyone explain me why I get this problem... I have my action and form defined in the struts-config.xml.. Now in my jsp page when I enter a value in the text-box and try to see the value in my action using debugger, I don't see that value in my form and all i see is the reset value defined in the form bean. Somehow anyvalues I enter in my jsp pages aren't getting moved to the form and they my form just has the reset values defined initally. Can someone explain this to me.. Naga 860-686-1643 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Populate bean values to my form
Hello, I know that my question might sound naive but I realy need your help. Unfortunately I couldn't find out from the archieves what I'm doing wrong. So here I go. I need to submit a form (SearchForm) retrieve some data from the database depending on the values entered in the SearchForm (SearchFormAction)and then edit the data returned by the query in the database(userform.jsp). This is how I have implemented the previous. struts-config == !-- Edit mail subscription -- actionpath=/search type=ait.app.SearchFormAction name=searchForm scope=request validate=false forward name=success path=/editUser/ /action action path=/editUser type=ait.app.EditUserAction name=userForm scope=request validate=false forward name=successpath=/userform.jsp/ /action SearchFormAction data.createpool(); data.open(SELECT * FROM +role+ WHERE username='+id+'); //get the data form database . servlet.getServletContext().setAttribute(Constants.USER_KEY,usef); //set the bean to the values returned by the query return (mapping.findForward(/editUser)); //call the EditUserAction befor displaying the userform.jsp EditUserAction == UserBean user=(UserBean) servlet.getServletContext().getAttribute(Constants.USER_KEY); HttpSession session = request.getSession(); // Populate the user registration form if (form == null) { form = new UserForm(); if (request.equals(mapping.getScope())) request.setAttribute(mapping.getAttribute(), form); else session.setAttribute(mapping.getAttribute(), form); } UserForm userform = (UserForm) form; try { PropertyUtils.copyProperties(userform, user); // Shouldn't this populate the user to the form? } catch (InvocationTargetException e) {//Handle the exception } return (new ActionForward(/userform.jsp)); userform.jsp tdhtml:text property=fname value=//td tdhtml:text property=sname value=//td tdhtml:text property=bdate value=/ /td ... UserForm . public void setFname(String name){ this.fname=name; } public String getFname(){ return this.fname; } public void setSname(String myname){ this.sname=myname; } . UserBean = public class UserBean { String fname; String sname; String bdate; String address; String region; String post; String phone; String faculty; String dregister; String email; String username; String password; public void setFname(String first){ this.fname=first; } public String getFname(){ return this.fname; } After doing all the above I get an empty userform.jsp. Can someome please tell me what I'm missing? Thank you in advance, Konstantina
Re: A newbie question.
On Tue, 29 Oct 2002, Josh Berry wrote: My other stumbling block was in using a DataSource. I was able to setup the DataSource using Struts, but was not happy with the way that it required doing the database access actually in the Action classes. Instead, I was wanting the action class to be a checklist. Basically, I try to keep my actions as a simple series of calls into some business classes I wrote. In order to do this, I went through the extra effort of setting up a JNDI dataSource in Tomcat so that my business classes could all get to it. Was there another way I should have done this? Does what I am saying make sense? This is how I go about it as well. I have a datasource set up in my container. I access that datasource using jndi, and do no do that in my Actions. This topic cycles through here every now and again. Try a search for DAO in the archives at http://nagoya.apache.org/eyebrowse/SearchList?listName=struts-user;jakarta.apache.org I'm sure some useful threads on other people's approach will turn up. And, finally, I know this is offtopic but does anyone have a good recommendation for a free email client for windows that would allow me to view threaded messages? As it is right now, I just get a long list of these emails everytime I log in. In fact, this is one of the reasons I used to avoid mailing lists, as it is less the comfortable to read. I believe mutt would do what I want, but I can't use that during the day as I don't believe it is available for windows. I haven't used Eudora (www.qualcomm.com) in awhile, but there is a free version available if you want to deal with advertisements. I use pine, and there is a Windows version for that (http://www.washington.edu/pine/). I use FreeBSD, so I can only attest that the Unix version does threading and filtering just fine. I haven't tried the Windows version. -- stu: www.stuology.net It just no longer is plain simple safe fun when it's the psycho chimp that has the ray gun Stuology -- A million monkeys can't be wrong -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: form and action in struts-config
A few suggestions: * Try setting the 'name' attribute in the action mapping to '/cultureForm' * Make sure you using a html:form in your culture.jsp file. * Make sure that the 'action' attribute value of the html:form is 'cultureForm.do' (assuming you are using the usual Struts convention) Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 9:08 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config I checked the struts-config.xml and here is the piece of code.. form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / The issue I am facing is I don't see the values in my ACTION class after I submit my jsp page and go to action class and retreive them by saying cultureform.get(xxx) and all I see in the formbean values are nulls... I know I am missing something very silly but can't figure it out... Any idea ... Naga Phone: 860-686-1643 -Original Message- From: Marcus Biel [mailto:Marcus.Biel;bmw.de] Sent: Tuesday, October 29, 2002 2:33 AM To: [EMAIL PROTECTED] Subject: Re: form and action in struts-config Would need to see some of your code... The only idea I got without seeing your code: check your struts-config.xml form-bean name=yourFormMappingName type=YourFormClass/ action path=/doAction type=YourActionClassName name=yourFormMappingName scope=session validate=true input=/yourJSP.jsp forward name=yourLocalForwardName path=/yourSecondJSP.jsp / /action Or even better: Download James Holmes Struts Console to edit your struts-config. (search google) hope this helps, marcus [EMAIL PROTECTED] schrieb: Can anyone explain me why I get this problem... I have my action and form defined in the struts-config.xml.. Now in my jsp page when I enter a value in the text-box and try to see the value in my action using debugger, I don't see that value in my form and all i see is the reset value defined in the form bean. Somehow anyvalues I enter in my jsp pages aren't getting moved to the form and they my form just has the reset values defined initally. Can someone explain this to me.. Naga 860-686-1643 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: form and action in struts-config
Oops! Major brain fart. Change the suggestions: Ignore the first suggestion. The third suggestion should read: * Make sure that the 'action' attribute value of the html:form is 'test.do' (assuming you are using the usual Struts convention) -Original Message- From: Sri Sankaran Sent: Tuesday, October 29, 2002 9:22 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config A few suggestions: * Try setting the 'name' attribute in the action mapping to '/cultureForm' * Make sure you using a html:form in your culture.jsp file. * Make sure that the 'action' attribute value of the html:form is 'cultureForm.do' (assuming you are using the usual Struts convention) Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 9:08 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config I checked the struts-config.xml and here is the piece of code.. form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / The issue I am facing is I don't see the values in my ACTION class after I submit my jsp page and go to action class and retreive them by saying cultureform.get(xxx) and all I see in the formbean values are nulls... I know I am missing something very silly but can't figure it out... Any idea ... Naga Phone: 860-686-1643 -Original Message- From: Marcus Biel [mailto:Marcus.Biel;bmw.de] Sent: Tuesday, October 29, 2002 2:33 AM To: [EMAIL PROTECTED] Subject: Re: form and action in struts-config Would need to see some of your code... The only idea I got without seeing your code: check your struts-config.xml form-bean name=yourFormMappingName type=YourFormClass/ action path=/doAction type=YourActionClassName name=yourFormMappingName scope=session validate=true input=/yourJSP.jsp forward name=yourLocalForwardName path=/yourSecondJSP.jsp / /action Or even better: Download James Holmes Struts Console to edit your struts-config. (search google) hope this helps, marcus [EMAIL PROTECTED] schrieb: Can anyone explain me why I get this problem... I have my action and form defined in the struts-config.xml.. Now in my jsp page when I enter a value in the text-box and try to see the value in my action using debugger, I don't see that value in my form and all i see is the reset value defined in the form bean. Somehow anyvalues I enter in my jsp pages aren't getting moved to the form and they my form just has the reset values defined initally. Can someone explain this to me.. Naga 860-686-1643 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
form:text property
Hi All, I have this in a jsp form:text property=phonenumber / Now, what does this property corresponds to ? I am getting the exeception saying no getter method available for property phonenumber Thanks, - raj
RE: form and action in struts-config
Sri I have been using the other action attribute convention i.e path '/test' and also the other action-mappings were working fine with this declaration.But anyway I will try this too and let u know.. Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 9:27 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Oops! Major brain fart. Change the suggestions: Ignore the first suggestion. The third suggestion should read: * Make sure that the 'action' attribute value of the html:form is 'test.do' (assuming you are using the usual Struts convention) -Original Message- From: Sri Sankaran Sent: Tuesday, October 29, 2002 9:22 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config A few suggestions: * Try setting the 'name' attribute in the action mapping to '/cultureForm' * Make sure you using a html:form in your culture.jsp file. * Make sure that the 'action' attribute value of the html:form is 'cultureForm.do' (assuming you are using the usual Struts convention) Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 9:08 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config I checked the struts-config.xml and here is the piece of code.. form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / The issue I am facing is I don't see the values in my ACTION class after I submit my jsp page and go to action class and retreive them by saying cultureform.get(xxx) and all I see in the formbean values are nulls... I know I am missing something very silly but can't figure it out... Any idea ... Naga Phone: 860-686-1643 -Original Message- From: Marcus Biel [mailto:Marcus.Biel;bmw.de] Sent: Tuesday, October 29, 2002 2:33 AM To: [EMAIL PROTECTED] Subject: Re: form and action in struts-config Would need to see some of your code... The only idea I got without seeing your code: check your struts-config.xml form-bean name=yourFormMappingName type=YourFormClass/ action path=/doAction type=YourActionClassName name=yourFormMappingName scope=session validate=true input=/yourJSP.jsp forward name=yourLocalForwardName path=/yourSecondJSP.jsp / /action Or even better: Download James Holmes Struts Console to edit your struts-config. (search google) hope this helps, marcus [EMAIL PROTECTED] schrieb: Can anyone explain me why I get this problem... I have my action and form defined in the struts-config.xml.. Now in my jsp page when I enter a value in the text-box and try to see the value in my action using debugger, I don't see that value in my form and all i see is the reset value defined in the form bean. Somehow anyvalues I enter in my jsp pages aren't getting moved to the form and they my form just has the reset values defined initally. Can someone explain this to me.. Naga 860-686-1643 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: [Re: A newbie question.]
This is how I go about it as well. I have a datasource set up in my container. I access that datasource using jndi, and do no do that in my Actions. This topic cycles through here every now and again. Try a search for DAO in the archives at http://nagoya.apache.org/eyebrowse/SearchList?listName=struts-user;jakarta.apache.org I'm sure some useful threads on other people's approach will turn up. I'll definitely check that out. Thanks. I haven't used Eudora (www.qualcomm.com) in awhile, but there is a free version available if you want to deal with advertisements. I use pine, and there is a Windows version for that (http://www.washington.edu/pine/). I use FreeBSD, so I can only attest that the Unix version does threading and filtering just fine. I haven't tried the Windows version. I actually have FreeBSD on my laptop at home. Though, I do not have email setup on it correctly. (It has never been an issue, as it is FAR from a primary machine.) I used to use mutt, however, and know that it has options for threading. I was hoping I could get something like that for windows. Thanks for the heads up on pine. Also, thank you V for the heads up on basebeans. That looks to be a very good solution for viewing these posts at work. I'm assuming I still have to post through email, though? -josh -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: form and action in struts-config
OK, so you have: form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / What does your jsp look like? Just send a snippet with the form tag and some representative field(s). While you are at it, send a sample demonstrating how you are trying to extract user-entered data from the form. Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 9:50 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Sri The third suggestion too did not work .. Any more suggestions.. Naga Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 9:27 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Oops! Major brain fart. Change the suggestions: Ignore the first suggestion. The third suggestion should read: * Make sure that the 'action' attribute value of the html:form is 'test.do' (assuming you are using the usual Struts convention) -Original Message- From: Sri Sankaran Sent: Tuesday, October 29, 2002 9:22 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config A few suggestions: * Try setting the 'name' attribute in the action mapping to '/cultureForm' * Make sure you using a html:form in your culture.jsp file. * Make sure that the 'action' attribute value of the html:form is 'cultureForm.do' (assuming you are using the usual Struts convention) Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 9:08 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config I checked the struts-config.xml and here is the piece of code.. form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / The issue I am facing is I don't see the values in my ACTION class after I submit my jsp page and go to action class and retreive them by saying cultureform.get(xxx) and all I see in the formbean values are nulls... I know I am missing something very silly but can't figure it out... Any idea ... Naga Phone: 860-686-1643 -Original Message- From: Marcus Biel [mailto:Marcus.Biel;bmw.de] Sent: Tuesday, October 29, 2002 2:33 AM To: [EMAIL PROTECTED] Subject: Re: form and action in struts-config Would need to see some of your code... The only idea I got without seeing your code: check your struts-config.xml form-bean name=yourFormMappingName type=YourFormClass/ action path=/doAction type=YourActionClassName name=yourFormMappingName scope=session validate=true input=/yourJSP.jsp forward name=yourLocalForwardName path=/yourSecondJSP.jsp / /action Or even better: Download James Holmes Struts Console to edit your struts-config. (search google) hope this helps, marcus [EMAIL PROTECTED] schrieb: Can anyone explain me why I get this problem... I have my action and form defined in the struts-config.xml.. Now in my jsp page when I enter a value in the text-box and try to see the value in my action using debugger, I don't see that value in my form and all i see is the reset value defined in the form bean. Somehow anyvalues I enter in my jsp pages aren't getting moved to the form and they my form just has the reset values defined initally. Can someone explain this to me.. Naga 860-686-1643 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail:
Advantages of other frameworks
This was at the end of another thread and didn't get any response so I'm moving it into a new thread. John Nicholas -Original Message- From: James Mitchell [mailto:jmitchtx;telocity.com] I'm not here to argue about Struts' performance. Anyone who chooses another framework over Struts either doesn't need Struts or they don't know what it has to offer. I have yet to meet anything that comes close to what this framework can do Andrew Hill wrote: Barracuda? . John Nicholas wrote: Maybe this should be in it's own thread but I would be interested in advantages that other frameworks may offer. I hate seeing people get too much in the 'home team' mentality rather than the 'best tool for the job' mentality. I like struts and am in the middle of my 3rd project with it but I can't believe it's the best tool for every possible web publishing job. Struts seems very focused on form handling and is perfect for web applications but what about a large brochure site? I would think another framework (like cocoon) might work better for a site that needs to manage 100s or 1000s of detailed pages but has little user input.I could see how tapestry or xmlc might work better where html designers are going to be working on the site more than programmers. I'd like to see comments like Framework X is better than Struts where you have situations Y and Z. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Maxlength validation returns null in error message
I think, arg2 is only required for the range validation error message not for minlength/maxlength. please check for the error messages declared in the validator-rules.xml. But in the struts-example application in validation.xml, arg2 is declared for maxlength, field property=username depends=minlength,maxlength arg0 key=prompt.username/ arg1 key=${var:minlength} name=minlength resource=false/ arg2 key=${var:maxlength} name=maxlength resource=false/ .. Make arg2 to arg1 for the maxlength and it should work. -Original Message- From: Jeff Born [mailto:jborn;gr.com] Sent: Monday, October 28, 2002 8:12 PM To: [EMAIL PROTECTED] Subject: Maxlength validation returns null in error message Hi all, I've looking at the struts-example.war in 1.1b2 and when running through the login.jsp page I keep getting the following username can not be greater than null characters. This happens via the JavaScript validation. I thought maybe it might be JavaScript related, but when I remove the onsubmit and let the server validate I end up with the same message. I think I found somewhere that this is an open error, but not sure where to check. Any direction here? Is there a simple fix? Is a fix in the works? Thanks, jb -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: How to use Templates efficently ?
Definitely use Tiles as Cedric suggested. The template taglib is deprecated in 1.1 in favor of Tiles so when you eventually migrate to 1.1 you'll already have Tiles in place. David _ Unlimited Internet access for only $21.95/month. Try MSN! http://resourcecenter.msn.com/access/plans/2monthsfree.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Differentiating Option boxs in action class
Hi, I have two option boxes called group and attribute, which are loaded in preaction. And i am using javascript onchange='document.forms[0].submit()' to kick of an action in option box. As there are two option boxes on screen is there any way distinguish between them say which option box is changed. So i can call related action in my action class. Any examples and code is helpful. Thanks vkvk _ Internet access plans that fit your lifestyle -- join MSN. http://resourcecenter.msn.com/access/plans/default.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
[OT] Re: Javascripting
Make sure you're submitting to .do not .jsp. Also, it's usually a bad idea to rely on js to submit forms. What happens when javascript is turned off? David From: Alok Garg [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Javascripting Date: Tue, 29 Oct 2002 19:09:26 +0530 Hello All, I am facing problem in using javascript. The cases: 1) I have a select box. 2) OnChange a javascript method is called. 3) In this method a Form is submitted and an action class is called. 4) on finishing with the action class same jsp is called. Problem:: 5) if now again step 2 is repeated I am getting the error object not found?? On seeing the URL of the page before submitting it was a jsp page and after submitting it is a .do page. Please help me with it. _ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: form:text property
Wendy, Thanks for your reply. I have a getPhoneNumber() method instead of getPhonenumber() ? But how does it matter ? Thanks, - raj - Original Message - From: Wendy Smoak [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 8:33 PM Subject: RE: form:text property I have this in a jsp form:text property=phonenumber / Now, what does this property corresponds to ? I am getting the exeception saying no getter method available for property phonenumber I don't recognize the 'form' prefix. Are you using the struts-html.tld with that prefix? Assuming you're within an html:form tag [possibly form:form with your usage], then the property should belong to your form bean. Does your form have a getPhonenumber() method? (Are you sure it's not getPhoneNumber()?) -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University PA Information Resources Management -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [OT] Re: Javascripting
Some people are creating apps for controlled environments. Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: Tuesday, October 29, 2002 10:24 AM To: [EMAIL PROTECTED] Subject: [OT] Re: Javascripting Make sure you're submitting to .do not .jsp. Also, it's usually a bad idea to rely on js to submit forms. What happens when javascript is turned off? David From: Alok Garg [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Javascripting Date: Tue, 29 Oct 2002 19:09:26 +0530 Hello All, I am facing problem in using javascript. The cases: 1) I have a select box. 2) OnChange a javascript method is called. 3) In this method a Form is submitted and an action class is called. 4) on finishing with the action class same jsp is called. Problem:: 5) if now again step 2 is repeated I am getting the error object not found?? On seeing the URL of the page before submitting it was a jsp page and after submitting it is a .do page. Please help me with it. _ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
tiles:put / in ActionForward.perform()
Hi! I'm trying to expand my tiles with a dynamic body. I want to control this body with a simple parameter in the url eg http://localhost:8081/myPage?body=aTile.jsp . Does anyone have an example of how to do this? Thanks in advance Roland Carlsson -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Struts in a war inside a ear file in WL6.1
I'm getting this error in the browser when I try to deploy an ear that has two EJBs and a war with struts in it. When I click on the button that has the action: No action instance for path /amortization could be created action: Error creating ActionForm instance of class ' i.webcontrol.monthlyprocess.AmortizationForm' java.lang.ClassNotFoundException: com.mypcka.ipi.webcontrol AmortizationForm at java.net.URLClassLoader$1.run(URLClassLoader.java:19 at java.security.AccessController.doPrivileged(Native M at java.net.URLClassLoader.findClass(URLClassLoader.jav at java.lang.ClassLoader.loadClass(ClassLoader.java:294 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher. at java.lang.ClassLoader.loadClass(ClassLoader.java:250 at java.lang.ClassLoader.loadClassInternal(ClassLoader. at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:115) The struts.jar is inside the WAR file under web-inf/lib/struts.jar any ideas? thanks -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: form:text property
I have a getPhoneNumber() method instead of getPhonenumber() ? But how does it matter ? Then change your tag to form:text property=phoneNumber / Java is case sensitive-- phoneNumber isn't the same as phonenumber. -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University PA Information Resources Management
Re: form:text property
Yes, got it. Thanks a lot.. spent an hour on this... - Raj - Original Message - From: Wendy Smoak [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 9:03 PM Subject: RE: form:text property I have a getPhoneNumber() method instead of getPhonenumber() ? But how does it matter ? Then change your tag to form:text property=phoneNumber / Java is case sensitive-- phoneNumber isn't the same as phonenumber. -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University PA Information Resources Management -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [OT] Re: Javascripting
I understand that; however, if you're not then using js in this way is a very bad idea. David From: Madel,Kurt [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: [OT] Re: Javascripting Date: Tue, 29 Oct 2002 10:28:07 -0500 Some people are creating apps for controlled environments. Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: Tuesday, October 29, 2002 10:24 AM To: [EMAIL PROTECTED] Subject: [OT] Re: Javascripting Make sure you're submitting to .do not .jsp. Also, it's usually a bad idea to rely on js to submit forms. What happens when javascript is turned off? David From: Alok Garg [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Javascripting Date: Tue, 29 Oct 2002 19:09:26 +0530 Hello All, I am facing problem in using javascript. The cases: 1) I have a select box. 2) OnChange a javascript method is called. 3) In this method a Form is submitted and an action class is called. 4) on finishing with the action class same jsp is called. Problem:: 5) if now again step 2 is repeated I am getting the error object not found?? On seeing the URL of the page before submitting it was a jsp page and after submitting it is a .do page. Please help me with it. _ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ Get a speedy connection with MSN Broadband. Join now! http://resourcecenter.msn.com/access/plans/freeactivation.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Struts in a war inside a ear file in WL6.1
The struts.jar is inside the WAR file under web-inf/lib/struts.jar any ideas? Try capitalizing WEB-INF? If you're running on Windows it might not matter, but I've never seen it in lower case. -- Wendy Smoak http://sourceforge.net/projects/unidbtags
RE: Maxlength validation returns null in error message
I think, arg2 is only required for the range validation error message not for minlength/maxlength. please check for the error messages declared in the validator-rules.xml. But in the struts-example application in validation.xml, arg2 is declared for maxlength, field property=username depends=minlength,maxlength arg0 key=prompt.username/ arg1 key=${var:minlength} name=minlength resource=false/ arg2 key=${var:maxlength} name=maxlength resource=false/ .. Make arg2 to arg1 for the maxlength and it should work. -Original Message- From: Jeff Born [mailto:jborn;gr.com] Sent: Monday, October 28, 2002 8:12 PM To: [EMAIL PROTECTED] Subject: Maxlength validation returns null in error message Hi all, I've looking at the struts-example.war in 1.1b2 and when running through the login.jsp page I keep getting the following username can not be greater than null characters. This happens via the JavaScript validation. I thought maybe it might be JavaScript related, but when I remove the onsubmit and let the server validate I end up with the same message. I think I found somewhere that this is an open error, but not sure where to check. Any direction here? Is there a simple fix? Is a fix in the works? Thanks, jb -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Validator lazy validation
In using the validator I noticed that the validator will run every validator specified in the depends attribute of the field element in the validator.xml. I would like the validator to stop running checks at the first check that fails for a particular field element. You could call it lazy validation. Is there a way to achieve this? Greetings, Bas --- Bas Passon First8 - http://www.first8.nl Email: [EMAIL PROTECTED] Phone: +31 (0)24 348 38 77 Fax: +31 (0)24 348 35 71 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: form and action in struts-config
Sri Here is the snippet of form class too.Plz take a look at this one too.. Naga Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 10:08 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config OK, so you have: form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / What does your jsp look like? Just send a snippet with the form tag and some representative field(s). While you are at it, send a sample demonstrating how you are trying to extract user-entered data from the form. Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 9:50 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Sri The third suggestion too did not work .. Any more suggestions.. Naga Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 9:27 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Oops! Major brain fart. Change the suggestions: Ignore the first suggestion. The third suggestion should read: * Make sure that the 'action' attribute value of the html:form is 'test.do' (assuming you are using the usual Struts convention) -Original Message- From: Sri Sankaran Sent: Tuesday, October 29, 2002 9:22 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config A few suggestions: * Try setting the 'name' attribute in the action mapping to '/cultureForm' * Make sure you using a html:form in your culture.jsp file. * Make sure that the 'action' attribute value of the html:form is 'cultureForm.do' (assuming you are using the usual Struts convention) Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 9:08 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config I checked the struts-config.xml and here is the piece of code.. form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / The issue I am facing is I don't see the values in my ACTION class after I submit my jsp page and go to action class and retreive them by saying cultureform.get(xxx) and all I see in the formbean values are nulls... I know I am missing something very silly but can't figure it out... Any idea ... Naga Phone: 860-686-1643 -Original Message- From: Marcus Biel [mailto:Marcus.Biel;bmw.de] Sent: Tuesday, October 29, 2002 2:33 AM To: [EMAIL PROTECTED] Subject: Re: form and action in struts-config Would need to see some of your code... The only idea I got without seeing your code: check your struts-config.xml form-bean name=yourFormMappingName type=YourFormClass/ action path=/doAction type=YourActionClassName name=yourFormMappingName scope=session validate=true input=/yourJSP.jsp forward name=yourLocalForwardName path=/yourSecondJSP.jsp / /action Or even better: Download James Holmes Struts Console to edit your struts-config. (search google) hope this helps, marcus [EMAIL PROTECTED] schrieb: Can anyone explain me why I get this problem... I have my action and form defined in the struts-config.xml.. Now in my jsp page when I enter a value in the text-box and try to see the value in my action using debugger, I don't see that value in my form and all i see is the reset value defined in the form bean. Somehow anyvalues I enter in my jsp pages aren't getting moved to the form and they my form just has the reset values defined initally. Can someone explain this to me.. Naga 860-686-1643 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail:
RE: form and action in struts-config
You cannot nest form tags. That isn't valid HTML. That probably explains why your field values aren't getting submitted. You can accomplish what you are attempting with simply your current outer form tag with one hidden 'target' field. Set the target accordingly using JavaScript based on the button the user selects and then submit. Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 10:36 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Sri Here are the attchmnts of action class and jsp. Naga Vankineni Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 10:08 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config OK, so you have: form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / What does your jsp look like? Just send a snippet with the form tag and some representative field(s). While you are at it, send a sample demonstrating how you are trying to extract user-entered data from the form. Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 9:50 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Sri The third suggestion too did not work .. Any more suggestions.. Naga Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 9:27 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Oops! Major brain fart. Change the suggestions: Ignore the first suggestion. The third suggestion should read: * Make sure that the 'action' attribute value of the html:form is 'test.do' (assuming you are using the usual Struts convention) -Original Message- From: Sri Sankaran Sent: Tuesday, October 29, 2002 9:22 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config A few suggestions: * Try setting the 'name' attribute in the action mapping to '/cultureForm' * Make sure you using a html:form in your culture.jsp file. * Make sure that the 'action' attribute value of the html:form is 'cultureForm.do' (assuming you are using the usual Struts convention) Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 9:08 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config I checked the struts-config.xml and here is the piece of code.. form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / The issue I am facing is I don't see the values in my ACTION class after I submit my jsp page and go to action class and retreive them by saying cultureform.get(xxx) and all I see in the formbean values are nulls... I know I am missing something very silly but can't figure it out... Any idea ... Naga Phone: 860-686-1643 -Original Message- From: Marcus Biel [mailto:Marcus.Biel;bmw.de] Sent: Tuesday, October 29, 2002 2:33 AM To: [EMAIL PROTECTED] Subject: Re: form and action in struts-config Would need to see some of your code... The only idea I got without seeing your code: check your struts-config.xml form-bean name=yourFormMappingName type=YourFormClass/ action path=/doAction type=YourActionClassName name=yourFormMappingName scope=session validate=true input=/yourJSP.jsp forward name=yourLocalForwardName path=/yourSecondJSP.jsp / /action Or even better: Download James Holmes Struts Console to edit your struts-config. (search google) hope this helps, marcus [EMAIL PROTECTED] schrieb: Can anyone explain me why I get this problem... I have my action and form defined in the struts-config.xml.. Now in my jsp page when I enter a value in the text-box and try to see the value in my action using debugger, I don't see that value in my form and all i see is the reset value defined in the form bean. Somehow anyvalues I enter in my jsp pages aren't getting moved to the form and they my form just has the reset values defined initally. Can someone explain this to me.. Naga 860-686-1643 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or
RE: Struts in a war inside a ear file in WL6.1
I'm getting this error in the browser when I try to deploy an ear that has two EJBs and a war with struts in it. When I click on the button that has the action: No action instance for path /amortization could be created action: Error creating ActionForm instance of class ' i.webcontrol.monthlyprocess.AmortizationForm' java.lang.ClassNotFoundException: com.mypcka.ipi.webcontrol AmortizationForm The struts.jar is inside the WAR file under web-inf/lib/struts.jar First let me say I don't do EJB's or .ear files, but that error message doesn't appear to have anything to do with struts.jar. It's complaining that it can't find your AmortizationForm class. Can you post the action tag from struts-config.xml? Was part of the error message cut off? (Do you really have a package named i.webcontrol.monthlyprocess?) Do you have an AmortizationForm class in two *different* packages? The error message refers to both i.webcontrol.monthlyprocess (which I assume is really com.mypcka.ipi.webcontrol.monthlyprocess) and also com.mypcka.ipi.webcontrol. (Again, could just have been cut off.) -- Wendy Smoak http://sourceforge.net/projects/unidbtags
how many form for update and create action ?
I have a conceptual problem in my struts application I am programming an application which give the possibility to create, update and delete several information, for exemple the name and the price of an item. So I need to give to the user two possibilities : 1- the possibility to create an item 2- the possibility to update an item so i use two action, one for each possibility Should I use the same form bean to update and create or should I use different form bean, one for update and one for create ? and if I should use different form bean, should they have the same type ? Greetings, Xavier -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Action class called multiple times
I'm running a Web Application on WebLogic 6.1sp3 with Struts 1.0. A user request triggers an Action class to generate a report from an Oracle Reports Server. I've found that if the ORS takes longer than 5 minutes to process, the Action class is called again, and then every 5 minutes from then on. Has anyone seen this behavior before when using Struts? --- Kirk Zaleski [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: how many form for update and create action ?
You have one form bean, one jsp, and 2 actions. ProductForm - form bean holds data and has action attribute to determine if this is an add or edit form productForm.jsp - displays data to user GetProductFormAction - if this will be an edit form, get data from db and pre-populate the form bean, forward to productForm.jsp SaveProductFormAction - called when user submits the form, if this is an edit form, update record in db, if it's an add form, insert record in db. David From: Xavier Combelle [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: how many form for update and create action ? Date: Tue, 29 Oct 2002 17:25:34 +0100 I have a conceptual problem in my struts application I am programming an application which give the possibility to create, update and delete several information, for exemple the name and the price of an item. So I need to give to the user two possibilities : 1- the possibility to create an item 2- the possibility to update an item so i use two action, one for each possibility Should I use the same form bean to update and create or should I use different form bean, one for update and one for create ? and if I should use different form bean, should they have the same type ? Greetings, Xavier -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ Get faster connections -- switch to MSN Internet Access! http://resourcecenter.msn.com/access/plans/default.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Nested levels within tiles?
How many levels of extends can you have within tiles? I've attached a tiles def file (that works), but I would like to see if it is possible to do it differently so that I don't duplicate code in the xml file. Here is the scenario... site.mainLayout defines the overall page. The mainbody portion will vary depending on the page called. As in the xml file, mainbody will display a group of portals on the left and right side of the screen with a larger html section in the middle addressed by bodycontent. The problem (as I see it) is that to get this to work I need to duplicate code in both home.page.layout and logon.page.layout. Is it possible to do an additional extends somewhere so that will eliminate the duplication of code so that a scope change (what the users want to see) can be addressed in a single location of the xml file? Later, aj !DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD Tiles Configuration//EN http://jakarta.apache.org/struts/dtds/tiles-config.dtd; !-- Definitions for Tiles documentation -- tiles-definitions !-- === -- !-- Master definition(s) -- !-- === -- !-- Main page layout used as a root for other pages defintion. -- definition name=site.mainLayout path=/layout/mainPageLayout.jsp put name=header value=/layout/mainPageHeader.jsp / put name=titlebar value=/layout/mainPageTitleBar.jsp / put name=rowlinks value=/layout/mainPageRowLinks.jsp / put name=spacerbar value=/layout/mainPageSpacerBar.jsp / put name=mainbody value= / put name=footer value=/layout/mainPageFooter.jsp / /definition !-- === -- !-- Index page definition -- !-- === -- definition name=home.page extends=site.mainLayout put name=mainbody value=home.page.layout / /definition definition name=home.page.layout path=/layout/homePageBodyLayout.jsp put name=leftportals value=/leftPortals/index.jsp / put name=bodycontent value=/home/index.jsp / put name=rightportals value=/rightPortals/index.jsp / /definition definition name=logon.page extends=site.mainLayout put name=mainbody value=logon.page.layout / /definition definition name=logon.page.layout path=/layout/homePageBodyLayout.jsp put name=leftportals value=/leftPortals/index.jsp / put name=bodycontent value=/logon/index.jsp / put name=rightportals value=/rightPortals/index.jsp / /definition /tiles-definitions -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: form and action in struts-config
Sri, I used the nested tags previously for other similiar pages and they all worked fine.. Also I can try it out like you said,but my point is how did the other page which had the similar functionality like this page work well and why is the problem only with this one. Naga Vankineni Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 11:11 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config You cannot nest form tags. That isn't valid HTML. That probably explains why your field values aren't getting submitted. You can accomplish what you are attempting with simply your current outer form tag with one hidden 'target' field. Set the target accordingly using JavaScript based on the button the user selects and then submit. Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 10:36 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Sri Here are the attchmnts of action class and jsp. Naga Vankineni Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 10:08 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config OK, so you have: form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / What does your jsp look like? Just send a snippet with the form tag and some representative field(s). While you are at it, send a sample demonstrating how you are trying to extract user-entered data from the form. Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 9:50 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Sri The third suggestion too did not work .. Any more suggestions.. Naga Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 9:27 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Oops! Major brain fart. Change the suggestions: Ignore the first suggestion. The third suggestion should read: * Make sure that the 'action' attribute value of the html:form is 'test.do' (assuming you are using the usual Struts convention) -Original Message- From: Sri Sankaran Sent: Tuesday, October 29, 2002 9:22 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config A few suggestions: * Try setting the 'name' attribute in the action mapping to '/cultureForm' * Make sure you using a html:form in your culture.jsp file. * Make sure that the 'action' attribute value of the html:form is 'cultureForm.do' (assuming you are using the usual Struts convention) Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 9:08 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config I checked the struts-config.xml and here is the piece of code.. form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / The issue I am facing is I don't see the values in my ACTION class after I submit my jsp page and go to action class and retreive them by saying cultureform.get(xxx) and all I see in the formbean values are nulls... I know I am missing something very silly but can't figure it out... Any idea ... Naga Phone: 860-686-1643 -Original Message- From: Marcus Biel [mailto:Marcus.Biel;bmw.de] Sent: Tuesday, October 29, 2002 2:33 AM To: [EMAIL PROTECTED] Subject: Re: form and action in struts-config Would need to see some of your code... The only idea I got without seeing your code: check your struts-config.xml form-bean name=yourFormMappingName type=YourFormClass/ action path=/doAction type=YourActionClassName name=yourFormMappingName scope=session validate=true input=/yourJSP.jsp forward name=yourLocalForwardName path=/yourSecondJSP.jsp / /action Or even better: Download James Holmes Struts Console to edit your struts-config. (search google) hope this helps, marcus [EMAIL PROTECTED] schrieb: Can anyone explain me why I get this problem... I have my action and form defined in the struts-config.xml.. Now in my jsp page when I enter a value in the text-box and try to see the value in my action using debugger, I don't see that value in my form and all i see is the reset value defined in the form bean. Somehow anyvalues I enter in my jsp pages aren't getting moved to the form and they my form just has the
Re: how many form for update and create action ?
On Tue, 29 Oct 2002, Xavier Combelle wrote: Date: Tue, 29 Oct 2002 17:25:34 +0100 From: Xavier Combelle [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: how many form for update and create action ? I have a conceptual problem in my struts application I am programming an application which give the possibility to create, update and delete several information, for exemple the name and the price of an item. So I need to give to the user two possibilities : 1- the possibility to create an item 2- the possibility to update an item so i use two action, one for each possibility Should I use the same form bean to update and create or should I use different form bean, one for update and one for create ? and if I should use different form bean, should they have the same type ? The struts-example application (that ships with Struts) illustrates one approach to this problem. It uses the same form bean for both create and edit (SubscriptionForm), and the same setup action (SetupSubscriptionAction) and save-to-database action (SaveSubscriptionAction) for both create and edit functions. I chose to use an action property, included in the form bean and the various URLs, to indicate which type of transaction was to be performed. Greetings, Xavier Craig -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Container Managed Authentication and roles attribute on action
On Tue, 29 Oct 2002, Jarnot Voytek Contr AU HQ/SC wrote: Date: Tue, 29 Oct 2002 10:25:40 -0600 From: Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List (E-mail) [EMAIL PROTECTED] Subject: Container Managed Authentication and roles attribute on action I love the fact that when using (as we are) container managed authentication, I can specify roles on a per action basis in struts-config.xml. My problem is that when a user is not authorized, I get a 400 Bad Request response to the browser. Is it possible to configure a [page/action/forward] that would be invoked instead? In your web.xml file, you can define the page that is used for any particular status code (including 400). Check out the error-page directive. I hope what I'm after is clear - I just want a custom page to inform the user that they've overstepped their bounds. Thanks, Voytek Jarnot Craig -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [JSTL] c:out and DynaBeanClass
Hi flare, It doesn't work for me. I'm getting error org.apache.jasper.JasperException: An error occurred while evaluating custom action attribute value with value ${flare.ciccio}: Unable to find a value for ciccio in object of class org.apache.commons.beanutils.BasicDynaBean using operator . (null). My environment: Tomcat 4.1.12 Jakarta JSTL: Nightly build. Thanks Deepak -Original Message- From: flare [mailto:flare;flare.it] Sent: Tuesday, October 29, 2002 4:48 AM To: Struts Users Mailing List Subject: RE: [JSTL] c:out and DynaBeanClass JSTL supports dynabeans transparently Could you please supply a scenario and sample code that proves this? well.. I thought dynabeans were supported cause I'm using them without problem, since in the JSTL ML told me the full support will be added in the 2.x release I can at least say the OUT and various FMT tags work fine with them % page language=java import=org.apache.commons.beanutils.* % % taglib prefix=c uri=http://java.sun.com/jstl/core; % % DynaProperty[] props = new DynaProperty[2]; BasicDynaClass dClass = null; props[0] = new DynaProperty(ciccio); props[1] = new DynaProperty(pippo); try {dClass = new BasicDynaClass(flare, Class.forName(org.apache.commons.beanutils.BasicDynaBean), props); } catch (Exception e) { e.printStackTrace(); } DynaBean dbean = dClass.newInstance(); dbean.set(ciccio,uno); dbean.set(pippo,due); pageContext.setAttribute(flare,dbean); % c:out value=${flare.ciccio}/ %=((DynaBean)pageContext.getAttribute(flare)).get(pippo)% -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Suggested Change in ActionForwards
Hi all, Recently I've had a good deal of trouble with templates after upgrading my servlet container. It seems my container vendor has revisited their interpretation of forwards in the JSP spec which broke my application horribly. Several people on this list ( thanks Cedric and others ) gave me good suggestions about how to get my app up and going again. Unfortunately, my servlet container made it very difficult for any quick-fix solution that I tried. The solution that finally solved my problem involved adding a new 'feature' to the ActionForward and a slight addition to the struts-config.dtd. I wanted to share the idea with the group to see if these additions might be helpful to the rest of the community. What I've done is add an include parameter for the forward tag in the struts-config.xml file. This tells the ActionServlet (I'm currently working with 1.02) to do an include instead of a forward after processing the action. This is similar to the redirect parameter that already exists. What this allows me to do is explicitly declare that the target of the forward is in fact not a complete page but is a fragment meant to be included in a template (or tile). This also allows me to have each element of the template (or tile) be an action. The TilesRequestProcessor currently will do an include instead of a forward if the request.isCommitted() is true. This is nice (except it doesn't work with my #% servlet container) but I would like to be able to explicitly declare this behavior in the base struts package so that the developer has control of the way forwards operate. So, a forward that needs to be an include looks like forward name=success path=/jsp/myPage.jsp include=true/ where include is an optional parameter that defaults to false. I've made the few code changes in my local version of 1.02. I would be willing to submit the changes to the current tree if the powers that be think that this would be good for the package. Thanks for any feedback or ulconstructive/ul criticism :). Ken -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
a complex solution for a simple problem
Hello Here is my situation. I need to copy information from one database (da_A) and insert it into another (db_B).I get the id for the from an ActionForm. I guess the easiest thing to do would be to write code in my acton class that basically makes jdbc calls to both databases and do a jdbc get -set between them. I would not need any model beans in this case. Till now I've been kind of proud of the fact that I have not put any jdbc code or any real business logic in any of my action classes. But in this situation every other way I know seems like overkill. Scenario 1 : jdbc is done in the model classes that contain methods that can do everything from manipulating jdbc to storing value. In this scenario the ActionClass is just a staging area for the transfer. ActionClass + (db_A_ModelBean - db_B_ModelBean ) Scenario 2 : jdbc is done in the ActionClass and the ModelBeans are really only value beans copyProperties() comes to mind in this situation ActionClass + (db_A_ValueBean - db_B_ValueBean ) Scenario 3 : Break everything out to granular compoments. Action class does nothing but calls and passes data between utility beans that do the jdbc work and value beans that just hold values via get/set. ActionClass + ((db_A_UtilityBean - db_A_ValueBean ) - (db_B_ValueBean - db_B_UtilityBean )) Which is the best method, are there better suggestions? Thanks -- Vincent Stoessel Linux Systems Developer vincent xaymaca.com -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: a complex solution for a simple problem
I would break this into a value bean for the info and a DAO for the jdbc. ValueBean value = dao.getSomeValue(); dao.insertSomeValue(value); getSomeValue retrieves data from dbA and insertSomeValue inserts it into dbB. Of course, there are many variations of this that you can try. I don't think this is overkill and it allows you to reuse the jdbc logic. David From: Vincent Stoessel [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users [EMAIL PROTECTED] Subject: a complex solution for a simple problem Date: Tue, 29 Oct 2002 12:26:22 -0500 Hello Here is my situation. I need to copy information from one database (da_A) and insert it into another (db_B).I get the id for the from an ActionForm. I guess the easiest thing to do would be to write code in my acton class that basically makes jdbc calls to both databases and do a jdbc get -set between them. I would not need any model beans in this case. Till now I've been kind of proud of the fact that I have not put any jdbc code or any real business logic in any of my action classes. But in this situation every other way I know seems like overkill. Scenario 1 : jdbc is done in the model classes that contain methods that can do everything from manipulating jdbc to storing value. In this scenario the ActionClass is just a staging area for the transfer. ActionClass + (db_A_ModelBean - db_B_ModelBean ) Scenario 2 : jdbc is done in the ActionClass and the ModelBeans are really only value beans copyProperties() comes to mind in this situation ActionClass + (db_A_ValueBean - db_B_ValueBean ) Scenario 3 : Break everything out to granular compoments. Action class does nothing but calls and passes data between utility beans that do the jdbc work and value beans that just hold values via get/set. ActionClass + ((db_A_UtilityBean - db_A_ValueBean ) - (db_B_ValueBean - db_B_UtilityBean )) Which is the best method, are there better suggestions? Thanks -- Vincent Stoessel Linux Systems Developer vincent xaymaca.com -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ Choose an Internet access plan right for you -- try MSN! http://resourcecenter.msn.com/access/plans/default.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Suggested Change in ActionForwards
This sounds very similar to the 1.1 feature of putting tiles in the forward like: forward name=success path=account.form.myFormTile / This tells Tiles to process the account.form.myFormTile definition and construct the response. Does that meet your needs? David From: Ken Riley [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Suggested Change in ActionForwards Date: Tue, 29 Oct 2002 12:23:52 -0500 Hi all, Recently I've had a good deal of trouble with templates after upgrading my servlet container. It seems my container vendor has revisited their interpretation of forwards in the JSP spec which broke my application horribly. Several people on this list ( thanks Cedric and others ) gave me good suggestions about how to get my app up and going again. Unfortunately, my servlet container made it very difficult for any quick-fix solution that I tried. The solution that finally solved my problem involved adding a new 'feature' to the ActionForward and a slight addition to the struts-config.dtd. I wanted to share the idea with the group to see if these additions might be helpful to the rest of the community. What I've done is add an include parameter for the forward tag in the struts-config.xml file. This tells the ActionServlet (I'm currently working with 1.02) to do an include instead of a forward after processing the action. This is similar to the redirect parameter that already exists. What this allows me to do is explicitly declare that the target of the forward is in fact not a complete page but is a fragment meant to be included in a template (or tile). This also allows me to have each element of the template (or tile) be an action. The TilesRequestProcessor currently will do an include instead of a forward if the request.isCommitted() is true. This is nice (except it doesn't work with my #@% servlet container) but I would like to be able to explicitly declare this behavior in the base struts package so that the developer has control of the way forwards operate. So, a forward that needs to be an include looks like forward name=success path=/jsp/myPage.jsp include=true/ where include is an optional parameter that defaults to false. I've made the few code changes in my local version of 1.02. I would be willing to submit the changes to the current tree if the powers that be think that this would be good for the package. Thanks for any feedback or ulconstructive/ul criticism :). Ken -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ Get faster connections -- switch to MSN Internet Access! http://resourcecenter.msn.com/access/plans/default.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Maxlength validation returns null in error message
Thanks for the info, that fixed it for me. Also cleared up the arg0, arg1, arg2 confusion. jb -Original Message- From: Nekkalapudi, Viplava [mailto:VNekkalapudi;erac.com] Sent: Tuesday, October 29, 2002 10:51 AM To: [EMAIL PROTECTED] Subject: RE: Maxlength validation returns null in error message I think, arg2 is only required for the range validation error message not for minlength/maxlength. please check for the error messages declared in the validator-rules.xml. But in the struts-example application in validation.xml, arg2 is declared for maxlength, field property=username depends=minlength,maxlength arg0 key=prompt.username/ arg1 key=${var:minlength} name=minlength resource=false/ arg2 key=${var:maxlength} name=maxlength resource=false/ .. Make arg2 to arg1 for the maxlength and it should work. -Original Message- From: Jeff Born [mailto:jborn;gr.com] Sent: Monday, October 28, 2002 8:12 PM To: [EMAIL PROTECTED] Subject: Maxlength validation returns null in error message Hi all, I've looking at the struts-example.war in 1.1b2 and when running through the login.jsp page I keep getting the following username can not be greater than null characters. This happens via the JavaScript validation. I thought maybe it might be JavaScript related, but when I remove the onsubmit and let the server validate I end up with the same message. I think I found somewhere that this is an open error, but not sure where to check. Any direction here? Is there a simple fix? Is a fix in the works? Thanks, jb -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
struts-validator.war doesn't work
I'm using jakarta-struts-20021029, and trying struts-validator.war, it doesn,t works. I'm using Tomcat 4.1.10 Thanks for all Juan Pedro. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [JSTL] c:out and DynaBeanClass
Hi flare, It doesn't work for me. I'm getting error org.apache.jasper.JasperException: An error occurred while evaluating custom action attribute value with value ${flare.ciccio}: Unable to find a value for ciccio in object of class org.apache.commons.beanutils.BasicDynaBean using operator . (null). I got this error trying to render a url with a dynabean param c:url value=/showAllegati.do var=show c:param name=id value=${requestScope.id}/ c:param name=tipo value=${requestScope.tipo} / c:param name=key value=${item.a_nomefile} / ^^ dynabean /c:url With out and ftm tags works for me My environment: Tomcat 4.1.12 Jakarta JSTL: Nightly build. I'm using Resin 2.1.5 JSTL latest stable (1.02 I think) -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
html:select tag question
This may be a question for the Struts Developers, but here goes. I've been investigating the following JSP error (thrown by a JSP page attempting to use a FormBean) :- javax.servlet.jsp.JspException: No getter method available for property archiveServer for bean under name org.apache.struts.taglib.html.BEAN at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:304) at org.apache.jsp.ResultArchiveAdmin_jsp._jspService(ResultArchiveAdmin_jsp.jav a:265) Having looked at the Struts source code it would appear that the org.apache.struts.taglib.html.BEAN string should be the Class of the FormBean I've associated with my JSP page - but it isn't. This is the default value that the name var is initialised to. It would appear that the SelectTag.setName() method is not being called and hence the tag does not know the FormBean it should be looking for. Has anyone any ideas when/how the SelectTag should be told the Class of the FormBean it should be looking for so that it can populate the HTML OPTION tag? BTW I'm referencing the JSP page directly via a link, should I go via an Action? It wouldn't do anything as this initial reference simply displays an empty Form for the user to complete. Many thanks. Neil. Neil Axtell Principal Engineer (MMI/Web Technologies) ANRITSU LIMITED European Measurement Division - Engineering 200 Capability Green Luton, UK Tel: +44 (0) 1582 433347 Fax: +44 (0) 1582 433276 E-Mail: [EMAIL PROTECTED] mailto:Neil.Axtell;eu.anritsu.com - This email message, together with any attachments, is for the exclusive and confidential use of the addressee(s). If you have received this message in error, please notify the sender by email immediately, then delete the message and any copies. Any views or opinions presented herein are solely those of the author and do not necessarily represent those of the Anritsu group of companies. - -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: form:text property
Raj Yadav wrote: Yes, got it. Thanks a lot.. spent an hour on this... Can you turn off the EMAIL NOTIFICATION in your outgoing messages? Sheesh! -- Peter Pilgrim ServerSide Java Specialist My on-line resume and for interview videos about myself, J2EE Open Source, Struts and Expresso. || \\=== `` http://www.xenonsoft.demon.co.uk/no-it-striker.html '' -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: error checking in Action
yes i agree. my error checking is going into a buisness level helper class (instead of the form) because it is so complex. it onvolves going into the database, and making sure there are a minimum number of an item left, before a user can make changes to it. it also needs to check various other attributes from the db. i thought that this was too cumbersome to be in the form. andrew mentioned some ways to forward back to the form with an error in 1.1. i am using 1.0, will these techniques still work? are there any other suggestions on how to do this in 1.0? unfortunately i need to stick to 1.0, so suggestion to upgrade are not going to help much :-) thanks, -mark -Original Message- From: David Graham [mailto:dgraham1980;hotmail.com] Sent: Monday, October 28, 2002 10:38 PM To: [EMAIL PROTECTED] Subject: Re: error checking in Action Nice restatement Rob. That's exactly how I see the validation working. I know I'm in trouble when my action class gets too big :-). David From: Rob Leland [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: error checking in Action Date: Tue, 29 Oct 2002 00:14:55 -0500 David Graham wrote: Why do you need to move error checking into an action? Why not just let the form bean do it's job and validate itself? Have you looked at using the validator? Validation belongs in the form bean; actions' main job is to direct traffic and execute business layer methods. David Agreed, For Generic type of validation the ActionForm is an appropiate place to do validation. To restate what David said, the ActionForm is designed to be passive, and have values info it needs passed to it. It should definately not make method calls to other Business Logic. To add to that,Any complex validation would take place in the Business Logic, with the Action being the go between loading and unloading the ActionForm and calling validation methods in the Business Logic. -Rob -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ Get faster connections -- switch to MSN Internet Access! http://resourcecenter.msn.com/access/plans/default.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: form and action in struts-config
Don't know. All I can say is that nesting forms is incorrect usage of HTML and will lead to unpredictable results. Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 11:50 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Sri, I used the nested tags previously for other similiar pages and they all worked fine.. Also I can try it out like you said,but my point is how did the other page which had the similar functionality like this page work well and why is the problem only with this one. Naga Vankineni Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 11:11 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config You cannot nest form tags. That isn't valid HTML. That probably explains why your field values aren't getting submitted. You can accomplish what you are attempting with simply your current outer form tag with one hidden 'target' field. Set the target accordingly using JavaScript based on the button the user selects and then submit. Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 10:36 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Sri Here are the attchmnts of action class and jsp. Naga Vankineni Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 10:08 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config OK, so you have: form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / What does your jsp look like? Just send a snippet with the form tag and some representative field(s). While you are at it, send a sample demonstrating how you are trying to extract user-entered data from the form. Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 9:50 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Sri The third suggestion too did not work .. Any more suggestions.. Naga Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 9:27 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Oops! Major brain fart. Change the suggestions: Ignore the first suggestion. The third suggestion should read: * Make sure that the 'action' attribute value of the html:form is 'test.do' (assuming you are using the usual Struts convention) -Original Message- From: Sri Sankaran Sent: Tuesday, October 29, 2002 9:22 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config A few suggestions: * Try setting the 'name' attribute in the action mapping to '/cultureForm' * Make sure you using a html:form in your culture.jsp file. * Make sure that the 'action' attribute value of the html:form is 'cultureForm.do' (assuming you are using the usual Struts convention) Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 9:08 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config I checked the struts-config.xml and here is the piece of code.. form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / The issue I am facing is I don't see the values in my ACTION class after I submit my jsp page and go to action class and retreive them by saying cultureform.get(xxx) and all I see in the formbean values are nulls... I know I am missing something very silly but can't figure it out... Any idea ... Naga Phone: 860-686-1643 -Original Message- From: Marcus Biel [mailto:Marcus.Biel;bmw.de] Sent: Tuesday, October 29, 2002 2:33 AM To: [EMAIL PROTECTED] Subject: Re: form and action in struts-config Would need to see some of your code... The only idea I got without seeing your code: check your struts-config.xml form-bean name=yourFormMappingName type=YourFormClass/ action path=/doAction type=YourActionClassName name=yourFormMappingName scope=session validate=true input=/yourJSP.jsp forward name=yourLocalForwardName path=/yourSecondJSP.jsp / /action Or even better: Download James Holmes Struts Console to edit your struts-config. (search google) hope this helps, marcus [EMAIL PROTECTED] schrieb: Can anyone explain me why I get this problem... I have my action and
Re: [how many form for update and create action ?]
Xavier Combelle [EMAIL PROTECTED] wrote: I have a conceptual problem in my struts application I am programming an application which give the possibility to create, update and delete several information, for exemple the name and the price of an item. So I need to give to the user two possibilities : 1- the possibility to create an item 2- the possibility to update an item so i use two action, one for each possibility Should I use the same form bean to update and create or should I use different form bean, one for update and one for create ? and if I should use different form bean, should they have the same type ? I can only explain my approach. For simplicity, I will change it to a User example. I have one form for all user related information. However, there are three places that this information will be used, specifically, there is a search page, an add page, and an edit page. So, I created a pre-action that handles each of these pages. (note, they all use the same preaction) The pre-action simply makes sure that the form is initialized correctly. In the case of the edit page, it loads the user to be edited. The search page submits to a particular action for searching, though the add and edit page both submit to an action for saving. I was able to distinguish which page linked to the action based upon the parameter. So... for at least three input pages, I have one form and a total of three actions. Of course, saying it like that sounds like I simply wanted to minimize the number of files to create. Possibly, but it really does feel simpler this way. That is the way I would recommend it, one form. Some pages are just subsets of the form, but you still just need the one form. Afterall, the whole point of the form class is simply a buffer between the presentation and the business logic. It should reflect more of what the user is going to experience then what the backend knows. Now, before you take my word, I would at defer to others here. If people would chime in on my approach I would greatly appreciate it. -josh -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [JSTL] c:out and DynaBeanClass
Hi flare, I don't know how you got c:out working with DynaBean but seems like that JSTL doesn't support DynaBean. Here is the link http://nagoya.apache.org/eyebrowse/ReadMsg?listName=taglibs-user;jakarta.apa che.orgmsgId=367697. I also looked at the source code and couldn't find anything related to DynaBean. Deepak -Original Message- From: flare [mailto:flare;flare.it] Sent: Tuesday, October 29, 2002 12:43 PM To: Struts Users Mailing List Subject: RE: [JSTL] c:out and DynaBeanClass Hi flare, It doesn't work for me. I'm getting error org.apache.jasper.JasperException: An error occurred while evaluating custom action attribute value with value ${flare.ciccio}: Unable to find a value for ciccio in object of class org.apache.commons.beanutils.BasicDynaBean using operator . (null). I got this error trying to render a url with a dynabean param c:url value=/showAllegati.do var=show c:param name=id value=${requestScope.id}/ c:param name=tipo value=${requestScope.tipo} / c:param name=key value=${item.a_nomefile} / ^^ dynabean /c:url With out and ftm tags works for me My environment: Tomcat 4.1.12 Jakarta JSTL: Nightly build. I'm using Resin 2.1.5 JSTL latest stable (1.02 I think) -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: [how many form for update and create action ?]
Josh, I think your approach is fairly standard and is also what I recommended :-). David From: Josh Berry [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: [how many form for update and create action ?] Date: Tue, 29 Oct 2002 13:33:40 -0500 Xavier Combelle [EMAIL PROTECTED] wrote: I have a conceptual problem in my struts application I am programming an application which give the possibility to create, update and delete several information, for exemple the name and the price of an item. So I need to give to the user two possibilities : 1- the possibility to create an item 2- the possibility to update an item so i use two action, one for each possibility Should I use the same form bean to update and create or should I use different form bean, one for update and one for create ? and if I should use different form bean, should they have the same type ? I can only explain my approach. For simplicity, I will change it to a User example. I have one form for all user related information. However, there are three places that this information will be used, specifically, there is a search page, an add page, and an edit page. So, I created a pre-action that handles each of these pages. (note, they all use the same preaction) The pre-action simply makes sure that the form is initialized correctly. In the case of the edit page, it loads the user to be edited. The search page submits to a particular action for searching, though the add and edit page both submit to an action for saving. I was able to distinguish which page linked to the action based upon the parameter. So... for at least three input pages, I have one form and a total of three actions. Of course, saying it like that sounds like I simply wanted to minimize the number of files to create. Possibly, but it really does feel simpler this way. That is the way I would recommend it, one form. Some pages are just subsets of the form, but you still just need the one form. Afterall, the whole point of the form class is simply a buffer between the presentation and the business logic. It should reflect more of what the user is going to experience then what the backend knows. Now, before you take my word, I would at defer to others here. If people would chime in on my approach I would greatly appreciate it. -josh -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org _ Unlimited Internet access -- and 2 months free! Try MSN. http://resourcecenter.msn.com/access/plans/2monthsfree.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Advice needed on dynamic list forms.
Greetings: I know this is done many times before. My requirement is to display a list of records where one of the columns is text box. The actual datastructure is a list of dual lists.. I have a List of wrapper objects that each contains two Lists. The internal list are value objects with non String values. All columns are readonly data except for one editable currency field. Wrapper customerWrapper1 voList1 voList2 customerWrapper2 voList1 voList2 So far I have all of this working and auto populating at request time. The problem is validation. What I have done so far is: 1 - The two wrapper objects use the commons ListUtils.lazyList() 2 - The page is rendered with nested tags (very easy!) 3 - upon submit, the datastructure gets repopulated and the amount field gets converted to a Float, all automatically. I was quite happy how clean this all was until I realized that I still want to validate the text value and redisplay the bad input in the list. By the time the validate method in the form is called, the list is already repopulated. If the Amount field is Bad input it would be converted to 0.0. So I need access to the field before is get converted. I should mention that I have no ability alter the data structure form the backend, so I can only wrap or convert... Has anyone got any advice? In an effort to get this going.. I am in the proccess if wrapping each value object inside another value object that contains a single String property and the vo. I will iterate throught each of the lists and validate each entry, then when sending to the back end, also iterate and convert each value. I am using 1.1b2 but am not using the validator. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Form Validation Errors in ONE line?
Hi I used struts declarative validation, which works quite well for me, but the all errors are concatenated in one line. Is there a way to break them into multiple line on my web page? -Dan
RE: form and action in struts-config
Sri I fixed the problem and found out that the problem was in my jsp page at defining forms. Thank you very much and really appreciate it .. Naga Vankineni Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 1:16 PM To: Struts Users Mailing List Subject: RE: form and action in struts-config Don't know. All I can say is that nesting forms is incorrect usage of HTML and will lead to unpredictable results. Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 11:50 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Sri, I used the nested tags previously for other similiar pages and they all worked fine.. Also I can try it out like you said,but my point is how did the other page which had the similar functionality like this page work well and why is the problem only with this one. Naga Vankineni Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 11:11 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config You cannot nest form tags. That isn't valid HTML. That probably explains why your field values aren't getting submitted. You can accomplish what you are attempting with simply your current outer form tag with one hidden 'target' field. Set the target accordingly using JavaScript based on the button the user selects and then submit. Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 10:36 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Sri Here are the attchmnts of action class and jsp. Naga Vankineni Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 10:08 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config OK, so you have: form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / What does your jsp look like? Just send a snippet with the form tag and some representative field(s). While you are at it, send a sample demonstrating how you are trying to extract user-entered data from the form. Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 9:50 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Sri The third suggestion too did not work .. Any more suggestions.. Naga Phone: 860-686-1643 -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, October 29, 2002 9:27 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config Oops! Major brain fart. Change the suggestions: Ignore the first suggestion. The third suggestion should read: * Make sure that the 'action' attribute value of the html:form is 'test.do' (assuming you are using the usual Struts convention) -Original Message- From: Sri Sankaran Sent: Tuesday, October 29, 2002 9:22 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config A few suggestions: * Try setting the 'name' attribute in the action mapping to '/cultureForm' * Make sure you using a html:form in your culture.jsp file. * Make sure that the 'action' attribute value of the html:form is 'cultureForm.do' (assuming you are using the usual Struts convention) Sri -Original Message- From: Vankineni, Naga X [mailto:naga_x_vankineni;groton.pfizer.com] Sent: Tuesday, October 29, 2002 9:08 AM To: Struts Users Mailing List Subject: RE: form and action in struts-config I checked the struts-config.xml and here is the piece of code.. form-bean name=cultureForm type=com.pfizer.caa.culture.CultureForm / action name=cultureForm type=com.pfizer.caa.culture.CultureAction input=/test/culture.jsp scope=session validate=false path=/test / The issue I am facing is I don't see the values in my ACTION class after I submit my jsp page and go to action class and retreive them by saying cultureform.get(xxx) and all I see in the formbean values are nulls... I know I am missing something very silly but can't figure it out... Any idea ... Naga Phone: 860-686-1643 -Original Message- From: Marcus Biel [mailto:Marcus.Biel;bmw.de] Sent: Tuesday, October 29, 2002 2:33 AM To: [EMAIL PROTECTED] Subject: Re: form and action in struts-config Would need to see some of your code... The only idea I got without seeing your code: check your struts-config.xml form-bean name=yourFormMappingName type=YourFormClass/ action path=/doAction type=YourActionClassName
Re: [Re: [how many form for update and create action ?]]
David Graham [EMAIL PROTECTED] wrote: Josh, I think your approach is fairly standard and is also what I recommended :-). The only thing I wasn't sure of was using the same action for saving and creating. I feel that is easiest, but I can see how some people might disagree. Also, two general questions to the forum. First, I've noticed a lot of people top post. Is that the standard in a mailing list? I am more used to news groups. If I am annoying anyone by having the quotes above, please let me know. Second, It gets to be difficult to see if a question has already been answered before I post. Do we typically defer to certain members to answer, or should I just use common sense? (That is, if a message was posted within the past couple of hours, feel free to answer; check for someone else having answered, otherwise.) -josh -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: [Re: [how many form for update and create action ?]]
A couple of embedded comments. On Tue, 29 Oct 2002, Josh Berry wrote: Date: Tue, 29 Oct 2002 14:16:54 -0500 From: Josh Berry [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: [Re: [how many form for update and create action ?]] David Graham [EMAIL PROTECTED] wrote: Josh, I think your approach is fairly standard and is also what I recommended :-). The only thing I wasn't sure of was using the same action for saving and creating. I feel that is easiest, but I can see how some people might disagree. I tend to prefer the one-Action solution for this, primarily because the only functional difference tends to be using an INSERT or an UPDATE. If you use the typical DAO pattern, that's usually just a simpmle if-else statement in your Action to call the insert() or update() method of your DAO. Also, two general questions to the forum. First, I've noticed a lot of people top post. Is that the standard in a mailing list? I am more used to news groups. If I am annoying anyone by having the quotes above, please let me know. I don't think we'll have a lot of influence on human nature or laziness :-) ... but I prefer intermixing responses (as I'm doing here). Even more importantly, you should trim down the message you are quoting to just the part you are addressing, if it's not the whole message. Second, It gets to be difficult to see if a question has already been answered before I post. Do we typically defer to certain members to answer, or should I just use common sense? (That is, if a message was posted within the past couple of hours, feel free to answer; check for someone else having answered, otherwise.) Multiple answers are a Good Thing (tm) :-), because there are often different perspectives and experiences that can be very useful. You probably should not assume that any particular person will always answer questions in a particular topic area -- they might be busy or offline, or just not in a mood to answer questions on that particular day :-). In terms of mechanics, I always read mailing lists with the message sort set to threaded -- then, it's trivially simple to see if there have been responses yet (and even look at them to confirm), in an attempt to avoid completely redundant responses. Of course, there are still the inevitable race conditions (multiple people composing and sending answers at the same time). -josh Craig -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [JSTL] c:out and DynaBeanClass
Hi flare, I don't know how you got c:out working with DynaBean but seems like that JSTL doesn't support DynaBean. You're right, It seems Resin has a JSTL implementation built-in so I was using the Resin implementation not the Apache one. I really didn't know about that sorry... -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Can format strings be used with html:text input fields
Currently we use format strings to control the display output of our financial fields for bean:write output statements. bean:write name=overviewForm property=LHO_AppraisedPrice format=$###,###,###.00 / This format string ensures that thousands and hundred thousands values automatically have the appropriate number of commas inserted and that the value ends with .00. Is there a similiar clean way to do this with html:text fields. It won't recognize a format attribute and I would prefer to keep all formatting in the JSP file and out of the corresponding action. ex. html:text property=LHO_AppraisedPrice / Thanks, Norman -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Form Validation Errors in ONE line?
I assume you're using html:errors to display the messages. Add this to your message resources file errors.prefix=br/ I believe this requires version 1.1. David From: Dan Tran [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Form Validation Errors in ONE line? Date: Tue, 29 Oct 2002 11:00:01 -0800 Hi I used struts declarative validation, which works quite well for me, but the all errors are concatenated in one line. Is there a way to break them into multiple line on my web page? -Dan _ Choose an Internet access plan right for you -- try MSN! http://resourcecenter.msn.com/access/plans/default.asp -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Container Managed Authentication and roles attribute on action
In your web.xml file, you can define the page that is used for any particular status code (including 400). Check out the error-page directive. That's a workable solution, but a bit of kludge - assuming that the user can get a error-code of 400 for other reasons than not being authorized. I guess I was hoping for a way to trap the response before it left the struts code, perform some logic, and forward to another page (maybe the one they just came from). Thanks, Voytek Jarnot -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Container Managed Authentication and roles attribute on actio n
Another way is to check the role from the action: request.isUserInRole(role); On false, forward to your error page. Not as convenient as using the Struts config, but much more definitive. Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Jarnot Voytek Contr AU HQ/SC [mailto:Voytek.Jarnot;MAXWELL.AF.MIL] Sent: Tuesday, October 29, 2002 3:33 PM To: 'Struts Users Mailing List' Subject: RE: Container Managed Authentication and roles attribute on actio n In your web.xml file, you can define the page that is used for any particular status code (including 400). Check out the error-page directive. That's a workable solution, but a bit of kludge - assuming that the user can get a error-code of 400 for other reasons than not being authorized. I guess I was hoping for a way to trap the response before it left the struts code, perform some logic, and forward to another page (maybe the one they just came from). Thanks, Voytek Jarnot -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Struts in a war inside a ear file in WL6.1
I belive you need a copy of the struts.jar file inside the ear file as well - plus the manifest should have a line such as: classpath: struts.jar This is classic Weblogic classloader stuff - check their docs. Kevin Gus Delgado [EMAIL PROTECTED] on 10/29/2002 10:24:21 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:Struts Users Mailing List [EMAIL PROTECTED] cc: (bcc: Kevin Bedell/Systems/USHO/SunLife) Subject:Struts in a war inside a ear file in WL6.1 I'm getting this error in the browser when I try to deploy an ear that has two EJBs and a war with struts in it. When I click on the button that has the action: No action instance for path /amortization could be created action: Error creating ActionForm instance of class ' i.webcontrol.monthlyprocess.AmortizationForm' java.lang.ClassNotFoundException: com.mypcka.ipi.webcontrol AmortizationForm at java.net.URLClassLoader$1.run(URLClassLoader.java:19 at java.security.AccessController.doPrivileged(Native M at java.net.URLClassLoader.findClass(URLClassLoader.jav at java.lang.ClassLoader.loadClass(ClassLoader.java:294 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher. at java.lang.ClassLoader.loadClass(ClassLoader.java:250 at java.lang.ClassLoader.loadClassInternal(ClassLoader. at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:115) The struts.jar is inside the WAR file under web-inf/lib/struts.jar any ideas? thanks -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender and erase this e-mail message immediately. --- -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: [RE: Container Managed Authentication and roles attribute on action]
my response below... Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] wrote: That's a workable solution, but a bit of kludge - assuming that the user can get a error-code of 400 for other reasons than not being authorized. I guess I was hoping for a way to trap the response before it left the struts code, perform some logic, and forward to another page (maybe the one they just came from). This is more of a question then answer, but I thought the whole point of container managed security was that if they are not allowed on a resource the resource is not aware of this fact. That is, if the web.xml file has a resource as being restricted and the user is not allowed, then they NEVER touch the struts code. The web server does the redirecting of the user to the appropriate spot. Now, from what I know of this stuff. What you are describing sounds more likely to be accomplished using filters. Am I completely off on this? -josh -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Container Managed Authentication and roles attribute on action
On Tue, 29 Oct 2002, Jarnot Voytek Contr AU HQ/SC wrote: Date: Tue, 29 Oct 2002 14:33:04 -0600 From: Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Container Managed Authentication and roles attribute on actio n In your web.xml file, you can define the page that is used for any particular status code (including 400). Check out the error-page directive. That's a workable solution, but a bit of kludge - assuming that the user can get a error-code of 400 for other reasons than not being authorized. I guess I was hoping for a way to trap the response before it left the struts code, perform some logic, and forward to another page (maybe the one they just came from). A different approach would be to subclass RequetProcessor and override the processRoles() method to do something differnt. Thanks, Voytek Jarnot Craig -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Container Managed Authentication and roles attribute on actio n
I plan to use that method when necessary, but hope to accomplish a large chunk of the security requirements declaratively. -Original Message- From: Madel,Kurt [mailto:kmadel;csmi.com] Sent: Tuesday, October 29, 2002 2:39 PM To: 'Struts Users Mailing List' Subject: RE: Container Managed Authentication and roles attribute on actio n Another way is to check the role from the action: request.isUserInRole(role); On false, forward to your error page. Not as convenient as using the Struts config, but much more definitive. Kurt Madel Programmer, CSMi (703) 823-4300 ext. 170 -Original Message- From: Jarnot Voytek Contr AU HQ/SC [mailto:Voytek.Jarnot;MAXWELL.AF.MIL] Sent: Tuesday, October 29, 2002 3:33 PM To: 'Struts Users Mailing List' Subject: RE: Container Managed Authentication and roles attribute on actio n In your web.xml file, you can define the page that is used for any particular status code (including 400). Check out the error-page directive. That's a workable solution, but a bit of kludge - assuming that the user can get a error-code of 400 for other reasons than not being authorized. I guess I was hoping for a way to trap the response before it left the struts code, perform some logic, and forward to another page (maybe the one they just came from). Thanks, Voytek Jarnot -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [RE: Container Managed Authentication and roles attribute on actio n]
Your assumption is correct, I can restrict url-patterns in web.xml, but for finer-grained control, I _may_ wish to utilize struts-config.xml to restrict at the action level. -Original Message- From: Josh Berry [mailto:josh.berry;usa.net] Sent: Tuesday, October 29, 2002 3:03 PM To: Struts Users Mailing List Subject: Re: [RE: Container Managed Authentication and roles attribute on actio n] my response below... Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] wrote: That's a workable solution, but a bit of kludge - assuming that the user can get a error-code of 400 for other reasons than not being authorized. I guess I was hoping for a way to trap the response before it left the struts code, perform some logic, and forward to another page (maybe the one they just came from). This is more of a question then answer, but I thought the whole point of container managed security was that if they are not allowed on a resource the resource is not aware of this fact. That is, if the web.xml file has a resource as being restricted and the user is not allowed, then they NEVER touch the struts code. The web server does the redirecting of the user to the appropriate spot. Now, from what I know of this stuff. What you are describing sounds more likely to be accomplished using filters. Am I completely off on this? -josh -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Container Managed Authentication and roles attribute on actio n
Thank you, I should've known to look in RequestProcessor... -Original Message- From: Craig R. McClanahan [mailto:craigmcc;apache.org] Sent: Tuesday, October 29, 2002 3:05 PM To: Struts Users Mailing List Subject: RE: Container Managed Authentication and roles attribute on actio n On Tue, 29 Oct 2002, Jarnot Voytek Contr AU HQ/SC wrote: Date: Tue, 29 Oct 2002 14:33:04 -0600 From: Jarnot Voytek Contr AU HQ/SC [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Container Managed Authentication and roles attribute on actio n In your web.xml file, you can define the page that is used for any particular status code (including 400). Check out the error-page directive. That's a workable solution, but a bit of kludge - assuming that the user can get a error-code of 400 for other reasons than not being authorized. I guess I was hoping for a way to trap the response before it left the struts code, perform some logic, and forward to another page (maybe the one they just came from). A different approach would be to subclass RequetProcessor and override the processRoles() method to do something differnt. Thanks, Voytek Jarnot Craig -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Nice labels for inputs.
I am not real sure of what to call what I am trying to do, so nice labels will have to work. Due to my amazing irritation with having to check a tiny little box for a radio/checkbox select when there is a large label I could be checking, I used to use the label tag quite extensively. I am not sure that this had any benefit in Netscape, but it did have the benefit of allowing a user to click on a label and having the input element associated update. Now, unfortunately, the time I tried to do this with struts, I ran into the problem of id not being allowed in any of the html: input tags. So, while I can still use the label tag all day, there is no way for me to associate it with the correct input element. That is, a typical input (again, radio and checkbox receive the most benefit) should look something like this: label for=maleMale/labelinput type=radio id=male value=male Is there any reason that id is not allowed on the struts input tags? Does anyone else see the benefit? I know it sounds asinine, but that is one the often unused standard tags that I wish received more use. -josh -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Nice labels for inputs.
Use the styleId attribute. That's exactly what it does. -Original Message- From: Josh Berry [mailto:josh.berry;usa.net] Sent: Tuesday, October 29, 2002 1:32 PM To: 'Struts Users Mailing List' Subject: Nice labels for inputs. I am not real sure of what to call what I am trying to do, so nice labels will have to work. Due to my amazing irritation with having to check a tiny little box for a radio/checkbox select when there is a large label I could be checking, I used to use the label tag quite extensively. I am not sure that this had any benefit in Netscape, but it did have the benefit of allowing a user to click on a label and having the input element associated update. Now, unfortunately, the time I tried to do this with struts, I ran into the problem of id not being allowed in any of the html: input tags. So, while I can still use the label tag all day, there is no way for me to associate it with the correct input element. That is, a typical input (again, radio and checkbox receive the most benefit) should look something like this: label for=maleMale/labelinput type=radio id=male value=male Is there any reason that id is not allowed on the struts input tags? Does anyone else see the benefit? I know it sounds asinine, but that is one the often unused standard tags that I wish received more use. -josh -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Nice labels for inputs.
Hi, The struts-html tags have the styleId attribute, that will output and id Salut! -- Antoni Reus A Dimarts 29 Octubre 2002 22:31, Josh Berry va escriure: I am not real sure of what to call what I am trying to do, so nice labels will have to work. Due to my amazing irritation with having to check a tiny little box for a radio/checkbox select when there is a large label I could be checking, I used to use the label tag quite extensively. I am not sure that this had any benefit in Netscape, but it did have the benefit of allowing a user to click on a label and having the input element associated update. Now, unfortunately, the time I tried to do this with struts, I ran into the problem of id not being allowed in any of the html: input tags. So, while I can still use the label tag all day, there is no way for me to associate it with the correct input element. That is, a typical input (again, radio and checkbox receive the most benefit) should look something like this: label for=maleMale/labelinput type=radio id=male value=male Is there any reason that id is not allowed on the struts input tags? Does anyone else see the benefit? I know it sounds asinine, but that is one the often unused standard tags that I wish received more use. -josh -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org