Correct.. you will need commons-lang.jar on your CLASSPATH you can download here http://jakarta.apache.org/site/downloads/downloads_commons-lang.cgi
M- --------------------------------------------------------------------------- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. --------------------------------------------------------------------------- Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. ----- Original Message ----- From: "Yee Kai Lai" <[EMAIL PROTECTED]> To: <user@struts.apache.org> Sent: Saturday, February 17, 2007 5:48 PM Subject: RE: Interceptor to Autheticate User > Hi, the problem might be because you have forgotten to import certain jar > that should contain > SystemUtil class. > > >>From: manoj sinha <[EMAIL PROTECTED]> >>Reply-To: "Struts Users Mailing List" <user@struts.apache.org> >>To: user@struts.apache.org >>Subject: Interceptor to Autheticate User >>Date: Fri, 16 Feb 2007 06:17:32 -0800 (PST) >> >>Hi, >>Wiil appreciate if some one come with Solution!! >>I am writing customized Authentication Interceptor.It Checks username & >>password from database by calling EJBs. >>Code is Here: >>public class AuthenticationInterceptor extends LoginSupport implements >>Interceptor { >> >> public void destroy() { >> } >> >> public void init() { >> } >> >> public String intercept(ActionInvocation actionInvocation) throws >>Exception { >> >> InitialContext jndiContext =SystemUtil.getIntialcontext(); >> Object ref = jndiContext.lookup("Login"); >> Authentication auth =null; >> Encryption encrypt = new Encryption(); >> String encryptPassword = encrypt.encryptString(getPassword()); >> auth = (Authentication) new >>AuthenticationFactory().getAuthenticat(Constants.AUTHENTICATION_MODE); >> Vector loginVector >>=auth.doAuthenticate(getUsername(),getPassword()); >> >> >> if(loginVector!=null){ >> if(((String)loginVector.elementAt(0)).equals("success")){ >> return actionInvocation.invoke(); >> } >> return Action.ERROR; >> } >> return Action.INPUT; >> } >> } >> >>Here LoginSupport class contains getter/setter methods. >>I hace defined Interceptor Stack that is like >><interceptor name="userAuthentication" >>class="com.....AuthenticationInterceptor"/> >><interceptor-stack name="login"> >> <interceptor-ref name="userAuthentication"/> >> <interceptor-ref name="defaultStack"/> >> </interceptor-stack> >>But Error is : >>[[default]] Servlet.service() for servlet default threw exception >>java.lang.NoClassDefFoundError: com/...../...../util/SystemUtil >> at >>com......AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:26) >> at >>com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200) >> at >>org.apache.struts2.impl.StrutsActionProxy$1.call(StrutsActionProxy.java:27) >> at >>org.apache.struts2.impl.StrutsActionProxy$1.call(StrutsActionProxy.java:26) >> Will be Obliged if suggestion comes... >>Thanks >>Manoj >> >> >>--------------------------------- >>8:00? 8:25? 8:40? Find a flick in no time >> with theYahoo! Search movie showtime shortcut. > > _________________________________________________________________ > Find singles online in your area with MSN Dating and Match.com! > http://cp.intl.match.com/eng/msn/msnsg/wbc/wbc.html > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >