Re: html:messages
Thanks for replying me. am using struts 1.2 . how do i do it in struts 1.2 dusty wrote: > > In your action method use addActionMessage. Then in the jsp page use > to display the message(s) in the list. > > You will be using the MessageStoreInterceptor. If you are using 2.1.6 > make sure the "store" interceptor is in your stack in struts.xml. If you > are using an earlier version you need to register the interceptor and then > add it to your stack: > class="org.apache.struts2.interceptor.MessageStoreInterceptor"/> > > > ... > > AUTOMATIC > > > -D > > > m.harig wrote: >> >> hello all >> i've a new-user page (say new_user.jsp) . am inserting a new >> user into db. after inserting am mapping my page to new_user.jsp . what >> my doubt is i've to display a message "User created successfully". how >> do i do it? help me out of this please. >> note : am setting "redirect=true" in my >> struts-config.xml . If i don't set "redirect=true" it'll lead for >> duplicate entry on db. >> >> >> > > -- View this message in context: http://www.nabble.com/html%3Amessages-tp21556740p21557339.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: html:messages
In your action method use addActionMessage. Then in the jsp page use to display the message(s) in the list. You will be using the MessageStoreInterceptor. If you are using 2.1.6 make sure the "store" interceptor is in your stack in struts.xml. If you are using an earlier version you need to register the interceptor and then add it to your stack: ... AUTOMATIC -D m.harig wrote: > > hello all > i've a new-user page (say new_user.jsp) . am inserting a new > user into db. after inserting am mapping my page to new_user.jsp . what my > doubt is i've to display a message "User created successfully". how do i > do it? help me out of this please. > note : am setting "redirect=true" in my struts-config.xml > . If i don't set "redirect=true" it'll lead for duplicate entry on db. > > > -- View this message in context: http://www.nabble.com/html%3Amessages-tp21556740p21557132.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
html:messages
hello all i've a new-user page (say new_user.jsp) . am inserting a new user into db. after inserting am mapping my page to new_user.jsp . what my doubt is i've to display a message "User created successfully". how do i do it? help me out of this please. note : am setting "redirect=true" in my struts-config.xml . If i don't set "redirect=true" it'll lead for duplicate entry on db. -- View this message in context: http://www.nabble.com/html%3Amessages-tp21556740p21556740.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Common Resource bundles across web projects, ActionMessage and html:messages
When you use messages from an alternate (i.e. non default) message resources you need to specify the "bundle" attribute in the tag. So if you have something like this in your struts-config,xml: Then to use your "'GeneralMessages" in your jsp you specify bundle="common": I notice that you are storing your messages using a property of "Globals.MESSAGE_KEY" - often people get confused between the "property" the message is associated with in the ActionMessages object and the request attribute under which that ActionMessages object is stored. Globals.MESSAGE_KEY is usually used as the request attribute key - rather than the propery a message is associated with in ActionMessages. You may be wanting to store messages from different bundles in the same ActionMessages object. The only way to do this would be to store them under different "property" names in the ActionMessages and then use that property in the jsp tags to "filter" messages for a specific resources bundle: ActionMessages messages = new ActionMessages(); messages.add("defaultFoo", new ActionMessage(...); messages.add("commonBar", new ActionMessage(...); saveMessages(request, messages); then in your jsp: This is however a misuse of what property was designed for and it would be better to store messages from different bundles in different ActionMessages objects ActionMessages defaultMsgs = new ActionMessages(); defaultMsgs.add("foo", new ActionMessage(...); saveMessages(request, defaultMsgs); ActionMessages commonMsgs = new ActionMessages(); commonMsgs.add("bar", new ActionMessage(...); request.setAttribute("commonMsgs", commonMsgs); ...then in your jsp More info here http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html Niall On 3/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi all, > We are using the ActionMessage-s with replacement values. > > We want to divide the resource bundles so that we have a 'common-layout-jar' > which contains common messages in 'GeneralMessages.properties' and so the > application war itself contains *all application specific messages* in > 'ApplicationResources.properties', the last one set up as the default bundle > in struts-config.xml. > > Generally, it seems that resource bundle texts from the default bundle > *only* are accessible for an ActionMessage contructor by their key - (new > ActionMessage(String key, Object o);) > > Therefore, from our experience, all bundle texts with *replacement objects* > specifically, must be placed in the *default bundle*. > > If not, the ActionMessage contructor with key (or possibly the > tag) and replacement values does not play - and an > JspException is generated, see below. > > Does anyone have a solution to this, we want to refer *directly* to message > keys in common resource bundles instead of having to concatenating strings > manually. (That is the workaround we found to work if we insist on having > the common messages once and for all defined in the common layout jar.) > > Thanks! > > Regards, > Gudny H. > > --- > Code example: > In the Action-class: > ActionMessages messages = new ActionMessages(); > ActionMessage("general.textWithOneReplacementValue", > replacementValue); > messages.add(Globals.MESSAGE_KEY, msg); > > Message associated with the key in the resource bundle: >general.textWithOneReplacementValue= Some message with one replacement > value: '{0}' > > The JSP code we used for outputting the messages is: > > > > > If "general.textWithOneReplacementValue" property is placed in other than > the default bundle, this JspException is generated: > > 2006-03-16 10:45:03,779 ERROR [[/nims-web-5.0-SNAPSHOT].[action]] > Servlet.service() for servlet action threw exception > javax.servlet.jsp.JspException: Cannot find bean: "msg" in any scope. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Common Resource bundles across web projects, ActionMessage and html:messages
Title: Common Resource bundles across web projects, ActionMessage and html:messages Hi all, We are using the ActionMessage-s with replacement values. We want to divide the resource bundles so that we have a 'common-layout-jar' which contains common messages in 'GeneralMessages.properties' and so the application war itself contains *all application specific messages* in 'ApplicationResources.properties', the last one set up as the default bundle in struts-config.xml. Generally, it seems that resource bundle texts from the default bundle *only* are accessible for an ActionMessage contructor by their key - (new ActionMessage(String key, Object o);) Therefore, from our experience, all bundle texts with *replacement objects* specifically, must be placed in the *default bundle*. If not, the ActionMessage contructor with key (or possibly the tag) and replacement values does not play - and an JspException is generated, see below. Does anyone have a solution to this, we want to refer *directly* to message keys in common resource bundles instead of having to concatenating strings manually. (That is the workaround we found to work if we insist on having the common messages once and for all defined in the common layout jar.) Thanks! Regards, Gudny H. --- Code example: In the Action-class: ActionMessages messages = new ActionMessages(); ActionMessage("general.textWithOneReplacementValue", replacementValue); messages.add(Globals.MESSAGE_KEY, msg); Message associated with the key in the resource bundle: general.textWithOneReplacementValue= Some message with one replacement value: '{0}' The JSP code we used for outputting the messages is: <html:messages id="msg" message="true"> <bean:write name="msg" /><br/> html:messages> If "general.textWithOneReplacementValue" property is placed in other than the default bundle, this JspException is generated: 2006-03-16 10:45:03,779 ERROR [[/nims-web-5.0-SNAPSHOT].[action]] Servlet.service() for servlet action threw exception javax.servlet.jsp.JspException: Cannot find bean: "msg" in any scope. --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:messages or html:errors???
isn't deprecated - both and offer different ways of doing the same thing. When it comes to displaying a message against a single property, is easier and the issue of including markup in resource bundles doesn't arise. http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html Niall - Original Message - From: "Jubin Kuriakose" <[EMAIL PROTECTED]> Sent: Tuesday, March 14, 2006 3:04 AM Hi fea is deprecated as it doesn't allow html styling to the messages, the only way thats possible is through the reasource bundle which is bad design priciple. allow messages to be formatted using html. here is an eg. > > > > class="showstate" onClick="expandcontent(this, 'sc1')" /> > Message Queues > >name="fincoreMsgQueue"> > name="msgQueue"/> > > > > > > jubs On 3/13/06, fea jabi <[EMAIL PROTECTED]> wrote: > > Using struts 1.2.7 > > which one to use? html:messages or html:errors?? > > > I am using html:errors now and displaying errors for each property i.eusing > > > > > Just wondering why html:messages is available? when this tag can be used? > Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:messages or html:errors???
Hi fea is deprecated as it doesn't allow html styling to the messages, the only way thats possible is through the reasource bundle which is bad design priciple. allow messages to be formatted using html. here is an eg. > > > > class="showstate" onClick="expandcontent(this, 'sc1')" /> > Message Queues > >name="fincoreMsgQueue"> > name="msgQueue"/> > > > > > > jubs On 3/13/06, fea jabi <[EMAIL PROTECTED]> wrote: > > Using struts 1.2.7 > > which one to use? html:messages or html:errors?? > > > I am using html:errors now and displaying errors for each property i.eusing > > > > > Just wondering why html:messages is available? when this tag can be used? > Thanks. > > _ > Don't 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] > >
Re: html:messages or html:errors???
On 3/13/06, fea jabi <[EMAIL PROTECTED]> wrote: > Using struts 1.2.7 > > which one to use? html:messages or html:errors?? http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:messages or html:errors???
Using struts 1.2.7 which one to use? html:messages or html:errors?? I am using html:errors now and displaying errors for each property i.e using Just wondering why html:messages is available? when this tag can be used? 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]
html:messages
Greetings, I am unable to find a solution... even after searching... and waiting for the espresso to kick in. I have messages and would like to determine the number of messages in the bean. If there is more than one message format the output as a list or else just display the message. Unable to come up with something. This is what I am currently using: Any ideas would be greatly appreciated ! - Glenn
html:messages not displaying all messages
I have the following in an action class: msgs.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("This is an Action-inserted error",false)); msgs.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("So is this",false)); addErrors(request,msgs); (Notice that I'm trying out the resource-free ActionMessage from 1.2.7) Using as follows, I only get the first message: If I just use , I get both messages. Am I missing something with ? -- Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:messages help
To answer my own question, in this case I was able to remove the redirect attribute and everything works. If I couldn't do that I would have had to stick the messages in the session. Thanks, Ross Ross Gibb wrote: Hi Daniel, Ah yes, that was exactly it, thanks. It may have taken me a long time to figure that out. To save me even more time what was your solution? The global forward I am forwarding to looks like the following in struts-config.xml: I want to display a message at the top using html:messages. I seem to recall needing the redirect set to true but I can't remember why. Is that affecting it? Thanks, Ross Daniel Henrique Ferreira e Silva wrote: Hi Ross, I know this maybe can't make any sense but i got this problem once due to some mistakes handling scopes. Let me explain: I had an Action instance that did some stuff and in case of errors, put them all in the request and forward to the next view. But my next view was a forward action (a global forward) to a jsp error page. So, when the forward action was executed, the messages saved in the request were lost, resulting in no error messages rendered in my jsp page. May this be your situation? Hope that helped. Cheers, Daniel Silva. On 7/12/05, Ross Gibb <[EMAIL PROTECTED]> wrote: This could be something. I do have the taglib definition but I am using the el version, so mine looks like this: <%@ taglib uri="http://jakarta.apache.org/struts/tags-html-el"; prefix="html"%> Would that make a difference? I will try it the other way. Brad Balmer wrote: Any chance that you are missing the include for struts-html? <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> Granted I'm using 1.2, but I'm still using the saveMessages(request, messages) and using this to display messages and errors: Ross Gibb wrote: Hi, Thanks for the response, but no dice, still doesn't work. I changed the jsp to the following: I am using Struts 1.1 so I don't have access to addMessages(). Any other suggestions? Thanks, Ross Yan Hu wrote: if (!messages.isEmpty()) saveMessages(request, messages); use addMessages(). saveMessages has been deprecated. You left out the "message" attribute. Set it to "true". - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:messages help
Hi Daniel, Ah yes, that was exactly it, thanks. It may have taken me a long time to figure that out. To save me even more time what was your solution? The global forward I am forwarding to looks like the following in struts-config.xml: I want to display a message at the top using html:messages. I seem to recall needing the redirect set to true but I can't remember why. Is that affecting it? Thanks, Ross Daniel Henrique Ferreira e Silva wrote: Hi Ross, I know this maybe can't make any sense but i got this problem once due to some mistakes handling scopes. Let me explain: I had an Action instance that did some stuff and in case of errors, put them all in the request and forward to the next view. But my next view was a forward action (a global forward) to a jsp error page. So, when the forward action was executed, the messages saved in the request were lost, resulting in no error messages rendered in my jsp page. May this be your situation? Hope that helped. Cheers, Daniel Silva. On 7/12/05, Ross Gibb <[EMAIL PROTECTED]> wrote: This could be something. I do have the taglib definition but I am using the el version, so mine looks like this: <%@ taglib uri="http://jakarta.apache.org/struts/tags-html-el"; prefix="html"%> Would that make a difference? I will try it the other way. Brad Balmer wrote: Any chance that you are missing the include for struts-html? <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> Granted I'm using 1.2, but I'm still using the saveMessages(request, messages) and using this to display messages and errors: Ross Gibb wrote: Hi, Thanks for the response, but no dice, still doesn't work. I changed the jsp to the following: I am using Struts 1.1 so I don't have access to addMessages(). Any other suggestions? Thanks, Ross Yan Hu wrote: if (!messages.isEmpty()) saveMessages(request, messages); use addMessages(). saveMessages has been deprecated. You left out the "message" attribute. Set it to "true". - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:messages help
Hi Ross, I know this maybe can't make any sense but i got this problem once due to some mistakes handling scopes. Let me explain: I had an Action instance that did some stuff and in case of errors, put them all in the request and forward to the next view. But my next view was a forward action (a global forward) to a jsp error page. So, when the forward action was executed, the messages saved in the request were lost, resulting in no error messages rendered in my jsp page. May this be your situation? Hope that helped. Cheers, Daniel Silva. On 7/12/05, Ross Gibb <[EMAIL PROTECTED]> wrote: > This could be something. I do have the taglib definition but I am using > the el version, so mine looks like this: > > <%@ taglib uri="http://jakarta.apache.org/struts/tags-html-el"; > prefix="html"%> > > Would that make a difference? I will try it the other way. > > > > Brad Balmer wrote: > > > Any chance that you are missing the include for struts-html? > > > > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > > > > Granted I'm using 1.2, but I'm still using the saveMessages(request, > > messages) and using this to display messages and errors: > > > > > > > > > > > > > footer="message.footer"> > > > > > > > > Ross Gibb wrote: > > > >> Hi, > >> > >> Thanks for the response, but no dice, still doesn't work. I changed > >> the jsp to the following: > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> I am using Struts 1.1 so I don't have access to addMessages(). > >> > >> Any other suggestions? > >> > >> Thanks, > >> > >> Ross > >> > >> Yan Hu wrote: > >> > if (!messages.isEmpty()) > saveMessages(request, messages); > > >>> > >>> > >>> use addMessages(). saveMessages has been deprecated. > >>> > >>> > >>> > >>> > >>> > > > > > > > >>> > >>> > >>> > >>> You left out the "message" attribute. Set it to "true". > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> - > >>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> For additional commands, e-mail: [EMAIL PROTECTED] > >>> > >>> > >>> > >>> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > 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: html:messages help
This could be something. I do have the taglib definition but I am using the el version, so mine looks like this: <%@ taglib uri="http://jakarta.apache.org/struts/tags-html-el"; prefix="html"%> Would that make a difference? I will try it the other way. Brad Balmer wrote: Any chance that you are missing the include for struts-html? <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> Granted I'm using 1.2, but I'm still using the saveMessages(request, messages) and using this to display messages and errors: footer="message.footer"> Ross Gibb wrote: Hi, Thanks for the response, but no dice, still doesn't work. I changed the jsp to the following: I am using Struts 1.1 so I don't have access to addMessages(). Any other suggestions? Thanks, Ross Yan Hu wrote: if (!messages.isEmpty()) saveMessages(request, messages); use addMessages(). saveMessages has been deprecated. You left out the "message" attribute. Set it to "true". - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:messages help
Any chance that you are missing the include for struts-html? <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> Granted I'm using 1.2, but I'm still using the saveMessages(request, messages) and using this to display messages and errors: footer="message.footer"> Ross Gibb wrote: Hi, Thanks for the response, but no dice, still doesn't work. I changed the jsp to the following: I am using Struts 1.1 so I don't have access to addMessages(). Any other suggestions? Thanks, Ross Yan Hu wrote: if (!messages.isEmpty()) saveMessages(request, messages); use addMessages(). saveMessages has been deprecated. You left out the "message" attribute. Set it to "true". - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:messages help
Hi, Thanks again but still not working. I tried as you suggested. I don't think it is a problem with the tag anyway because when I look at what the browser gets I see And not Anyway, I will get the struts source and step through the html:messages code, perhaps there is something fishy going on in there. Ross Yan Hu wrote: Try the following... Don't forget to import struts-bean.tld <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> I think it is better to use struts-tags when possible since they were designed for Struts. - 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: html:messages help
Try the following... Don't forget to import struts-bean.tld <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> I think it is better to use struts-tags when possible since they were designed for Struts. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:messages help
Hi, Thanks for the response, but no dice, still doesn't work. I changed the jsp to the following: I am using Struts 1.1 so I don't have access to addMessages(). Any other suggestions? Thanks, Ross Yan Hu wrote: if (!messages.isEmpty()) saveMessages(request, messages); use addMessages(). saveMessages has been deprecated. You left out the "message" attribute. Set it to "true". - 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: html:messages help
> > if (!messages.isEmpty()) > saveMessages(request, messages); use addMessages(). saveMessages has been deprecated. > > > > > You left out the "message" attribute. Set it to "true". - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:messages help
Hi, I am having trouble getting messages to display using the html:messages tag. I have tried to help myself and followed the struts docs but I can't seem to get this to work. The html:errors tag works fine. Here's what I am trying to do: I have an action that is trying to add a global message if a certain action is successful. ActionMessages messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("mesg.pwResetSuccess")); if (!messages.isEmpty()) saveMessages(request, messages); forward = mapping.findForward(GLOBAL_FORWARDS.LOGIN); As you can see I create a messages object, stick my message in it as global and save it. This is pretty much verbatim from the struts user guide. I ran this through a debugger and all code is being executed. This forwards to a jsp page that has the following inside it: When the browser renders the page I get no messages. Any ideas? Thanks, Ross - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Html:messages vs html:errors
Hooray, I found it, thanks to Allen and Niall. Messages: Since it was finding messages present when it should, but wasn't finding the messages themselves, it should have dawned on me that if logic:messagesPresent needs to know if you are looking for message="true" so then the html:messages might need message="true" as well. So back to the grindstone, thanks again. Michael Oliver CTO Alarius Systems LLC 3325 N. Nellis Blvd, #1 Las Vegas, NV 89115 Phone:(702)643-7425 Fax:(702)974-0341 *Note new email changed from [EMAIL PROTECTED] -Original Message- From: Fogleson, Allen [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 12:25 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Html:messages vs html:errors Michael, Are you capturing exceptions in the jsp? (i.e. do you wrap a giant try catch block or something?) I ask this because it must be finding the message since if a key is not found you should get an exception along the lines of "Cannot find message resource for key " (I cant remember the exact text) and sorry I cant see your entire text. Can you forward the applicationResources file and the jsp mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 2:14 PM To: 'Struts Users Mailing List' Subject: RE: Html:messages vs html:errors Thanks, But ARG That wasn't it. I changed the however I am still not displaying any messages not even the ???null??? there are also no exceptions in the log. Is there some other package I can add a logger for that might yield a hint as to what's going on? Michael Oliver CTO Alarius Systems LLC 3325 N. Nellis Blvd, #1 Las Vegas, NV 89115 Phone:(702)643-7425 Fax:(702)974-0341 *Note new email changed from [EMAIL PROTECTED] -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 11:30 AM To: Struts Users Mailing List Subject: Re: Html:messages vs html:errors The problem is with how you've configured your messages resources. Because you've specified a key your message resources are not being stored under the "default" messages resources key. There being stored under the bundle key "ApplicationResources". You just need to remove that (and the id, its unnecessary) and have the following... If you do specify a "key" value in the element, then you need to use the same value in the "bundle" attribute of the JSP tags, something like the following should work with what you had set up... I'm going to post an update to the page I originally put up which includes info on this - I'll post to the list when its ready. Niall - Original Message - From: "Michael Oliver" <[EMAIL PROTECTED]> Sent: Wednesday, April 06, 2005 5:12 PM > Still not displaying messages, here is what I have so far. > > struts-config.xml entry: > > > ... > null="false" parameter="ApplicationResources"/> > ... > > The ApplicationResources.properties file is located at > > /WEB-INF/classes/ApplicationResources.properties > > it contains: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Html:messages vs html:errors
Michael, Are you capturing exceptions in the jsp? (i.e. do you wrap a giant try catch block or something?) I ask this because it must be finding the message since if a key is not found you should get an exception along the lines of "Cannot find message resource for key " (I cant remember the exact text) and sorry I cant see your entire text. Can you forward the applicationResources file and the jsp mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 2:14 PM To: 'Struts Users Mailing List' Subject: RE: Html:messages vs html:errors Thanks, But ARG That wasn't it. I changed the however I am still not displaying any messages not even the ???null??? there are also no exceptions in the log. Is there some other package I can add a logger for that might yield a hint as to what's going on? Michael Oliver CTO Alarius Systems LLC 3325 N. Nellis Blvd, #1 Las Vegas, NV 89115 Phone:(702)643-7425 Fax:(702)974-0341 *Note new email changed from [EMAIL PROTECTED] -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 11:30 AM To: Struts Users Mailing List Subject: Re: Html:messages vs html:errors The problem is with how you've configured your messages resources. Because you've specified a key your message resources are not being stored under the "default" messages resources key. There being stored under the bundle key "ApplicationResources". You just need to remove that (and the id, its unnecessary) and have the following... If you do specify a "key" value in the element, then you need to use the same value in the "bundle" attribute of the JSP tags, something like the following should work with what you had set up... I'm going to post an update to the page I originally put up which includes info on this - I'll post to the list when its ready. Niall - Original Message - From: "Michael Oliver" <[EMAIL PROTECTED]> Sent: Wednesday, April 06, 2005 5:12 PM > Still not displaying messages, here is what I have so far. > > struts-config.xml entry: > > > ... > null="false" parameter="ApplicationResources"/> > ... > > The ApplicationResources.properties file is located at > > /WEB-INF/classes/ApplicationResources.properties > > it contains: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Html:messages vs html:errors
Thanks, But ARG That wasn't it. I changed the however I am still not displaying any messages not even the ???null??? there are also no exceptions in the log. Is there some other package I can add a logger for that might yield a hint as to what's going on? Michael Oliver CTO Alarius Systems LLC 3325 N. Nellis Blvd, #1 Las Vegas, NV 89115 Phone:(702)643-7425 Fax:(702)974-0341 *Note new email changed from [EMAIL PROTECTED] -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 11:30 AM To: Struts Users Mailing List Subject: Re: Html:messages vs html:errors The problem is with how you've configured your messages resources. Because you've specified a key your message resources are not being stored under the "default" messages resources key. There being stored under the bundle key "ApplicationResources". You just need to remove that (and the id, its unnecessary) and have the following... If you do specify a "key" value in the element, then you need to use the same value in the "bundle" attribute of the JSP tags, something like the following should work with what you had set up... I'm going to post an update to the page I originally put up which includes info on this - I'll post to the list when its ready. Niall - Original Message - From: "Michael Oliver" <[EMAIL PROTECTED]> Sent: Wednesday, April 06, 2005 5:12 PM > Still not displaying messages, here is what I have so far. > > struts-config.xml entry: > > > ... > null="false" parameter="ApplicationResources"/> > ... > > The ApplicationResources.properties file is located at > > /WEB-INF/classes/ApplicationResources.properties > > it contains: - 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: Html:messages vs html:errors
The problem is with how you've configured your messages resources. Because you've specified a key your message resources are not being stored under the "default" messages resources key. There being stored under the bundle key "ApplicationResources". You just need to remove that (and the id, its unnecessary) and have the following... If you do specify a "key" value in the element, then you need to use the same value in the "bundle" attribute of the JSP tags, something like the following should work with what you had set up... I'm going to post an update to the page I originally put up which includes info on this - I'll post to the list when its ready. Niall - Original Message - From: "Michael Oliver" <[EMAIL PROTECTED]> Sent: Wednesday, April 06, 2005 5:12 PM > Still not displaying messages, here is what I have so far. > > struts-config.xml entry: > > > ... > null="false" parameter="ApplicationResources"/> > ... > > The ApplicationResources.properties file is located at > > /WEB-INF/classes/ApplicationResources.properties > > it contains: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Html:messages vs html:errors
Still not displaying messages, here is what I have so far. struts-config.xml entry: ... ... The ApplicationResources.properties file is located at /WEB-INF/classes/ApplicationResources.properties it contains: ... label.phone.number=Phone Number label.welcome=Welcome back {0} {1}\! message.body={0} error.detail={0} error.min.length=The input must be at least {0} characters in length. error.max.length=The input cannot be longer than {0} characters in length. errors.required={0} is required. errors.invalid={0} is invalid. ... I have log4j setup with log4j.logger.org.apache.struts=DEBUG,A1,A2 and on startup the log4j related output is: 656 DEBUG [main] action.ActionServlet - Initializing module path '' message resources from 'ApplicationResources' 656 INFO [main] util.PropertyMessageResources - Initializing, config='ApplicationResources', returnNull=true I have an Action that forwards to a jsp, the action execute has: ... if (uri.indexOf("Al") >= 0){ ActionMessages messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("message.body",retStatus)); this.saveMessages(request, messages); } ... where uri is a string variable of the resource the action is looking at, and retStatus is a string that contains the status of the request. The jsp has near the top if the body tile Messages: ...the rest of the body When I test this setup, when the uri contains 'Al' I get the red "Messages:" as I suspect, but no list of messages under it. When I traverse a resource without the 'Al' in the uri, I do NOT get the red "Messages:". I have verified that xerces and the ApplicationResources are loaded from the Catalina log: 2005-04-06 09:00:02 WebappLoader[/AJDocMan]: Deploy JAR /WEB-INF/lib/struts.jar to C:\Java\ArchivedWorkspaces\AJDocMan\WebContent\WEB-INF\lib\struts.jar 2005-04-06 09:00:02 WebappLoader[/AJDocMan]: Deploy JAR /WEB-INF/lib/xercesImpl.jar to C:\Java\ArchivedWorkspaces\AJDocMan\WebContent\WEB-INF\lib\xercesImpl.ja r 2005-04-06 09:00:03 WebappLoader[/AJDocMan]: Deploy JAR /WEB-INF/lib/xmlParserAPIs.jar to C:\Java\ArchivedWorkspaces\AJDocMan\WebContent\WEB-INF\lib\xmlParserAPIs .jar 2005-04-06 09:00:03 ContextConfig[/AJDocMan]:Adding path '/WEB-INF/lib/xercesImpl.jar' 2005-04-06 09:00:03 ContextConfig[/AJDocMan]:Adding path '/WEB-INF/lib/xmlParserAPIs.jar' 2005-04-06 09:00:07,500 DEBUG [main] action.ActionServlet (ActionServlet.java:1209) - Initializing module path '' message resources from 'ApplicationResources' 2005-04-06 09:00:07,500 INFO [main] util.PropertyMessageResources (PropertyMessageResources.java:127) - Initializing, config='ApplicationResources', returnNull=true These are the xerces-2_6_2 jars from the dist. What can I check next? Michael Oliver CTO Alarius Systems LLC 3325 N. Nellis Blvd, #1 Las Vegas, NV 89115 Phone:(702)643-7425 Fax:(702)974-0341 *Note new email changed from [EMAIL PROTECTED] -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 05, 2005 5:09 PM To: Struts Users Mailing List Subject: Re: Html:messages vs html:errors One cause of this is if it can't find the message key in your application resources and you have your message resources configured with null="true". If you change your message resources config to null="false" in your struts-config.xml Then if it can't find the message for some reason, you should get the following displayed. Messages: ???en_US.error.detail Another cause...do you have the taglib declaration for the html tags at the top of your page? Anyway, what you have looks good, just a matter of debugging which bits of struts are not configured properly. Nialll - Original Message - From: "Michael Oliver" <[EMAIL PROTECTED]> Sent: Wednesday, April 06, 2005 12:25 AM > I tried the example from the HelpTagsErrorsAndMessages.html in my jsp > near the top of the body. > > > >Messages: > > > > > > > > > The action that forwards to that jsp has: > > ActionErrors errors = new ActionErrors(); > errors.add(ActionErrors.GLOBAL_MESSAGE, new > ActionMessage("error.detail",retStatus)); > this.saveErrors(request, errors); > > where retStatus is a string. > > And in my ApplicationResources.properties I have > > error.detail={0} > > But when I run it I get > > org.apache.jasper.JasperException: Cannot find bean msg in any scope > ... > - Root Cause - > javax.servlet.ServletExceptio
Re: Html:messages vs html:errors
One cause of this is if it can't find the message key in your application resources and you have your message resources configured with null="true". If you change your message resources config to null="false" in your struts-config.xml Then if it can't find the message for some reason, you should get the following displayed. Messages: ???en_US.error.detail Another cause...do you have the taglib declaration for the html tags at the top of your page? Anyway, what you have looks good, just a matter of debugging which bits of struts are not configured properly. Nialll - Original Message - From: "Michael Oliver" <[EMAIL PROTECTED]> Sent: Wednesday, April 06, 2005 12:25 AM > I tried the example from the HelpTagsErrorsAndMessages.html in my jsp > near the top of the body. > > > >Messages: > > > > > > > > > The action that forwards to that jsp has: > > ActionErrors errors = new ActionErrors(); > errors.add(ActionErrors.GLOBAL_MESSAGE, new > ActionMessage("error.detail",retStatus)); > this.saveErrors(request, errors); > > where retStatus is a string. > > And in my ApplicationResources.properties I have > > error.detail={0} > > But when I run it I get > > org.apache.jasper.JasperException: Cannot find bean msg in any scope > ... > - Root Cause - > javax.servlet.ServletException: Cannot find bean msg in any scope - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Html:messages vs html:errors
I tried the example from the HelpTagsErrorsAndMessages.html in my jsp near the top of the body. Messages: The action that forwards to that jsp has: ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_MESSAGE, new ActionMessage("error.detail",retStatus)); this.saveErrors(request, errors); where retStatus is a string. And in my ApplicationResources.properties I have error.detail={0} But when I run it I get org.apache.jasper.JasperException: Cannot find bean msg in any scope ... - Root Cause - javax.servlet.ServletException: Cannot find bean msg in any scope ... Michael Oliver CTO Alarius Systems LLC 3325 N. Nellis Blvd, #1 Las Vegas, NV 89115 Phone:(702)643-7425 Fax:(702)974-0341 *Note new email changed from [EMAIL PROTECTED] -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 05, 2005 12:28 PM To: Struts Users Mailing List Subject: Re: Html:messages vs html:errors >From this and other messages I think you've got the wrong end of the stick regarding the tag. You can use either or with ActionMessage, its just down to personal preference. I've added a page comparing and here: http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html You can use either As for the validate method in your action form - then whether you use or the you can do something like the following... public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if () { errors.add("myProperty", new ActionMessage("myProperty.error")); } return errors; } Niall - Original Message - From: "Fergal O'Shea" <[EMAIL PROTECTED]> To: "'Riyaz Mansoor'" <[EMAIL PROTECTED]>; "'Struts Users Mailing List'" Sent: Tuesday, April 05, 2005 5:21 PM Subject: RE: Html:messages vs html:errors > > We don't seem to have struts-examples.war readily available here at work. > > Does anyone have an example of overriding an ActionForm's validate() method, > but using ActionMessage instead of ActionError (I presume you still have to > use a Collection of ActionErrors), and using html:messages instead of simple > old . > Specifically, how does one tie in the id parameter in html:messages with the > ActionErrors Collection returned by one's validate() method ? - 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: Html:messages vs html:errors
This seems to be one of the biggest problems for Struts users, I am still on 1.1 but had so much trouble with that I am sure moving to html:messages will be better, I too want to do that, but not finding what to do. Michael Oliver CTO Alarius Systems LLC 3325 N. Nellis Blvd, #1 Las Vegas, NV 89115 Phone:(702)643-7425 Fax:(702)974-0341 *Note new email changed from [EMAIL PROTECTED] -Original Message- From: Fergal O'Shea [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 05, 2005 9:22 AM To: 'Riyaz Mansoor'; 'Struts Users Mailing List' Subject: RE: Html:messages vs html:errors We don't seem to have struts-examples.war readily available here at work. Does anyone have an example of overriding an ActionForm's validate() method, but using ActionMessage instead of ActionError (I presume you still have to use a Collection of ActionErrors), and using html:messages instead of simple old . Specifically, how does one tie in the id parameter in html:messages with the ActionErrors Collection returned by one's validate() method ? > I'm a Struts newbie. A lot of the books and documentation I have on > Struts is pre 1.2 and uses html:errors and ActionErrors. Given > ActionErrors is deprecated, I'd like to use ActionMessages for some new JSPs I'm writing. the usage is the same. actionerrors are dependent on certain keys such as "error.prefix" that came with the messageresources file. messageresources have no such dependencies. have a look at the struts-examples.war. u'll see all u'll need there :) - 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: Html:messages vs html:errors
>From this and other messages I think you've got the wrong end of the stick regarding the tag. You can use either or with ActionMessage, its just down to personal preference. I've added a page comparing and here: http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html You can use either As for the validate method in your action form - then whether you use or the you can do something like the following... public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if () { errors.add("myProperty", new ActionMessage("myProperty.error")); } return errors; } Niall - Original Message - From: "Fergal O'Shea" <[EMAIL PROTECTED]> To: "'Riyaz Mansoor'" <[EMAIL PROTECTED]>; "'Struts Users Mailing List'" Sent: Tuesday, April 05, 2005 5:21 PM Subject: RE: Html:messages vs html:errors > > We don't seem to have struts-examples.war readily available here at work. > > Does anyone have an example of overriding an ActionForm's validate() method, > but using ActionMessage instead of ActionError (I presume you still have to > use a Collection of ActionErrors), and using html:messages instead of simple > old . > Specifically, how does one tie in the id parameter in html:messages with the > ActionErrors Collection returned by one's validate() method ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Html:messages vs html:errors
We don't seem to have struts-examples.war readily available here at work. Does anyone have an example of overriding an ActionForm's validate() method, but using ActionMessage instead of ActionError (I presume you still have to use a Collection of ActionErrors), and using html:messages instead of simple old . Specifically, how does one tie in the id parameter in html:messages with the ActionErrors Collection returned by one's validate() method ? > I'm a Struts newbie. A lot of the books and documentation I have on > Struts is pre 1.2 and uses html:errors and ActionErrors. Given > ActionErrors is deprecated, I'd like to use ActionMessages for some new JSPs I'm writing. the usage is the same. actionerrors are dependent on certain keys such as "error.prefix" that came with the messageresources file. messageresources have no such dependencies. have a look at the struts-examples.war. u'll see all u'll need there :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Html:messages vs html:errors
Here are wiki topics that discuss this: http://wiki.apache.org/struts/StrutsDeprecatedActionErrors http://wiki.apache.org/struts/ActionErrorsAndActionMessages Hubert On Apr 5, 2005 8:18 AM, Fergal O'Shea <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm a Struts newbie. A lot of the books and documentation I have on Struts > is pre 1.2 and uses html:errors and ActionErrors. Given ActionErrors is > deprecated, I'd like to use ActionMessages for some new JSPs I'm writing. > > Does anyone know of links to more up-to-date articles or documentation > discussing the transition from Errors to Messages, what's similar and what > has changed ? > I've looked at the Apache website, but it mostly still seems to talk in > terms of ActionErrors. > > TIA, > > Fergal > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Html:messages vs html:errors
> I'm a Struts newbie. A lot of the books and documentation I have on Struts > is pre 1.2 and uses html:errors and ActionErrors. Given ActionErrors is > deprecated, I'd like to use ActionMessages for some new JSPs I'm writing. the usage is the same. actionerrors are dependent on certain keys such as "error.prefix" that came with the messageresources file. messageresources have no such dependencies. have a look at the struts-examples.war. u'll see all u'll need there :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Html:messages vs html:errors
Hi, I'm a Struts newbie. A lot of the books and documentation I have on Struts is pre 1.2 and uses html:errors and ActionErrors. Given ActionErrors is deprecated, I'd like to use ActionMessages for some new JSPs I'm writing. Does anyone know of links to more up-to-date articles or documentation discussing the transition from Errors to Messages, what's similar and what has changed ? I've looked at the Apache website, but it mostly still seems to talk in terms of ActionErrors. TIA, Fergal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Indentation using html:messages tag
So you are looking for something like this First Name Required Max Length Last Name Required Hard to help unless we know what you are looking for? Nathan On Jul 30, 2004, at 3:08 AM, Suresh S wrote: Hi, OK, i got what you r trying to say .But the problem is the errors in the list are need to be displayed from the bundle whereas the Title is user entered . Thanx Suresh S On Fri, 2004-07-30 at 14:24, Suresh S wrote: Hi , Thanks for the quick reply.But still i will be having problem in identifying which is Title and Error. i need to achieve something like this Title 1 * error1 * error 2 Title 2 * error1 * error2 Title n * error1 * error2 Thanx Suresh S On Fri, 2004-07-30 at 13:27, Erdem Ergin wrote: hi; While you are generating your action messages you can use a format which is specified in your message resource file. Simple usage: ... msg = new ActionMessage("<>", "stop"); messages.add("message2", msg) ... and in jsp use: which writes all the messages Detailed example can be found at: http://javaboutique.internet.com/tutorials/excep_struts/index-2.html Erdem -Original Message- From: Suresh S [mailto:[EMAIL PROTECTED] Sent: Fri 7/30/2004 10:38 AM To: Struts Users Mailing List Subject: Indentation using html:messages tag hi friends, I have a problem in displaying validation messages in using messages> tag can some one help me on this? this is the problem i need to display the validation messages in following format. Title 1 * error1 * error 2 Title 2 * error1 * error2 Title n * error1 * error2 The problem here is all the contents are dynamic including the title name . Thanks in advance for your suggestions.Pls reply asap Thanx Suresh S _ _ - 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: Indentation using html:messages tag
Hi, OK, i got what you r trying to say .But the problem is the errors in the list are need to be displayed from the bundle whereas the Title is user entered . Thanx Suresh S On Fri, 2004-07-30 at 14:24, Suresh S wrote: > Hi , > Thanks for the quick reply.But still i will be having problem in > identifying which is Title and Error. > > i need to achieve something like this > > Title 1 > > > * error1 > > * error 2 > > Title 2 > >* error1 > >* error2 > > > > > > Title n > >* error1 > >* error2 > > Thanx > Suresh S > > > On Fri, 2004-07-30 at 13:27, Erdem Ergin wrote: > > > hi; > > > > While you are generating your action messages you can use a format which is > > specified in your message resource file. > > > > Simple usage: > > ... > > msg = new ActionMessage("<>", "stop"); > > messages.add("message2", msg) > > ... > > > > and in jsp use: > > > > > > > > > > > > which writes all the messages > > > > Detailed example can be found at: > > http://javaboutique.internet.com/tutorials/excep_struts/index-2.html > > > > Erdem > > > > -Original Message- > > From: Suresh S [mailto:[EMAIL PROTECTED] > > Sent: Fri 7/30/2004 10:38 AM > > To: Struts Users Mailing List > > Subject: Indentation using html:messages tag > > > > hi friends, > > > > I have a problem in displaying validation messages in using > messages> tag can some one help me on this? this is the problem i need > > to display the validation messages in following format. > > > > Title 1 > > * error1 > > * error 2 > > Title 2 > >* error1 > >* error2 > > > > > > Title n > >* error1 > >* error2 > > > > > > The problem here is all the contents are dynamic including the title > > name . Thanks in advance for your suggestions.Pls reply asap > > > > Thanx > > Suresh S > > > > > > > > > > > > > > > > __ > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED]
RE: Indentation using html:messages tag
Hi , Thanks for the quick reply.But still i will be having problem in identifying which is Title and Error. i need to achieve something like this Title 1 > * error1 > * error 2 > Title 2 >* error1 >* error2 > > > Title n >* error1 >* error2 Thanx Suresh S On Fri, 2004-07-30 at 13:27, Erdem Ergin wrote: > hi; > > While you are generating your action messages you can use a format which is > specified in your message resource file. > > Simple usage: > ... > msg = new ActionMessage("<>", "stop"); > messages.add("message2", msg) > ... > > and in jsp use: > > > > > > which writes all the messages > > Detailed example can be found at: > http://javaboutique.internet.com/tutorials/excep_struts/index-2.html > > Erdem > > -Original Message- > From: Suresh S [mailto:[EMAIL PROTECTED] > Sent: Fri 7/30/2004 10:38 AM > To: Struts Users Mailing List > Subject: Indentation using html:messages tag > > hi friends, > > I have a problem in displaying validation messages in using messages> tag can some one help me on this? this is the problem i need > to display the validation messages in following format. > > Title 1 > * error1 > * error 2 > Title 2 >* error1 >* error2 > > > Title n >* error1 >* error2 > > > The problem here is all the contents are dynamic including the title > name . Thanks in advance for your suggestions.Pls reply asap > > Thanx > Suresh S > > > > > > > > __ > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]
RE: Indentation using html:messages tag
hi; While you are generating your action messages you can use a format which is specified in your message resource file. Simple usage: ... msg = new ActionMessage("<>", "stop"); messages.add("message2", msg) ... and in jsp use: which writes all the messages Detailed example can be found at: http://javaboutique.internet.com/tutorials/excep_struts/index-2.html Erdem -Original Message- From: Suresh S [mailto:[EMAIL PROTECTED] Sent: Fri 7/30/2004 10:38 AM To: Struts Users Mailing List Subject: Indentation using html:messages tag hi friends, I have a problem in displaying validation messages in using tag can some one help me on this? this is the problem i need to display the validation messages in following format. Title 1 * error1 * error 2 Title 2 * error1 * error2 Title n * error1 * error2 The problem here is all the contents are dynamic including the title name . Thanks in advance for your suggestions.Pls reply asap Thanx Suresh S - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Indentation using html:messages tag
hi friends, I have a problem in displaying validation messages in using tag can some one help me on this? this is the problem i need to display the validation messages in following format. Title 1 * error1 * error 2 Title 2 * error1 * error2 Title n * error1 * error2 The problem here is all the contents are dynamic including the title name . Thanks in advance for your suggestions.Pls reply asap Thanx Suresh S
Re: Html:messages tag (Resolved)
I did elaborate in a code snippets. The tag is designed to have a body, and process it iteratively - in your example it will iterate over all messages with a property "x" processing the body of the tag for each message it finds. The reason your code works is by accident - it stores each message under the page scope variable you specify - it just so happens that after its finished processing its body the last one still exists - making your code work (sort of) - but if you removed the tage you would end up with "Msg=" being displayed when there were no messages. In your code the tag has no body - in mine id does My suggesstion was that you should replace Msg= With the following. Msg= Niall - Original Message - From: "Betty Koon" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Thursday, June 17, 2004 3:19 AM Subject: RE: Html:messages tag (Resolved) > I am sorry but I am not clear on what suggestion? Can you elaborate your > suggestion in code snippnet. Thanks. > In my case, I am sure, I will only have 1 message set up for property x. > > -Betty > > > -Original Message- > From: Niall Pemberton [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 16, 2004 7:18 PM > To: Struts Users Mailing List > Subject: Re: Html:messages tag (Resolved) > > > This isn't the correct way to use . > > It iterates over either all the messages (if you don't specify a property) > or all messages for a property storing each message as a page scope > variable. The way your using it it will only display the last message (try > putting two messages for property "x") - you should really have a closing > tag: > > > Msg= > > > Also if you do it this way there's no need for the > tag, unless you want to display some other markup around your errors, such > as > > > > The following errors have occured: > > > > Msg= > > > > > > Niall > > - Original Message - > From: "Betty Koon" <[EMAIL PROTECTED]> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > Sent: Thursday, June 17, 2004 1:33 AM > Subject: RE: Html:messages tag (Resolved) > > > > I didn't know I have to do the following: > message="true"> > > Msg= > > > > > > -Betty > > > > > > -Original Message- > > From: Betty Koon [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 16, 2004 5:31 PM > > To: 'Struts Users Mailing List' > > Subject: RE: Html:messages tag > > > > > > I did, it doesn't help. Nothing get printed out at all. > > > > -Betty > > > > -Original Message- > > From: Chris Cranford [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 16, 2004 5:27 PM > > To: Struts Users Mailing List > > Subject: Re: Html:messages tag > > > > > > Have you tried removing "property" from the messages tag to see if the > > message you're wanting to print out exists in the collection at all ? > > > > Hope this helps! > > Chris > > > > - Original Message - > > From: "Betty Koon" <[EMAIL PROTECTED]> > > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > > Sent: Wednesday, June 16, 2004 8:19 PM > > Subject: Html:messages tag > > > > > > > Hi All, > > > > > > I seem not to be able to get html:message print out the message I > > > set up > > in > > > the action at all. > > > I have looked at the request attribute, it does contain the > > > ActionMessages and I was able to retrieve the message for a > > > particular property in my > > JSP, > > > but the tag just doesn't work. > > > > > > Here is the code snipplet in my jsp > > > > > > > > > > > > Msg= > > > > > > > > > > > > The output is always Msg= > > > > > > Any idea? Thanks > > > > > > -Betty > > > -Original Message- > > > From: Ram Venkataswamy [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, June 16, 2004 4:50 PM > > > To: Struts Users Mailing List > > > Subject: RE: getInputForward() question > > > > > > > > > Yep, your colleague is right - input attribute is used to re-direct > > > the con
RE: Html:messages tag (Resolved)
I am sorry but I am not clear on what suggestion? Can you elaborate your suggestion in code snippnet. Thanks. In my case, I am sure, I will only have 1 message set up for property x. -Betty -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 7:18 PM To: Struts Users Mailing List Subject: Re: Html:messages tag (Resolved) This isn't the correct way to use . It iterates over either all the messages (if you don't specify a property) or all messages for a property storing each message as a page scope variable. The way your using it it will only display the last message (try putting two messages for property "x") - you should really have a closing tag: Msg= Also if you do it this way there's no need for the tag, unless you want to display some other markup around your errors, such as The following errors have occured: Msg= Niall - Original Message - From: "Betty Koon" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Thursday, June 17, 2004 1:33 AM Subject: RE: Html:messages tag (Resolved) > I didn't know I have to do the following: message="true"> > Msg= > > > -Betty > > > -Original Message- > From: Betty Koon [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 16, 2004 5:31 PM > To: 'Struts Users Mailing List' > Subject: RE: Html:messages tag > > > I did, it doesn't help. Nothing get printed out at all. > > -Betty > > -Original Message- > From: Chris Cranford [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 16, 2004 5:27 PM > To: Struts Users Mailing List > Subject: Re: Html:messages tag > > > Have you tried removing "property" from the messages tag to see if the > message you're wanting to print out exists in the collection at all ? > > Hope this helps! > Chris > > - Original Message - > From: "Betty Koon" <[EMAIL PROTECTED]> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > Sent: Wednesday, June 16, 2004 8:19 PM > Subject: Html:messages tag > > > > Hi All, > > > > I seem not to be able to get html:message print out the message I > > set up > in > > the action at all. > > I have looked at the request attribute, it does contain the > > ActionMessages and I was able to retrieve the message for a > > particular property in my > JSP, > > but the tag just doesn't work. > > > > Here is the code snipplet in my jsp > > > > > > > > Msg= > > > > > > > > The output is always Msg= > > > > Any idea? Thanks > > > > -Betty > > -Original Message- > > From: Ram Venkataswamy [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 16, 2004 4:50 PM > > To: Struts Users Mailing List > > Subject: RE: getInputForward() question > > > > > > Yep, your colleague is right - input attribute is used to re-direct > > the control if validation fails - not for Success / user defined > > forwards > > > > V.K.Ram > > NitroX Struts Team > > > > > > > > -Original Message- > > From: Carl Fyffe [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 16, 2004 4:36 PM > > To: [EMAIL PROTECTED] > > Subject: getInputForward() question > > > > For the past year or so, I have been using getInputForward() and the > > input attribute in the to define the "default" end point > > for that > action. > > I did that because normally there is only one tile for the action to > > go > to, > > so being lazy I wouldn't create a forward I would just use the input > > to > act > > as the default forward. > > > > Today a colleague informed me that was a poor strategy because the > > input > is > > only for when validation fails. Am I missusing the input attribute? > > > > Carl > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PRO
Re: Html:messages tag (Resolved)
This isn't the correct way to use . It iterates over either all the messages (if you don't specify a property) or all messages for a property storing each message as a page scope variable. The way your using it it will only display the last message (try putting two messages for property "x") - you should really have a closing tag: Msg= Also if you do it this way there's no need for the tag, unless you want to display some other markup around your errors, such as The following errors have occured: Msg= Niall - Original Message - From: "Betty Koon" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Thursday, June 17, 2004 1:33 AM Subject: RE: Html:messages tag (Resolved) > I didn't know I have to do the following: > > > Msg= > > > -Betty > > > -Original Message- > From: Betty Koon [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 16, 2004 5:31 PM > To: 'Struts Users Mailing List' > Subject: RE: Html:messages tag > > > I did, it doesn't help. Nothing get printed out at all. > > -Betty > > -Original Message- > From: Chris Cranford [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 16, 2004 5:27 PM > To: Struts Users Mailing List > Subject: Re: Html:messages tag > > > Have you tried removing "property" from the messages tag to see if the > message you're wanting to print out exists in the collection at all ? > > Hope this helps! > Chris > > - Original Message - > From: "Betty Koon" <[EMAIL PROTECTED]> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > Sent: Wednesday, June 16, 2004 8:19 PM > Subject: Html:messages tag > > > > Hi All, > > > > I seem not to be able to get html:message print out the message I set > > up > in > > the action at all. > > I have looked at the request attribute, it does contain the > > ActionMessages and I was able to retrieve the message for a particular > > property in my > JSP, > > but the tag just doesn't work. > > > > Here is the code snipplet in my jsp > > > > > > > > Msg= > > > > > > > > The output is always Msg= > > > > Any idea? Thanks > > > > -Betty > > -Original Message- > > From: Ram Venkataswamy [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 16, 2004 4:50 PM > > To: Struts Users Mailing List > > Subject: RE: getInputForward() question > > > > > > Yep, your colleague is right - input attribute is used to re-direct > > the control if validation fails - not for Success / user defined > > forwards > > > > V.K.Ram > > NitroX Struts Team > > > > > > > > -Original Message- > > From: Carl Fyffe [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 16, 2004 4:36 PM > > To: [EMAIL PROTECTED] > > Subject: getInputForward() question > > > > For the past year or so, I have been using getInputForward() and the > > input attribute in the to define the "default" end point for > > that > action. > > I did that because normally there is only one tile for the action to > > go > to, > > so being lazy I wouldn't create a forward I would just use the input > > to > act > > as the default forward. > > > > Today a colleague informed me that was a poor strategy because the > > input > is > > only for when validation fails. Am I missusing the input attribute? > > > > Carl > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Html:messages tag (Resolved)
Yup :-) ... that is correct ... :-) - Original Message - From: "Betty Koon" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Wednesday, June 16, 2004 8:33 PM Subject: RE: Html:messages tag (Resolved) > I didn't know I have to do the following: > > > Msg= > > > -Betty > > > -Original Message- > From: Betty Koon [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 16, 2004 5:31 PM > To: 'Struts Users Mailing List' > Subject: RE: Html:messages tag > > > I did, it doesn't help. Nothing get printed out at all. > > -Betty > > -Original Message- > From: Chris Cranford [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 16, 2004 5:27 PM > To: Struts Users Mailing List > Subject: Re: Html:messages tag > > > Have you tried removing "property" from the messages tag to see if the > message you're wanting to print out exists in the collection at all ? > > Hope this helps! > Chris > > - Original Message - > From: "Betty Koon" <[EMAIL PROTECTED]> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > Sent: Wednesday, June 16, 2004 8:19 PM > Subject: Html:messages tag > > > > Hi All, > > > > I seem not to be able to get html:message print out the message I set > > up > in > > the action at all. > > I have looked at the request attribute, it does contain the > > ActionMessages and I was able to retrieve the message for a particular > > property in my > JSP, > > but the tag just doesn't work. > > > > Here is the code snipplet in my jsp > > > > > > > > Msg= > > > > > > > > The output is always Msg= > > > > Any idea? Thanks > > > > -Betty > > -Original Message- > > From: Ram Venkataswamy [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 16, 2004 4:50 PM > > To: Struts Users Mailing List > > Subject: RE: getInputForward() question > > > > > > Yep, your colleague is right - input attribute is used to re-direct > > the control if validation fails - not for Success / user defined > > forwards > > > > V.K.Ram > > NitroX Struts Team > > > > > > > > -Original Message- > > From: Carl Fyffe [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 16, 2004 4:36 PM > > To: [EMAIL PROTECTED] > > Subject: getInputForward() question > > > > For the past year or so, I have been using getInputForward() and the > > input attribute in the to define the "default" end point for > > that > action. > > I did that because normally there is only one tile for the action to > > go > to, > > so being lazy I wouldn't create a forward I would just use the input > > to > act > > as the default forward. > > > > Today a colleague informed me that was a poor strategy because the > > input > is > > only for when validation fails. Am I missusing the input attribute? > > > > Carl > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Html:messages tag (Resolved)
I didn't know I have to do the following: Msg= -Betty -Original Message- From: Betty Koon [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 5:31 PM To: 'Struts Users Mailing List' Subject: RE: Html:messages tag I did, it doesn't help. Nothing get printed out at all. -Betty -Original Message- From: Chris Cranford [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 5:27 PM To: Struts Users Mailing List Subject: Re: Html:messages tag Have you tried removing "property" from the messages tag to see if the message you're wanting to print out exists in the collection at all ? Hope this helps! Chris - Original Message - From: "Betty Koon" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Wednesday, June 16, 2004 8:19 PM Subject: Html:messages tag > Hi All, > > I seem not to be able to get html:message print out the message I set > up in > the action at all. > I have looked at the request attribute, it does contain the > ActionMessages and I was able to retrieve the message for a particular > property in my JSP, > but the tag just doesn't work. > > Here is the code snipplet in my jsp > > > > Msg= > > > > The output is always Msg= > > Any idea? Thanks > > -Betty > -Original Message- > From: Ram Venkataswamy [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 16, 2004 4:50 PM > To: Struts Users Mailing List > Subject: RE: getInputForward() question > > > Yep, your colleague is right - input attribute is used to re-direct > the control if validation fails - not for Success / user defined > forwards > > V.K.Ram > NitroX Struts Team > > > > -Original Message- > From: Carl Fyffe [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 16, 2004 4:36 PM > To: [EMAIL PROTECTED] > Subject: getInputForward() question > > For the past year or so, I have been using getInputForward() and the > input attribute in the to define the "default" end point for > that action. > I did that because normally there is only one tile for the action to > go to, > so being lazy I wouldn't create a forward I would just use the input > to act > as the default forward. > > Today a colleague informed me that was a poor strategy because the > input is > only for when validation fails. Am I missusing the input attribute? > > Carl > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Html:messages tag
How are you creating the message inside your action? Can you post that code snippet? - Original Message - From: "Betty Koon" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Wednesday, June 16, 2004 8:30 PM Subject: RE: Html:messages tag > I did, it doesn't help. Nothing get printed out at all. > > -Betty > > -Original Message- > From: Chris Cranford [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 16, 2004 5:27 PM > To: Struts Users Mailing List > Subject: Re: Html:messages tag > > > Have you tried removing "property" from the messages tag to see if the > message you're wanting to print out exists in the collection at all ? > > Hope this helps! > Chris > > - Original Message - > From: "Betty Koon" <[EMAIL PROTECTED]> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > Sent: Wednesday, June 16, 2004 8:19 PM > Subject: Html:messages tag > > > > Hi All, > > > > I seem not to be able to get html:message print out the message I set > > up > in > > the action at all. > > I have looked at the request attribute, it does contain the > > ActionMessages and I was able to retrieve the message for a particular > > property in my > JSP, > > but the tag just doesn't work. > > > > Here is the code snipplet in my jsp > > > > > > > > Msg= > > > > > > > > The output is always Msg= > > > > Any idea? Thanks > > > > -Betty > > -Original Message- > > From: Ram Venkataswamy [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 16, 2004 4:50 PM > > To: Struts Users Mailing List > > Subject: RE: getInputForward() question > > > > > > Yep, your colleague is right - input attribute is used to re-direct > > the control if validation fails - not for Success / user defined > > forwards > > > > V.K.Ram > > NitroX Struts Team > > > > > > > > -Original Message- > > From: Carl Fyffe [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 16, 2004 4:36 PM > > To: [EMAIL PROTECTED] > > Subject: getInputForward() question > > > > For the past year or so, I have been using getInputForward() and the > > input attribute in the to define the "default" end point for > > that > action. > > I did that because normally there is only one tile for the action to > > go > to, > > so being lazy I wouldn't create a forward I would just use the input > > to > act > > as the default forward. > > > > Today a colleague informed me that was a poor strategy because the > > input > is > > only for when validation fails. Am I missusing the input attribute? > > > > Carl > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Html:messages tag
I did, it doesn't help. Nothing get printed out at all. -Betty -Original Message- From: Chris Cranford [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 5:27 PM To: Struts Users Mailing List Subject: Re: Html:messages tag Have you tried removing "property" from the messages tag to see if the message you're wanting to print out exists in the collection at all ? Hope this helps! Chris - Original Message - From: "Betty Koon" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Wednesday, June 16, 2004 8:19 PM Subject: Html:messages tag > Hi All, > > I seem not to be able to get html:message print out the message I set > up in > the action at all. > I have looked at the request attribute, it does contain the > ActionMessages and I was able to retrieve the message for a particular > property in my JSP, > but the tag just doesn't work. > > Here is the code snipplet in my jsp > > > > Msg= > > > > The output is always Msg= > > Any idea? Thanks > > -Betty > -Original Message- > From: Ram Venkataswamy [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 16, 2004 4:50 PM > To: Struts Users Mailing List > Subject: RE: getInputForward() question > > > Yep, your colleague is right - input attribute is used to re-direct > the control if validation fails - not for Success / user defined > forwards > > V.K.Ram > NitroX Struts Team > > > > -Original Message- > From: Carl Fyffe [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 16, 2004 4:36 PM > To: [EMAIL PROTECTED] > Subject: getInputForward() question > > For the past year or so, I have been using getInputForward() and the > input attribute in the to define the "default" end point for > that action. > I did that because normally there is only one tile for the action to > go to, > so being lazy I wouldn't create a forward I would just use the input > to act > as the default forward. > > Today a colleague informed me that was a poor strategy because the > input is > only for when validation fails. Am I missusing the input attribute? > > Carl > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - 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: Html:messages tag
Have you tried removing "property" from the messages tag to see if the message you're wanting to print out exists in the collection at all ? Hope this helps! Chris - Original Message - From: "Betty Koon" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Wednesday, June 16, 2004 8:19 PM Subject: Html:messages tag > Hi All, > > I seem not to be able to get html:message print out the message I set up in > the action at all. > I have looked at the request attribute, it does contain the ActionMessages > and I was able to retrieve the message for a particular property in my JSP, > but the tag just doesn't work. > > Here is the code snipplet in my jsp > > > > Msg= > > > > The output is always Msg= > > Any idea? Thanks > > -Betty > -Original Message- > From: Ram Venkataswamy [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 16, 2004 4:50 PM > To: Struts Users Mailing List > Subject: RE: getInputForward() question > > > Yep, your colleague is right - input attribute is used to re-direct the > control if validation fails - not for Success / user defined forwards > > V.K.Ram > NitroX Struts Team > > > > -Original Message- > From: Carl Fyffe [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 16, 2004 4:36 PM > To: [EMAIL PROTECTED] > Subject: getInputForward() question > > For the past year or so, I have been using getInputForward() and the input > attribute in the to define the "default" end point for that action. > I did that because normally there is only one tile for the action to go to, > so being lazy I wouldn't create a forward I would just use the input to act > as the default forward. > > Today a colleague informed me that was a poor strategy because the input is > only for when validation fails. Am I missusing the input attribute? > > Carl > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Html:messages tag
Hi All, I seem not to be able to get html:message print out the message I set up in the action at all. I have looked at the request attribute, it does contain the ActionMessages and I was able to retrieve the message for a particular property in my JSP, but the tag just doesn't work. Here is the code snipplet in my jsp Msg= The output is always Msg= Any idea? Thanks -Betty -Original Message- From: Ram Venkataswamy [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 4:50 PM To: Struts Users Mailing List Subject: RE: getInputForward() question Yep, your colleague is right - input attribute is used to re-direct the control if validation fails - not for Success / user defined forwards V.K.Ram NitroX Struts Team -Original Message- From: Carl Fyffe [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 4:36 PM To: [EMAIL PROTECTED] Subject: getInputForward() question For the past year or so, I have been using getInputForward() and the input attribute in the to define the "default" end point for that action. I did that because normally there is only one tile for the action to go to, so being lazy I wouldn't create a forward I would just use the input to act as the default forward. Today a colleague informed me that was a poor strategy because the input is only for when validation fails. Am I missusing the input attribute? Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Precompile JSP error with html:messages
I have the following JSP: <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> test When I deploy an ear file into either WSAD or WebSphere admin console and check the precompile JSP box, the JSP compiler gives the following error: [6/9/04 7:34:41:108 EDT] 40e0e85a SystemErr R C:/DOCUME~1/jjones/LOCALS~1/Temp/app_fd092f8e4b/ear/brochureWAR.war/WEB- INF/classes/_test.java:82: cannot resolve symbol symbol : method setMessage (java.lang.String) location: class org.apache.struts.taglib.html.MessagesTag [6/9/04 7:34:41:139 EDT] 40e0e85a SystemErr R _jspx_th_html_messages_0.setMessage("true"); [6/9/04 7:34:41:139 EDT] 40e0e85a SystemErr R ^ [6/9/04 7:34:41:327 EDT] 40e0e85a SystemErr R 1 error The JSP compiles just fine while developing in WSAD or and it runs fine if I deploy the ear without precompiling the JSPs. Any ideas? Thanks, Jennifer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:messages ..bean:write not displaying.urgent
Hi Friends! i'm using tiles where i want to get html:errors from properties file. But i'm not getting. i'm adding and saving errors in action class only.And errors are not specific to any property but those are global using GLOBAL_MESSAGE. i'm sure that messages are available in properties file. Please anybody tell me how to make settings in tiles layout. awaiting ur reply Ganesh - Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs