Re: Difficulty getting html:message tag to work.
On 10/14/2003 10:23:24 PM "Matt & Toni Willis" wrote: > Hi, > > I'm using Struts 1.1, and am attempting to utilize the new > ActionMessages class with the tag. > > I have the following code in my Action class: > > actionMessages.add("message", new > ActionMessage("error.systemAuthentication.failure")); > saveMessages(request, actionMessages); > > > > With the corresponding tags in my jsp: > > > > > > Maybe change this to include a write statement? Susan Bradeen > No message is being rendered in the html page though. > > I think I'm definitely misunderstanding the concept behing both > ActionMessages and htmL:message. > > > Thanks in advance: > > Matt > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Difficulty getting html:message tag to work.
Hi, I'm using Struts 1.1, and am attempting to utilize the new ActionMessages class with the tag. I have the following code in my Action class: actionMessages.add("message", new ActionMessage("error.systemAuthentication.failure")); saveMessages(request, actionMessages); With the corresponding tags in my jsp: No message is being rendered in the html page though. I think I'm definitely misunderstanding the concept behing both ActionMessages and htmL:message. Thanks in advance: Matt
Re: Using the html:message tag
Thanks! Works like a charm! -- Sloan - Original Message - From: "Larry Zappeterrini" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Friday, February 14, 2003 3:12 PM Subject: RE: Using the html:message tag > html:messages works a bit differently than html:errors in that it does not > print out the collection containing your messages for you. You must do it > manually between a begin and end tag. Using your example, you would have to > do the following: > > > <%-- print out mdxquery, could also use bean:write --%> > > > > -Original Message- > From: Sloan Seaman [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 14, 2003 2:57 PM > To: Struts Users Mailing List > Subject: Re: Using the html:message tag > > > Guys... > > Thanks for the info but it is still not working (I will work on it on > Monday). > > Here is what I understand (becuase I'm feeling like an idiot right now). > > The property attribute looks like the right thing because the API docs for > ActionMessages say the first parameter is for property. > > The message tag being set to true I also understand. > > The Id tag however... I don't know what to do (it is required). I have no > Idea what to set it to. > > Here is (hopefully for the final time) my entire html and source code: > > HTML: > <%@ page language="java" %> > <%@ taglib uri="/WEB-INF/tags/struts/struts-html.tld" prefix="html" %> > <%@ taglib uri="/WEB-INF/tags/struts/struts-tiles.tld" prefix="tiles" %> > > > > POC - Admin - Query > > > > > > > > > > > Please enter your query: > > > > onsubmit="return validateMdxQuery(this);" > > > > > > > Description > > > > > > > > Query > > > > > > > > > > > > > > > > > > > > and here is the java: > package com.symbol.mobilecommerce.analysis.actions; > > import javax.servlet.http.*; > import org.apache.struts.action.*; > import org.apache.commons.beanutils.PropertyUtils; > > public final class MdxQuery > extends Action > { > > public ActionForward execute(ActionMapping _mapping, ActionForm _form, > HttpServletRequest _request, HttpServletResponse _response) > throws Exception > { > ActionErrors errors = new ActionErrors(); > ActionMessages messages = new ActionMessages(); > > // Validate the request parameters specified by the user > String description = (String) PropertyUtils.getSimpleProperty(_form, > "description"); > String query = (String) PropertyUtils.getSimpleProperty(_form, "query"); > > // Report any errors we have discovered back to the original form > if (!errors.isEmpty()) { > saveErrors(_request, errors); >return new ActionForward( (String)PropertyUtils.getSimpleProperty(_form, > "FAILURE_PAGE") ); > >//return (_mapping.getInputForward()); > } > > // Remove the obsolete form bean > if (_mapping.getAttribute() != null) { > if ("request".equals(_mapping.getScope())) > _request.removeAttribute(_mapping.getAttribute()); > else > > _request.getSession().removeAttribute(_mapping.getAttribute()); > } > > messages.add("success", new ActionMessage("mdxquery.success")); > saveMessages(_request, messages); > // Forward control to the specified success URI > return new ActionForward( (String)PropertyUtils.getSimpleProperty(_form, > "SUCCESS_PAGE") ); > } > } > > > - Original Message - > From: "Sri Sankaran" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Friday, February 14, 2003 2:25 PM > Subject: RE: Using the html:message tag > > > Use the property attribute. > >property="success" >message="true"/> > > Also take a look at the html-messages.jsp file that is part of the > struts-exercise-taglib application that ships with Struts. > > Sri > > -Original Message- > From: Sloan Seaman [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 14, 2003 2:09 PM > To: Struts Users Mailing List; [EMAIL PROTECTED] > Subject: Re: Using the html:message tag > > > Jerome, > > I tried it but it didn't work. > > Here is what I have in my HTML: > > > And here is what is in my action file: > ActionMessages messages = new A
RE: Using the html:message tag
html:messages works a bit differently than html:errors in that it does not print out the collection containing your messages for you. You must do it manually between a begin and end tag. Using your example, you would have to do the following: <%-- print out mdxquery, could also use bean:write --%> -Original Message- From: Sloan Seaman [mailto:[EMAIL PROTECTED]] Sent: Friday, February 14, 2003 2:57 PM To: Struts Users Mailing List Subject: Re: Using the html:message tag Guys... Thanks for the info but it is still not working (I will work on it on Monday). Here is what I understand (becuase I'm feeling like an idiot right now). The property attribute looks like the right thing because the API docs for ActionMessages say the first parameter is for property. The message tag being set to true I also understand. The Id tag however... I don't know what to do (it is required). I have no Idea what to set it to. Here is (hopefully for the final time) my entire html and source code: HTML: <%@ page language="java" %> <%@ taglib uri="/WEB-INF/tags/struts/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/tags/struts/struts-tiles.tld" prefix="tiles" %> POC - Admin - Query Please enter your query: Description Query and here is the java: package com.symbol.mobilecommerce.analysis.actions; import javax.servlet.http.*; import org.apache.struts.action.*; import org.apache.commons.beanutils.PropertyUtils; public final class MdxQuery extends Action { public ActionForward execute(ActionMapping _mapping, ActionForm _form, HttpServletRequest _request, HttpServletResponse _response) throws Exception { ActionErrors errors = new ActionErrors(); ActionMessages messages = new ActionMessages(); // Validate the request parameters specified by the user String description = (String) PropertyUtils.getSimpleProperty(_form, "description"); String query = (String) PropertyUtils.getSimpleProperty(_form, "query"); // Report any errors we have discovered back to the original form if (!errors.isEmpty()) { saveErrors(_request, errors); return new ActionForward( (String)PropertyUtils.getSimpleProperty(_form, "FAILURE_PAGE") ); //return (_mapping.getInputForward()); } // Remove the obsolete form bean if (_mapping.getAttribute() != null) { if ("request".equals(_mapping.getScope())) _request.removeAttribute(_mapping.getAttribute()); else _request.getSession().removeAttribute(_mapping.getAttribute()); } messages.add("success", new ActionMessage("mdxquery.success")); saveMessages(_request, messages); // Forward control to the specified success URI return new ActionForward( (String)PropertyUtils.getSimpleProperty(_form, "SUCCESS_PAGE") ); } } - Original Message - From: "Sri Sankaran" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, February 14, 2003 2:25 PM Subject: RE: Using the html:message tag Use the property attribute. Also take a look at the html-messages.jsp file that is part of the struts-exercise-taglib application that ships with Struts. Sri -Original Message- From: Sloan Seaman [mailto:[EMAIL PROTECTED]] Sent: Friday, February 14, 2003 2:09 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Using the html:message tag Jerome, I tried it but it didn't work. Here is what I have in my HTML: And here is what is in my action file: ActionMessages messages = new ActionMessages(); messages.add("success", new ActionMessage("mdxquery.success")); saveMessages(_request, messages); where mxdquery.success in a value in my ApplicationResources.properties file.. I'm not sure about the id attribute. The API for ActionMessages.add says the first string is the property while the docs on the id attribute say it is the name scope of the JSP bean(??)... Idea's? -- Sloan - Original Message - From: "Jerome Jacobsen" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, February 14, 2003 1:47 PM Subject: RE: Using the html:message tag > Try this: > > > If you omit message="true" then the tag only looks for error messages under > Action.ERROR_KEY. With the message="true" it will look for messages > under Action.MESSAGE_KEY. > > > -Original Message- > > From: Sloan Seaman [mailto:[EMAIL PROTECTED]] > > Sent: Friday, February 14, 2003 1:26 PM > > To: Struts Users Mailing List > > Subject: Using the html:message tag > > > > > > I want to display messages in my html when the
Re: Using the html:message tag
Guys... Thanks for the info but it is still not working (I will work on it on Monday). Here is what I understand (becuase I'm feeling like an idiot right now). The property attribute looks like the right thing because the API docs for ActionMessages say the first parameter is for property. The message tag being set to true I also understand. The Id tag however... I don't know what to do (it is required). I have no Idea what to set it to. Here is (hopefully for the final time) my entire html and source code: HTML: <%@ page language="java" %> <%@ taglib uri="/WEB-INF/tags/struts/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/tags/struts/struts-tiles.tld" prefix="tiles" %> POC - Admin - Query Please enter your query: Description Query and here is the java: package com.symbol.mobilecommerce.analysis.actions; import javax.servlet.http.*; import org.apache.struts.action.*; import org.apache.commons.beanutils.PropertyUtils; public final class MdxQuery extends Action { public ActionForward execute(ActionMapping _mapping, ActionForm _form, HttpServletRequest _request, HttpServletResponse _response) throws Exception { ActionErrors errors = new ActionErrors(); ActionMessages messages = new ActionMessages(); // Validate the request parameters specified by the user String description = (String) PropertyUtils.getSimpleProperty(_form, "description"); String query = (String) PropertyUtils.getSimpleProperty(_form, "query"); // Report any errors we have discovered back to the original form if (!errors.isEmpty()) { saveErrors(_request, errors); return new ActionForward( (String)PropertyUtils.getSimpleProperty(_form, "FAILURE_PAGE") ); //return (_mapping.getInputForward()); } // Remove the obsolete form bean if (_mapping.getAttribute() != null) { if ("request".equals(_mapping.getScope())) _request.removeAttribute(_mapping.getAttribute()); else _request.getSession().removeAttribute(_mapping.getAttribute()); } messages.add("success", new ActionMessage("mdxquery.success")); saveMessages(_request, messages); // Forward control to the specified success URI return new ActionForward( (String)PropertyUtils.getSimpleProperty(_form, "SUCCESS_PAGE") ); } } - Original Message - From: "Sri Sankaran" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, February 14, 2003 2:25 PM Subject: RE: Using the html:message tag Use the property attribute. Also take a look at the html-messages.jsp file that is part of the struts-exercise-taglib application that ships with Struts. Sri -Original Message- From: Sloan Seaman [mailto:[EMAIL PROTECTED]] Sent: Friday, February 14, 2003 2:09 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Using the html:message tag Jerome, I tried it but it didn't work. Here is what I have in my HTML: And here is what is in my action file: ActionMessages messages = new ActionMessages(); messages.add("success", new ActionMessage("mdxquery.success")); saveMessages(_request, messages); where mxdquery.success in a value in my ApplicationResources.properties file.. I'm not sure about the id attribute. The API for ActionMessages.add says the first string is the property while the docs on the id attribute say it is the name scope of the JSP bean(??)... Idea's? -- Sloan - Original Message - From: "Jerome Jacobsen" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, February 14, 2003 1:47 PM Subject: RE: Using the html:message tag > Try this: > > > If you omit message="true" then the tag only looks for error messages under > Action.ERROR_KEY. With the message="true" it will look for messages > under Action.MESSAGE_KEY. > > > -Original Message- > > From: Sloan Seaman [mailto:[EMAIL PROTECTED]] > > Sent: Friday, February 14, 2003 1:26 PM > > To: Struts Users Mailing List > > Subject: Using the html:message tag > > > > > > I want to display messages in my html when the action completes > > successfully (think "Query successfully processed" type messages.) > > > > I'm guessing I use the tag but it doesn't seem to be > > working. > > > > In my code I have: > > ActionMessages messages = new ActionMessages(); > > messages.add("success", new ActionMessage("mdxquery.success")); > > saveMessages(_request, messages); > > > > And in my html I have: > &
Re: Using the html:message tag
Jerome, It still didn't work. Here is what I have (you left out the id tag which is required so I tried two seperate things) and Still nothing... Any other ideas? Thanks! -- Sloan - Original Message - From: "Jerome Jacobsen" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, February 14, 2003 2:13 PM Subject: RE: Using the html:message tag > Sorry. It should be this: > > > > > > -Original Message- > > From: Sloan Seaman [mailto:[EMAIL PROTECTED]] > > Sent: Friday, February 14, 2003 2:09 PM > > To: Struts Users Mailing List; [EMAIL PROTECTED] > > Subject: Re: Using the html:message tag > > > > > > Jerome, > > > > I tried it but it didn't work. > > > > Here is what I have in my HTML: > > > > > > And here is what is in my action file: > > ActionMessages messages = new ActionMessages(); > > messages.add("success", new ActionMessage("mdxquery.success")); > > saveMessages(_request, messages); > > > > where mxdquery.success in a value in my ApplicationResources.properties > > file.. > > > > I'm not sure about the id attribute. The API for ActionMessages.add says > > the first string is the property while the docs on the id attribute say it > > is the name scope of the JSP bean(??)... > > > > Idea's? > > > > -- > > Sloan > > > > > > - Original Message - > > From: "Jerome Jacobsen" <[EMAIL PROTECTED]> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > > Sent: Friday, February 14, 2003 1:47 PM > > Subject: RE: Using the html:message tag > > > > > > > Try this: > > > > > > > > > If you omit message="true" then the tag only looks for error messages > > under > > > Action.ERROR_KEY. With the message="true" it will look for > > messages under > > > Action.MESSAGE_KEY. > > > > > > > -Original Message- > > > > From: Sloan Seaman [mailto:[EMAIL PROTECTED]] > > > > Sent: Friday, February 14, 2003 1:26 PM > > > > To: Struts Users Mailing List > > > > Subject: Using the html:message tag > > > > > > > > > > > > I want to display messages in my html when the action completes > > > > successfully > > > > (think "Query successfully processed" type messages.) > > > > > > > > I'm guessing I use the tag but it doesn't seem to be > > > > working. > > > > > > > > In my code I have: > > > > ActionMessages messages = new ActionMessages(); > > > > messages.add("success", new ActionMessage("mdxquery.success")); > > > > saveMessages(_request, messages); > > > > > > > > And in my html I have: > > > > > > > > > > > > What am I doing wrong? > > > > > > > > Thanks! > > > > > > > > -- > > > > Sloan > > > > > > > > > > > > > > > > - > > > > 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: Using the html:message tag
Use the property attribute. Also take a look at the html-messages.jsp file that is part of the struts-exercise-taglib application that ships with Struts. Sri -Original Message- From: Sloan Seaman [mailto:[EMAIL PROTECTED]] Sent: Friday, February 14, 2003 2:09 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Using the html:message tag Jerome, I tried it but it didn't work. Here is what I have in my HTML: And here is what is in my action file: ActionMessages messages = new ActionMessages(); messages.add("success", new ActionMessage("mdxquery.success")); saveMessages(_request, messages); where mxdquery.success in a value in my ApplicationResources.properties file.. I'm not sure about the id attribute. The API for ActionMessages.add says the first string is the property while the docs on the id attribute say it is the name scope of the JSP bean(??)... Idea's? -- Sloan - Original Message - From: "Jerome Jacobsen" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, February 14, 2003 1:47 PM Subject: RE: Using the html:message tag > Try this: > > > If you omit message="true" then the tag only looks for error messages under > Action.ERROR_KEY. With the message="true" it will look for messages > under Action.MESSAGE_KEY. > > > -Original Message- > > From: Sloan Seaman [mailto:[EMAIL PROTECTED]] > > Sent: Friday, February 14, 2003 1:26 PM > > To: Struts Users Mailing List > > Subject: Using the html:message tag > > > > > > I want to display messages in my html when the action completes > > successfully (think "Query successfully processed" type messages.) > > > > I'm guessing I use the tag but it doesn't seem to be > > working. > > > > In my code I have: > > ActionMessages messages = new ActionMessages(); > > messages.add("success", new ActionMessage("mdxquery.success")); > > saveMessages(_request, messages); > > > > And in my html I have: > > > > > > What am I doing wrong? > > > > Thanks! > > > > -- > > Sloan > > > > > > > > > > - > > 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: Using the html:message tag
Sorry. It should be this: > -Original Message- > From: Sloan Seaman [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 14, 2003 2:09 PM > To: Struts Users Mailing List; [EMAIL PROTECTED] > Subject: Re: Using the html:message tag > > > Jerome, > > I tried it but it didn't work. > > Here is what I have in my HTML: > > > And here is what is in my action file: > ActionMessages messages = new ActionMessages(); > messages.add("success", new ActionMessage("mdxquery.success")); > saveMessages(_request, messages); > > where mxdquery.success in a value in my ApplicationResources.properties > file.. > > I'm not sure about the id attribute. The API for ActionMessages.add says > the first string is the property while the docs on the id attribute say it > is the name scope of the JSP bean(??)... > > Idea's? > > -- > Sloan > > > - Original Message - > From: "Jerome Jacobsen" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Friday, February 14, 2003 1:47 PM > Subject: RE: Using the html:message tag > > > > Try this: > > > > > > If you omit message="true" then the tag only looks for error messages > under > > Action.ERROR_KEY. With the message="true" it will look for > messages under > > Action.MESSAGE_KEY. > > > > > -Original Message- > > > From: Sloan Seaman [mailto:[EMAIL PROTECTED]] > > > Sent: Friday, February 14, 2003 1:26 PM > > > To: Struts Users Mailing List > > > Subject: Using the html:message tag > > > > > > > > > I want to display messages in my html when the action completes > > > successfully > > > (think "Query successfully processed" type messages.) > > > > > > I'm guessing I use the tag but it doesn't seem to be > > > working. > > > > > > In my code I have: > > > ActionMessages messages = new ActionMessages(); > > > messages.add("success", new ActionMessage("mdxquery.success")); > > > saveMessages(_request, messages); > > > > > > And in my html I have: > > > > > > > > > What am I doing wrong? > > > > > > Thanks! > > > > > > -- > > > Sloan > > > > > > > > > > > > - > > > 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: Using the html:message tag
Jerome, I tried it but it didn't work. Here is what I have in my HTML: And here is what is in my action file: ActionMessages messages = new ActionMessages(); messages.add("success", new ActionMessage("mdxquery.success")); saveMessages(_request, messages); where mxdquery.success in a value in my ApplicationResources.properties file.. I'm not sure about the id attribute. The API for ActionMessages.add says the first string is the property while the docs on the id attribute say it is the name scope of the JSP bean(??)... Idea's? -- Sloan - Original Message - From: "Jerome Jacobsen" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, February 14, 2003 1:47 PM Subject: RE: Using the html:message tag > Try this: > > > If you omit message="true" then the tag only looks for error messages under > Action.ERROR_KEY. With the message="true" it will look for messages under > Action.MESSAGE_KEY. > > > -Original Message- > > From: Sloan Seaman [mailto:[EMAIL PROTECTED]] > > Sent: Friday, February 14, 2003 1:26 PM > > To: Struts Users Mailing List > > Subject: Using the html:message tag > > > > > > I want to display messages in my html when the action completes > > successfully > > (think "Query successfully processed" type messages.) > > > > I'm guessing I use the tag but it doesn't seem to be > > working. > > > > In my code I have: > > ActionMessages messages = new ActionMessages(); > > messages.add("success", new ActionMessage("mdxquery.success")); > > saveMessages(_request, messages); > > > > And in my html I have: > > > > > > What am I doing wrong? > > > > Thanks! > > > > -- > > Sloan > > > > > > > > - > > 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: Using the html:message tag
You have to set the 'message' attribute of to 'true'. The docs at http://jakarta.apache.org/struts/userGuide/struts-html.html#messages explain it all. Sri > -Original Message- > From: Sloan Seaman [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 14, 2003 1:26 PM > To: Struts Users Mailing List > Subject: Using the html:message tag > > > I want to display messages in my html when the action > completes successfully (think "Query successfully processed" > type messages.) > > I'm guessing I use the tag but it doesn't > seem to be working. > > In my code I have: > ActionMessages messages = new ActionMessages(); > messages.add("success", new ActionMessage("mdxquery.success")); > saveMessages(_request, messages); > > And in my html I have: > > > What am I doing wrong? > > Thanks! > > -- > Sloan > > > > - > 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: Using the html:message tag
Try this: If you omit message="true" then the tag only looks for error messages under Action.ERROR_KEY. With the message="true" it will look for messages under Action.MESSAGE_KEY. > -Original Message- > From: Sloan Seaman [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 14, 2003 1:26 PM > To: Struts Users Mailing List > Subject: Using the html:message tag > > > I want to display messages in my html when the action completes > successfully > (think "Query successfully processed" type messages.) > > I'm guessing I use the tag but it doesn't seem to be > working. > > In my code I have: > ActionMessages messages = new ActionMessages(); > messages.add("success", new ActionMessage("mdxquery.success")); > saveMessages(_request, messages); > > And in my html I have: > > > What am I doing wrong? > > Thanks! > > -- > Sloan > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using the html:message tag
I want to display messages in my html when the action completes successfully (think "Query successfully processed" type messages.) I'm guessing I use the tag but it doesn't seem to be working. In my code I have: ActionMessages messages = new ActionMessages(); messages.add("success", new ActionMessage("mdxquery.success")); saveMessages(_request, messages); And in my html I have: What am I doing wrong? Thanks! -- Sloan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: usefulness of html:message tag
If you look at the docs on the messages tag you will find it supports multiple ResourceBundles/properties files as does the entire Struts framework. David From: "Khalid K." <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: usefulness of html:message tag Date: Thu, 5 Dec 2002 08:57:05 -0800 Being new to the struts world, I have the following question: The tag uses ApplicationResources.properties file which is defined in struts-config.xml file. This works fine for small sites. But what if the site contains 100s if not 1000s lines of text which needs to be managed and internationalized ? In that case ApplicationResource.properties file becomes huge and unmanageable, and furthermore as far as I can tell, you are allowed to have only 1 resource file per web app. So internationalization is out of question. In our case, we don't use html:message tag, but instead we use ResourceBundle to get the resource spanish/english and then in our JSPs we create a bean, and just do a .getValue("key"). Any ideas of how to approach this in another way ??? Thanks, Khalid _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
usefulness of html:message tag
Being new to the struts world, I have the following question: The tag uses ApplicationResources.properties file which is defined in struts-config.xml file. This works fine for small sites. But what if the site contains 100s if not 1000s lines of text which needs to be managed and internationalized ? In that case ApplicationResource.properties file becomes huge and unmanageable, and furthermore as far as I can tell, you are allowed to have only 1 resource file per web app. So internationalization is out of question. In our case, we don't use html:message tag, but instead we use ResourceBundle to get the resource spanish/english and then in our JSPs we create a bean, and just do a .getValue("key"). Any ideas of how to approach this in another way ??? Thanks, Khalid
RE: "html:message" tag
It is optional, but if you are using Struts and are not strickly adhering to the MVC/Model approach and having all requests go through the ActionServlet you have better use it. Most app servers won't load the servlet until it is requested, if you don't use load-on-startup. I am assuming that she directly accessed the jsp. Therefore, the ActionServlet was never requested and never instantiated. The bean:message tag gets the page context for the current jsp and looks for the ResourceBundle. This is "context" is being maintained by the container and since the ActionServlet was never instantiated the bean:message tag couldn't find it. -Original Message-From: Gogineni, Pratima [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 3:55 PMTo: '[EMAIL PROTECTED]'Subject: RE: "html:message" tag Jason - I assumed that load-on-startup is an optional element and only required to specify the order. i.e. if this is not specified the appserver loads teh servlet in any order it likes??? if this is the case then the actionservlet shoudl have been loaded before the jsp page was compiled unless - the jsp page was also specified in teh deployment descriptor to be precompiled? -Original Message-From: Jason Chaffee [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 3:41 PMTo: '[EMAIL PROTECTED]'Subject: RE: "html:message" tag Your ActionServlet needs to be loaded to create an instance of the ResourceBundle. Therefore, if you were requesting a jsp page without going through the ActionServlet, there will not be a ResourceBundle in the servlet context because this happens when the ActionServlet is initialized. -Original Message-From: Sue Deng [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 1:47 PMTo: [EMAIL PROTECTED]Subject: Re: "html:message" tagI would like to share what I did wrong before: I forgot to put the line "2" in web.xml file. After I add this line, my jsp works. So, why is this line so important for using bean:message lag? Thanks, -Sue Jason Chaffee wrote: I find the following configuration easier: Simply put the the resouce file in /WEB-INF/classes directory. Then change the deployment descriptor as follows: action org.apache.struts.action.ActionServlet application ApplicationResources Also, make sure there isn't a typo in your resource file or your jsp page. -Original Message- From: Sue Deng [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 11:51 AM To: [EMAIL PROTECTED] Subject: Re: "html:message" tag I put my ApplicationResources.properties file in /usr/local/tomcat/classes/net/covalent directory before. Now i moved it to my applications /WEB-INF/classes/net/covalent directory. And I got "Missing message for key logon.title" error, but the logon.title key is in the file. Thanks, -Sue Ratnadeep Bhattacharjee wrote: > Chances are the location of your ApplicationResource file is not where > ActionServlet is looking for it. For example, if your web.xml looks as follows: > > > action > org.apache.struts.action.ActionServlet > > application > net.covalent.ApplicationResources > > > > then the ApplicationResources.properties file should be in the > WEB-INF/classes/net/covalent/ directory. > > Hope this helps. > > -Deep. > > > > > I did not make any changes on the code. What do you mean the "app > > server"? I am using jakarta-struts-1.0-b1 under Tomcat. What should I > > do now? > > > > Thanks, > > > > -Sue > > > > Jason Chaffee wrote: > > > > > Have you made any changes to the code? The ActionServlet should be > > > creating the resource bundle and storing in the servlet context using > > > this key. What app server are you using? There could be a bug in how > > > it stores objects in the servlet context, thus the ActionServlet can't > > > find anything that has previously been stored there. > > > > > > -Original Message- > > > From: Sue
Re: "html:message" tag
My guess: A reference to the message property file is obtained in the ActionServlet.initApp() method. If ActionServlet is not loaded at startup, then this method is not called. So when you call , it's probably still not called (unless the ActionServlet is instantiated before displaying the page). Shunhui --- Sue Deng <[EMAIL PROTECTED]> wrote: > I would like to share what I did wrong before: I > forgot to put the line > "2" in web.xml > file. After I add > this line, my jsp works. So, why is this line so > important for using > bean:message lag? > > Thanks, > > -Sue > > Jason Chaffee wrote: > > > > > > > I find the following configuration easier: > > > > Simply put the the resouce file in > /WEB-INF/classes directory. > > > > Then change the deployment descriptor as follows: > > > > > > action > > > > > org.apache.struts.action.ActionServlet > > > >application > > > ApplicationResources > > > > Also, make sure there isn't a typo in your > resource file or your jsp > > page. > > > > -Original Message- > > From: Sue Deng [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, May 01, 2001 11:51 AM > > To: [EMAIL PROTECTED] > > Subject: Re: "html:message" tag > > > > I put my ApplicationResources.properties file in > > /usr/local/tomcat/classes/net/covalent directory > before. Now i moved > > it to my > > applications /WEB-INF/classes/net/covalent > directory. And I got > > "Missing message > > for key logon.title" error, but the logon.title > key is in the file. > > > > Thanks, > > > > -Sue > > Ratnadeep Bhattacharjee wrote: > > > > > Chances are the location of your > ApplicationResource file is not > > where > > > ActionServlet is looking for it. For example, if > your web.xml looks > > as follows: > > > > > > > > > action > > > > > > org.apache.struts.action.ActionServlet > > > > > > application > > > > net.covalent.ApplicationResources > > > > > > > > > > > > then the ApplicationResources.properties file > should be in the > > > WEB-INF/classes/net/covalent/ directory. > > > > > > Hope this helps. > > > > > > -Deep. > > > > > > > > > > > I did not make any changes on the code. What > do you mean the "app > > > > > > server"? I am using jakarta-struts-1.0-b1 > under Tomcat. What > > should I > > > > do now? > > > > > > > > Thanks, > > > > > > > > -Sue > > > > > > > > Jason Chaffee wrote: > > > > > > > > > Have you made any changes to the code? The > ActionServlet > > should be > > > > > creating the resource bundle and storing in > the servlet context > > using > > > > > this key. What app server are you using? > There could be a bug > > in how > > > > > it stores objects in the servlet context, > thus the ActionServlet > > can't > > > > > find anything that has previously been > stored there. > > > > > > > > > > -----Original Message- > > > > > From: Sue Deng > [mailto:[EMAIL PROTECTED]] > > > > > Sent: Tuesday, May 01, 2001 9:39 AM > > > > > To: [EMAIL PROTECTED] > > > > > Subject: Re: "html:message" tag > > > > > > > > > > Thanks, Jason. But when I use > bean:message, I got "Cannot > > > > > > > find message resources under key > > > > > org.apache.struts.action.MESSAGE" > error. > > > > > > > > > > Thanks, > > > > > > > > > > -Sue > > > > > > > > > > Jason Chaffee wrote: > > > > > > > > > > > > > > > > > > > > > > > it should be bean:message > > > > > > > > > > > > -Original Message- > > > > > > From: Sue Deng > [mailto:[EMAIL PROTECTED]] > > > > > > Sent: Monday, April 30, 2001 5:26 PM > > > > > > To: [EMAIL PROTECTED] > > > > > > Subject: "html:message" tag > > > > > > > > > > > > Hi, > > > > > > > > > > > > I am trying to build form using struts > taglib. But I get > > > > > > "no such tag > > > > > > message ..."error when I use > "html:message" tag. I found > > > > > > > > that > > > > > > struts-html.tld and struts-bean.tld > files do not have a > > > > > > tag named > > > > > > "message", but the struts example uses > that tag. Why? > > > > > > > > > > > > Thanks, > > > > > > > > > > > > -Sue > > > > > > __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: "html:message" tag
Jason - I assumed that load-on-startup is an optional element and only required to specify the order. i.e. if this is not specified the appserver loads teh servlet in any order it likes??? if this is the case then the actionservlet shoudl have been loaded before the jsp page was compiled unless - the jsp page was also specified in teh deployment descriptor to be precompiled? -Original Message-From: Jason Chaffee [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 3:41 PMTo: '[EMAIL PROTECTED]'Subject: RE: "html:message" tag Your ActionServlet needs to be loaded to create an instance of the ResourceBundle. Therefore, if you were requesting a jsp page without going through the ActionServlet, there will not be a ResourceBundle in the servlet context because this happens when the ActionServlet is initialized. -Original Message-From: Sue Deng [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 1:47 PMTo: [EMAIL PROTECTED]Subject: Re: "html:message" tagI would like to share what I did wrong before: I forgot to put the line "2" in web.xml file. After I add this line, my jsp works. So, why is this line so important for using bean:message lag? Thanks, -Sue Jason Chaffee wrote: I find the following configuration easier: Simply put the the resouce file in /WEB-INF/classes directory. Then change the deployment descriptor as follows: action org.apache.struts.action.ActionServlet application ApplicationResources Also, make sure there isn't a typo in your resource file or your jsp page. -Original Message- From: Sue Deng [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 11:51 AM To: [EMAIL PROTECTED] Subject: Re: "html:message" tag I put my ApplicationResources.properties file in /usr/local/tomcat/classes/net/covalent directory before. Now i moved it to my applications /WEB-INF/classes/net/covalent directory. And I got "Missing message for key logon.title" error, but the logon.title key is in the file. Thanks, -Sue Ratnadeep Bhattacharjee wrote: > Chances are the location of your ApplicationResource file is not where > ActionServlet is looking for it. For example, if your web.xml looks as follows: > > > action > org.apache.struts.action.ActionServlet > > application > net.covalent.ApplicationResources > > > > then the ApplicationResources.properties file should be in the > WEB-INF/classes/net/covalent/ directory. > > Hope this helps. > > -Deep. > > > > > I did not make any changes on the code. What do you mean the "app > > server"? I am using jakarta-struts-1.0-b1 under Tomcat. What should I > > do now? > > > > Thanks, > > > > -Sue > > > > Jason Chaffee wrote: > > > > > Have you made any changes to the code? The ActionServlet should be > > > creating the resource bundle and storing in the servlet context using > > > this key. What app server are you using? There could be a bug in how > > > it stores objects in the servlet context, thus the ActionServlet can't > > > find anything that has previously been stored there. > > > > > > -Original Message- > > > From: Sue Deng [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, May 01, 2001 9:39 AM > > > To: [EMAIL PROTECTED] > > > Subject: Re: "html:message" tag > > > > > > Thanks, Jason. But when I use bean:message, I got "Cannot > > > find message resources under key > > > org.apache.struts.action.MESSAGE" error. > > > > > > Thanks, > > > > > > -Sue > > > > > > Jason Chaffee wrote: > > > > > > > > > > > > > > > it should be bean:message > > > > > > > > -Original Message- > > > > From: Sue Deng [mailto:[EMAIL PROTECTED]] > > > > Sent: Monday, April 30, 2001 5:26 PM > >
RE: "html:message" tag
Your ActionServlet needs to be loaded to create an instance of the ResourceBundle. Therefore, if you were requesting a jsp page without going through the ActionServlet, there will not be a ResourceBundle in the servlet context because this happens when the ActionServlet is initialized. -Original Message-From: Sue Deng [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 1:47 PMTo: [EMAIL PROTECTED]Subject: Re: "html:message" tagI would like to share what I did wrong before: I forgot to put the line "2" in web.xml file. After I add this line, my jsp works. So, why is this line so important for using bean:message lag? Thanks, -Sue Jason Chaffee wrote: I find the following configuration easier: Simply put the the resouce file in /WEB-INF/classes directory. Then change the deployment descriptor as follows: action org.apache.struts.action.ActionServlet application ApplicationResources Also, make sure there isn't a typo in your resource file or your jsp page. -Original Message- From: Sue Deng [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 11:51 AM To: [EMAIL PROTECTED] Subject: Re: "html:message" tag I put my ApplicationResources.properties file in /usr/local/tomcat/classes/net/covalent directory before. Now i moved it to my applications /WEB-INF/classes/net/covalent directory. And I got "Missing message for key logon.title" error, but the logon.title key is in the file. Thanks, -Sue Ratnadeep Bhattacharjee wrote: > Chances are the location of your ApplicationResource file is not where > ActionServlet is looking for it. For example, if your web.xml looks as follows: > > > action > org.apache.struts.action.ActionServlet > > application > net.covalent.ApplicationResources > > > > then the ApplicationResources.properties file should be in the > WEB-INF/classes/net/covalent/ directory. > > Hope this helps. > > -Deep. > > > > > I did not make any changes on the code. What do you mean the "app > > server"? I am using jakarta-struts-1.0-b1 under Tomcat. What should I > > do now? > > > > Thanks, > > > > -Sue > > > > Jason Chaffee wrote: > > > > > Have you made any changes to the code? The ActionServlet should be > > > creating the resource bundle and storing in the servlet context using > > > this key. What app server are you using? There could be a bug in how > > > it stores objects in the servlet context, thus the ActionServlet can't > > > find anything that has previously been stored there. > > > > > > -Original Message- > > > From: Sue Deng [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, May 01, 2001 9:39 AM > > > To: [EMAIL PROTECTED] > > > Subject: Re: "html:message" tag > > > > > > Thanks, Jason. But when I use bean:message, I got "Cannot > > > find message resources under key > > > org.apache.struts.action.MESSAGE" error. > > > > > > Thanks, > > > > > > -Sue > > > > > > Jason Chaffee wrote: > > > > > > > > > > > > > > > it should be bean:message > > > > > > > > -----Original Message- > > > > From: Sue Deng [mailto:[EMAIL PROTECTED]] > > > > Sent: Monday, April 30, 2001 5:26 PM > > > > To: [EMAIL PROTECTED] > > > > Subject: "html:message" tag > > > > > > > > Hi, > > > > > > > > I am trying to build form using struts taglib. But I get > > > > "no such tag > > > > message ..."error when I use "html:message" tag. I found > > > > that > > > > struts-html.tld and struts-bean.tld files do not have a > > > > tag named > > > > "message", but the struts example uses that tag. Why? > > > > > > > > Thanks, > > > > > > > > -Sue > > >
Re: "html:message" tag
I would like to share what I did wrong before: I forgot to put the line "2" in web.xml file. After I add this line, my jsp works. So, why is this line so important for using bean:message lag? Thanks, -Sue Jason Chaffee wrote: I find the following configuration easier: Simply put the the resouce file in /WEB-INF/classes directory. Then change the deployment descriptor as follows: action org.apache.struts.action.ActionServlet application ApplicationResources Also, make sure there isn't a typo in your resource file or your jsp page. -Original Message- From: Sue Deng [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 11:51 AM To: [EMAIL PROTECTED] Subject: Re: "html:message" tag I put my ApplicationResources.properties file in /usr/local/tomcat/classes/net/covalent directory before. Now i moved it to my applications /WEB-INF/classes/net/covalent directory. And I got "Missing message for key logon.title" error, but the logon.title key is in the file. Thanks, -Sue Ratnadeep Bhattacharjee wrote: > Chances are the location of your ApplicationResource file is not where > ActionServlet is looking for it. For example, if your web.xml looks as follows: > > > action > org.apache.struts.action.ActionServlet > > application > net.covalent.ApplicationResources > > > > then the ApplicationResources.properties file should be in the > WEB-INF/classes/net/covalent/ directory. > > Hope this helps. > > -Deep. > > > > > I did not make any changes on the code. What do you mean the "app > > server"? I am using jakarta-struts-1.0-b1 under Tomcat. What should I > > do now? > > > > Thanks, > > > > -Sue > > > > Jason Chaffee wrote: > > > > > Have you made any changes to the code? The ActionServlet should be > > > creating the resource bundle and storing in the servlet context using > > > this key. What app server are you using? There could be a bug in how > > > it stores objects in the servlet context, thus the ActionServlet can't > > > find anything that has previously been stored there. > > > > > > -Original Message- > > > From: Sue Deng [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, May 01, 2001 9:39 AM > > > To: [EMAIL PROTECTED] > > > Subject: Re: "html:message" tag > > > > > > Thanks, Jason. But when I use bean:message, I got "Cannot > > > find message resources under key > > > org.apache.struts.action.MESSAGE" error. > > > > > > Thanks, > > > > > > -Sue > > > > > > Jason Chaffee wrote: > > > > > > > > > > > > > > > it should be bean:message > > > > > > > > -Original Message- > > > > From: Sue Deng [mailto:[EMAIL PROTECTED]] > > > > Sent: Monday, April 30, 2001 5:26 PM > > > > To: [EMAIL PROTECTED] > > > > Subject: "html:message" tag > > > > > > > > Hi, > > > > > > > > I am trying to build form using struts taglib. But I get > > > > "no such tag > > > > message ..."error when I use "html:message" tag. I found > > > > that > > > > struts-html.tld and struts-bean.tld files do not have a > > > > tag named > > > > "message", but the struts example uses that tag. Why? > > > > > > > > Thanks, > > > > > > > > -Sue > > >
Re: "html:message" tag
By the way, struts-example gave me the similar error message also, but it worked before. Thanks, -Sue Sue Deng wrote: > I put my ApplicationResources.properties file in > /usr/local/tomcat/classes/net/covalent directory before. Now i moved it to my > applications /WEB-INF/classes/net/covalent directory. And I got "Missing message > for key logon.title" error, but the logon.title key is in the file. > > Thanks, > > -Sue > Ratnadeep Bhattacharjee wrote: > > > Chances are the location of your ApplicationResource file is not where > > ActionServlet is looking for it. For example, if your web.xml looks as follows: > > > > > > action > > org.apache.struts.action.ActionServlet > > > > application > > net.covalent.ApplicationResources > > > > > > > > then the ApplicationResources.properties file should be in the > > WEB-INF/classes/net/covalent/ directory. > > > > Hope this helps. > > > > -Deep. > > > > > > > > I did not make any changes on the code. What do you mean the "app > > > server"? I am using jakarta-struts-1.0-b1 under Tomcat. What should I > > > do now? > > > > > > Thanks, > > > > > > -Sue > > > > > > Jason Chaffee wrote: > > > > > > > Have you made any changes to the code? The ActionServlet should be > > > > creating the resource bundle and storing in the servlet context using > > > > this key. What app server are you using? There could be a bug in how > > > > it stores objects in the servlet context, thus the ActionServlet can't > > > > find anything that has previously been stored there. > > > > > > > > -Original Message- > > > > From: Sue Deng [mailto:[EMAIL PROTECTED]] > > > > Sent: Tuesday, May 01, 2001 9:39 AM > > > > To: [EMAIL PROTECTED] > > > > Subject: Re: "html:message" tag > > > > > > > > Thanks, Jason. But when I use bean:message, I got "Cannot > > > > find message resources under key > > > > org.apache.struts.action.MESSAGE" error. > > > > > > > > Thanks, > > > > > > > > -Sue > > > > > > > > Jason Chaffee wrote: > > > > > > > > > > > > > > > > > > > it should be bean:message > > > > > > > > > > -Original Message- > > > > > From: Sue Deng [mailto:[EMAIL PROTECTED]] > > > > > Sent: Monday, April 30, 2001 5:26 PM > > > > > To: [EMAIL PROTECTED] > > > > > Subject: "html:message" tag > > > > > > > > > > Hi, > > > > > > > > > > I am trying to build form using struts taglib. But I get > > > > > "no such tag > > > > > message ..."error when I use "html:message" tag. I found > > > > > that > > > > > struts-html.tld and struts-bean.tld files do not have a > > > > > tag named > > > > > "message", but the struts example uses that tag. Why? > > > > > > > > > > Thanks, > > > > > > > > > > -Sue > > > >
RE: "html:message" tag
Title: RE: "html:message" tag I find the following configuration easier: Simply put the the resouce file in /WEB-INF/classes directory. Then change the deployment descriptor as follows: action org.apache.struts.action.ActionServlet application ApplicationResources Also, make sure there isn't a typo in your resource file or your jsp page. -Original Message- From: Sue Deng [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 11:51 AM To: [EMAIL PROTECTED] Subject: Re: "html:message" tag I put my ApplicationResources.properties file in /usr/local/tomcat/classes/net/covalent directory before. Now i moved it to my applications /WEB-INF/classes/net/covalent directory. And I got "Missing message for key logon.title" error, but the logon.title key is in the file. Thanks, -Sue Ratnadeep Bhattacharjee wrote: > Chances are the location of your ApplicationResource file is not where > ActionServlet is looking for it. For example, if your web.xml looks as follows: > > > action > org.apache.struts.action.ActionServlet > > application > net.covalent.ApplicationResources > > > > then the ApplicationResources.properties file should be in the > WEB-INF/classes/net/covalent/ directory. > > Hope this helps. > > -Deep. > > > > > I did not make any changes on the code. What do you mean the "app > > server"? I am using jakarta-struts-1.0-b1 under Tomcat. What should I > > do now? > > > > Thanks, > > > > -Sue > > > > Jason Chaffee wrote: > > > > > Have you made any changes to the code? The ActionServlet should be > > > creating the resource bundle and storing in the servlet context using > > > this key. What app server are you using? There could be a bug in how > > > it stores objects in the servlet context, thus the ActionServlet can't > > > find anything that has previously been stored there. > > > > > > -Original Message- > > > From: Sue Deng [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, May 01, 2001 9:39 AM > > > To: [EMAIL PROTECTED] > > > Subject: Re: "html:message" tag > > > > > > Thanks, Jason. But when I use bean:message, I got "Cannot > > > find message resources under key > > > org.apache.struts.action.MESSAGE" error. > > > > > > Thanks, > > > > > > -Sue > > > > > > Jason Chaffee wrote: > > > > > > > > > > > > > > > it should be bean:message > > > > > > > > -Original Message- > > > > From: Sue Deng [mailto:[EMAIL PROTECTED]] > > > > Sent: Monday, April 30, 2001 5:26 PM > > > > To: [EMAIL PROTECTED] > > > > Subject: "html:message" tag > > > > > > > > Hi, > > > > > > > > I am trying to build form using struts taglib. But I get > > > > "no such tag > > > > message ..."error when I use "html:message" tag. I found > > > > that > > > > struts-html.tld and struts-bean.tld files do not have a > > > > tag named > > > > "message", but the struts example uses that tag. Why? > > > > > > > > Thanks, > > > > > > > > -Sue > > >
Re: "html:message" tag
I put my ApplicationResources.properties file in /usr/local/tomcat/classes/net/covalent directory before. Now i moved it to my applications /WEB-INF/classes/net/covalent directory. And I got "Missing message for key logon.title" error, but the logon.title key is in the file. Thanks, -Sue Ratnadeep Bhattacharjee wrote: > Chances are the location of your ApplicationResource file is not where > ActionServlet is looking for it. For example, if your web.xml looks as follows: > > > action > org.apache.struts.action.ActionServlet > > application > net.covalent.ApplicationResources > > > > then the ApplicationResources.properties file should be in the > WEB-INF/classes/net/covalent/ directory. > > Hope this helps. > > -Deep. > > > > > I did not make any changes on the code. What do you mean the "app > > server"? I am using jakarta-struts-1.0-b1 under Tomcat. What should I > > do now? > > > > Thanks, > > > > -Sue > > > > Jason Chaffee wrote: > > > > > Have you made any changes to the code? The ActionServlet should be > > > creating the resource bundle and storing in the servlet context using > > > this key. What app server are you using? There could be a bug in how > > > it stores objects in the servlet context, thus the ActionServlet can't > > > find anything that has previously been stored there. > > > > > > -Original Message- > > > From: Sue Deng [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, May 01, 2001 9:39 AM > > > To: [EMAIL PROTECTED] > > > Subject: Re: "html:message" tag > > > > > > Thanks, Jason. But when I use bean:message, I got "Cannot > > > find message resources under key > > > org.apache.struts.action.MESSAGE" error. > > > > > > Thanks, > > > > > > -Sue > > > > > > Jason Chaffee wrote: > > > > > > > > > > > > > > > it should be bean:message > > > > > > > > -Original Message- > > > > From: Sue Deng [mailto:[EMAIL PROTECTED]] > > > > Sent: Monday, April 30, 2001 5:26 PM > > > > To: [EMAIL PROTECTED] > > > > Subject: "html:message" tag > > > > > > > > Hi, > > > > > > > > I am trying to build form using struts taglib. But I get > > > > "no such tag > > > > message ..."error when I use "html:message" tag. I found > > > > that > > > > struts-html.tld and struts-bean.tld files do not have a > > > > tag named > > > > "message", but the struts example uses that tag. Why? > > > > > > > > Thanks, > > > > > > > > -Sue > > >
RE: "html:message" tag
Just checking ... you do have an ApplicationResources.properties file and a message for the key you are using in the tag in that file? -Original Message- From: Sue Deng To: [EMAIL PROTECTED] Sent: 5/1/01 11:10 AM Subject: Re: "html:message" tag I did not make any changes on the code. What do you mean the "app server"? I am using jakarta-struts-1.0-b1 under Tomcat. What should I do now? Thanks, -Sue Jason Chaffee wrote: Have you made any changes to the code? The ActionServlet should be creating the resource bundle and storing in the servlet context using this key. What app server are you using? There could be a bug in how it stores objects in the servlet context, thus the ActionServlet can't find anything that has previously been stored there. -Original Message- From: Sue Deng [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] Sent: Tuesday, May 01, 2001 9:39 AM To: [EMAIL PROTECTED] Subject: Re: "html:message" tag Thanks, Jason. But when I use bean:message, I got "Cannot find message resources under key org.apache.struts.action.MESSAGE" error. Thanks, -Sue Jason Chaffee wrote: it should be bean:message -Original Message- From: Sue Deng [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] Sent: Monday, April 30, 2001 5:26 PM To: [EMAIL PROTECTED] Subject: "html:message" tag Hi, I am trying to build form using struts taglib. But I get "no such tag message ..."error when I use "html:message" tag. I found that struts-html.tld and struts-bean.tld files do not have a tag named "message", but the struts example uses that tag. Why? Thanks, -Sue
Re: "html:message" tag
Chances are the location of your ApplicationResource file is not where ActionServlet is looking for it. For example, if your web.xml looks as follows: action org.apache.struts.action.ActionServlet application net.covalent.ApplicationResources then the ApplicationResources.properties file should be in the WEB-INF/classes/net/covalent/ directory. Hope this helps. -Deep. > > I did not make any changes on the code. What do you mean the "app > server"? I am using jakarta-struts-1.0-b1 under Tomcat. What should I > do now? > > Thanks, > > -Sue > > Jason Chaffee wrote: > > > Have you made any changes to the code? The ActionServlet should be > > creating the resource bundle and storing in the servlet context using > > this key. What app server are you using? There could be a bug in how > > it stores objects in the servlet context, thus the ActionServlet can't > > find anything that has previously been stored there. > > > > -Original Message- > > From: Sue Deng [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, May 01, 2001 9:39 AM > > To: [EMAIL PROTECTED] > > Subject: Re: "html:message" tag > > > > Thanks, Jason. But when I use bean:message, I got "Cannot > > find message resources under key > > org.apache.struts.action.MESSAGE" error. > > > > Thanks, > > > > -Sue > > > > Jason Chaffee wrote: > > > > > > > > > > > it should be bean:message > > > > > > -Original Message- > > > From: Sue Deng [mailto:[EMAIL PROTECTED]] > > > Sent: Monday, April 30, 2001 5:26 PM > > > To: [EMAIL PROTECTED] > > > Subject: "html:message" tag > > > > > > Hi, > > > > > > I am trying to build form using struts taglib. But I get > > > "no such tag > > > message ..."error when I use "html:message" tag. I found > > > that > > > struts-html.tld and struts-bean.tld files do not have a > > > tag named > > > "message", but the struts example uses that tag. Why? > > > > > > Thanks, > > > > > > -Sue > >
RE: "html:message" tag
I haven't used Tomcat, but I believe quite a few people are using it with Struts without any problems. Can you give me more precise details? What does your deployment descriptor look like? Is your action class do anything with the servlet, etc. Also, what appears on the console when this errors occurs? -Original Message-From: Sue Deng [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 11:11 AMTo: [EMAIL PROTECTED]Subject: Re: "html:message" tagI did not make any changes on the code. What do you mean the "app server"? I am using jakarta-struts-1.0-b1 under Tomcat. What should I do now? Thanks, -Sue Jason Chaffee wrote: Have you made any changes to the code? The ActionServlet should be creating the resource bundle and storing in the servlet context using this key. What app server are you using? There could be a bug in how it stores objects in the servlet context, thus the ActionServlet can't find anything that has previously been stored there. -Original Message- From: Sue Deng [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 9:39 AM To: [EMAIL PROTECTED] Subject: Re: "html:message" tag Thanks, Jason. But when I use bean:message, I got "Cannot find message resources under key org.apache.struts.action.MESSAGE" error. Thanks, -Sue Jason Chaffee wrote: it should be bean:message -Original Message- From: Sue Deng [mailto:[EMAIL PROTECTED]] Sent: Monday, April 30, 2001 5:26 PM To: [EMAIL PROTECTED] Subject: "html:message" tag Hi, I am trying to build form using struts taglib. But I get "no such tag message ..."error when I use "html:message" tag. I found that struts-html.tld and struts-bean.tld files do not have a tag named "message", but the struts example uses that tag. Why? Thanks, -Sue
Re: "html:message" tag
I did not make any changes on the code. What do you mean the "app server"? I am using jakarta-struts-1.0-b1 under Tomcat. What should I do now? Thanks, -Sue Jason Chaffee wrote: Have you made any changes to the code? The ActionServlet should be creating the resource bundle and storing in the servlet context using this key. What app server are you using? There could be a bug in how it stores objects in the servlet context, thus the ActionServlet can't find anything that has previously been stored there. -Original Message- From: Sue Deng [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 9:39 AM To: [EMAIL PROTECTED] Subject: Re: "html:message" tag Thanks, Jason. But when I use bean:message, I got "Cannot find message resources under key org.apache.struts.action.MESSAGE" error. Thanks, -Sue Jason Chaffee wrote: it should be bean:message -Original Message- From: Sue Deng [mailto:[EMAIL PROTECTED]] Sent: Monday, April 30, 2001 5:26 PM To: [EMAIL PROTECTED] Subject: "html:message" tag Hi, I am trying to build form using struts taglib. But I get "no such tag message ..."error when I use "html:message" tag. I found that struts-html.tld and struts-bean.tld files do not have a tag named "message", but the struts example uses that tag. Why? Thanks, -Sue
RE: "html:message" tag
Have you made any changes to the code? The ActionServlet should be creating the resource bundle and storing in the servlet context using this key. What app server are you using? There could be a bug in how it stores objects in the servlet context, thus the ActionServlet can't find anything that has previously been stored there. -Original Message-From: Sue Deng [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 9:39 AMTo: [EMAIL PROTECTED]Subject: Re: "html:message" tagThanks, Jason. But when I use bean:message, I got "Cannot find message resources under key org.apache.struts.action.MESSAGE" error. Thanks, -Sue Jason Chaffee wrote: it should be bean:message -Original Message- From: Sue Deng [mailto:[EMAIL PROTECTED]] Sent: Monday, April 30, 2001 5:26 PM To: [EMAIL PROTECTED] Subject: "html:message" tag Hi, I am trying to build form using struts taglib. But I get "no such tag message ..."error when I use "html:message" tag. I found that struts-html.tld and struts-bean.tld files do not have a tag named "message", but the struts example uses that tag. Why? Thanks, -Sue
Re: "html:message" tag
Thanks, Jason. But when I use bean:message, I got "Cannot find message resources under key org.apache.struts.action.MESSAGE" error. Thanks, -Sue Jason Chaffee wrote: it should be bean:message -Original Message- From: Sue Deng [mailto:[EMAIL PROTECTED]] Sent: Monday, April 30, 2001 5:26 PM To: [EMAIL PROTECTED] Subject: "html:message" tag Hi, I am trying to build form using struts taglib. But I get "no such tag message ..."error when I use "html:message" tag. I found that struts-html.tld and struts-bean.tld files do not have a tag named "message", but the struts example uses that tag. Why? Thanks, -Sue
RE: "html:message" tag
Title: RE: "html:message" tag it should be bean:message -Original Message- From: Sue Deng [mailto:[EMAIL PROTECTED]] Sent: Monday, April 30, 2001 5:26 PM To: [EMAIL PROTECTED] Subject: "html:message" tag Hi, I am trying to build form using struts taglib. But I get "no such tag message ..."error when I use "html:message" tag. I found that struts-html.tld and struts-bean.tld files do not have a tag named "message", but the struts example uses that tag. Why? Thanks, -Sue
"html:message" tag
Hi, I am trying to build form using struts taglib. But I get "no such tag message ..."error when I use "html:message" tag. I found that struts-html.tld and struts-bean.tld files do not have a tag named "message", but the struts example uses that tag. Why? Thanks, -Sue