You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Je...@nlgroup.ca on 2002/10/17 22:12:08 UTC

ApplicationResources from within ActionForm's validate()??

I am using 1.1b2

I have searched for this question but have found many similar questions but
no satisfactory answer.

It appears that using :
MessageResources msg = this.getServlet().getResources()

inside the action for will work, but it is deprecated.

What is the cleanest way to do this?

I am validating a date format and would like to keep the mask in the
properties file is possible.

thanks


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ApplicationResources from within ActionForm's validate()??

Posted by Eddie Bush <ek...@swbell.net>.
Have you tried the javadocs yet?

-- 
Eddie Bush




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: ApplicationResources from within ActionForm's validate()??

Posted by James Mitchell <jm...@telocity.com>.
>From the struts-example...

    public ActionForward execute(ActionMapping mapping,
				 ActionForm form,
				 HttpServletRequest request,
				 HttpServletResponse response)
	throws Exception {

	// Extract attributes we will need
	Locale locale = getLocale(request);
--->	MessageResources messages = getResources(request);
	HttpSession session = request.getSession();




James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org




> -----Original Message-----
> From: Jeff_Mychasiw@nlgroup.ca [mailto:Jeff_Mychasiw@nlgroup.ca]
> Sent: Thursday, October 17, 2002 4:12 PM
> To: struts-user@jakarta.apache.org
> Subject: ApplicationResources from within ActionForm's validate()??
> 
> 
> I am using 1.1b2
> 
> I have searched for this question but have found many similar 
> questions but
> no satisfactory answer.
> 
> It appears that using :
> MessageResources msg = this.getServlet().getResources()
> 
> inside the action for will work, but it is deprecated.
> 
> What is the cleanest way to do this?
> 
> I am validating a date format and would like to keep the mask in the
> properties file is possible.
> 
> thanks
> 
> 
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>