Thanks!
________________________________ From: Musachy Barroso <musa...@gmail.com> To: Struts Users Mailing List <user@struts.apache.org> Sent: Tuesday, February 10, 2009 10:35:01 AM Subject: Re: Cookie Intercepter configuration It is a bug. This interceptor was added in 2.0.7, and it was never added to struts-default.xml in the 2.1 branch. Just add this to your struts.xml: <interceptor name="cookie" class="org.apache.struts2.interceptor.CookieInterceptor"/> for reference: https://issues.apache.org/struts/browse/WW-2992 musachy On Tue, Feb 10, 2009 at 10:27 AM, Musachy Barroso <musa...@gmail.com> wrote: > Where is the cookie interceptor defined? it is not in struts-default.xml: > > http://struts.apache.org/2.x/docs/struts-defaultxml.html > > hum..this is weird. > > musachy > > On Tue, Feb 10, 2009 at 9:08 AM, Norris Shelton <norrisshel...@yahoo.com> > wrote: >> <!DOCTYPE struts PUBLIC >> "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" >> "http://struts.apache.org/dtds/struts-2.1.dtd"> >> <struts> >> <constant name="struts.objectFactory" value="spring"/> >> <constant name="struts.devMode" value="true"/> >> <constant name="struts.configuration.xml.reload" value="true"/> >> <constant name="struts.custom.i18n.resources" value="globalMessages"/> >> <!-- >> Normally looks actions that are in a specific package [actions, >> struts] and end in *Action or extend Action. >> In this case, we also want it to scan all classes under the conap >> directory >> --> >> <constant name="struts.convention.action.packages" >> value="mil.army.usaac.conap"/> >> <package name="conap" extends="struts-default"> >> <default-interceptor-ref name="paramsPrepareParamsStack"/> >> <action name="/soldier/view" >> class="mil.army.usaac.conap.soldier.ViewAction"> >> <interceptor-ref name="cookie"> >> <param name="cookiesName">*</param> >> <param name="cookiesValue">*</param> >> </interceptor-ref> >> </action> >> </package> >> </struts> >> >> >> >> ________________________________ >> From: Jack Qu <qujiak...@hotmail.com> >> To: Struts Users Mailing List <user@struts.apache.org> >> Sent: Tuesday, February 10, 2009 8:55:11 AM >> Subject: Re: Cookie Intercepter configuration >> >> what's the >> file:/C:/dev/sun/sjas9_1_u2/domains/domain1/applications/j2ee-modules/conap/WEB-INF/classes/struts.xml:17:44 >> show text! >> >> -------------------------------------------------- >> From: "Norris Shelton" <norrisshel...@yahoo.com> >> Sent: Tuesday, February 10, 2009 9:47 PM >> To: "Struts Users Mailing List" <user@struts.apache.org> >> Subject: Re: Cookie Intercepter configuration >> >>> Is there a library that I should be including? >>> >>> [#|2009-02-10T08:19:42.441-0500|INFO|sun-appserver9.1|org.apache.struts2.spring.StrutsSpringObjectFactory|_ThreadID=22;_ThreadName=httpWorkerThread-4848-1;|... >>> initialized Struts-Spring integration successfully|#] >>> >>> [#|2009-02-10T08:19:44.300-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=22;_ThreadName=httpWorkerThread-4848-1;_RequestID=e361233b-87b4-43e9-bc9e-8c91015caa2d;|WebModule[/conap]PWC1270: >>> Exception starting filter struts2 >>> Unable to load configuration. - interceptor-ref - >>> file:/C:/dev/sun/sjas9_1_u2/domains/domain1/applications/j2ee-modules/conap/WEB-INF/classes/struts.xml:17:44 >>> at >>> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58) >>> at >>> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360) >>> at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403) >>> at >>> org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190) >>> at >>> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:257) >>> at >>> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:369) >>> at >>> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103) >>> at >>> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4389) >>> at >>> org.apache.catalina.core.StandardContext.start(StandardContext.java:5189) >>> at com.sun.enterprise.web.WebModule.start(WebModule.java:326) >>> at >>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:973) >>> at >>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957) >>> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688) >>> at >>> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1584) >>> at >>> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1222) >>> at >>> com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:182) >>> at >>> com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:278) >>> at >>> com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:974) >>> at >>> com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:961) >>> at >>> com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:464) >>> at >>> com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176) >>> at >>> com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308) >>> at >>> com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:226) >>> at >>> com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298) >>> at >>> com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132) >>> at >>> com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108) >>> at >>> com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919) >>> at >>> com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:591) >>> at >>> com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:635) >>> at >>> com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:744) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375) >>> at >>> com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358) >>> at >>> com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464) >>> at >>> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) >>> at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) >>> at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source) >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90) >>> at $Proxy1.invoke(Unknown Source) >>> at >>> com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304) >>> at >>> com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174) >>> at >>> com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69) >>> at >>> com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155) >>> at >>> com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122) >>> at >>> com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193) >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) >>> at >>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290) >>> at >>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) >>> at >>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) >>> at >>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) >>> at >>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) >>> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) >>> at >>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) >>> at >>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) >>> at >>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) >>> at >>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) >>> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) >>> at >>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) >>> at >>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) >>> at >>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) >>> at >>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) >>> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) >>> at >>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272) >>> at >>> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) >>> at >>> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) >>> at >>> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) >>> at >>> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) >>> at >>> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) >>> at >>> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) >>> at >>> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) >>> at >>> com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116) >>> Caused by: Unable to find interceptor class referenced by ref-name cookie - >>> interceptor-ref - >>> file:/C:/dev/sun/sjas9_1_u2/domains/domain1/applications/j2ee-modules/conap/WEB-INF/classes/struts.xml:17:44 >>> at >>> com.opensymphony.xwork2.config.providers.InterceptorBuilder.constructInterceptorReference(InterceptorBuilder.java:52) >>> at >>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.lookupInterceptorReference(XmlConfigurationProvider.java:1092) >>> at >>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildInterceptorList(XmlConfigurationProvider.java:531) >>> at >>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:369) >>> at >>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:460) >>> at >>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:265) >>> at >>> org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111) >>> at >>> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:189) >>> at >>> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55) >>> ... 77 more >>> |#] >>> >>> >>> >>> >>> >>> >>> ________________________________ >>> From: Musachy Barroso <musa...@gmail.com> >>> To: Struts Users Mailing List <user@struts.apache.org> >>> Sent: Monday, February 9, 2009 5:20:45 PM >>> Subject: Re: Cookie Intercepter configuration >>> >>> There should be a more meaningful exception down there in the log, can >>> you post the whole stack trace? >>> >>> musachy >>> >>> On Mon, Feb 9, 2009 at 4:38 PM, Norris Shelton <norrisshel...@yahoo.com> >>> wrote: >>>> Struts 2.1.6 on Glassfish 9.1_02 >>>> >>>> I am trying to configure the cookie intercepter, but it looks like I am >>>> missing something. >>>> >>>> I have the following in my struts.xml: >>>> <default-interceptor-ref name="paramsPrepareParamsStack"/> >>>> <action name="/soldier/view" >>>> class="mil.army.usaac.conap.soldier.ViewAction"> >>>> <interceptor-ref name="cookie"> >>>> <param name="cookiesName">*</param> >>>> <param name="cookiesValue">*</param> >>>> </interceptor-ref> >>>> </action> >>>> >>>> >>>> My server errors when I try to deploy the webapp. >>>> [#|2009-02-09T15:42:34.727-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=17;_ThreadName=httpWorkerThread-4848-2;_RequestID=17f40931-feed-453a-902a-f45c6313df0d;|WebModule[/conap]PWC1270: >>>> Exception starting filter struts2 >>>> Unable to load configuration. - interceptor-ref - >>>> file:/C:/dev/sun/sjas9_1_u2/domains/domain1/applications/j2ee-modules/conap/WEB-INF/classes/struts.xml:17:44 >>>> at >>>> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58) >>>> >>>> >>>> >>>> >>>> Norris Shelton >>>> Software Engineer >>>> Sun Certified Java 1.1 Programmer >>>> Shelton Consulting, LLC >>>> ICQ# 26487421 >>>> AIM NorrisEShelton >>>> YIM norrisshelton >>>> >>>> >>>> >>>> >>> >>> >>> >>> -- "Hey you! Would you help me to carry the stone?" Pink Floyd >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>> For additional commands, e-mail: user-h...@struts.apache.org >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >> > > > > -- > "Hey you! Would you help me to carry the stone?" Pink Floyd > -- "Hey you! Would you help me to carry the stone?" Pink Floyd --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org