RE: Single ActionForm accross multiple Actions
Great .. thanks for all the responses... I think I will go with the ActionForm stored in session-scope. Just wanting to confirm, that I will need to perform the following code changes: == public ActionForward execute( ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse ) throws Exception { actionForm = httpServletRequest.getSession().getAttribute("myForm"); // ... // normal code follows!!! } == Also, would I be correct in saying that I will be unable to use the ValidatorActionForm. TIA, Kunal -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Tuesday, 8 June 2004 23:21 To: [EMAIL PROTECTED] Subject: RE: Single ActionForm accross multiple Actions This is more or less what a session-scope ActionForm is for. As long as the ActionForm class contains all the properties and methods for all the screen it will service, just putting it in session I think is your best bet. As someone else said, hidden form fields are your other choice. Actually, you could also store the data temporarily to a database, but if you would even consider that, session is really the right answer. Frank >From: "Kunal H. Parikh" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> >Subject: Single ActionForm accross multiple Actions >Date: Tue, 8 Jun 2004 12:08:25 +1000 > >Hi All! > >I want to maintain a single ActionForm across multiple Actions. > >I want to get the info from the user in a step-by-step manner, but only >wanna talk to the SessionBean at the end when they hit "confirm". > >The alternative that I can think of is writing a JavaBean with all the >properties, and pass the JavaBean around as a session attribute. > >Any one have a better solution ? > > >TIA, > >Kunal > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > _ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ValidatorForm vs ValidatorActionForm
http://wiki.apache.org/struts/ValidatorActionForms -Original Message- From: Navjot Singh [mailto:[EMAIL PROTECTED] Sent: Tuesday, 8 June 2004 14:48 To: Struts Users Mailing List Subject: ValidatorForm vs ValidatorActionForm hi, What's the use of ValidatorActionForm when ValidatorForm is already there? --- regards Navjot Singh Net4India Ltd. Politicians are like diapers and need to be changed for same reason. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Single ActionForm accross multiple Actions
Hi All! I want to maintain a single ActionForm across multiple Actions. I want to get the info from the user in a step-by-step manner, but only wanna talk to the SessionBean at the end when they hit "confirm". The alternative that I can think of is writing a JavaBean with all the properties, and pass the JavaBean around as a session attribute. Any one have a better solution ? TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] JBoss EJBs or Hibernate
Hi All! I just wanted a view of people in the industry on their preferences for PERSISTENCE, and if possible, WHY! I intend to run everything in the same JVM and most likely be using JBOSS. TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Saving state.
Hi! What state are you trying to remember? If it is the preparation of the grid in JSP1, then u can either save the attributes as session attributes or the results as a session attribute. Also, if everything is related to an ID, then u can reconstruct links with the id in all links on the page. You need to be a little more specific to get a more specific answer to your scenario. HTH anyway! Kunal -Original Message- From: SEGUI MUNAR [mailto:[EMAIL PROTECTED] Sent: Thursday, 3 June 2004 16:43 To: [EMAIL PROTECTED] Subject: Saving state. Hi. I'm developing an application with Struts 1.1, Tomcat 5 and Eclipse. I explain my problem: This situation is: I have 1 jsp (jsp1) that shows information in a grid. >From this grid I can go to the jsp2, where I can see the details of 1 row of the previous grid. From jsp2 I can go to jsp3, where I can see aditional information about the record shown in jsp2. From jsp3 I can go to jsp4 to see any other information, and so on. My problem is not going forward, my problem is goin back. ¿How can I retrieve the state of each action form? I use scope="request". ¿Should I implement an stack to save the differents actionform's? Is there any example of stack. ¿Should I implement any other system? I would appreciate your help. Thanks in advance. _ ¿Dónde se esconden [EMAIL PROTECTED] [EMAIL PROTECTED] Encuentra miles de perfiles en MSN Amor & Amistad. http://match.msn.es/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: One Forward Action Multiple JSPs
Hi Glenn! I would recommend creating an "Action", with two action-forwards: 1. TermsAndConditions_default 2. TermsAndConditions_fr In Action.execute, detect the appropriate locale and forward control to the appropriate action-forward. HTH, Kunal -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, 4 June 2004 03:45 To: [EMAIL PROTECTED] Subject: One Forward Action Multiple JSPs Greetings, What I would like to do is to be able to display different JSPs for the same ForwardAction. I now have this: What I would like is based on the Locale show a different JSP. I cannot use the i18n for this with resource bundles since the page contains lots of text and the format is different for both languages. So if I create my own ForwardAction (secure.credentials.TermsAndConditionsForwardAction) how would I set the parameter value to either /WEB-INF/secure/credentials/termsAndConditions_en.jsp or /WEB-INF/secure/credentials/termsAndConditions_fr.jsp Is this the best way to go about or are there other suggestions? TIA, Glenn. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Good env for struts-based-web-tier and ejb components development
Hi Navjot! I would suggest IntelliJ IDEA for Java development. While IDEA does have support for EJB development, I prefer using plain Java Classes with XDoclet tags. IDEA gives you a high degree of flexibility, great environment and fantastic re-factoring support. IDEA increases developer productivity to quite a high extent. HTH Kunal -Original Message- From: Navjot Singh [mailto:[EMAIL PROTECTED] Sent: Thursday, 3 June 2004 15:12 To: Struts Users Mailing List Subject: [OT] Good env for struts-based-web-tier and ejb components development Hi List, I am about to start development work on some auction site which in principle is similar to e-bay but not of that scale. I will be using J2EE+Jboss. What kind of IDE development environment do you guys use for the development? I just tried Eclipse + EasyStruts + Lomboz. Lomboz is good but not good enough. 1. I still have to carefully edit ejb-jar and jboss files to make my things run. 2. The directory structure that it creates in the background is not good. 3. The xdoclet tags that it generates is for all servers. e.g JOnAs jboss, weblogic. but i need for only jboss. 4. The build files that it generates are bit obscure. Easy Struts is just OK and doesn't provide much time saving to me. I can live without it also. Moreover, EasyStruts doesn't work with Eclipse 3.0. In nutshell, the entire development environment becomes unorganized, if not complex. I wish to know what kinda env do you use? How do streamline your development process? TIA Navjot Singh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [SOLVED] Default methodName for DispatchAction
Hi All! Just went through the source code. This problem can be attacked by overriding the method unspecified(...) === public ActionForward unspecified( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { === Thanks, Kunal -Original Message- From: Kunal H. Parikh [mailto:[EMAIL PROTECTED] Sent: Wednesday, 2 June 2004 11:53 To: 'Struts Users Mailing List' Subject: Default methodName for DispatchAction Hi All! I was wondering if it were possible to have a "default" method called when there is no parameter matched or the parameter is null. TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Default methodName for DispatchAction
Hi All! I was wondering if it were possible to have a "default" method called when there is no parameter matched or the parameter is null. TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT]: StatefulSessionBeans and HTTPSession
Given that my stateful sessionbeans are already taking up a lot of memory, I want to keep my HTTPSession as light as possible. It'll help to keep an ID rather than an object as a parameter. Any suggestions ? Cheers, Kunal -Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED] Sent: Friday, 28 May 2004 21:37 To: Struts Users Mailing List Subject: RE: [OT]: StatefulSessionBeans and HTTPSession Why? It appears that you already have the appropriate "best practices" solution. Are you trying to avoid using a BusinessDelegate? robert > -Original Message----- > From: Kunal H. Parikh [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 27, 2004 9:15 PM > To: Struts Users Mailing List > Subject: [OT]: StatefulSessionBeans and HTTPSession > > > Hi All! > > Just wanted to know if there is a better strategy to do this. > > My current implementation: > Struts/JSP --> BusinessDelegate --> StatefulSessionBean --> Multiple > EntityBeans > > Now, I add the BusinessDelegate to my HttpSession, effectively keeping the > handle to my StatefulSessionBean. > > Instead, I was hoping, if it were possible, to store a StatefulSessionBeanID > in my HttpSession and recall the StatefulSessionBean using the ID from my > EJB tier. > > Let me know of your thoughts on this structure. > > > TIA, > > Kunal > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT]: StatefulSessionBeans and HTTPSession
Hi All! Just wanted to know if there is a better strategy to do this. My current implementation: Struts/JSP --> BusinessDelegate --> StatefulSessionBean --> Multiple EntityBeans Now, I add the BusinessDelegate to my HttpSession, effectively keeping the handle to my StatefulSessionBean. Instead, I was hoping, if it were possible, to store a StatefulSessionBeanID in my HttpSession and recall the StatefulSessionBean using the ID from my EJB tier. Let me know of your thoughts on this structure. TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie question: Can anything cause the controller servlet to set the ActionForm bean twice
Hey Neil! Can you update me on the Struts' transaction token handling? What exactly is Struts' transaction token handling? TIA, Kunal -Original Message- From: Neil Erdwien [mailto:[EMAIL PROTECTED] Sent: Wednesday, 21 April 2004 06:59 To: Struts Users Mailing List Subject: Re: Newbie question: Can anything cause the controller servlet to set the ActionForm bean twice I've seen cases where a user accidentally double-clicks on the submit button and submits the form twice in quick succession. Struts' transaction token handling can prevent multiple submissions from being processed. However, I think this would happen after the ActionForm has been populated, so may not fix the problem you're seeing. Perpetual Newbie wrote: > Hi, > > I had an error that I have not been able to replicate ... and am hence > vague on the specifics. > It occured twice on different systems on different days before I had > debugging statements inline. > > It appears that the ActionForm bean was set twice (after a post) before > any other processing occured. > > With this limited information, has anyone seen something similar ? Or > perhaps what might be the root cause or what might trigger it. > > After this, the action called the validate() manually where an exception > was thrown ... (possibly because of null values set during the second > set). > > -- > Thanks, > pnewbie > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Neil Erdwien, [EMAIL PROTECTED], Web Technologies Manager Computing and Network Services, Kansas State University - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Determining tiles definition name from JSP
Hi All! Is it possible to determine the name of the tiles definition being processed from within a JSP page? I am attempting to have an XML menu with IDs exactly the same as the name of the tile definition. Then I would do some XSLT, and id matching and fetch the appropriate XML fragment. TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Must the from name and action name MATCH ?
Hi All! I was wondering if I could attach a form with a name different to that of the action. i.e. === === I want to follow this pattern of naming conventions: ActionName: searchAction FromName: searchForm ForwardName: searchResults (Assuming that I only have one forward for every action) TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Detrmining which module from within JSP
Hey All! Just for the record, (Incorrect) ^^ Along a similar note, how would one work out the name of the tile definition being processed ? Any ideas ? TIA, Kunal -Original Message- From: Craig McClanahan [mailto:[EMAIL PROTECTED] Sent: Monday, 19 April 2004 16:03 To: Struts Users Mailing List Subject: Re: Detrmining which module from within JSP Kunal H. Parikh wrote: >Hi All! > >Craig's suggestion works great! > >However, it appears to me that dot delimited request variable names don't >work with the JSTL. > >Eg: > > > >The above prints nothing and therefore a .prefix also fails. > >Does anyone know if this is a JSTL bug, or is there something that needs to >change in struts? > >Or is there something I am doing incorrectly? > > > This isn't a bug, it's a feature :-). Actually, this happens because the "." character is an operator in the EL syntax, so it can't be used literally in an expression. Try something like this: The prefix is instead. This works because the "." operator and the "[...]" bracket syntax are treated identically in the EL syntax, just as they are in JavaScript. Therefore, you have to enclose the string constant that includes periods in quotes to make things work as you expect. >TIA, > >Kunal > > > Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Detrmining which module from within JSP
Hi All! Craig's suggestion works great! However, it appears to me that dot delimited request variable names don't work with the JSTL. Eg: The above prints nothing and therefore a .prefix also fails. Does anyone know if this is a JSTL bug, or is there something that needs to change in struts? Or is there something I am doing incorrectly? TIA, Kunal -Original Message- From: Craig McClanahan [mailto:[EMAIL PROTECTED] Sent: Sunday, 18 April 2004 10:17 To: Struts Users Mailing List Subject: Re: Detrmining which module from within JSP Josh Holtzman wrote: >Hello, > > > >Can anyone suggest a means to determine the current struts application >module from within a JSP? > As long as you have correctly gone through an action first, the ModuleConfig object for the selected module has been stored as a request attribute under the key "org.apache.struts.action.MODULE" (from Java code, you would use Globals.MODULE_KEY to reference this string). So, you could say something like this in a JSP page: The current module prefix is The Javadocs for org.apache.struts.Globals describe many other attribute names that Struts uses to store interesting things while processing a request. > > > > >Would it be possible to use a Bean or Logic tag to make this determination? > > > >Thanks again for any suggestions. > > > >Regards, > > > >Josh Holtzman > > > Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: redirecting XML/XSLT to JSP or Vice Versa
Consider the JSTL. JSTL supports XML and XSLT processing. Cheers, Kunal -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, 14 April 2004 16:14 To: [EMAIL PROTECTED] Subject: redirecting XML/XSLT to JSP or Vice Versa Hi In the application I am working with data is in the form of XML for some screens .But since the architecture uses beans and jsp.I was wondering how to integrate JSP/Struts Architecture with XSLT/XML. My requirement is either transform the xsl template to JSP or vice versa. XSL/XML -> JSP -> HTML or JSP -> XSL/XML -> HTML is this possible?? also I was planning to use the tag eg http://127.0.0.1:9080/XSLTServlet"; /> This would give a transformed page. is this ok?? Now when i started doing the basic transformation on an xsl derived from a JSP PAge came across an error "The prefix "bean" for element "bean:message" is not bound." can this be resolved. regards Alan The XSL is as follows http://www.w3.org/1999/XSL/Transform"; version="1.0" xmlns:xalan="http://xml.apache.org/xslt"; > MASTEK "Making a valuable difference" Mastek in NASSCOM's 'India Top 20' Software Service Exporters List. In the US, we're called MAJESCO ~~ Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from all computers. ~~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using XDoclet for DynaForms
Hi All! Is there a recommended way of generating DynaActionForms using XDoclet ? If not, I guess I would end up writing my own ActionForms and inserting XDoclet tags in there. However, is there any performance benefit of using DynaActionForms instead of plain ActionForms ? TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynaValidatorActionForm client-side validation
I may be a little off here, but why are you using the DynaValidatorActionForm ? Try using the DynaValidatorForm and u should have client-side and server-side validation working. This is because, the DynaValidatorActionForm.getValidationKey returns the mapping PATH, whereas the DynaValidatorForm.getValidationKey returns the mapping NAME! HTH, KP -Original Message- From: Saul Q Yuan [mailto:[EMAIL PROTECTED] Sent: Friday, 9 April 2004 06:03 To: 'Struts Users Mailing List' Subject: RE: DynaValidatorActionForm client-side validation Hmmm, I don't seem to have that problem. Did you specify method="validateYourActionForm" in addition to: formName="/yourActionPath" in your -Original Message- > From: Adam Hardy [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 08, 2004 3:02 PM > To: Struts Users Mailing List > Subject: Re: DynaValidatorActionForm client-side validation > > > Hmmm, good question. I had this problem, but never managed to > solve it. > I thought I was doing something wrong but I couldn't work it out. > Eventually I changed to DynaValidatorForm, which wasn't a big problem > because there were only 2 or 3 forms where I wanted to use the same > DynaForm but different validation. > > Perhaps someone actually knows if there is a solution? > > > > On 04/08/2004 11:16 AM Igor Antonacci wrote: > > Hi All, > > I'm working on DynaValidatorActionForm client-side > validation but I've > > some problems about. > > > > Everything is working but, as DynaValidatorActionForm maps > validation > > rules with Action path attribute, Struts generates a client side > > validation method name with a "/" character. > > > > It is because Action path has a "/" as first character. > > > > How do I solve this issue ? > > > > Thanks, > > Igor. > > > > -- > > Callidus Software > > Igor Antonacci > > Core Engineer > > [EMAIL PROTECTED] > > -- > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > struts 1.2 + tomcat 5.0.19 + java 1.4.2 > Linux 2.4.20 Debian > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] jspc from command line...
You need to include the tomcat jars in ur classpath! TOMCAT_HOME\bin\*.jar TOMCAT_HOME\server\lib\*.jar TOMCAT_HOME\common\lib\*.jar -Original Message- From: Pady Srinivasan [mailto:[EMAIL PROTECTED] Sent: Wednesday, 31 March 2004 00:02 To: [EMAIL PROTECTED] Subject: [OT] jspc from command line... Tomcat 5.0.16... When I try to run jspc from command line, I get this error: C:\projects>jspc -v -d c:\jspoutput -p com.myapp.reports -c Test newtest.jsp java.lang.NullPointerException at org.apache.jasper.JspC.initServletContext(JspC.java:990) at org.apache.jasper.JspC.execute(JspC.java:852) at org.apache.jasper.JspC.main(JspC.java:238) Anybody used jspc as above ? Thanks -- pady [EMAIL PROTECTED] __ This e-mail has been scanned by the Heroix e-mail security system __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]