Re: Issues with Tomcat 7.0.57 not loading ActionServlets
Yes Martin, That file does exists in that folder. Thanks Raj Sent from my iPhone > On May 16, 2015, at 7:54 PM, Martin Gainty wrote: > > Raj- > > did you check for the existence of > /WEB-INF/validator-rules.xmlin $TOMCAT_HOME/webapps/NameOfYourWebappGoesHere > ? > Martin > __ > > > >> Date: Wed, 6 May 2015 20:29:34 -0500 >> Subject: Issues with Tomcat 7.0.57 not loading ActionServlets >> From: bsudershan...@gmail.com >> To: user@struts.apache.org >> >> I upgraded my application from tomcat 5.5.15, JDK 1.5, Struts 1.1 on Debian >> 2.6.32 to >> tomcat 7.0.57, JDK 1.6, struts 1.1 on ubuntu14.04 and Action Servlets are >> not loading. >> I am thinking of this is something to do with version conflict. Please let >> me know what I am missing. >> >> Below is the error >> >> Apr 24, 2015 9:00:20 PM org.apache.catalina.core.ApplicationContext log >> >> INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: >> [org.apache.webapp.balancer.RuleChain: RoundRobinRule@643fd34a] >> >> Apr 24, 2015 9:00:20 PM org.apache.catalina.core.ApplicationContext log >> >> INFO: Marking servlet action as unavailable >> >> Apr 24, 2015 9:00:20 PM org.apache.catalina.core.StandardContext >> loadOnStartup >> >> SEVERE: Servlet threw load() exception >> >> javax.servlet.UnavailableException: Cannot load a validator resource from >> '/WEB-INF/validator-rules.xml' >> >> at >> org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:174) >> >> at >> org.apache.struts.action.ActionServlet.initModulePlugIns( >> ActionServlet.java:839) >> >> at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332) >> >> at javax.servlet.GenericServlet.init(GenericServlet.java:158) >> >> at >> org.apache.catalina.core.StandardWrapper.initServlet( >> StandardWrapper.java:1284) >> >> at >> org.apache.catalina.core.StandardWrapper.loadServlet( >> StandardWrapper.java:1197) >> >> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087) >> >> at >> org.apache.catalina.core.StandardContext.loadOnStartup( >> StandardContext.java:5231) >> >> at >> org.apache.catalina.core.StandardContext.startInternal( >> StandardContext.java:5518) >> >> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) >> >> at >> org.apache.catalina.core.ContainerBase.addChildInternal( >> ContainerBase.java:901) >> >> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) >> >> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649) >> >> at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081) >> >> at >> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877) >> >> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) >> >> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) >> >> at java.util.concurrent.FutureTask.run(FutureTask.java:166) >> >> at >> java.util.concurrent.ThreadPoolExecutor.runWorker( >> ThreadPoolExecutor.java:1146) >> >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run( >> ThreadPoolExecutor.java:615) >> >> at java.lang.Thread.run(Thread.java:701) >> >> Thanks > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Change of HttpSession causes java.lang.IllegalStateException: HttpSession is invalid
Hello, We have a struts2 project. In that project we have a security procedure in order to log in the users. As part of the login process, the session is destroyed and recreated once the user is logged in, in order to avoid Session hijacking. The problem we are having is that the action finally returns a JSP, and that JSP has a OGNL reference to the session as follows: It seems that the reference #session points to the previous version, as we are getting errors as follows: ERROR org.apache.struts2.dispatcher.Dispatcher - Exception occurred during processing request: HttpSession is invalid java.lang.IllegalStateException: HttpSession is invalid at weblogic.servlet.internal.session.SessionData.getAttributeNames(SessionData.java:476) at org.apache.struts2.dispatcher.SessionMap.entrySet(SessionMap.java:111) at java.util.AbstractMap.hashCode(AbstractMap.java:492) at java.util.Objects.hashCode(Objects.java:96) at java.util.HashMap$Entry.hashCode(HashMap.java:847) at java.util.AbstractMap.hashCode(AbstractMap.java:494) at ognl.OgnlContext.hashCode(OgnlContext.java:707) at java.lang.Object.toString(Object.java:237) at java.lang.String.valueOf(String.java:2847) at java.lang.StringBuilder.append(StringBuilder.java:128) Is there some way we can force the stack to refresh the reference to the session? thanks JL
Re: STruts 2 - populating an ArrayList from the JSP
Try to use browser dev tools to debug your post request. Make sure the parameter names are correct. > > Can you guys help me on this issue? > > Thanks > > On Sat, May 16, 2015 at 12:47 PM, Preetham Mallavarapu < > preethamreddy.mallaar...@gmail.com> wrote: > > > Hi, > > > > I have a problem while accessing the arraylist from jsp in my action > > class... > > > > when I tried to submit the data it isnot returning any values... > > > > Below is my code.. > > > > > > > > class Student > > { > > private int id; > > private String studentName; > > > > //getters and setters > > } > > > > class certificates > > { > > private int id; > > private String certName; > > File certificateImage; > > > > //getters and setters > > } > > > > class StudentManager extends ActionSupport > > { > > private List studentCertificates= new > > ArrayList(); > > getCertficates(int studentID) > > { > > studentCertifictaes = getCertificatesFromDB(studentID); //fetches the > > student certifcates from DB > > > > return "displayCertificatesPage"; > > } > > > > > > updateCertificates() > > { > > system.out.println("No of Certificates.."+studentCertificates.size()); > > updateCertificatesinDB(studentCertificates); > > return "success"; > > } > > > > > > } > > > > > > certifcates.Jsp Page > > > > > > > > > enctype="multipart/form-data"> > > > > > > > > //certificate name can be changed > > > name="studentcertificates[%{#stat.index}].certificateImage" > > > //can be null also// > > > > > > > > > > > > > > flow goes in this way.. > > > > when user requests for certificates page -> (getCertificates > > inStudentManager will be called) -> (displays arraylist data in > > certificates.jsp page ) -> (edited information should be submitted to > > updateCertificates method in action class) > > > > > > but when the updateCerticates method is called the size of the arraylist > > shows zero. > > > > I couldn't trace out the reason why the populated data in arraylist is not > > getting submitted back to action class... > > > > Thanks > > > > This Email was scanned by Sophos Anti Virus