Intermixed...

> -----Original Message-----
> From: Marcus Biel [mailto:Marcus.Biel@;bmw.de] 
> Sent: Wednesday, November 13, 2002 6:26 AM
> To: [EMAIL PROTECTED]
> Subject: OT: user manually changing local
> 
> 
> ARG! What the hell is wrong here ???
> import java.util.Locale;
> import java.lang.*;
> import java.sql.*;
> import javax.servlet.http.*;
> import org.apache.struts.action.*;
> 
> public class SetLocalAction extends Action {
>       public ActionForward perform(ActionMapping mapping,
>       ActionForm form, HttpServletRequest request, 
> HttpServletResponse response){
> 
>   String localString = (SetLocalForm)form.getLocal();

Should be 
  String localString = ((SetLocalForm)form).getLocal();

> 
>   Locale local = new java.util.Local(localString, localString);
>       request.getSession().setAttribute(Action.LOCALE_KEY, local);
>       return mapping.findForward("setLocalActionDone");
>    }
> }
> 
> Got a SetLocalForm.class that has got the method getLocal() 
> so it should be working.
> 
> But when I try to compile the Action, I get:
> 
> SetLocalAction.java:12: cannot resolve symbol
> symbol  : class SetLocalForm
> location: class SetLocalAction
>   String localString = (SetLocalForm)form.getLocal();
>                         ^

Is the SetLocalForm class visitble to SetLocalAction; is it in the same package or do 
you have the appropriate import statement?


> SetLocalAction.java:12: cannot resolve symbol
> symbol  : method getLocal  ()
> location: class org.apache.struts.action.ActionForm
>   String localString = (SetLocalForm)form.getLocal();
>     

See above code fix.
                                     ^
> SetLocalAction.java:14: cannot resolve symbol
> symbol  : class Local
> location: package util
>   Locale local = new java.util.Local(localString, localString);

Should be 
  Locale local = new java.util.Locale(localString, localString);

Note the 'e' in Locale.
>                               ^
> 3 errors
> 
> 
> Damn! Thats frustrating!
> 
> marcus

Sri

> 
> --
> To unsubscribe, e-mail:   
> <mailto:struts-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:struts-user-help@;jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to