Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 19 Feb 2010 16:34:32 -0000 Issue 9008

user-digest-help

2010-02-19


Author LoginPost Reply

user Digest 19 Feb 2010 16:34:32 -0000 Issue 9008

Topics (messages 205055 through 205081):

Re: struts2 on jboss java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable
 205055 by: nani2ratna

Re: Looping problem
 205056 by: nani2ratna

Re: NoClassDefFoundError
 205057 by: nani2ratna

Re: Failed while destroying filter during shutdown
 205058 by: nani2ratna

I added Facebook Connect into the mix
 205059 by: Saeed Iqbal

Old versions of Struts
 205060 by: RogerV

Re: How to prevent JSP files from being publicly directly accessible?
 205061 by: wild_oscar
 205063 by: Greg Lindholm
 205064 by: Cimballi

Spring Session Scoping
 205062 by: Obinna

Re: Any way to load resources in java.util.ResourceBundle
 205065 by: roman danilin

[Q] executeScripts
 205066 by: Hoying, Ken
 205067 by: Hoying, Ken
 205068 by: Hoying, Ken

XSS vulnerability with <s:text>
 205069 by: John Orr
 205075 by: Greg Lindholm
 205077 by: John Orr

how to eliminate time in <s:textfield>
 205070 by: fireapple
 205071 by: Brian Thompson
 205076 by: fireapple
 205078 by: wild_oscar

Struts2 and PlugIn interface
 205072 by: Maciej Radochonski
 205073 by: Lukasz Lenart
 205074 by: Maciej Radochonski

Interceptor
 205079 by: CRANFORD, CHRIS
 205080 by: Cimballi
 205081 by: John Orr

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------


Attachment: user_205055.ezm (zipped)

http://nani2ratna.wordpress.com/2010/02/18/solution-java-lang-noclassdeffounderror-orgapachestruts2utilobjectfactorydestroyable/

check this if it helps you.

Thanks
RS



