> Query 1: There are two approaches I can think of right now. You will need to "burn" this querystring information into (a) the form object or (b) the session.
(a) If you are using dynaction form, then just adding another variable to hold the id0 in the config.xml definition should be less painful. But even if you are using the regular "typed" action form, then also it should not be too much of a trouble to add the extra parameter. You can then map this parameter to a hidden variable in your jsp. (b) Instead of reading the variable form querystring/request object, burn it in to the session and read it from there. You could have a helper function ( a getId0( ) ) which checks if the variable is in the query string then it returns from the request object, else it should look up the session. Prevalidation, it would find it in the the request object, post validation it can pick it up from the session. Be aware that the drawback of this approach is that the user may have contamination of this variable if she opens another window from the same browser (like a Ctrl N in internet explorer) which will share the same cookie and hence the same session. But this is true in all cases where you use session scoped variables. >Query 2: I doubt if you could do that! The xml config files are fairly static in my opinion. But I am just guessing. HTH, Raghu On 12/3/05, Shivani Sawhney <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Can someone please help solve the following problems? > > > > Query 1: > > > > I am trying to access an action through a hyperlink and provide some > parameters through query string. This action forwards to a JSP, whose > URL reads something like > http://servername:port/rd/masters/SetupEditJobProfileAction.do?id0=13. I > have added validations on this JSP through DynaValidator Framework. Now > if the user feeds some incorrect input, the user is taken to the same > JSP with the errors listed but the URL doesn't have the query string > attached anymore, i.e., the URL becomes something like, > http://servername:port/rd/masters/SetupEditJobProfileAction.do which is > causing errors in my code. > > > > Could someone please suggest how to keep the query string (request > parameters) intact even when validation errors are caught and displayed > on the JSP? > > > > > > Query 2: > > Can I use user defined classes while initializing form fields using Dyna > Action? > > E.g., Can I write something like, > > <form-bean name="ChangePasswordForm" > type="org.apache.struts.validator.DynaValidatorForm"> > > <form-property name="date" type="java.lang.String" > initial="rd.admin.DateFormat.getDate()"/> > > > > Any help will be much appreciated. > > Thanks in advance. > > Regards, > > Shivani > > >