You have several problems, none of which have anything to do with Struts. First, your "SetLocalForm" class appears to be not defined. I would guess it's not in the same package as your "SetLocalAction" class.
Second, you can't do: String localString = (SetLocalForm)form.getLocal(); Because the "ActionForm" class does not have a "getLocal()" method. Most likely, you would have something like this: SetLocalForm setLocalForm = (SetLocalForm) form; String localString = setLocalForm.getLocal(); Third, there is no "java.util.Local" class. Are all of these "Local"s supposed to be "Locale"s? If so, you have several name changes you need to make. > -----Original Message----- > From: Marcus Biel [mailto:Marcus.Biel@;bmw.de] > Sent: Wednesday, November 13, 2002 3:26 AM > To: [EMAIL PROTECTED] > Subject: OT: Re: 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(); > > 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(); > ^ > SetLocalAction.java:12: cannot resolve symbol > symbol : method getLocal () > location: class org.apache.struts.action.ActionForm > String localString = (SetLocalForm)form.getLocal(); > ^ > SetLocalAction.java:14: cannot resolve symbol > symbol : class Local > location: package util > Locale local = new java.util.Local(localString, localString); > ^ > 3 errors > > > Damn! Thats frustrating! > > marcus > > -- > To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> 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>