i18n in struts action classes
Hi All, I am developing a struts app and want to apply i18n to the ActionErrors and ActionMessages being passed from Form and Action classes onto jsp files. I may have any number of resource properties files named as : appResources.properties, appResources_jp.properties, appResources_ko.properties I have my browser locale settings to Japanese for example, and I want all the errors and messages on my jsps to be picked from the corresponding properties file. How can I achieve that without explicitly calling setLocale() in Form/Action classes to do so??? Thanks in anticipation, Mukta.
Re: errorStyleClass not working
See "1. Why have two JSP tags that do the same job?": http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html ..and follow the link to the Wiki regarding ActionErrors/ActionMessages: http://wiki.apache.org/struts/ActionErrorsAndActionMessages Niall On 7/19/06, fea jabi <[EMAIL PROTECTED]> wrote: Yah, in the JSP where the errorStyleClass is working I am using So, do I have to use html:errors? not html:messages? yes, I am using DynaValidatorForm but calling validate from action class. The validation is done in validator.xml In dispath action class I have ActionMessages messages = (ActionMessages)frm.validate( mapping, request ); if ( messages != null && !messages.isEmpty() ) { saveMessages(request, messages); return (mapping.findForward("validationFailed")); } Should I be saving action errors instead of ActionMessages? Thanks. >From: "David Friedman" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: "Struts Users Mailing List" >Subject: RE: errorStyleClass not working >Date: Wed, 19 Jul 2006 14:51:48 -0400 > >There is something odd going on here. > >In the JSP's where the html:messages and errorStyleClass are working, do >you >have html:messages setting 'message="true"'? This is odd because that >changes the key from Globals.MESSAGE_KEY to Global.ERROR_KEY. Action1 Html >tags perform error lookups (I just checked the SVN repos) using in the >Globals.ERROR_KEY, not the Globals.MESSAGE_KEY. That makes me wonder: > >Are the error messages you are seeing on this page (the page where >errorStyleClass is not working) the ones you saved INSIDE your action or >are >you 100% sure these are validation errors from the DynaValidatorForm? > >What do you see when you remove the 'message="true"' from your >html:messages >tag and then run your action? > >See this page for what I'm talking about: >http://husted.com/struts/tips/017.html > >Take a look at your logic:messagesPresent tag doing the same thing. This >is >the current SVN java code ( just a snippet ) that is important: > >public class MessagesPresentTag extends ConditionalTagBase { > /** > * If this is set to 'true', then the Globals.MESSAGE_KEY > * will be used to retrieve the messages from scope. > */ > protected String message = null; > > public MessagesPresentTag() { > name = Globals.ERROR_KEY; > } >// ... End of snippet, lots cut but you get the idea that >// you are changing the keys to NOT use the Globals.ERROR_KEY >// that I believe errorStyleClass is using. >} > >Regards, >David > >-Original Message- >From: fea jabi [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 19, 2006 1:57 PM >To: user@struts.apache.org >Subject: RE: errorStyleClass not working > > >yes, using 1.2.7 version of struts. This(errorStyleClass) does work in >another page though whose property is in Form-bean. > >But here in this page, I have the arraylist in the form-bean, and the >arraylist contains the list of objects whose one of the attribute is shown >in the input field. probably something is missing here. > >actually showing the messages. I can see the message entered value is not >valid. > > > > > value="${error}"/> > > > > > > >From: "David Friedman" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: "Struts Users Mailing List" > >Subject: RE: errorStyleClass not working > >Date: Wed, 19 Jul 2006 13:36:10 -0400 > > > >I see your final output does not list the class="..." attribute. What > >version of struts are you using? Accoring to the release notes, only > >versions 1.2.7 and above have the errorStyleClass attributes in them. >Are > >you sure your version supports errorStyleClass? And we ARE talking the > >output of your html:text tag on a page which also shows the actual >errors, > >via the html:errors tag, right? > > > >Regards, > >David > > > >-Original Message- > >From: fea jabi [mailto:[EMAIL PROTECTED] > >Sent: Wednesday, July 19, 2006 1:28 PM > >To: user@struts.apache.org > >Subject: RE: errorStyleClass not working > > > > > >Thanks for helping me. > > > >The web page has > > > > > > > > > > > > > > > > > > >You said "nested page". Are you including one page inside another or >do > > >you > > >simply mean "nested inside a displaytag library tag"? > > > >I mean "nested inside a displaytag library tag". > > > >trying to validate the user entered values, here the 2nd one i.e > >name="hrs[1].adHrs" checking if user entered numeric value. I am getting > >the > >error msg back too. But only the errorStyleClass is not working. > > > >Thanks. > > > > > > >From: "David Friedman" <[EMAIL PROTECTED]> > > >Reply-To: "Struts Users Mailing List" > > >To: "Struts Users Mailing List" > > >Subject: RE: errorStyleClass not working > > >Date: Wed, 19 Jul 2006 13:12:17 -0400 > > > > > >I wa
Re: Can Action class send user to url not in struts-config.xml?
Thanks Adam! Adam Hardy-3 wrote: > > String forwardUrl = "/private/payments.do?" + customQueryString; > forward = new ActionForward("anyName", forwardUrl, false); > > > But I would recommend against going down that route, or at least try to > keep it really simple. > > -- View this message in context: http://www.nabble.com/Can-Action-class-send-user-to-url-not-in-struts-config.xml--tf1968310.html#a5405946 Sent from the Struts - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: writing my own chain command in 1.3.5?
At 10:24 PM +0100 7/19/06, Adam Hardy wrote: I'm trying to set up a new app using 1.3.5 and I am going to set up the process-view chain to do some view logic, if possible. Please could someone in-the-know check these steps to configure 1.3.5: *snip* This sounds exactly right. * write a bespoke command to do the view logic, extending ActionCommand.java (is that correct?) and reference it in the chain-config.xml in the 'process-view' chain You don't *have* to extend ActionCommand, but by doing so you save yourself the trouble of casting the Context to an ActionContext. By the way, the 'servlet-exception' chain from struts-core has only 2 commands: ExceptionHandler, PerformForward. But the chain from struts-tiles.jar has 4: ExceptionHandler, ExecuteForwardCommand, TilesPreProcessor, PerformForward. Is that 'ExecuteForwardCommand' tiles specific? hm. No, ExecuteForwardCommand is not tiles specific. I can't think of any reason off-hand for the inconsistency, except for error. applying per-forward commands is something new that not many people have begun using, so I can imagine that no one has contemplated whether they should or should not be supported automatically on exception-handling commands or not. In general, I don't see why not, except that one wants to keep exception handling processes as simple as possible to minimize the risk of a secondary error derailing the handling of the original error. Joe -- Joe Germuska [EMAIL PROTECTED] * http://blog.germuska.com "The truth is that we learned from João forever to be out of tune." -- Caetano Veloso - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HTML reset problem
Hello there! This is more an HTML/JavaScript issue, but I hope someone has the answer :) I've been using HTML for a long time, but today I've just found out something stupid that I've never cared about, reset on a form does not clean it, but restores to the original state ... Ok, you can laugh now :P But ?I really never thought of that. So, when the user is in edit mode (all inputs has a value set) the clean button (which actualluy is a reset method) just dont work. Is there an easy way to do that? Instead of using JS to loop through all components and set their values = ''? Best Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select disable problem
Thanks all, we solved this using hidden fields :) Thanks On 7/18/06, Laurie Harper <[EMAIL PROTECTED]> wrote: Vinicius Carvalho wrote: > Hello there! I believe this is an HTML/HTTP issue, but... > > I have a userForm that some of the fields (selects) when the user is > editing must come as readonly (disabled). Well, that's almost ok, > because I need that data on the action called by the form, and those > values are not passed to the action. Right, disabled form controls are not submitted, per the HTML spec. > I tried to use hidden values together with the html:select, but it > seems that struts is too smart and its not setting the values, keeping > the null ones :( Without seeing what you're doing, it's hard to diagnose what's going wrong. What does your JSP markup look like? What does the resulting (rendered) HTML look like? How are you trying to retrieve the values in your action code? L. - 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]
writing my own chain command in 1.3.5?
I'm trying to set up a new app using 1.3.5 and I am going to set up the process-view chain to do some view logic, if possible. Please could someone in-the-know check these steps to configure 1.3.5: * create a web.xml with the ActionServlet config, e.g. from the struts-blank.war in the apps download and put this in the servlet node: [1] chainConfig org/mydns/strutsstuff/chain-config.xml * create this chain-config.xml based on the one in the struts-core.jar at org.apache.struts.chain or on the one in struts-tiles.jar at org.apache.struts.tiles (for the tiles processing command) * delete the old controller config from struts-config.xml, or use a new struts-config from the struts-blank.war * update the tiles-defs.xml DOCTYPE to version 1.3 (see [1] ) * write a bespoke command to do the view logic, extending ActionCommand.java (is that correct?) and reference it in the chain-config.xml in the 'process-view' chain By the way, the 'servlet-exception' chain from struts-core has only 2 commands: ExceptionHandler, PerformForward. But the chain from struts-tiles.jar has 4: ExceptionHandler, ExecuteForwardCommand, TilesPreProcessor, PerformForward. Is that 'ExecuteForwardCommand' tiles specific? [1] http://wiki.apache.org/struts/StrutsUpgradeNotes12to13 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Valdator - RequiredIf doesn't work for IE
Thanks Adam. I got it working now -- View this message in context: http://www.nabble.com/Valdator---RequiredIf-doesn%27t-work-for-IE-tf1968272.html#a5403936 Sent from the Struts - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can Action class send user to url not in struts-config.xml?
pantichd on 19/07/06 20:15, wrote: Is there a way for an action class to send a user to a url other than those defined as forwards in the struts-config.xml file? My situation is this: A filter checks every request in the system to verify that the user has logged in. If not, the user is sent to the login.jsp page. The login.jsp executes a login action class that has a forward for a successful and unsuccessful login. The action class is a generic class that can be used by different apps. I want to customize it so that an app can specify that a user should be sent to the original url requested upon a successful login. String forwardUrl = "/private/payments.do?" + customQueryString; forward = new ActionForward("anyName", forwardUrl, false); But I would recommend against going down that route, or at least try to keep it really simple. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Valdator - RequiredIf doesn't work for IE
The problem isn't technically due to the requiredIf tag but rather the client-side Javascript that is generated by Struts to do the requiredIf validation. My guess is that you are experiencing one of the many problems that arise when there are standards related issues with what MS supports vs. what the rest of the world supports. This becomes VERY obvious in web development. I believe the quote is "The nice thing about standards is that there are so many to choose from." Ok, so that doesn't really help you. Since the requiredIf tag is deprecated (and the docs say to use "validwhen") I would do that or implement the validate(...) method in your bean (just make sure you call super.validate(...) if you want to get any other validation error messages for rules defined in your XML. Alternatively, you can use the Javascript debugger in IE to find out where the error is and try to fix it yourself. -Adam -Original Message- From: mosho [mailto:[EMAIL PROTECTED] Sent: Wednesday, 19 July 2006 13:10 To: user@struts.apache.org Subject: Valdator - RequiredIf doesn't work for IE Hi all, I am using struts 1.1 version. I have set up validator framework. I am using requiredIf rule, it works perfectly in Mozilla Firefox but it doesn't work in Internet Explorer version 6.0. Is there any reason for it? Is it not supported on IE. Thanks -- View this message in context: http://www.nabble.com/Valdator---RequiredIf-doesn%27t-work-for-IE-tf1968272. html#a5402491 Sent from the Struts - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: errorStyleClass not working
After saving the ActionErrors in action class. and giving value="${error}"/> made the highlighting to work right. I tried to validate in Action class to check if validate was working right. When to use the ActionMessages and when to use ActionErrors. Thanks a lot for your help. From: "fea jabi" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: user@struts.apache.org Subject: RE: errorStyleClass not working Date: Wed, 19 Jul 2006 15:06:02 -0400 Yah, in the JSP where the errorStyleClass is working I am using So, do I have to use html:errors? not html:messages? yes, I am using DynaValidatorForm but calling validate from action class. The validation is done in validator.xml In dispath action class I have ActionMessages messages = (ActionMessages)frm.validate( mapping, request ); if ( messages != null && !messages.isEmpty() ) { saveMessages(request, messages); return (mapping.findForward("validationFailed")); } Should I be saving action errors instead of ActionMessages? Thanks. From: "David Friedman" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: "Struts Users Mailing List" Subject: RE: errorStyleClass not working Date: Wed, 19 Jul 2006 14:51:48 -0400 There is something odd going on here. In the JSP's where the html:messages and errorStyleClass are working, do you have html:messages setting 'message="true"'? This is odd because that changes the key from Globals.MESSAGE_KEY to Global.ERROR_KEY. Action1 Html tags perform error lookups (I just checked the SVN repos) using in the Globals.ERROR_KEY, not the Globals.MESSAGE_KEY. That makes me wonder: Are the error messages you are seeing on this page (the page where errorStyleClass is not working) the ones you saved INSIDE your action or are you 100% sure these are validation errors from the DynaValidatorForm? What do you see when you remove the 'message="true"' from your html:messages tag and then run your action? See this page for what I'm talking about: http://husted.com/struts/tips/017.html Take a look at your logic:messagesPresent tag doing the same thing. This is the current SVN java code ( just a snippet ) that is important: public class MessagesPresentTag extends ConditionalTagBase { /** * If this is set to 'true', then the Globals.MESSAGE_KEY * will be used to retrieve the messages from scope. */ protected String message = null; public MessagesPresentTag() { name = Globals.ERROR_KEY; } // ... End of snippet, lots cut but you get the idea that // you are changing the keys to NOT use the Globals.ERROR_KEY // that I believe errorStyleClass is using. } Regards, David -Original Message- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 1:57 PM To: user@struts.apache.org Subject: RE: errorStyleClass not working yes, using 1.2.7 version of struts. This(errorStyleClass) does work in another page though whose property is in Form-bean. But here in this page, I have the arraylist in the form-bean, and the arraylist contains the list of objects whose one of the attribute is shown in the input field. probably something is missing here. actually showing the messages. I can see the message entered value is not valid. >From: "David Friedman" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: "Struts Users Mailing List" >Subject: RE: errorStyleClass not working >Date: Wed, 19 Jul 2006 13:36:10 -0400 > >I see your final output does not list the class="..." attribute. What >version of struts are you using? Accoring to the release notes, only >versions 1.2.7 and above have the errorStyleClass attributes in them. Are >you sure your version supports errorStyleClass? And we ARE talking the >output of your html:text tag on a page which also shows the actual errors, >via the html:errors tag, right? > >Regards, >David > >-Original Message- >From: fea jabi [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 19, 2006 1:28 PM >To: user@struts.apache.org >Subject: RE: errorStyleClass not working > > >Thanks for helping me. > >The web page has > > > > > > > > > >You said "nested page". Are you including one page inside another or do > >you > >simply mean "nested inside a displaytag library tag"? > >I mean "nested inside a displaytag library tag". > >trying to validate the user entered values, here the 2nd one i.e >name="hrs[1].adHrs" checking if user entered numeric value. I am getting >the >error msg back too. But only the errorStyleClass is not working. > >Thanks. > > > >From: "David Friedman" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: "Struts Users Mailing List" > >Subject: RE: errorStyleClass not working >
Can Action class send user to url not in struts-config.xml?
Hello, Is there a way for an action class to send a user to a url other than those defined as forwards in the struts-config.xml file? My situation is this: A filter checks every request in the system to verify that the user has logged in. If not, the user is sent to the login.jsp page. The login.jsp executes a login action class that has a forward for a successful and unsuccessful login. The action class is a generic class that can be used by different apps. I want to customize it so that an app can specify that a user should be sent to the original url requested upon a successful login. I don't know how to accomplish that if I don't have the url specified as a forward in the struts-config.xml. Thanks in advance for any help. David. -- View this message in context: http://www.nabble.com/Can-Action-class-send-user-to-url-not-in-struts-config.xml--tf1968310.html#a5402595 Sent from the Struts - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Valdator - RequiredIf doesn't work for IE
Hi all, I am using struts 1.1 version. I have set up validator framework. I am using requiredIf rule, it works perfectly in Mozilla Firefox but it doesn't work in Internet Explorer version 6.0. Is there any reason for it? Is it not supported on IE. Thanks -- View this message in context: http://www.nabble.com/Valdator---RequiredIf-doesn%27t-work-for-IE-tf1968272.html#a5402491 Sent from the Struts - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator issue
On 7/19/06, harriquitawn tawn tawn <[EMAIL PROTECTED]> wrote: I have configured 2 struts-config.xml files (struts-config1.xml and struts-config2.xml), two validation.xml files (validation1.xml and validation2.xml), one validator-rules.xml and the web.xml file. ... When I execute it, I obtain that ONLY the validation2.xml works, because it is the last file in the web.xml. It sounds like this one: http://issues.apache.org/struts/browse/STR-2904 -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: errorStyleClass not working
Yah, in the JSP where the errorStyleClass is working I am using property="name"/> So, do I have to use html:errors? not html:messages? yes, I am using DynaValidatorForm but calling validate from action class. The validation is done in validator.xml In dispath action class I have ActionMessages messages = (ActionMessages)frm.validate( mapping, request ); if ( messages != null && !messages.isEmpty() ) { saveMessages(request, messages); return (mapping.findForward("validationFailed")); } Should I be saving action errors instead of ActionMessages? Thanks. From: "David Friedman" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: "Struts Users Mailing List" Subject: RE: errorStyleClass not working Date: Wed, 19 Jul 2006 14:51:48 -0400 There is something odd going on here. In the JSP's where the html:messages and errorStyleClass are working, do you have html:messages setting 'message="true"'? This is odd because that changes the key from Globals.MESSAGE_KEY to Global.ERROR_KEY. Action1 Html tags perform error lookups (I just checked the SVN repos) using in the Globals.ERROR_KEY, not the Globals.MESSAGE_KEY. That makes me wonder: Are the error messages you are seeing on this page (the page where errorStyleClass is not working) the ones you saved INSIDE your action or are you 100% sure these are validation errors from the DynaValidatorForm? What do you see when you remove the 'message="true"' from your html:messages tag and then run your action? See this page for what I'm talking about: http://husted.com/struts/tips/017.html Take a look at your logic:messagesPresent tag doing the same thing. This is the current SVN java code ( just a snippet ) that is important: public class MessagesPresentTag extends ConditionalTagBase { /** * If this is set to 'true', then the Globals.MESSAGE_KEY * will be used to retrieve the messages from scope. */ protected String message = null; public MessagesPresentTag() { name = Globals.ERROR_KEY; } // ... End of snippet, lots cut but you get the idea that // you are changing the keys to NOT use the Globals.ERROR_KEY // that I believe errorStyleClass is using. } Regards, David -Original Message- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 1:57 PM To: user@struts.apache.org Subject: RE: errorStyleClass not working yes, using 1.2.7 version of struts. This(errorStyleClass) does work in another page though whose property is in Form-bean. But here in this page, I have the arraylist in the form-bean, and the arraylist contains the list of objects whose one of the attribute is shown in the input field. probably something is missing here. actually showing the messages. I can see the message entered value is not valid. >From: "David Friedman" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: "Struts Users Mailing List" >Subject: RE: errorStyleClass not working >Date: Wed, 19 Jul 2006 13:36:10 -0400 > >I see your final output does not list the class="..." attribute. What >version of struts are you using? Accoring to the release notes, only >versions 1.2.7 and above have the errorStyleClass attributes in them. Are >you sure your version supports errorStyleClass? And we ARE talking the >output of your html:text tag on a page which also shows the actual errors, >via the html:errors tag, right? > >Regards, >David > >-Original Message- >From: fea jabi [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 19, 2006 1:28 PM >To: user@struts.apache.org >Subject: RE: errorStyleClass not working > > >Thanks for helping me. > >The web page has > > > > > > > > > >You said "nested page". Are you including one page inside another or do > >you > >simply mean "nested inside a displaytag library tag"? > >I mean "nested inside a displaytag library tag". > >trying to validate the user entered values, here the 2nd one i.e >name="hrs[1].adHrs" checking if user entered numeric value. I am getting >the >error msg back too. But only the errorStyleClass is not working. > >Thanks. > > > >From: "David Friedman" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: "Struts Users Mailing List" > >Subject: RE: errorStyleClass not working > >Date: Wed, 19 Jul 2006 13:12:17 -0400 > > > >I was asking what your html:text tag outputs. Can you post what it puts > >into your web page (when you view the source of the generated page?) You > >know, the generated html code: (example below) > > > >/> > > > >For what it is worth, your css class definition worked fine in a test >page > >/ > >form of mine. > > > >You said "nested page". Are you including one page inside another or do > >you > >simply mean "nested inside a displaytag library tag"? > > > >Regards, > >David > > > >-Original M
Re: How to Pass a Textfield Value as a c:param to a Link using c:url?
Thank all of you for support. Now, it it an off-topic question. I am able to pass the fixed values using the tag. But, what is the Javascript like to submit value of a text field in the Struts context when a link is clicked. It is difficult for me to get around the problem because my link is an image. -- Caroline --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > I suggest you rereading my very first answer. I can > add the following to it: > > * Clicking on a link, even if this link is defined > inside HTML form, > does not submit the form unless you write some > Javascript code to do > this. > * Even if your form were submitted with a link, the > link paramter > won't be populated with code like yours, because JSP > TAGS ARE > EVALUATED ON SERVER. > > If you want to submit a form with a link, you need > to write some > Javascript to do so. Or you can use a regular submit > button rendered > as a link (use CSS for that) and submit the form > with GET method. > > On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> > wrote: > > But, it does not work even I changed html-el to > html. > > > > In my link, I did pass some fixed values. They > are > > picked up. Let me explain: > > var="ascFirstName"> > > > > > > > value="${searchFirstName}" /> > > > > > > > > The fixed values "firstName" and "ASC" are picked > up > > without problem. But the "${searchFirstName}" > where > > searchFirstName is the property of a text field is > not > > picked up. > > > > --- David Friedman <[EMAIL PROTECTED]> wrote: > > > > > Dear Caroline Jen, > > > > > > I thought people only used the "html-el" taglib > > > because their JSP container > > > didn't natively support EL? That would mean > your > > > c:url and c:param tags > > > won't get the expressions ${searchFirstName} or > > > ${ascFirstName} parsed > > > because your JSP container doesn't do that. If > your > > > container did parse > > > expression like that, you would be using the > regular > > > "html" taglib, right? > > > If I am missing something please let me know. I > > > just cannot remember ever > > > hearing of any other reason to use the "html-el" > > > taglib - so this question > > > makes sense to me. > > > > > > Are you positive your final outputted html form > > > shows the url correctly > > > before you click on it? Because if it were > blank > > > due to this EL non-parsing > > > issue it would explain why your > > > request.getParameter() method is returning > > > nothing. > > > > > > Regards, > > > David > > > > > > -Original Message- > > > From: Caroline Jen [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, July 19, 2006 12:51 PM > > > To: Struts Users Mailing List > > > Subject: Re: How to Pass a Textfield Value as a > > > c:param to a Link using > > > c:url? > > > > > > > > > My text field and the link are defined inside a > HTML > > > form and I do have the html-el and the JSTL tag > > > libraries. Everything else worked fine except > > > passing > > > this text field value as a c:param via the c:url > > > link. > > > > > > When I submit the form, the browser address bar > > > shows > > > searchFirstName= > > > > > > a blank is sent. > > > > > > Let me post my code again. I tried to pass the > > > value > > > entered in a textfield: > > > > > > > > > > > > > > > to a link this way: > > > > > > > > var="ascFirstName"> > > > > > value="${searchFirstName}" /> > > > > > > > > > > > > and in my action class, I have > > > > > > String firstName = request.getParameter( > > > "searchFirstName" ); > > > > > > > > > I tried to print out the firstName in my action > > > class > > > using System.out.println( firstName); I got a > blank! > > > > > > > > > --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > > > > > > Make sure your text field is defined inside an > > > HTML > > > > form. Make sure > > > > you have proper taglib directives on top of > your > > > JSP > > > > page, for > > > > example, for html-el tags. > > > > > > > > Get an HTTP sniffer and see what is sent from > > > > browser when you submit > > > > a form. If you use Firefox, get Live HTTP > Header > > > > extension. > > > > > > > > On 7/19/06, Caroline Jen > <[EMAIL PROTECTED]> > > > > wrote: > > > > > I am not talking about submit a JSP, perform > > > some > > > > > action, and return a JSP. > > > > > > > > > > I submit the textfield, and I used > > > > System.out.println > > > > > in my action class to write out the value > > > > submitted. > > > > > I got a blank. Therefore, something must > go > > > > wrong. > > > > > > > > > > --- Michael Jouravlev <[EMAIL PROTECTED]> > wrote: > > > > > > > > > > > On 7/19/06, Caroline Jen > > > <[EMAIL PROTECTED]> > > > > > > wrote: > > > > > > > I must have done someting wrong. > > > > > > > > > > > > > > I tried to pass the value entered in a > > > > textfield: > > > > > > > /> > > > > > > > > > > > > > > to a link this way: > > > > > > > > > > > > var="ascFirstName"> > > > > > > >
Validator issue
I have configured 2 struts-config.xml files (struts-config1.xml and struts-config2.xml), two validation.xml files (validation1.xml and validation2.xml), one validator-rules.xml and the web.xml file. Web xml file: ... /WEB-INF/struts-config1.xml,/WEB-INF/struts-config2.xml ... In struts-config1.xml I configure the plugin for validation1.xml In struts-config2.xml I configure the plugin for validation2.xml When I execute it, I obtain that ONLY the validation2.xml works, because it is the last file in the web.xml. If I put /WEB-INF/struts-config2.xml,/WEB-INF/struts-config1.xml then only the validation1.xml works. Is there any reason for that? Thanks a lot - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: errorStyleClass not working
There is something odd going on here. In the JSP's where the html:messages and errorStyleClass are working, do you have html:messages setting 'message="true"'? This is odd because that changes the key from Globals.MESSAGE_KEY to Global.ERROR_KEY. Action1 Html tags perform error lookups (I just checked the SVN repos) using in the Globals.ERROR_KEY, not the Globals.MESSAGE_KEY. That makes me wonder: Are the error messages you are seeing on this page (the page where errorStyleClass is not working) the ones you saved INSIDE your action or are you 100% sure these are validation errors from the DynaValidatorForm? What do you see when you remove the 'message="true"' from your html:messages tag and then run your action? See this page for what I'm talking about: http://husted.com/struts/tips/017.html Take a look at your logic:messagesPresent tag doing the same thing. This is the current SVN java code ( just a snippet ) that is important: public class MessagesPresentTag extends ConditionalTagBase { /** * If this is set to 'true', then the Globals.MESSAGE_KEY * will be used to retrieve the messages from scope. */ protected String message = null; public MessagesPresentTag() { name = Globals.ERROR_KEY; } // ... End of snippet, lots cut but you get the idea that // you are changing the keys to NOT use the Globals.ERROR_KEY // that I believe errorStyleClass is using. } Regards, David -Original Message- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 1:57 PM To: user@struts.apache.org Subject: RE: errorStyleClass not working yes, using 1.2.7 version of struts. This(errorStyleClass) does work in another page though whose property is in Form-bean. But here in this page, I have the arraylist in the form-bean, and the arraylist contains the list of objects whose one of the attribute is shown in the input field. probably something is missing here. actually showing the messages. I can see the message entered value is not valid. >From: "David Friedman" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: "Struts Users Mailing List" >Subject: RE: errorStyleClass not working >Date: Wed, 19 Jul 2006 13:36:10 -0400 > >I see your final output does not list the class="..." attribute. What >version of struts are you using? Accoring to the release notes, only >versions 1.2.7 and above have the errorStyleClass attributes in them. Are >you sure your version supports errorStyleClass? And we ARE talking the >output of your html:text tag on a page which also shows the actual errors, >via the html:errors tag, right? > >Regards, >David > >-Original Message- >From: fea jabi [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 19, 2006 1:28 PM >To: user@struts.apache.org >Subject: RE: errorStyleClass not working > > >Thanks for helping me. > >The web page has > > > > > > > > > >You said "nested page". Are you including one page inside another or do > >you > >simply mean "nested inside a displaytag library tag"? > >I mean "nested inside a displaytag library tag". > >trying to validate the user entered values, here the 2nd one i.e >name="hrs[1].adHrs" checking if user entered numeric value. I am getting >the >error msg back too. But only the errorStyleClass is not working. > >Thanks. > > > >From: "David Friedman" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: "Struts Users Mailing List" > >Subject: RE: errorStyleClass not working > >Date: Wed, 19 Jul 2006 13:12:17 -0400 > > > >I was asking what your html:text tag outputs. Can you post what it puts > >into your web page (when you view the source of the generated page?) You > >know, the generated html code: (example below) > > > >/> > > > >For what it is worth, your css class definition worked fine in a test >page > >/ > >form of mine. > > > >You said "nested page". Are you including one page inside another or do > >you > >simply mean "nested inside a displaytag library tag"? > > > >Regards, > >David > > > >-Original Message- > >From: fea jabi [mailto:[EMAIL PROTECTED] > >Sent: Wednesday, July 19, 2006 12:53 PM > >To: user@struts.apache.org > >Subject: RE: errorStyleClass not working > > > > > >Thanks for your response. > > > > >a) Have you checked your output to make sure the class is set in the >html > > >when an error occurs? > > > >what class are you talking about here? > > > >yes, the css is embeded and the errormsg is also in there. It works fine >in > >other pages. except for this nested page. > > > >.errormsg{ > >color: red; > >background: inherit; > >font-size: 11px; > >border: 1px solid red; > >padding: 3px; > >} > > > >Hoping to get an answer for this. Thanks. > > > > > > >From: "David Friedman" <[EMAIL PROTECTED]> > > >Reply-To: "Struts Users Mailing List" > > >To: "Struts Users Mailing List" > > >Subject
Re: How to Pass a Textfield Value as a c:param to a Link using c:url?
On 7/19/06, Laurie Harper <[EMAIL PROTECTED]> wrote: Michael Jouravlev wrote: > On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> wrote: >> My text field and the link are defined inside a HTML >> form > >> When I submit the form, the browser address bar shows >> searchFirstName= >> >> a blank is sent. > > You should start from here. Why does the browser send an emply > parameter? View HTML page source and verify that you have a and > you have inside of it. Try cutting that HTML > out, create a test HTML page and see how your browser submits the > form. Check generated request. The HTML form may not be properly > generated by JSP tags, but I don't know what exactly went wrong in > your JSP page. The problem is that c:url produces a link, not a form submit. You cannot capture the value entered into a text field and include it as a link parameter, except by writing some Javascript. When I wrote this reply I got an impression that Caroline submits the form first, then she displays the page with JSTL tags where she wants to use submitted searchFirstName. But looks like this is not true, and my first understanding about what she wanted to do (submitting the form, generating URL on the fly) was in fact a correct one. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: errorStyleClass not working
yes, using 1.2.7 version of struts. This(errorStyleClass) does work in another page though whose property is in Form-bean. But here in this page, I have the arraylist in the form-bean, and the arraylist contains the list of objects whose one of the attribute is shown in the input field. probably something is missing here. actually showing the messages. I can see the message entered value is not valid. value="${error}"/> From: "David Friedman" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: "Struts Users Mailing List" Subject: RE: errorStyleClass not working Date: Wed, 19 Jul 2006 13:36:10 -0400 I see your final output does not list the class="..." attribute. What version of struts are you using? Accoring to the release notes, only versions 1.2.7 and above have the errorStyleClass attributes in them. Are you sure your version supports errorStyleClass? And we ARE talking the output of your html:text tag on a page which also shows the actual errors, via the html:errors tag, right? Regards, David -Original Message- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 1:28 PM To: user@struts.apache.org Subject: RE: errorStyleClass not working Thanks for helping me. The web page has >You said "nested page". Are you including one page inside another or do >you >simply mean "nested inside a displaytag library tag"? I mean "nested inside a displaytag library tag". trying to validate the user entered values, here the 2nd one i.e name="hrs[1].adHrs" checking if user entered numeric value. I am getting the error msg back too. But only the errorStyleClass is not working. Thanks. >From: "David Friedman" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: "Struts Users Mailing List" >Subject: RE: errorStyleClass not working >Date: Wed, 19 Jul 2006 13:12:17 -0400 > >I was asking what your html:text tag outputs. Can you post what it puts >into your web page (when you view the source of the generated page?) You >know, the generated html code: (example below) > >/> > >For what it is worth, your css class definition worked fine in a test page >/ >form of mine. > >You said "nested page". Are you including one page inside another or do >you >simply mean "nested inside a displaytag library tag"? > >Regards, >David > >-Original Message- >From: fea jabi [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 19, 2006 12:53 PM >To: user@struts.apache.org >Subject: RE: errorStyleClass not working > > >Thanks for your response. > > >a) Have you checked your output to make sure the class is set in the html > >when an error occurs? > >what class are you talking about here? > >yes, the css is embeded and the errormsg is also in there. It works fine in >other pages. except for this nested page. > >.errormsg{ >color: red; >background: inherit; >font-size: 11px; >border: 1px solid red; >padding: 3px; >} > >Hoping to get an answer for this. Thanks. > > > >From: "David Friedman" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: "Struts Users Mailing List" > >Subject: RE: errorStyleClass not working > >Date: Wed, 19 Jul 2006 12:18:24 -0400 > > > >a) Have you checked your output to make sure the class is set in the html > >when an error occurs? > > > >b) What is the CSS you specify for that "errormsg" style definition? > > > >c) Have you embedded your style definition in the web page to ensure it >is > >loaded properly? FireFox has a good plugin called "web developer" that > >includes a live CSS editor so you can make sure your css is loaded and > >"adjust" it to see how different changes alter your page appearance. > > > >Regards, > >David > > > > >From: "fea jabi" <[EMAIL PROTECTED]> > > >Reply-To: "Struts Users Mailing List" > > >To: user@struts.apache.org > > >Subject: errorStyleClass not working > > >Date: Mon, 17 Jul 2006 11:44:49 -0400 > > > > > >... > > > > > > > > > > > > > > > " > > >errorStyleClass="errormsg"/> > > > > > > > > > > > > > > > > > > > > > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > >_ >FREE pop-up blocking with the new MSN Toolbar get it now! >http://toolbar.msn.click-url.com/go/onm00200415ave/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: How to Pass a Textfield Value as a c:param to a Link using c:url?
I suggest you rereading my very first answer. I can add the following to it: * Clicking on a link, even if this link is defined inside HTML form, does not submit the form unless you write some Javascript code to do this. * Even if your form were submitted with a link, the link paramter won't be populated with code like yours, because JSP TAGS ARE EVALUATED ON SERVER. If you want to submit a form with a link, you need to write some Javascript to do so. Or you can use a regular submit button rendered as a link (use CSS for that) and submit the form with GET method. On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> wrote: But, it does not work even I changed html-el to html. In my link, I did pass some fixed values. They are picked up. Let me explain: The fixed values "firstName" and "ASC" are picked up without problem. But the "${searchFirstName}" where searchFirstName is the property of a text field is not picked up. --- David Friedman <[EMAIL PROTECTED]> wrote: > Dear Caroline Jen, > > I thought people only used the "html-el" taglib > because their JSP container > didn't natively support EL? That would mean your > c:url and c:param tags > won't get the expressions ${searchFirstName} or > ${ascFirstName} parsed > because your JSP container doesn't do that. If your > container did parse > expression like that, you would be using the regular > "html" taglib, right? > If I am missing something please let me know. I > just cannot remember ever > hearing of any other reason to use the "html-el" > taglib - so this question > makes sense to me. > > Are you positive your final outputted html form > shows the url correctly > before you click on it? Because if it were blank > due to this EL non-parsing > issue it would explain why your > request.getParameter() method is returning > nothing. > > Regards, > David > > -Original Message- > From: Caroline Jen [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 19, 2006 12:51 PM > To: Struts Users Mailing List > Subject: Re: How to Pass a Textfield Value as a > c:param to a Link using > c:url? > > > My text field and the link are defined inside a HTML > form and I do have the html-el and the JSTL tag > libraries. Everything else worked fine except > passing > this text field value as a c:param via the c:url > link. > > When I submit the form, the browser address bar > shows > searchFirstName= > > a blank is sent. > > Let me post my code again. I tried to pass the > value > entered in a textfield: > > > > > to a link this way: > > var="ascFirstName"> > value="${searchFirstName}" /> > > > > and in my action class, I have > > String firstName = request.getParameter( > "searchFirstName" ); > > > I tried to print out the firstName in my action > class > using System.out.println( firstName); I got a blank! > > > --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > > Make sure your text field is defined inside an > HTML > > form. Make sure > > you have proper taglib directives on top of your > JSP > > page, for > > example, for html-el tags. > > > > Get an HTTP sniffer and see what is sent from > > browser when you submit > > a form. If you use Firefox, get Live HTTP Header > > extension. > > > > On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> > > wrote: > > > I am not talking about submit a JSP, perform > some > > > action, and return a JSP. > > > > > > I submit the textfield, and I used > > System.out.println > > > in my action class to write out the value > > submitted. > > > I got a blank. Therefore, something must go > > wrong. > > > > > > --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > > > > > > On 7/19/06, Caroline Jen > <[EMAIL PROTECTED]> > > > > wrote: > > > > > I must have done someting wrong. > > > > > > > > > > I tried to pass the value entered in a > > textfield: > > > > > > > > > > > > > > > to a link this way: > > > > > > > > var="ascFirstName"> > > > > > > > > > value="${searchFirstName}" /> > > > > > > > > > > > > > > > and in my action class, I have > > > > > String firstName = request.getParameter( > > > > > "searchFirstName" ); > > > > > > > > > > I tried to print out the firstName, I got a > > blank! > > > > > > > > > > Please advise what went wrong. > > > > > > > > JSP tags are processed *on server*. For your > > setup > > > > to work you need to > > > > submit a pag with > > > property="searchFirstName" /> to the > > > > server first, read value from request > parameter > > and > > > > stick it into > > > > appropriate scope under "searchFirstName" > name. > > > > > > > > Then, when you forward to JSP from your > action, > > > > JSP/servlet engine > > > > will process JSP tags, still *on server*. It > > will > > > > read > > > > "searchFirstName" from servlet scope and write > > out > > > > its value into > > > > generated HTML markup. Then resulting HTML > page > > will > > > > be sent to > > > > browser. > > > > > > > > If you want to do the whole thing on client, > use > > > > HTML form and subm
RE: How to Pass a Textfield Value as a c:param to a Link using c:url?
Where does "searchFirstName" get defined? If it is in your form when how would c:url know what form or what field to use? Also, have you tried having your action set "searchFirstName" with something like this request.setParameter("searchFirstName", someStringVar) so c:url could see it as ${searchFirstName} in the url it is generating? I guess I do not see how it is supposed to know the field "searchFirstName" that the FORM that Struts is using unless you give it the scope, bean name, and field name kind of like: request.formdefname.searchFirstName. Remember, the html: and html-el: tags already know their form name to implicitly use because it is pulled from the action path. C:url isn't a struts tag so how would it know that scope and form bean name to lookup to find the searchFirstName field? I hope this makes sense. Regards, David -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 1:40 PM To: Struts Users Mailing List Subject: RE: How to Pass a Textfield Value as a c:param to a Link using c:url? But, it does not work even I changed html-el to html. In my link, I did pass some fixed values. They are picked up. Let me explain: The fixed values "firstName" and "ASC" are picked up without problem. But the "${searchFirstName}" where searchFirstName is the property of a text field is not picked up. --- David Friedman <[EMAIL PROTECTED]> wrote: > Dear Caroline Jen, > > I thought people only used the "html-el" taglib > because their JSP container > didn't natively support EL? That would mean your > c:url and c:param tags > won't get the expressions ${searchFirstName} or > ${ascFirstName} parsed > because your JSP container doesn't do that. If your > container did parse > expression like that, you would be using the regular > "html" taglib, right? > If I am missing something please let me know. I > just cannot remember ever > hearing of any other reason to use the "html-el" > taglib - so this question > makes sense to me. > > Are you positive your final outputted html form > shows the url correctly > before you click on it? Because if it were blank > due to this EL non-parsing > issue it would explain why your > request.getParameter() method is returning > nothing. > > Regards, > David > > -Original Message- > From: Caroline Jen [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 19, 2006 12:51 PM > To: Struts Users Mailing List > Subject: Re: How to Pass a Textfield Value as a > c:param to a Link using > c:url? > > > My text field and the link are defined inside a HTML > form and I do have the html-el and the JSTL tag > libraries. Everything else worked fine except > passing > this text field value as a c:param via the c:url > link. > > When I submit the form, the browser address bar > shows > searchFirstName= > > a blank is sent. > > Let me post my code again. I tried to pass the > value > entered in a textfield: > > > > > to a link this way: > > var="ascFirstName"> > value="${searchFirstName}" /> > > > > and in my action class, I have > > String firstName = request.getParameter( > "searchFirstName" ); > > > I tried to print out the firstName in my action > class > using System.out.println( firstName); I got a blank! > > > --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > > Make sure your text field is defined inside an > HTML > > form. Make sure > > you have proper taglib directives on top of your > JSP > > page, for > > example, for html-el tags. > > > > Get an HTTP sniffer and see what is sent from > > browser when you submit > > a form. If you use Firefox, get Live HTTP Header > > extension. > > > > On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> > > wrote: > > > I am not talking about submit a JSP, perform > some > > > action, and return a JSP. > > > > > > I submit the textfield, and I used > > System.out.println > > > in my action class to write out the value > > submitted. > > > I got a blank. Therefore, something must go > > wrong. > > > > > > --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > > > > > > On 7/19/06, Caroline Jen > <[EMAIL PROTECTED]> > > > > wrote: > > > > > I must have done someting wrong. > > > > > > > > > > I tried to pass the value entered in a > > textfield: > > > > > > > > > > > > > > > to a link this way: > > > > > > > > var="ascFirstName"> > > > > > > > > > value="${searchFirstName}" /> > > > > > > > > > > > > > > > and in my action class, I have > > > > > String firstName = request.getParameter( > > > > > "searchFirstName" ); > > > > > > > > > > I tried to print out the firstName, I got a > > blank! > > > > > > > > > > Please advise what went wrong. > > > > > > > > JSP tags are processed *on server*. For your > > setup > > > > to work you need to > > > > submit a pag with > > > property="searchFirstName" /> to the > > > > server first, read value from request > parameter > > and > > > > stick it into > > > > appropriate scope under "searchFirstName" > name. > >
Re: How to Pass a Textfield Value as a c:param to a Link using c:url?
Michael Jouravlev wrote: On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> wrote: My text field and the link are defined inside a HTML form When I submit the form, the browser address bar shows searchFirstName= a blank is sent. You should start from here. Why does the browser send an emply parameter? View HTML page source and verify that you have a and you have inside of it. Try cutting that HTML out, create a test HTML page and see how your browser submits the form. Check generated request. The HTML form may not be properly generated by JSP tags, but I don't know what exactly went wrong in your JSP page. The problem is that c:url produces a link, not a form submit. You cannot capture the value entered into a text field and include it as a link parameter, except by writing some Javascript. The c:url tag is processed on the server, as part of generating the HTML page. That happens *before* the user types anything into the text field. So anything subsequently entered into the text field is not going to be part of the link. If you need the request to include form inputs, you need to generate that request via a form post. Use a submit button instead of the link. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to Pass a Textfield Value as a c:param to a Link using c:url?
But, it does not work even I changed html-el to html. In my link, I did pass some fixed values. They are picked up. Let me explain: The fixed values "firstName" and "ASC" are picked up without problem. But the "${searchFirstName}" where searchFirstName is the property of a text field is not picked up. --- David Friedman <[EMAIL PROTECTED]> wrote: > Dear Caroline Jen, > > I thought people only used the "html-el" taglib > because their JSP container > didn't natively support EL? That would mean your > c:url and c:param tags > won't get the expressions ${searchFirstName} or > ${ascFirstName} parsed > because your JSP container doesn't do that. If your > container did parse > expression like that, you would be using the regular > "html" taglib, right? > If I am missing something please let me know. I > just cannot remember ever > hearing of any other reason to use the "html-el" > taglib - so this question > makes sense to me. > > Are you positive your final outputted html form > shows the url correctly > before you click on it? Because if it were blank > due to this EL non-parsing > issue it would explain why your > request.getParameter() method is returning > nothing. > > Regards, > David > > -Original Message- > From: Caroline Jen [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 19, 2006 12:51 PM > To: Struts Users Mailing List > Subject: Re: How to Pass a Textfield Value as a > c:param to a Link using > c:url? > > > My text field and the link are defined inside a HTML > form and I do have the html-el and the JSTL tag > libraries. Everything else worked fine except > passing > this text field value as a c:param via the c:url > link. > > When I submit the form, the browser address bar > shows > searchFirstName= > > a blank is sent. > > Let me post my code again. I tried to pass the > value > entered in a textfield: > > > > > to a link this way: > > var="ascFirstName"> > value="${searchFirstName}" /> > > > > and in my action class, I have > > String firstName = request.getParameter( > "searchFirstName" ); > > > I tried to print out the firstName in my action > class > using System.out.println( firstName); I got a blank! > > > --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > > Make sure your text field is defined inside an > HTML > > form. Make sure > > you have proper taglib directives on top of your > JSP > > page, for > > example, for html-el tags. > > > > Get an HTTP sniffer and see what is sent from > > browser when you submit > > a form. If you use Firefox, get Live HTTP Header > > extension. > > > > On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> > > wrote: > > > I am not talking about submit a JSP, perform > some > > > action, and return a JSP. > > > > > > I submit the textfield, and I used > > System.out.println > > > in my action class to write out the value > > submitted. > > > I got a blank. Therefore, something must go > > wrong. > > > > > > --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > > > > > > On 7/19/06, Caroline Jen > <[EMAIL PROTECTED]> > > > > wrote: > > > > > I must have done someting wrong. > > > > > > > > > > I tried to pass the value entered in a > > textfield: > > > > > > > > > > > > > > > to a link this way: > > > > > > > > var="ascFirstName"> > > > > > > > > > value="${searchFirstName}" /> > > > > > > > > > > > > > > > and in my action class, I have > > > > > String firstName = request.getParameter( > > > > > "searchFirstName" ); > > > > > > > > > > I tried to print out the firstName, I got a > > blank! > > > > > > > > > > Please advise what went wrong. > > > > > > > > JSP tags are processed *on server*. For your > > setup > > > > to work you need to > > > > submit a pag with > > > property="searchFirstName" /> to the > > > > server first, read value from request > parameter > > and > > > > stick it into > > > > appropriate scope under "searchFirstName" > name. > > > > > > > > Then, when you forward to JSP from your > action, > > > > JSP/servlet engine > > > > will process JSP tags, still *on server*. It > > will > > > > read > > > > "searchFirstName" from servlet scope and write > > out > > > > its value into > > > > generated HTML markup. Then resulting HTML > page > > will > > > > be sent to > > > > browser. > > > > > > > > If you want to do the whole thing on client, > use > > > > HTML form and submit > > > > it with GET method. This way form fields will > be > > > > appended to "action" > > > > URL, exactly as you wanted. > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,
RE: errorStyleClass not working
I see your final output does not list the class="..." attribute. What version of struts are you using? Accoring to the release notes, only versions 1.2.7 and above have the errorStyleClass attributes in them. Are you sure your version supports errorStyleClass? And we ARE talking the output of your html:text tag on a page which also shows the actual errors, via the html:errors tag, right? Regards, David -Original Message- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 1:28 PM To: user@struts.apache.org Subject: RE: errorStyleClass not working Thanks for helping me. The web page has >You said "nested page". Are you including one page inside another or do >you >simply mean "nested inside a displaytag library tag"? I mean "nested inside a displaytag library tag". trying to validate the user entered values, here the 2nd one i.e name="hrs[1].adHrs" checking if user entered numeric value. I am getting the error msg back too. But only the errorStyleClass is not working. Thanks. >From: "David Friedman" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: "Struts Users Mailing List" >Subject: RE: errorStyleClass not working >Date: Wed, 19 Jul 2006 13:12:17 -0400 > >I was asking what your html:text tag outputs. Can you post what it puts >into your web page (when you view the source of the generated page?) You >know, the generated html code: (example below) > > > >For what it is worth, your css class definition worked fine in a test page >/ >form of mine. > >You said "nested page". Are you including one page inside another or do >you >simply mean "nested inside a displaytag library tag"? > >Regards, >David > >-Original Message- >From: fea jabi [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 19, 2006 12:53 PM >To: user@struts.apache.org >Subject: RE: errorStyleClass not working > > >Thanks for your response. > > >a) Have you checked your output to make sure the class is set in the html > >when an error occurs? > >what class are you talking about here? > >yes, the css is embeded and the errormsg is also in there. It works fine in >other pages. except for this nested page. > >.errormsg{ >color: red; >background: inherit; >font-size: 11px; >border: 1px solid red; >padding: 3px; >} > >Hoping to get an answer for this. Thanks. > > > >From: "David Friedman" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: "Struts Users Mailing List" > >Subject: RE: errorStyleClass not working > >Date: Wed, 19 Jul 2006 12:18:24 -0400 > > > >a) Have you checked your output to make sure the class is set in the html > >when an error occurs? > > > >b) What is the CSS you specify for that "errormsg" style definition? > > > >c) Have you embedded your style definition in the web page to ensure it >is > >loaded properly? FireFox has a good plugin called "web developer" that > >includes a live CSS editor so you can make sure your css is loaded and > >"adjust" it to see how different changes alter your page appearance. > > > >Regards, > >David > > > > >From: "fea jabi" <[EMAIL PROTECTED]> > > >Reply-To: "Struts Users Mailing List" > > >To: user@struts.apache.org > > >Subject: errorStyleClass not working > > >Date: Mon, 17 Jul 2006 11:44:49 -0400 > > > > > >... > > > > > > > > > > > > > > > " > > >errorStyleClass="errormsg"/> > > > > > > > > > > > > > > > > > > > > > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > >_ >FREE pop-up blocking with the new MSN Toolbar get it now! >http://toolbar.msn.click-url.com/go/onm00200415ave/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] > _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/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: errorStyleClass not working
Thanks for helping me. The web page has You said "nested page". Are you including one page inside another or do you simply mean "nested inside a displaytag library tag"? I mean "nested inside a displaytag library tag". trying to validate the user entered values, here the 2nd one i.e name="hrs[1].adHrs" checking if user entered numeric value. I am getting the error msg back too. But only the errorStyleClass is not working. Thanks. From: "David Friedman" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: "Struts Users Mailing List" Subject: RE: errorStyleClass not working Date: Wed, 19 Jul 2006 13:12:17 -0400 I was asking what your html:text tag outputs. Can you post what it puts into your web page (when you view the source of the generated page?) You know, the generated html code: (example below) For what it is worth, your css class definition worked fine in a test page / form of mine. You said "nested page". Are you including one page inside another or do you simply mean "nested inside a displaytag library tag"? Regards, David -Original Message- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 12:53 PM To: user@struts.apache.org Subject: RE: errorStyleClass not working Thanks for your response. >a) Have you checked your output to make sure the class is set in the html >when an error occurs? what class are you talking about here? yes, the css is embeded and the errormsg is also in there. It works fine in other pages. except for this nested page. .errormsg{ color: red; background: inherit; font-size: 11px; border: 1px solid red; padding: 3px; } Hoping to get an answer for this. Thanks. >From: "David Friedman" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: "Struts Users Mailing List" >Subject: RE: errorStyleClass not working >Date: Wed, 19 Jul 2006 12:18:24 -0400 > >a) Have you checked your output to make sure the class is set in the html >when an error occurs? > >b) What is the CSS you specify for that "errormsg" style definition? > >c) Have you embedded your style definition in the web page to ensure it is >loaded properly? FireFox has a good plugin called "web developer" that >includes a live CSS editor so you can make sure your css is loaded and >"adjust" it to see how different changes alter your page appearance. > >Regards, >David > > >From: "fea jabi" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: user@struts.apache.org > >Subject: errorStyleClass not working > >Date: Mon, 17 Jul 2006 11:44:49 -0400 > > > >... > > > > > > > > > > " > >errorStyleClass="errormsg"/> > > > > > > > > > > > > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > _ FREE pop-up blocking with the new MSN Toolbar get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/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] _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to Pass a Textfield Value as a c:param to a Link using c:url?
On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> wrote: My text field and the link are defined inside a HTML form ... When I submit the form, the browser address bar shows searchFirstName= a blank is sent. You should start from here. Why does the browser send an emply parameter? View HTML page source and verify that you have a and you have inside of it. Try cutting that HTML out, create a test HTML page and see how your browser submits the form. Check generated request. The HTML form may not be properly generated by JSP tags, but I don't know what exactly went wrong in your JSP page. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: errorStyleClass not working
I was asking what your html:text tag outputs. Can you post what it puts into your web page (when you view the source of the generated page?) You know, the generated html code: (example below) For what it is worth, your css class definition worked fine in a test page / form of mine. You said "nested page". Are you including one page inside another or do you simply mean "nested inside a displaytag library tag"? Regards, David -Original Message- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 12:53 PM To: user@struts.apache.org Subject: RE: errorStyleClass not working Thanks for your response. >a) Have you checked your output to make sure the class is set in the html >when an error occurs? what class are you talking about here? yes, the css is embeded and the errormsg is also in there. It works fine in other pages. except for this nested page. .errormsg{ color: red; background: inherit; font-size: 11px; border: 1px solid red; padding: 3px; } Hoping to get an answer for this. Thanks. >From: "David Friedman" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: "Struts Users Mailing List" >Subject: RE: errorStyleClass not working >Date: Wed, 19 Jul 2006 12:18:24 -0400 > >a) Have you checked your output to make sure the class is set in the html >when an error occurs? > >b) What is the CSS you specify for that "errormsg" style definition? > >c) Have you embedded your style definition in the web page to ensure it is >loaded properly? FireFox has a good plugin called "web developer" that >includes a live CSS editor so you can make sure your css is loaded and >"adjust" it to see how different changes alter your page appearance. > >Regards, >David > > >From: "fea jabi" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: user@struts.apache.org > >Subject: errorStyleClass not working > >Date: Mon, 17 Jul 2006 11:44:49 -0400 > > > >... > > > > > > > > > > " > >errorStyleClass="errormsg"/> > > > > > > > > > > > > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > _ FREE pop-up blocking with the new MSN Toolbar get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/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: How to Pass a Textfield Value as a c:param to a Link using c:url?
Dear Caroline Jen, I thought people only used the "html-el" taglib because their JSP container didn't natively support EL? That would mean your c:url and c:param tags won't get the expressions ${searchFirstName} or ${ascFirstName} parsed because your JSP container doesn't do that. If your container did parse expression like that, you would be using the regular "html" taglib, right? If I am missing something please let me know. I just cannot remember ever hearing of any other reason to use the "html-el" taglib - so this question makes sense to me. Are you positive your final outputted html form shows the url correctly before you click on it? Because if it were blank due to this EL non-parsing issue it would explain why your request.getParameter() method is returning nothing. Regards, David -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 12:51 PM To: Struts Users Mailing List Subject: Re: How to Pass a Textfield Value as a c:param to a Link using c:url? My text field and the link are defined inside a HTML form and I do have the html-el and the JSTL tag libraries. Everything else worked fine except passing this text field value as a c:param via the c:url link. When I submit the form, the browser address bar shows searchFirstName= a blank is sent. Let me post my code again. I tried to pass the value entered in a textfield: to a link this way: and in my action class, I have String firstName = request.getParameter( "searchFirstName" ); I tried to print out the firstName in my action class using System.out.println( firstName); I got a blank! --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > Make sure your text field is defined inside an HTML > form. Make sure > you have proper taglib directives on top of your JSP > page, for > example, for html-el tags. > > Get an HTTP sniffer and see what is sent from > browser when you submit > a form. If you use Firefox, get Live HTTP Header > extension. > > On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> > wrote: > > I am not talking about submit a JSP, perform some > > action, and return a JSP. > > > > I submit the textfield, and I used > System.out.println > > in my action class to write out the value > submitted. > > I got a blank. Therefore, something must go > wrong. > > > > --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > > > > On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> > > > wrote: > > > > I must have done someting wrong. > > > > > > > > I tried to pass the value entered in a > textfield: > > > > > > > > > > > > to a link this way: > > > > > > var="ascFirstName"> > > > > > > > value="${searchFirstName}" /> > > > > > > > > > > > > and in my action class, I have > > > > String firstName = request.getParameter( > > > > "searchFirstName" ); > > > > > > > > I tried to print out the firstName, I got a > blank! > > > > > > > > Please advise what went wrong. > > > > > > JSP tags are processed *on server*. For your > setup > > > to work you need to > > > submit a pag with > > property="searchFirstName" /> to the > > > server first, read value from request parameter > and > > > stick it into > > > appropriate scope under "searchFirstName" name. > > > > > > Then, when you forward to JSP from your action, > > > JSP/servlet engine > > > will process JSP tags, still *on server*. It > will > > > read > > > "searchFirstName" from servlet scope and write > out > > > its value into > > > generated HTML markup. Then resulting HTML page > will > > > be sent to > > > browser. > > > > > > If you want to do the whole thing on client, use > > > HTML form and submit > > > it with GET method. This way form fields will be > > > appended to "action" > > > URL, exactly as you wanted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: errorStyleClass not working
Thanks for your response. a) Have you checked your output to make sure the class is set in the html when an error occurs? what class are you talking about here? yes, the css is embeded and the errormsg is also in there. It works fine in other pages. except for this nested page. .errormsg{ color: red; background: inherit; font-size: 11px; border: 1px solid red; padding: 3px; } Hoping to get an answer for this. Thanks. From: "David Friedman" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: "Struts Users Mailing List" Subject: RE: errorStyleClass not working Date: Wed, 19 Jul 2006 12:18:24 -0400 a) Have you checked your output to make sure the class is set in the html when an error occurs? b) What is the CSS you specify for that "errormsg" style definition? c) Have you embedded your style definition in the web page to ensure it is loaded properly? FireFox has a good plugin called "web developer" that includes a live CSS editor so you can make sure your css is loaded and "adjust" it to see how different changes alter your page appearance. Regards, David >From: "fea jabi" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: user@struts.apache.org >Subject: errorStyleClass not working >Date: Mon, 17 Jul 2006 11:44:49 -0400 > >... > > > > > " >errorStyleClass="errormsg"/> > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ FREE pop-up blocking with the new MSN Toolbar get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to Pass a Textfield Value as a c:param to a Link using c:url?
My text field and the link are defined inside a HTML form and I do have the html-el and the JSTL tag libraries. Everything else worked fine except passing this text field value as a c:param via the c:url link. When I submit the form, the browser address bar shows searchFirstName= a blank is sent. Let me post my code again. I tried to pass the value entered in a textfield: to a link this way: and in my action class, I have String firstName = request.getParameter( "searchFirstName" ); I tried to print out the firstName in my action class using System.out.println( firstName); I got a blank! --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > Make sure your text field is defined inside an HTML > form. Make sure > you have proper taglib directives on top of your JSP > page, for > example, for html-el tags. > > Get an HTTP sniffer and see what is sent from > browser when you submit > a form. If you use Firefox, get Live HTTP Header > extension. > > On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> > wrote: > > I am not talking about submit a JSP, perform some > > action, and return a JSP. > > > > I submit the textfield, and I used > System.out.println > > in my action class to write out the value > submitted. > > I got a blank. Therefore, something must go > wrong. > > > > --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > > > > On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> > > > wrote: > > > > I must have done someting wrong. > > > > > > > > I tried to pass the value entered in a > textfield: > > > > > > > > > > > > to a link this way: > > > > > > var="ascFirstName"> > > > > > > > value="${searchFirstName}" /> > > > > > > > > > > > > and in my action class, I have > > > > String firstName = request.getParameter( > > > > "searchFirstName" ); > > > > > > > > I tried to print out the firstName, I got a > blank! > > > > > > > > Please advise what went wrong. > > > > > > JSP tags are processed *on server*. For your > setup > > > to work you need to > > > submit a pag with > > property="searchFirstName" /> to the > > > server first, read value from request parameter > and > > > stick it into > > > appropriate scope under "searchFirstName" name. > > > > > > Then, when you forward to JSP from your action, > > > JSP/servlet engine > > > will process JSP tags, still *on server*. It > will > > > read > > > "searchFirstName" from servlet scope and write > out > > > its value into > > > generated HTML markup. Then resulting HTML page > will > > > be sent to > > > browser. > > > > > > If you want to do the whole thing on client, use > > > HTML form and submit > > > it with GET method. This way form fields will be > > > appended to "action" > > > URL, exactly as you wanted. > > > > > > > > > - > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > > __ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple struts-config files with wildcards
Volker Krebs wrote: I want to use wildcards. So it should look like this. config /WEB-INF/struts*, /WEB-INF/user/struts* Has anyone some hints ? I was thinking about extending org.apache.struts.action.ActionServlet and overwriting parseModuleConfigFile(Digester digester, String path) I think that extending ActionServlet and overriding its methods is generally not recommended. I would just submit a feature request, if I were you, and go with a list for right now. Just my 2 cents. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: errorStyleClass not working
a) Have you checked your output to make sure the class is set in the html when an error occurs? b) What is the CSS you specify for that "errormsg" style definition? c) Have you embedded your style definition in the web page to ensure it is loaded properly? FireFox has a good plugin called "web developer" that includes a live CSS editor so you can make sure your css is loaded and "adjust" it to see how different changes alter your page appearance. Regards, David >From: "fea jabi" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: user@struts.apache.org >Subject: errorStyleClass not working >Date: Mon, 17 Jul 2006 11:44:49 -0400 > >... > > > > > " >errorStyleClass="errormsg"/> > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to Pass a Textfield Value as a c:param to a Link using c:url?
Make sure your text field is defined inside an HTML form. Make sure you have proper taglib directives on top of your JSP page, for example, for html-el tags. Get an HTTP sniffer and see what is sent from browser when you submit a form. If you use Firefox, get Live HTTP Header extension. On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> wrote: I am not talking about submit a JSP, perform some action, and return a JSP. I submit the textfield, and I used System.out.println in my action class to write out the value submitted. I got a blank. Therefore, something must go wrong. --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> > wrote: > > I must have done someting wrong. > > > > I tried to pass the value entered in a textfield: > > > > > > to a link this way: > > var="ascFirstName"> > > > value="${searchFirstName}" /> > > > > > > and in my action class, I have > > String firstName = request.getParameter( > > "searchFirstName" ); > > > > I tried to print out the firstName, I got a blank! > > > > Please advise what went wrong. > > JSP tags are processed *on server*. For your setup > to work you need to > submit a pag with property="searchFirstName" /> to the > server first, read value from request parameter and > stick it into > appropriate scope under "searchFirstName" name. > > Then, when you forward to JSP from your action, > JSP/servlet engine > will process JSP tags, still *on server*. It will > read > "searchFirstName" from servlet scope and write out > its value into > generated HTML markup. Then resulting HTML page will > be sent to > browser. > > If you want to do the whole thing on client, use > HTML form and submit > it with GET method. This way form fields will be > appended to "action" > URL, exactly as you wanted. > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to Pass a Textfield Value as a c:param to a Link using c:url?
I am not talking about submit a JSP, perform some action, and return a JSP. I submit the textfield, and I used System.out.println in my action class to write out the value submitted. I got a blank. Therefore, something must go wrong. --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> > wrote: > > I must have done someting wrong. > > > > I tried to pass the value entered in a textfield: > > > > > > to a link this way: > > var="ascFirstName"> > > > value="${searchFirstName}" /> > > > > > > and in my action class, I have > > String firstName = request.getParameter( > > "searchFirstName" ); > > > > I tried to print out the firstName, I got a blank! > > > > Please advise what went wrong. > > JSP tags are processed *on server*. For your setup > to work you need to > submit a pag with property="searchFirstName" /> to the > server first, read value from request parameter and > stick it into > appropriate scope under "searchFirstName" name. > > Then, when you forward to JSP from your action, > JSP/servlet engine > will process JSP tags, still *on server*. It will > read > "searchFirstName" from servlet scope and write out > its value into > generated HTML markup. Then resulting HTML page will > be sent to > browser. > > If you want to do the whole thing on client, use > HTML form and submit > it with GET method. This way form fields will be > appended to "action" > URL, exactly as you wanted. > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to Pass a Textfield Value as a c:param to a Link using c:url?
On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> wrote: I must have done someting wrong. I tried to pass the value entered in a textfield: to a link this way: and in my action class, I have String firstName = request.getParameter( "searchFirstName" ); I tried to print out the firstName, I got a blank! Please advise what went wrong. JSP tags are processed *on server*. For your setup to work you need to submit a pag with to the server first, read value from request parameter and stick it into appropriate scope under "searchFirstName" name. Then, when you forward to JSP from your action, JSP/servlet engine will process JSP tags, still *on server*. It will read "searchFirstName" from servlet scope and write out its value into generated HTML markup. Then resulting HTML page will be sent to browser. If you want to do the whole thing on client, use HTML form and submit it with GET method. This way form fields will be appended to "action" URL, exactly as you wanted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to Pass a Textfield Value as a c:param to a Link using c:url?
I must have done someting wrong. I tried to pass the value entered in a textfield: to a link this way: and in my action class, I have String firstName = request.getParameter( "searchFirstName" ); I tried to print out the firstName, I got a blank! Please advise what went wrong. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing messages. from action, dao classes.
Anil- In your action, you already have access to the resource properties file. In any member method, as long as you have an instance of the request object, you can say: // get the resources for this action servlet MessageResources resources = this.getResources(request); to retrieve the MR for whatever module your action is a part of. Then, you can call resources.getMessage("the.name.of.the.key.in.the.properties.file") to retrieve your i18n property. Cheers, -Adam Anil Kumar T wrote: Hi guys, I would like ot know how to acess the resource properties from an action class or subsequent DAO classes. Any help, links etc would be great. Thanks & regards, Anil. Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Validator it does not reload request attributes
Kim- I had the same problem with some static form elements (e.g. contents of list boxes that were not part of any model data I cared to keep, yet it needed to be in the JSP page.) One solution I found was to set the properties on the session, but I decided that that was unnecessarily cluttering up the session and since only one form needed it was overkill. Note the method signature of the validate(...) method in your ValidatorFormBean (or DynaForm...): public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { // will not return null ActionErrors errors = super.validate(mapping, request); ... } It takes a HttpServletRequest object. Thus, you can set any attributes or parameters you need to on the request after a failed (or even successful) validation. What I do is if the validation fails (the ActionErrors instance will not be empty - use this as your flag) and I set the parameters to populate the static form content widgets in my JSP so when the JSP page is reloaded with the error messages displayed, it displays correctly. Doing this avoids two things: I'm not storing non-bean data in my bean and the data is segregated from the rest of the web container because it's only available to the request. Now, if your situation differs, you can set it on the session instead and all your JSP pages will have access to the content. Hope this helps. Cheers, -Adam Kim Brianne Go wrote: Good Day, I was just wondering if anyone has a clue on how to retain request values ( request.setAttribute()) forwarded to a jsp form page and once a form has been submitted or validated then returns with error messages the values from request.setAttribute() is no longer accessible. Here's an example... A form has an OptionsCollections populated using the request.setAttribute()... from an action class. I applied the Validator (Server-side) to perform input validations, everything works well aside from the problem specific to the OptionCollections... since it requires the values sent to the jsp page prior to submission and validation. A temporary solution was to put the OptionsCollections inside the bean:present tag to avoid disrupting the entire page's execution. But this is not acceptable in practice since the input field that requires OptionsCollections is necessary. Does anyone have an idea how to go about this aside from doing a bean:present or putting the values in session? Thanks, Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with Validator it does not reload request attributes
Hey have a attribute called "firsttime" in form bean. set it to "true" inside validate() in formbean. Now in jsp check whether the value of the firsttime is true or not() if its true set all the original values to the formbeam properties( mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 10:23 AM To: Struts Users Mailing List Subject: Problem with Validator it does not reload request attributes Good Day, I was just wondering if anyone has a clue on how to retain request values ( request.setAttribute()) forwarded to a jsp form page and once a form has been submitted or validated then returns with error messages the values from request.setAttribute() is no longer accessible. Here's an example... A form has an OptionsCollections populated using the request.setAttribute()... from an action class. I applied the Validator (Server-side) to perform input validations, everything works well aside from the problem specific to the OptionCollections... since it requires the values sent to the jsp page prior to submission and validation. A temporary solution was to put the OptionsCollections inside the bean:present tag to avoid disrupting the entire page's execution. But this is not acceptable in practice since the input field that requires OptionsCollections is necessary. Does anyone have an idea how to go about this aside from doing a bean:present or putting the values in session? Thanks, Brian Notice: All email and instant messages (including attachments) sent to or from Franklin Templeton Investments (FTI) personnel may be retained, monitored and/or reviewed by FTI and its agents, or authorized law enforcement personnel, without further notice or consent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Accessing messages. from action, dao classes.
Hi guys, I would like ot know how to acess the resource properties from an action class or subsequent DAO classes. Any help, links etc would be great. Thanks & regards, Anil. Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records.
Re: Java Source Compare utility
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Is there any open source Java source comparision utility, Winmerge http://winmerge.sourceforge.net KDiff http://kdiff3.sourceforge.net - - Chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEvj1/kv8rKBUE/T4RAphEAJ9Mveld4opHSYdnblkZ1v8Xw2AobwCcDgSO M37LBtqwRyGfuu25X26eSUk= =C5iZ -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Source Compare utility
Compare It! from www.Grigsoft.com -Original Message- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: 19 July 2006 14:56 To: Struts Users Mailing List Subject: Re: Java Source Compare utility what about old plain diff? or fc in windows world. and of course each ide brings one. leon On 7/19/06, Romuald this i forgot <[EMAIL PROTECTED]> wrote: > u think of CVS may be ? > we use this one for a java project : > http://www.tortoisecvs.org/ > > > > > On 7/19/06, Antonio Petrelli <[EMAIL PROTECTED]> wrote: > > > > Ashish Kulkarni ha scritto: > > > Hi > > > Is there any open source Java source comparision utility, I have 2 > > > versions of smae code and want to find what are the excat changes, > > > Thanx Ashish > > > > > Eclipse? > > > > > > - 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] This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java Source Compare utility
what about old plain diff? or fc in windows world. and of course each ide brings one. leon On 7/19/06, Romuald this i forgot <[EMAIL PROTECTED]> wrote: u think of CVS may be ? we use this one for a java project : http://www.tortoisecvs.org/ On 7/19/06, Antonio Petrelli <[EMAIL PROTECTED]> wrote: > > Ashish Kulkarni ha scritto: > > Hi > > Is there any open source Java source comparision utility, > > I have 2 versions of smae code and want to find what are the excat > > changes, > > Thanx > > Ashish > > > Eclipse? > > - > 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: Java Source Compare utility
u think of CVS may be ? we use this one for a java project : http://www.tortoisecvs.org/ On 7/19/06, Antonio Petrelli <[EMAIL PROTECTED]> wrote: Ashish Kulkarni ha scritto: > Hi > Is there any open source Java source comparision utility, > I have 2 versions of smae code and want to find what are the excat > changes, > Thanx > Ashish > Eclipse? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java Source Compare utility
On 7/19/06, Ashish Kulkarni <[EMAIL PROTECTED]> wrote: Is there any open source Java source comparision utility, I have 2 versions of smae code and want to find what are the excat changes, Clirr? http://clirr.sourceforge.net/ It's fine to ask non-Struts-related questions occasionally, but please add [OT] to your subject line so people can filter out off-topic posts if they want to. Thanks, -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java Source Compare utility
Ashish Kulkarni ha scritto: Hi Is there any open source Java source comparision utility, I have 2 versions of smae code and want to find what are the excat changes, Thanx Ashish Eclipse? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Java Source Compare utility
Hi Is there any open source Java source comparision utility, I have 2 versions of smae code and want to find what are the excat changes, Thanx Ashish
RE: logic tags for "" and null check
I am getting below error if i use value=""> Error: Attribute: value is not a valid attribute name -Original Message- From: Li [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 5:39 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: logic tags for "" and null check If it is submitted as action form, you can do it in your action form validate method, or you can use two logic tag do me On 7/19/06, Raghuveer <[EMAIL PROTECTED] > wrote: Hi, Code below is to check for for Action messages assigned for property. But i am checking for scalar or nested property in ActionForm. I need to check if(strTemp!=null && !"".equalsIgnoreCase(strTemp )){ with logic tags. I have tried from Husted Site.But that doesn't work properly. Ted ,can you help me.!! -Original Message- From: Krishna, Hari [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 18, 2006 12:42 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: logic tags for "" and null check Hi use the following for null and empty check:) class="errhead4" With Best Regards, I.Hari krishna. Franklin Templeton Investments +91- 44 - 24407000 Extn:17123 -- -Original Message- From: Raghuveer [mailto: [EMAIL PROTECTED] Sent: Tuesday, July 18, 2006 12:22 PM To: user@struts.apache.org Subject: logic tags for "" and null check How to check below code for "" and not null checking using logic tags below code doesn't work if there is no value in database column. String strTemp =null; strTemp =""; if(strTemp!=null && !"".equalsIgnoreCase(strTemp )){ -- } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Notice: All email and instant messages (including attachments) sent to or from Franklin Templeton Investments (FTI) personnel may be retained, monitored and/or reviewed by FTI and its agents, or authorized law enforcement personnel, without further notice or consent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- When we invent time, we invent death.
RE: errorStyleClass not working
can someone help me with this please. Thanks. From: "fea jabi" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: user@struts.apache.org Subject: errorStyleClass not working Date: Mon, 17 Jul 2006 11:44:49 -0400 struts-config dynamic="true"> . JSP: requestURI="PrepareAction.do" > ... " errorStyleClass="errormsg"/> validation.xml depends="integer,validwhen"> test (*this* >= 0) the error messages does display at the top. But the input field is not highlighted. Need help with highlighting. Thanks. _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logic:messagesPresent not working for nestedProperty
Thanks for your response. I am doing the below in Dispatch Action ActionMessages messages = (ActionMessages)frm.validate( mapping, request ); if ( messages != null && !messages.isEmpty() ) { saveMessages(request, messages); return (mapping.findForward("validationFailed")); } Because it's Messages that I saved, probabaly have to give message="true" in the tags logic:messagesPresent and html:messages tags. Is that right?? Thanks. From: Laurie Harper <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: user@struts.apache.org Subject: Re: logic:messagesPresent not working for nestedProperty Date: Tue, 18 Jul 2006 16:41:51 -0400 It depends how the messages were generated. Struts keeps two sets of messages: errors and general messages. The 'messages' attribute allows you to select which set to examine. How are you generating the messages? L. fea jabi wrote: Thanks, that worked giving messages="true" on the logic:messagesPresent and html:messages tags But not sure when this has to be given? ActionMessages are saved have to give this??? Thanks. From: Laurie Harper <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: user@struts.apache.org Subject: Re: logic:messagesPresent not working for nestedProperty Date: Thu, 13 Jul 2006 15:39:03 -0400 Are you sure the messsges are stored as error messages? What happens if you include messages="true" on the logic:messagesPresent and html:messages tags? L. fea jabi wrote: Validator messages are not getting displayed in JSP. When debugged the code i.e JSP, I see the RequestAttributes does contain the ActionErrors object and the also the messages in it. the message has Key is ___ "hrs[1].adHrs" value is _ "lbl.notvalidnumber" have the below in the JSP What's missing here? Thanks. _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ FREE pop-up blocking with the new MSN Toolbar get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ FREE pop-up blocking with the new MSN Toolbar get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logic tags for "" and null check
If it is submitted as action form, you can do it in your action form validate method, or you can use two logic tag do me On 7/19/06, Raghuveer <[EMAIL PROTECTED]> wrote: Hi, Code below is to check for for Action messages assigned for property. But i am checking for scalar or nested property in ActionForm. I need to check if(strTemp!=null && !"".equalsIgnoreCase(strTemp )){ with logic tags. I have tried from Husted Site.But that doesn't work properly. Ted ,can you help me.!! -Original Message- From: Krishna, Hari [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 18, 2006 12:42 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: logic tags for "" and null check Hi use the following for null and empty check:) class="errhead4" With Best Regards, I.Hari krishna. Franklin Templeton Investments +91- 44 - 24407000 Extn:17123 -- -Original Message- From: Raghuveer [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 18, 2006 12:22 PM To: user@struts.apache.org Subject: logic tags for "" and null check How to check below code for "" and not null checking using logic tags below code doesn't work if there is no value in database column. String strTemp =null; strTemp =""; if(strTemp!=null && !"".equalsIgnoreCase(strTemp )){ -- } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Notice: All email and instant messages (including attachments) sent to or from Franklin Templeton Investments (FTI) personnel may be retained, monitored and/or reviewed by FTI and its agents, or authorized law enforcement personnel, without further notice or consent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- When we invent time, we invent death.
Multiple struts-config files with wildcards
Hello, I want to specify multiple struts-config files. But I don't want to use comma seperated list like config /WEB-INF/struts-config.xml, /WEB-INF/struts-config2.xml, /WEB-INF/struts-config3.xml I want to use wildcards. So it should look like this. config /WEB-INF/struts*, /WEB-INF/user/struts* Has anyone some hints ? I was thinking about extending org.apache.struts.action.ActionServlet and overwriting parseModuleConfigFile(Digester digester, String path) Thanks Volker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]