Jon Pearson wrote:
>
> Well, I got past my problem by providing the name of the action to
> execute, instead of relying on Tomcat to specify that Struts should
> execute the default one. I'll play with my configuration later to get
> that fixed, hopefully it won't be too difficult.
>
>
>> -----Original Message-----
>> From: Jon Pearson
>> Sent: Wednesday, May 20, 2009 12:28 PM
>> To: Struts Users Mailing List
>> Subject: RE: struts2 on jboss java.lang.NoClassDefFoundError:
>> org/apache/struts2/util/ObjectFactoryDestroyable
>>
>> Additionally, although it doesn't show up in the log files, when I try
>> to view the application I see a page that includes this stack trace:
>>
>> java.lang.NullPointerException
>>
>>
>> org.apache.struts2.dispatcher.mapper.DefaultActionMapper.getUr
>> iFromActio
>> nMapping(DefaultActionMapper.java:532)
>>
>> org.apache.struts2.dispatcher.ServletActionRedirectResult.exec
>> ute(Servle
>> tActionRedirectResult.java:197)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(
>> DefaultAct
>> ionInvocation.java:361)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:265)
>>
>> com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor
>> .doInterce
>> pt(DefaultWorkflowInterceptor.java:163)
>>
>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.in
>> tercept(Me
>> thodFilterInterceptor.java:87)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> com.opensymphony.xwork2.validator.ValidationInterceptor.doInte
>> rcept(Vali
>> dationInterceptor.java:249)
>>
>> org.apache.struts2.interceptor.validation.AnnotationValidation
>> Intercepto
>> r.doIntercept(AnnotationValidationInterceptor.java:68)
>>
>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.in
>> tercept(Me
>> thodFilterInterceptor.java:87)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor
>> .intercept
>> (ConversionErrorInterceptor.java:122)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIn
>> tercept(Pa
>> rametersInterceptor.java:195)
>>
>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.in
>> tercept(Me
>> thodFilterInterceptor.java:87)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIn
>> tercept(Pa
>> rametersInterceptor.java:195)
>>
>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.in
>> tercept(Me
>> thodFilterInterceptor.java:87)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> com.opensymphony.xwork2.interceptor.StaticParametersIntercepto
>> r.intercep
>> t(StaticParametersInterceptor.java:148)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> org.apache.struts2.interceptor.CheckboxInterceptor.intercept(C
>> heckboxInt
>> erceptor.java:93)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> org.apache.struts2.interceptor.FileUploadInterceptor.intercept
>> (FileUploa
>> dInterceptor.java:235)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.int
>> ercept(Mod
>> elDrivenInterceptor.java:89)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> com.opensymphony.xwork2.interceptor.ScopedModelDrivenIntercept
>> or.interce
>> pt(ScopedModelDrivenInterceptor.java:128)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> org.apache.struts2.interceptor.ProfilingActivationInterceptor.
>> intercept(
>> ProfilingActivationInterceptor.java:104)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> org.apache.struts2.interceptor.debugging.DebuggingInterceptor.
>> intercept(
>> DebuggingInterceptor.java:267)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> com.opensymphony.xwork2.interceptor.ChainingInterceptor.interc
>> ept(Chaini
>> ngInterceptor.java:126)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> com.opensymphony.xwork2.interceptor.PrepareInterceptor.doInter
>> cept(Prepa
>> reInterceptor.java:138)
>>
>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.in
>> tercept(Me
>> thodFilterInterceptor.java:87)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(
>> I18nInterc
>> eptor.java:148)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> org.apache.struts2.interceptor.ServletConfigInterceptor.interc
>> ept(Servle
>> tConfigInterceptor.java:164)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept
>> (AliasInte
>> rceptor.java:128)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> com.opensymphony.xwork2.interceptor.ExceptionMappingIntercepto
>> r.intercep
>> t(ExceptionMappingInterceptor.java:176)
>>
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(Default
>> ActionInvo
>> cation.java:236)
>>
>> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsAction
>> Proxy.java
>> :52)
>>
>> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatc
>> her.java:4
>> 68)
>>
>> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(Filter
>> Dispatcher
>> .java:395)
>>   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
>> orImpl.jav
>> a:39)
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
>> odAccessor
>> Impl.java:25)
>>   java.lang.reflect.Method.invoke (Method.java:597)
>>
>> org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
>>   java.security.AccessController.doPrivileged(Native Method)
>>   javax.security.auth.Subject.doAsPrivileged (Subject.java:517)
>>
>> org.apache.catalina.security.SecurityUtil.execute(SecurityUtil
>> .java:276)
>>
>> org.apache.catalina.security.SecurityUtil.doAsPrivilege(Securi
>> tyUtil.jav
>> a:218)
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
>> er(Applica
>> tionFilterChain.java:230)
>>
>> org.apache.catalina.core.ApplicationFilterChain.access$000(App
>> licationFi
>> lterChain.java:56)
>>
>> org.apache.catalina.core.ApplicationFilterChain$1.run(Applicat
>> ionFilterC
>> hain.java:189)
>>   java.security.AccessController.doPrivileged(Native Method)
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
>> cationFilt
>> erChain.java:185)
>>
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
>> rapperValv
>> e.java:233)
>>
>> org.apache.catalina.core.StandardContextValve.invoke(StandardC
>> ontextValv
>> e.java:191)
>>
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
>> Valve.java
>> :128)
>>
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
>> Valve.java
>> :102)
>>
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
>> gineValve.
>> java:109)
>>
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap
>> ter.java:2
>> 86)
>>
>> org.apache.coyote.http11.Http11Processor.process(Http11Process
>> or.java:84
>> 5)
>>
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
>> r.process(
>> Http11Protocol.java:583)
>>
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.
>> java:447)
>>   java.lang.Thread.run (Thread.java:619)
>>  
>>
>> I have no idea DefaultActionMapper would be throwing a
>> NullPointerException, though...
>>
>> > -----Original Message-----
>> > From: Jon Pearson
>> > Sent: Wednesday, May 20, 2009 12:26 PM
>> > To: Struts Users Mailing List
>> > Subject: RE: struts2 on jboss java.lang.NoClassDefFoundError:
>> > org/apache/struts2/util/ObjectFactoryDestroyable
>> >
>> > I'm having this same problem on Tomcat 6. Here's the stack trace:
>> >
>> > javax.servlet.ServletException:
>> > org/apache/struts2/util/ObjectFactoryDestroyable
>> >      at
>> > org.apache.catalina.security.SecurityUtil.execute(SecurityUtil
>> > .java:294)
>> >      at
>> > org.apache.catalina.security.SecurityUtil.doAsPrivilege(Securi
>> > tyUtil.jav
>> > a:218)
>> >      at
>> > org.apache.catalina.security.SecurityUtil.doAsPrivilege(Securi
>> > tyUtil.jav
>> > a:178)
>> >      at
>> > org.apache.catalina.core.ApplicationFilterConfig.release(Appli
>> > cationFilt
>> > erConfig.java:326)
>> >      at
>> > org.apache.catalina.core.StandardContext.filterStop(StandardCo
>> > ntext.java
>> > :3744)
>> >      at
>> > org.apache.catalina.core.StandardContext.stop(StandardContext.
>> > java:4513)
>> >      at
>> > org.apache.catalina.core.ContainerBase.removeChild(ContainerBa
>> > se.java:92
>> > 4)
>> >      at
>> > org.apache.catalina.startup.HostConfig.checkResources(HostConf
>> > ig.java:10
>> > 46)
>> >      at
>> > org.apache.catalina.startup.HostConfig.check (HostConfig.java:1214)
>> >      at
>> > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConf
>> > ig.java:29
>> > 3)
>> >      at
>> > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(L
>> > ifecycleSu
>> > pport.java:117)
>> >      at
>> > org.apache.catalina.core.ContainerBase.backgroundProcess(Conta
>> > inerBase.j
>> > ava:1337)
>> >      at
>> > org.apache.catalina.core.ContainerBase$ContainerBackgroundProc
>> > essor.proc
>> > essChildren(ContainerBase.java:1601)
>> >      at
>> > org.apache.catalina.core.ContainerBase$ContainerBackgroundProc
>> > essor.proc
>> > essChildren(ContainerBase.java:1610)
>> >      at
>> > org.apache.catalina.core.ContainerBase$ContainerBackgroundProc
>> > essor.run(
>> > ContainerBase.java:1590)
>> >      at java.lang.Thread.run (Thread.java:619)
>> > Caused by: java.lang.NoClassDefFoundError:
>> > org/apache/struts2/util/ObjectFactoryDestroyable
>> >      at
>> >
>> org.apache.struts2.dispatcher.Dispatcher.cleanup (Dispatcher.java:254)
>> >      at
>> > org.apache.struts2.dispatcher.FilterDispatcher.destroy(FilterD
>> > ispatcher.
>> > java:233)
>> >      at
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >      at
>> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
>> > orImpl.jav
>> > a:39)
>> >      at
>> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
>> > odAccessor
>> > Impl.java:25)
>> >      at java.lang.reflect.Method.invoke (Method.java:597)
>> >      at
>> >
>> org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
>> >      at
>> java.security.AccessController.doPrivileged(Native Method)
>> >      at
>> > javax.security.auth.Subject.doAsPrivileged (Subject.java:517)
>> >      at
>> > org.apache.catalina.security.SecurityUtil.execute(SecurityUtil
>> > .java:276)
>> >      ... 15 more
>> > Caused by: java.lang.ClassNotFoundException:
>> > org.apache.struts2.util.ObjectFactoryDestroyable
>> >      at
>> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappC
>> > lassLoader
>> > .java:1387)
>> >      at
>> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappC
>> > lassLoader
>> > .java:1233)
>> >      at
>> > java.lang.ClassLoader.loadClassInternal (ClassLoader.java:320)
>> >      ... 25 more
>> >
>> > I checked the exploded WAR, and it includes
>> > WEB-INF/lib/struts2-core-2.1.6.jar
>> >
>> > Any ideas? This is immediately after I deploy the WAR, using the Web
>> > Application Manager (or by manually copying the WAR into
>> the webapps/
>> > directory).
>> >
>> > > -----Original Message-----
>> > > From: Daniele Del Gaudio [mailto:daniele.delgaudio@(protected)]
>> > > Sent: Wednesday, May 20, 2009 9:01 AM
>> > > To: user@(protected)
>> > > Subject: struts2 on jboss java.lang.NoClassDefFoundError:
>> > > org/apache/struts2/util/ObjectFactoryDestroyable
>> > >
>> > > Hello, can someone help me?
>> > >
>> > > When I undeploy or redeploy my web application based on
>> > > struts2 on jboss
>> > > 4.2.2 I have this error:
>> > >
>> > > 13:35:57,788 INFO [TomcatDeployer] undeploy,
>> > > ctxPath=/PianificazioneWeb,
>> warUrl=.../deploy/PianificazioneWeb.war/
>> > > 13:35:57,788 ERROR [BaseModelMBean] Exception invoking
>> > method destroy
>> > > java.lang.NoClassDefFoundError:
>> > > org/apache/struts2/util/ObjectFactoryDestroyable
>> > >  at
>> > >
>> >
>> org.apache.struts2.dispatcher.Dispatcher.cleanup (Dispatcher.java:257)
>> > >  at
>> > > org.apache.struts2.dispatcher.FilterDispatcher.destroy(FilterD
>> > > ispatcher.java:221)
>> > >  at
>> > > org.apache.catalina.core.ApplicationFilterConfig.release(Appli
>> > > cationFilterConfig.java:332)
>> > >  at
>> > > org.apache.catalina.core.StandardContext.filterStop(StandardCo
>> > > ntext.java:3757)
>> > >  at
>> > > org.apache.catalina.core.StandardContext.stop(StandardContext.
>> > > java:4517)
>> > >  at
>> > > org.apache.catalina.core.ContainerBase.destroy(ContainerBase.j
>> > > ava:1163)
>> > >  at
>> > > org.apache.catalina.core.StandardContext.destroy(StandardConte
>> > > xt.java:4617)
>> > >  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> > >  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> > >  at
>> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> > >  at java.lang.reflect.Method.invoke(Unknown Source)
>> > >  at ...
>> > >
>> > >
>> > > My web.xml is
>> > >
>> > > <?xml version="1.0" encoding="UTF-8"?>
>> > >
>> > > <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
>> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> > > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> > > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>> > >    <display-name>PianificazioneWeb</display-name>
>> > >  <context-param>
>> > >       <param-name>tilesDefinitions</param-name>
>> > >       <param-value>/WEB-INF/tiles.xml</param-value>
>> > >    </context-param>
>> > >
>> > >    <filter>
>> > >       <filter-name>struts2</filter-name>
>> > >
>> > > <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</
>> > > filter-class>
>> > >    </filter>
>> > >
>> > >          
>> > >    <filter-mapping>
>> > >       <filter-name>struts2</filter-name>
>> > >       <url-pattern>/*</url-pattern>
>> > >    </filter-mapping>
>> > >
>> > >
>> > >    <listener>
>> > >
>> > > <listener-class>org.apache.struts2.tiles.StrutsTilesListener</
>> > > listener-class>
>> > >    </listener>
>> > >
>> > >    <welcome-file-list>
>> > >       <welcome-file>index.jsp</welcome-file>
>> > >    </welcome-file-list>
>> > >
>> > >  <ejb-local-ref>
>> > >    
>> > >
>> >
>> <ejb-ref-name>serv/ServPianificazioneContrattiBeanLocal</ejb-ref-name>
>> > >    <ejb-ref-type>Session</ejb-ref-type>
>> > >    <local-home></local-home>
>> > >    
>> > >
>> >
>> <local>pianificazioneEjb.services.ServPianificazioneContratti</local>
>> > >  </ejb-local-ref>
>> > >  <ejb-local-ref>
>> > >    
>> > > <ejb-ref-name>serv/ServPianificazioneOpportunitaBeanLocal</ejb
>> > > -ref-name>
>> > >    <ejb-ref-type>Session</ejb-ref-type>
>> > >    <local-home></local-home>
>> > >    
>> > > <local>pianificazioneEjb.services.ServPianificazioneOpportunit
>> > > a</local>
>> > >  </ejb-local-ref>
>> > >  <ejb-local-ref>
>> > >    
>> > >
>> >
>> <ejb-ref-name>serv/ServPianificazioneProgettiBeanLocal</ejb-ref-name>
>> > >    <ejb-ref-type>Session</ejb-ref-type>
>> > >    <local-home></local-home>
>> > >    
>> > >
>> <local>pianificazioneEjb.services.ServPianificazioneProgetti</local>
>> > >  </ejb-local-ref>
>> > > </web-app>
>> > >
>> > > My jboss-web.xml is
>> > >
>> > > <?xml version="1.0" encoding="UTF-8"?>
>> > > <!--
>> > >  * Copyright 2008, Javid Jamae and Peter Johnson
>> > >  *
>> > >  * Licensed under the Apache License, Version 2.0 (the
>> > > "License"); you
>> > > may not
>> > >  * use this file except in compliance with the License. You
>> > > may obtain
>> > > a copy
>> > >  * of the License at
>> > >  *
>> > >  *   http://www.apache.org/licenses/LICENSE-2.0
>> > >  *
>> > >  * Unless required by applicable law or agreed to in
>> > > writing, software
>> > >  * distributed under the License is distributed on an "AS
>> > > IS" BASIS,
>> > > WITHOUT
>> > >  * WARRANTIES OR CONDITIONS OF ANY KIND, either express
>> > or implied.
>> > > See the
>> > >  * License for the specific language governing permissions
>> > > and limitations
>> > >  * under the License.
>> > > -->
>> > > <jboss-web>
>> > >    <loader-repository>
>> > >      pianificazioneWeb:loader=LoaderPianificazioneWeb
>> > >      <loader-repository-config>
>> > >      java2ParentDelegation=false
>> > >      </loader-repository-config>
>> > >    </loader-repository>  
>> > >      <ejb-local-ref>
>> > >      
>> > >
>> >
>> <ejb-ref-name>serv/ServPianificazioneContrattiBeanLocal</ejb-ref-name>
>> > >    
>> > > <local-jndi-name>Accoglienza/ServPianificazioneContrattiBean/l
>> > > ocal</local-jndi-name>
>> > >     </ejb-local-ref>
>> > >     <ejb-local-ref>
>> > >    
>> > > <ejb-ref-name>serv/ServPianificazioneOpportunitaBeanLocal</ejb
>> > > -ref-name>
>> > >    
>> > > <local-jndi-name>Accoglienza/ServPianificazioneOpportunitaBean
>> > > /local</local-jndi-name>
>> > >     </ejb-local-ref>
>> > >     <ejb-local-ref>
>> > >      
>> > >
>> >
>> <ejb-ref-name>serv/ServPianificazioneProgettiBeanLocal</ejb-ref-name>
>> > >    
>> > > <local-jndi-name>Accoglienza/ServPianificazioneProgettiBean/lo
>> > > cal</local-jndi-name>
>> > >     </ejb-local-ref>
>> > > </jboss-web>
>> > >
>> > > and my struts.xml is
>> > >
>> > > <?xml version="1.0" encoding="UTF-8" ?>
>> > > <!DOCTYPE struts PUBLIC
>> > >    "-//Apache Software Foundation//DTD Struts
>> > Configuration 2.0//EN"
>> > >    "http://struts.apache.org/dtds/struts-2.0.dtd">
>> > >
>> > > <struts>
>> > >
>> > >   <constant name="struts.enable.DynamicMethodInvocation"
>> > > value="true" />
>> > >   <!-- etichette e messaggi dell'intera applicazione sono in
>> > > MessageResources.properties -->
>> > >    <constant name="struts.custom.i18n.resources"
>> > > value="MessageResources" />
>> > >    <constant name="struts.ui.theme" value="css_xhtml" />
>> > >     <!-- devMode, i18n.reload,nocache a true solo in
>> ambiente di
>> > > sviluppo -->
>> > >    <constant name="struts.devMode" value="true" />
>> > >    <constant name="struts.i18n.reload" value="true" />
>> > >    <constant name="struts.xslt.nocache" value="true" />
>> > >    <constant name="struts.configuration.xml.reload"
>> > value="true" />
>> > >
>> > >
>> > >
>> > >
>> > >     <!-- <include file="struts-default.xml"/>   -->
>> > >
>> > >     <package name="action" extends="tiles-default">
>> > >
>> > >       <!-- le righe sotto sovrascrivono la def di result-type
>> > > scritta uguale nel file struts-plugin.xml
>> > >       in struts2-tiles-plugin-2.0.9.jar ma senza il
>> > > default="true" -->
>> > >
>> > >    
>> > >      <global-results>
>> > >        <result
>> name="error">/chapterEight/Error.jsp</result>
>> > >       </global-results>
>> > >      
>> > >       <global-exception-mappings>
>> > >         <exception-mapping exception="java.lang.Exception"
>> > > result="error"/>
>> > >       </global-exception-mappings>
>> > >
>> > >       <action name="PianificazioneContratto"
>> > > class="pianificazioneWeb.action.PianificazioneContratto">
>> > >         <interceptor-ref name="defaultStack">
>> > >            > >
>> name="params.excludeParams">idOpportunita,idProgetto
>> > >         </interceptor-ref>
>> > >         <result type="tiles" name="input"
>> > > >tiles.PianificazioneContratto</result>
>> > >         <result type="tiles" name="error"
>> > > >tiles.PianificazioneContratto</result>
>> > >         <result type="tiles" name="success"
>> > > >tiles.PianificazioneContratto</result>
>> > >       <!--   <interceptor-ref name="basicStack"/> -->  
>> > >       </action>
>> > >
>> > >      <action name="DatiContratto"
>> > > class="pianificazioneWeb.action.DatiContratto">
>> > >         <result type="tiles" >tiles.Contratto</result>
>> > >       <!--   <interceptor-ref name="basicStack"/> -->  
>> > >       </action>
>> > >
>> > >      <action name="Opportunita"
>> > > class="pianificazioneWeb.action.DatiOpportunita">
>> > >         <result type="tiles" >tiles.Opportunita</result>
>> > >       <!--   <interceptor-ref name="basicStack"/> -->  
>> > >       </action>
>> > >
>> > >       <action name="Progetto"
>> > > class="pianificazioneWeb.action.DatiProgetto">
>> > >         <interceptor-ref name="defaultStack">
>> > >            > >
>> name="params.excludeParams">idOpportunita,idProgetto
>> > >         </interceptor-ref>
>> > >         <result type="tiles" >tiles.Progetto</result>
>> > >       <!--   <interceptor-ref name="basicStack"/> -->  
>> > >       </action>
>> > >
>> > >       <action name="InsPianificContratto"
>> > > class="pianificazioneWeb.action.InsPianificContratto">
>> > >         <result type="tiles"
>> > >tiles.InsPianificContratto</result>
>> > >       </action>
>> > >
>> > >       <action name="SalvaInsPianificContratto"
>> > > class="pianificazioneWeb.action.InsPianificContratto">
>> > >         <result type="redirect"
>> > > >/action/PianificazioneContratto.action</result>
>> > >       </action>
>> > >
>> > >       <action name="InsPianificPM"
>> > > class="pianificazioneWeb.action.InsPianificPM">
>> > >         <result type="tiles" >tiles.InsPianificPM</result>
>> > >       </action>
>> > >              
>> > >     </package>
>> > > </struts>
>> > >
>> > >
>> > > Thanks,
>> > > daniele
>> > >
>> > >
>> > > __________ Information from ESET NOD32 Antivirus, version of
>> > > virus signature database 4090 (20090520) __________
>> > >
>> > > The message was checked by ESET NOD32 Antivirus.
>> > >
>> > > http://www.eset.com
>> > >
>> > >
>> > >
>> > >
>> >
>> ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
>> > > For additional commands, e-mail: user-help@(protected)
>> > >
>> > >
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@(protected)
>> > For additional commands, e-mail: user-help@(protected)
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_205056.ezm (zipped)

http://nani2ratna.wordpress.com/2010/02/18/solution-java-lang-noclassdeffounderror-orgapachestruts2utilobjectfactorydestroyable/

check this if it helps you.

Thanks
RS


tobias.schoessler wrote:
>
> I get this same phenomenon. running tomcat6.
>
> Is there any solution to this problem?
>
> This issue was filed in struts2's JIRA
>
> http://issues.apache.org/struts/browse/WW-2921
>
> and closed as not a problem. Then what is the solution?
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_205057.ezm (zipped)

http://nani2ratna.wordpress.com/2010/02/18/solution-java-lang-noclassdeffounderror-orgapachestruts2utilobjectfactorydestroyable/

check this if it helps you.

Thanks
RS


raryal wrote:
>
> Thanks for the quick reply.
>
> I am trying to deploy the application on Tomcat 6.x. I get the error
> logged
> in log file and nothing loads.
>
> Hope anybody else know the problem.
>
>
> Thanking Sincerely,
>
> Rabin Aryal
>
> -----Original Message-----
> From: Torsten Krah [mailto:tkrah@(protected)]
> Sent: Tuesday, October 21, 2008 12:36 PM
> To: Struts Users Mailing List
> Subject: Re: NoClassDefFoundError
>
> Am Dienstag, 21. Oktober 2008 18:20:09 schrieb Rabin Aryal:
>> Does anybody know what might cause it?
>
> You are undeploying your app - according to your stacktrace.
> I am getting this error too, but not reproducable - sometimes it undeploys
> without those exception, sometimes not.
> Additionally i am seeing this one more on JBoss than on Pluto (Tomcat
> 6.x),
> don't know if there is some sort of dependency.
>
> I guess this might be some sort of classloader problem, but thats really a
> guess.
>
>
> --
> Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
> Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
>
> Really, I'm not out to destroy Microsoft. That will just be a
> completely unintentional side effect."
>  -- Linus Torvalds
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_205058.ezm (zipped)

http://nani2ratna.wordpress.com/2010/02/18/solution-java-lang-noclassdeffounderror-orgapachestruts2utilobjectfactorydestroyable/

check this if it helps you.

Thanks
RS


totojack wrote:
>
> Updated struts from 2.0.6 to 2.0.8 (that fixed "FilterDispatcher not
> cleaning up correctly") but nothing changes. Maybe it's not a
> FilterDispatcher problem...
>
>
>
> totojack wrote:
>>
>> I've deployed a webapp with struts2 on weblogic 8.1/java 1.4.1_02.
>> It works fine, but when I make a redeploy it throws an exception with the
>> following two stack traces.
>> The NoClassDefFoundError seems strange to me, because the two jars
>> struts2-core.jar and backpost-util-concurrent.jar (for retrotranslation
>> of struts2) contain the classes correctly.
>> Maybe something related with weblogic?
>>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_205059.ezm (zipped)
My Demo Application now has Facebook Connect too

http://code.google.com/p/remove-registration/

Now doing the same in PHP before moving forward in Java.

--
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer
http://iqbalconsulting.com

Attachment: user_205060.ezm (zipped)

Hi

I've been tasked with debugging a mis-behaving app based on struts 2.0.12
with a WEB-INF/lib list of dependant jars that would make you weep. Rather
than trying to fight this, I thought I'd try the easy approach first.

So, where can I find either a config-browser plugin jar that's compatible
with struts 2.0.12 or where can I download a copy of 2.0.12 (complete with
plugin) - the oldest I've found so far is 2.0.14.

Regards


--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_205061.ezm (zipped)

Put them under WEB-INF.


CS Wong wrote:
>
> Hi,
>
> I've had a pen test finding where our JSP files, which are in the public
> directories of our web app can be opened directly as long as the user
> knows
> the name of the JSP file. This is a site where a login is mandatory to
> access any content. Struts actions are already protected where the action
> itself will detect for sessions and enforce security but direct access to
> JSP doesn't seem to be protected in the same way and apparently, this is a
> security risk. The auditor's opinion is that no content whatsoever should
> be
> viewable by anyone without a valid session.
>
> May I know what can be done to accomplish this? Both our Struts 1 and 2
> applications are affected by this finding.
>
> Thanks,
> Wong
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_205063.ezm (zipped)
Using a security constraint is the better way to go.

Here is a slightly different configuration we use because there are
some jsp files that are not part of the struts app portion which we
want to allow access.

What we do is put all out struts jsp's in to folder /struts then use
this <url-pattern>/struts/*</url-pattern> in the security constraint
to prevent access.

This works to prevent access because we don't declare any Roles, no
roles mean no access.

<security-constraint>
  <display-name>Prevent access to raw pages.</display-name>
  <web-resource-collection>
   <web-resource-name>Raw Pages</web-resource-name>
   <url-pattern>/error.jsp</url-pattern>
   <url-pattern>/struts/*</url-pattern>
   <url-pattern>/META-INF/*</url-pattern>
  </web-resource-collection>
  <auth-constraint>
   <description>No roles, so no direct access</description>
  </auth-constraint>
</security-constraint>


On Thu, Feb 18, 2010 at 2:41 AM, Lukasz Lenart
<lukasz.lenart@(protected):
> 2010/2/18 Cimballi <cimballi.cimballi@(protected)>:
>> The default pattern is to put all JSPs under WEB-INF and so you force
>> the call to an action to access them.
>
> As I know, it works only under Tomcat - it isn't standard. Better
> solution is to use security constraint section in web.xml
>
> <security-constraint>
>  <display-name>Access to JSP files</display-name>
>  <web-resource-name>JSP</web-resource-name>
>  <web-resource-collection>
>     <url-pattern>*.jsp</url-pattern>
>  </web-resource-collection>
>  <auth-constraint/>
> </security-constraint>
>
>
> Regards
> --
> Łukasz
> http://www.lenart.org.pl/
> Kapituła Javarsovia 2010
> http://javarsovia.pl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_205064.ezm (zipped)
From the servlet specifications

A special directory exists within the application hierarchy named “WEB-INF”.
This directory contains all things related to the application that
aren’t in the
document root of the application. The WEB-INF node is not part of the public
document tree of the application. No file contained in the WEB-INF
directory may
be served directly to a client by the container. However, the contents
of the WEB-
INF directory are visible to servlet code using the getResource and getResource-
AsStream method calls on the ServletContext, and may be exposed using the
RequestDispatcher calls.

Cimballi


Attachment: user_205062.ezm (zipped)
I'm looking into options to use the Spring's session scoping mechanism with
struts2 to take advantage of Springs scoping abstraction and integration
with session clustering solutions (ex: terracotta). I found a link to "
http://struts.apache.org/2.1.8.1/docs/spring-session-components-workarounds.html"
but the doc's are empty. Does anyone know what was intended to go there, or
have some examples/insight into my use case.

Thanks,
Eric

Attachment: user_205065.ezm (zipped)

Struts2 used com.opensymphony.xwork2.util.LocalizedTextUtil class for
managing Resource Bundles.

Maybe this scenario will help you:
- Create custom ServletContextListener for your webapp;
- Override contextInitialized method like this (change bundle name):

public void contextInitialized(ServletContextEvent event) {
  ResourceBundle bundle = ResourceBundle.getBundle("my-own-bundle");
 
LocalizedTextUtil.setDelegatedClassLoader(bundle.getClass().getClassLoader());
  LocalizedTextUtil.addDefaultResourceBundle("my-own-bundle");
}


omnipresent wrote:
>
> no help on this one?
>
> On Wed, Jan 27, 2010 at 12:43 PM, Bhaarat Sharma
> <bhaarat.s@(protected):
>
>> We have seen situations where sometimes the global resource bundles are
>> lost intermittently for some sessions. We are in a clustered/shared
>> environment where multiple apps are deployed onto a GlassFishV2 server.
>> Multiple apps share the struts2 core jars.
>>
>> We have some pages where we have written a custom Resource loader and
>> everything looks fine on these pages. Problem is on pages that utilize
>> <s:text name="my.label.name"/>. Our properties files reside globally in
>> WEB-INF/lib
>>
>> Our custom resource loader works as follows in a JSP
>>
>> <%CustomMessageResrouce cusResource = new
>> CustomMessageResource("Resource")%>
>> <%= cusResource.getMessage("my.label.name")%>
>>
>> Java code for it looks like:
>> import java.util.ResourceBundle;
>> ResourceBundle resource = ResourceBundle.getBundle(baseName);
>>
>>
>> So we know that loading properties into resourcebundles and using them as
>> shown above works.
>>
>> My question is..can we do the same for struts2. Can we forcefully load
>> the
>> resourcebundles inside java.util.ResourceBundle and then have them be
>> used
>> in <s:text> tag?
>>
>>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_205066.ezm (zipped)
I have a tabbed panel that contains a div which loads its content via ajax. Very standard. The ajax content includes javascript that I want to be executed so I have set the executeScripts parameter to "true" for the div. This all worked fantastic prior to upgrading to Struts 2.1.8.1 from 2.0.11.1. However, it now will not run my javascript code.

I have tracked down the issue or at least isolated it. In addition to the javascript, my content returned via ajax also contains an ajax themed submit tag. If I look at the template/ajax/submit.ftl in the dojo plugin and compare it to the version found in 2.0.11.1, I notice that it now contains the following three lines at the botton of the ftl:

<#if parameters.pushId>
<script language="JavaScript" type="text/javascript">djConfig.searchIds.push("${parameters.id?html}");</script>
</#if>

If I remove these lines, then all works fine again. Does anyone know why that would be or have a suggestion for a good fix for this issue?

Thanks in advance,
Ken



-----------------------------------------
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.

Attachment: user_205067.ezm (zipped)
As a followup, the problem does not seem to be with the script tag being there but the javascript call itself. If I replace the javascript: "djConfig.searchIds.push("${parameters.id?html}");" with some other code, all works fine. Not sure if this is throwing some error that is getting swallowed and as a result is stopping other code from running.

-----Original Message-----
From: Hoying, Ken [mailto:Ken_Hoying@(protected)]
Sent: Thursday, February 18, 2010 1:06 PM
To: Struts Users Mailing List
Subject: [Q] executeScripts

I have a tabbed panel that contains a div which loads its content via ajax. Very standard. The ajax content includes javascript that I want to be executed so I have set the executeScripts parameter to "true" for the div. This all worked fantastic prior to upgrading to Struts 2.1.8.1 from 2.0.11.1. However, it now will not run my javascript code.

I have tracked down the issue or at least isolated it. In addition to the javascript, my content returned via ajax also contains an ajax themed submit tag. If I look at the template/ajax/submit.ftl in the dojo plugin and compare it to the version found in 2.0.11.1, I notice that it now contains the following three lines at the botton of the ftl:

<#if parameters.pushId>
<script language="JavaScript" type="text/javascript">djConfig.searchIds.push("${parameters.id?html}");</script>
</#if>

If I remove these lines, then all works fine again. Does anyone know why that would be or have a suggestion for a good fix for this issue?

Thanks in advance,
Ken



-----------------------------------------
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.


Attachment: user_205068.ezm (zipped)
The problem is definitely with "djConfig.searchIds.push("${parameters.id?html}");". If I place this anywhere in my code then anything dojo related seems to come to a halt. Am I doing something wrong? Am I missing something? Where does Freemarker get the parameters.pushId from?

Thanks,
Ken

-----Original Message-----
From: Hoying, Ken [mailto:Ken_Hoying@(protected)]
Sent: Thursday, February 18, 2010 1:25 PM
To: Struts Users Mailing List
Subject: RE: [Q] executeScripts

As a followup, the problem does not seem to be with the script tag being there but the javascript call itself. If I replace the javascript: "djConfig.searchIds.push("${parameters.id?html}");" with some other code, all works fine. Not sure if this is throwing some error that is getting swallowed and as a result is stopping other code from running.

-----Original Message-----
From: Hoying, Ken [mailto:Ken_Hoying@(protected)]
Sent: Thursday, February 18, 2010 1:06 PM
To: Struts Users Mailing List
Subject: [Q] executeScripts

I have a tabbed panel that contains a div which loads its content via ajax. Very standard. The ajax content includes javascript that I want to be executed so I have set the executeScripts parameter to "true" for the div. This all worked fantastic prior to upgrading to Struts 2.1.8.1 from 2.0.11.1. However, it now will not run my javascript code.

I have tracked down the issue or at least isolated it. In addition to the javascript, my content returned via ajax also contains an ajax themed submit tag. If I look at the template/ajax/submit.ftl in the dojo plugin and compare it to the version found in 2.0.11.1, I notice that it now contains the following three lines at the botton of the ftl:

<#if parameters.pushId>
<script language="JavaScript" type="text/javascript">djConfig.searchIds.push("${parameters.id?html}");</script>
</#if>

If I remove these lines, then all works fine again. Does anyone know why that would be or have a suggestion for a good fix for this issue?

Thanks in advance,
Ken



-----------------------------------------
***Note:The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify the Sender
immediately by replying to the message and deleting it from your
computer. Thank you. Premier Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)



Attachment: user_205069.ezm (zipped)
This is my first posting to this list, so excuse me if this is an
issue that's already been addressed.

My concern is with the XSS vulnerability in the following use case:

<s:text name="resource.key">
<s:param value="param1"/>
</s:text>

It seems (Struts 2.1.8.1) that there is no mechanism in s:text or
s:param to do HTML escaping. If param1 contains user input then this
opens the door to XSS attacks.

The easiest solution I can see is to modify the code to

<s:text var="v" name="resource.key">
<s:param value="param1"/>
</s:text>
<s:property value="v"/>

This works, but it is a lot of work. It seems to me it would be better
if Struts2 supported

<s:text name="resource.key" escape="true">
<s:param value="param1"/>
</s:text>

or, better yet, had escape="true" as its default.

Is there another way round this problem which I am missing?

Thanks,

John


Attachment: user_205075.ezm (zipped)
A slightly cleaner way would be like this:

<s:text name="resource.key" ><s:param><s:property
value="param1"/></s:param></s:text>

I think in most cases <s:text> is used for displaying "safe" text that
the app either supplies or generates.
Obviously if you do use it to echo user supplied data you need to be careful.
It would be nice to have a flag like you suggest however it might be
difficult to get the behavior exactly right since the text may contain
formatting tags and what you really want is to just escape the
parameters.


On Thu, Feb 18, 2010 at 5:25 PM, John Orr <webskate101@(protected):
> This is my first posting to this list, so excuse me if this is an
> issue that's already been addressed.
>
> My concern is with the XSS vulnerability in the following use case:
>
> <s:text name="resource.key">
>  <s:param value="param1"/>
> </s:text>
>
> It seems (Struts 2.1.8.1) that there is no mechanism in s:text or
> s:param to do HTML escaping. If param1 contains user input then this
> opens the door to XSS attacks.
>
> The easiest solution I can see is to modify the code to
>
> <s:text var="v" name="resource.key">
>  <s:param value="param1"/>
> </s:text>
> <s:property value="v"/>
>
> This works, but it is a lot of work. It seems to me it would be better
> if Struts2 supported
>
> <s:text name="resource.key" escape="true">
>  <s:param value="param1"/>
> </s:text>
>
> or, better yet, had escape="true" as its default.
>
> Is there another way round this problem which I am missing?
>
> Thanks,
>
> John
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_205077.ezm (zipped)
Thanks for the cleaner code - that is an improvement, and I'll use that idiom.

I agree that generally <s:text> is intended for displaying safe text.
However the use case "Hello, {0}" has to be pretty common, when
something like a user name is inserted. Also the ability to access
OGNL inside resource bundles ("Hello, ${user.firstName}") guarantees
that parameters that may well originate with user input can end up
inside <s:text>. (Note, parameter escaping wouldn't help in this
case.)

The problem becomes most serious if different people have different
responsibilities. If the person responsible for writing the JSP's is
not involved with the resource bundles or the action layer, then they
have no way of knowing whether the text they are inserting is safe or
not. And I'd say they really need a clean way to take responsibility
to ensure what goes on the page is safe. Perhaps an "escape" attribute
on <s:text> which defaults to "false" would help.

Thanks, again,

John

On Fri, Feb 19, 2010 at 8:24 AM, Greg Lindholm <greg.lindholm@(protected):
> A slightly cleaner way would be like this:
>
> <s:text name="resource.key" ><s:param><s:property
> value="param1"/></s:param></s:text>
>
> I think in most cases <s:text> is used for displaying "safe" text that
> the app either supplies or generates.
> Obviously if you do use it to echo user supplied data you need to be careful.
> It would be nice to have a flag like you suggest however it might be
> difficult to get the behavior exactly right since the text may contain
> formatting tags and what you really want is to just escape the
> parameters.
>
>
> On Thu, Feb 18, 2010 at 5:25 PM, John Orr <webskate101@(protected):
>> This is my first posting to this list, so excuse me if this is an
>> issue that's already been addressed.
>>
>> My concern is with the XSS vulnerability in the following use case:
>>
>> <s:text name="resource.key">
>>  <s:param value="param1"/>
>> </s:text>
>>
>> It seems (Struts 2.1.8.1) that there is no mechanism in s:text or
>> s:param to do HTML escaping. If param1 contains user input then this
>> opens the door to XSS attacks.
>>
>> The easiest solution I can see is to modify the code to
>>
>> <s:text var="v" name="resource.key">
>>  <s:param value="param1"/>
>> </s:text>
>> <s:property value="v"/>
>>
>> This works, but it is a lot of work. It seems to me it would be better
>> if Struts2 supported
>>
>> <s:text name="resource.key" escape="true">
>>  <s:param value="param1"/>
>> </s:text>
>>
>> or, better yet, had escape="true" as its default.
>>
>> Is there another way round this problem which I am missing?
>>
>> Thanks,
>>
>> John
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_205070.ezm (zipped)

Dear all, I'm using
<s:textfield name="train.startDate" cssClass="datepicker">

where startDate is a java.util.Date field of an object train.

The output is something like this:

http://old.nabble.com/file/p27647328/date.png

How can I eliminate the 12:00:00 in the textfield? Thanks!
--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_205071.ezm (zipped)
Just add a getter to your "train" object that translates the startDate into
the format you'd like. Use a DateFormat object.

-Brian



On Thu, Feb 18, 2010 at 5:07 PM, fireapple <taizhang1981@(protected):

>
> Dear all, I'm using
> <s:textfield name="train.startDate" cssClass="datepicker">
>
> where startDate is a java.util.Date field of an object train.
>
> The output is something like this:
>
> http://old.nabble.com/file/p27647328/date.png
>
> How can I eliminate the 12:00:00 in the textfield? Thanks!
> --
> View this message in context:
> http://old.nabble.com/how-to-eliminate-time-in-%3Cs%3Atextfield%3E-tp27647328p27647328.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_205076.ezm (zipped)

Does that mean I have to create something like:

public String getStartDateStr()
{
...........
}

to do this?

I don't want to use this because if I use this getter, I have to create a
setter for this since user can edit the date.

Any other options? Thanks



Brian Thompson-5 wrote:
>
> Just add a getter to your "train" object that translates the startDate
> into
> the format you'd like. Use a DateFormat object.
>
> -Brian
>
>
>
> On Thu, Feb 18, 2010 at 5:07 PM, fireapple <taizhang1981@(protected):
>
>>
>> Dear all, I'm using
>> <s:textfield name="train.startDate" cssClass="datepicker">
>>
>> where startDate is a java.util.Date field of an object train.
>>
>> The output is something like this:
>>
>> http://old.nabble.com/file/p27647328/date.png
>>
>> How can I eliminate the 12:00:00 in the textfield? Thanks!
>> --
>> View this message in context:
>> http://old.nabble.com/how-to-eliminate-time-in-%3Cs%3Atextfield%3E-tp27647328p27647328.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_205078.ezm (zipped)

Aaah, dates!

Add an s:date and associate with the textfield, like:

<s:date name="train.startDate" id="trainDateId" format="dd-MM-yyyy"/>
<s:textfield name="train.startDate" value="%{#trainDateId}" label="Choo choo
(dd-MM-yyyy)" />

I'm not sure if both tags need the "name" or not - post your findings.


fireapple wrote:
>
> Does that mean I have to create something like:
>
> public String getStartDateStr()
> {
> ...........
> }
>
> to do this?
>
> I don't want to use this because if I use this getter, I have to create a
> setter for this since user can edit the date.
>
> Any other options? Thanks
>
>
>
> Brian Thompson-5 wrote:
>>
>> Just add a getter to your "train" object that translates the startDate
>> into
>> the format you'd like. Use a DateFormat object.
>>
>> -Brian
>>
>>
>>
>> On Thu, Feb 18, 2010 at 5:07 PM, fireapple <taizhang1981@(protected)>
>> wrote:
>>
>>>
>>> Dear all, I'm using
>>> <s:textfield name="train.startDate" cssClass="datepicker">
>>>
>>> where startDate is a java.util.Date field of an object train.
>>>
>>> The output is something like this:
>>>
>>> http://old.nabble.com/file/p27647328/date.png
>>>
>>> How can I eliminate the 12:00:00 in the textfield? Thanks!
>>> --
>>> View this message in context:
>>> http://old.nabble.com/how-to-eliminate-time-in-%3Cs%3Atextfield%3E-tp27647328p27647328.html
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>
>>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_205072.ezm (zipped)
Hi All,

Currently I am migration one of my applications from Struts1 onto Struts2. I
am using several Struts1 PlugIn's (mainly for data source configuration)
that are loaded on start up of the app. Could someone advise me if such a
functionality, or similar, is available in Struts2?

Thank you.

--
Regards,
Maciej Radochonski
mradochonski@(protected)
----------------------------------------------------------------
http://www.mradochonski.com
http://www.linkedin.com/in/mradochonski
----------------------------------------------------------------
Any fool can write code that a computer can understand. Good programmers
write code that humans can understand

Attachment: user_205073.ezm (zipped)
2010/2/19 Maciej Radochonski <mradochonski@(protected)>:
> Currently I am migration one of my applications from Struts1 onto Struts2. I
> am using several Struts1 PlugIn's (mainly for data source configuration)
> that are loaded on start up of the app. Could someone advise me if such a
> functionality, or similar, is available in Struts2?

No, use Spring, Guice or Hibernate - there are plugins to connect such
frameworks with Struts 2


Regards
--
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl


Attachment: user_205074.ezm (zipped)
Thanks for the answer.

Maciej

On Fri, Feb 19, 2010 at 2:53 PM, Lukasz Lenart <lukasz.lenart@(protected)
> wrote:

> 2010/2/19 Maciej Radochonski <mradochonski@(protected)>:
> > Currently I am migration one of my applications from Struts1 onto
> Struts2. I
> > am using several Struts1 PlugIn's (mainly for data source configuration)
> > that are loaded on start up of the app. Could someone advise me if such a
> > functionality, or similar, is available in Struts2?
>
> No, use Spring, Guice or Hibernate - there are plugins to connect such
> frameworks with Struts 2
>
>
> Regards
> --
> Łukasz
> http://www.lenart.org.pl/
> Kapituła Javarsovia 2010
> http://javarsovia.pl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_205079.ezm (zipped)
Is it possible to set a value in the request or valuestack from an
interceptor that contains the total time it took for the action to be
invoked and executed? I have a requirement to show this on the JSP page
and didn't know if I could do this within the Interceptor or if I have
to do this in my base action object.

Chris




Attachment: user_205080.ezm (zipped)
Look at ParameterRemoverInterceptor for example, you can access the
action context like this :
ActionContext ac = invocation.getInvocationContext();

And then you can set values in the value stack. Didn't test it but should work.

Cimballi


On Fri, Feb 19, 2010 at 11:10 AM, CRANFORD, CHRIS
<Chris.Cranford@(protected):
> Is it possible to set a value in the request or valuestack from an
> interceptor that contains the total time it took for the action to be
> invoked and executed?  I have a requirement to show this on the JSP page
> and didn't know if I could do this within the Interceptor or if I have
> to do this in my base action object.
>
> Chris
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_205081.ezm (zipped)
I think this case gets a little more complicated because you want the
timer data to be available to your result. If you simply wait for your
call to ActionInvocation.invoke() to return, then your result will
already have been processed. So you need to use your interceptor to
set a PreResultListener on the ActionInvokation, which will catch a
signal between the completion of the action and the processing of the
result. This listener can be an inner class of your interceptor which
can access the elapsed time and store it in the context or value
stack.

John

On Fri, Feb 19, 2010 at 10:15 AM, Cimballi <cimballi.cimballi@(protected):
> Look at ParameterRemoverInterceptor for example, you can access the
> action context like this :
> ActionContext ac = invocation.getInvocationContext();
>
> And then you can set values in the value stack. Didn't test it but should work.
>
> Cimballi
>
>
> On Fri, Feb 19, 2010 at 11:10 AM, CRANFORD, CHRIS
> <Chris.Cranford@(protected):
>> Is it possible to set a value in the request or valuestack from an
>> interceptor that contains the total time it took for the action to be
>> invoked and executed?  I have a requirement to show this on the JSP page
>> and didn't know if I could do this within the Interceptor or if I have
>> to do this in my base action object.
>>
>> Chris
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

©2008 gg3721.com - Jax Systems, LLC, U.S.A.