Helo, I get the following in my log (JRun 4, JDK 1.40.) :
10/06 09:23:41 user FileServlet: init
10/06 09:23:50 user action: Processing a POST for /authentication
10/06 09:23:50 user action: Setting locale 'fr'
10/06 09:23:50 user action: Looking for ActionForm bean under attribute
'authenticationForm'
10/06 09:23:50 user action: Creating new ActionForm instance of class
'baepp.AuthenticationForm'
10/06 09:23:51 user action: Storing instance under attribute
'authenticationForm' in scope 'request'
10/06 09:23:51 user action: Populating bean properties from this request
10/06 09:23:51 user action: Validating input form properties
10/06 09:23:51 user action: No errors detected, accepting input
10/06 09:23:51 user action: Looking for Action instance for class
baepp.Authentication
10/06 09:23:51 user action: Double checking for Action instance already
there
10/06 09:23:51 user action: Creating new Action instance
10/06 09:23:51 user action: Error creating Action instance for path
'/authentication', class name 'baepp.Authentication'
java.lang.ClassCastException: baepp.Authentication
at
org.apache.struts.action.ActionServlet.processActionCreate(ActionServlet.jav
a:1632)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1577)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:241)
at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:
348)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451
)
at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:29
4)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Partial code of my Authentication class (but it worked once and stumbled on
AuthenticationForm instead... then I removed a duplicate struts.jar I
found).
package baepp;
import javax.servlet.http.*;
import java.util.*;
import javax.servlet.*;
import java.io.IOException;
import com.sun.java.util.collections.*;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionErrors;
...
public class Authentication extends org.apache.struts.action.Action {
public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException, java.lang.NullPointerException {
...
javax.servlet.http.HttpSession session = null;
...
String userCompany = "";
String userLogin = "";
String userPassword = "";
String userLang = "";
...
int errorCode = 0;
...
java.util.Properties myProp = null;
baepp.Config myConfig = new baepp.Config();
java.util.Calendar logDate = java.util.Calendar.getInstance(new
java.util.Locale("en","US"));
session = request.getSession(true);
// former init method of servlet
...
...
if (!(session.isNew())) {
session.invalidate();
session = request.getSession(true);
}
...
// will set the locale (needed for form check) before getting the
language through the form
try{
ActionErrors errors = new ActionErrors();
userLogin = ((AuthenticationForm) form).getUserLogin();
userPassword = ((AuthenticationForm) form).getUserPassword();
userCompany = ((AuthenticationForm) form).getUserCompany();
userLang = request.getParameterValues("lang")[0];
// return the errors to the original form
if (!errors.empty()) {
return (mapping.findForward(mapping.getInput()));
}
}
catch(java.lang.NullPointerException e){
}
...
}
Barbara
______________________________________________________________________________
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>