You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by SudhirSahoo <su...@gmail.com> on 2013/03/05 06:24:15 UTC
Display progress bar in same page (request page) using struts2
execAndWait Interceptor
Can anyone please help me.
I have registration.jsp with a submit button.
When I submit it should validate the credential and show success.jsp.
While validating, it is required to dispaly progress bar in the same page
(registration.jsp) at the top untill success.jsp renders.
When I use the below code, it is showing wait.jsp. But I want to show an
image in the same page (registration.jsp) at the top.
<action name="registerSubmitAction" method="submit"
class="com.skumar.struts2.action.RegisterAction">
<interceptor-ref name="execAndWait">
1000
500
</interceptor-ref>
<result name="wait">/pages/wait.jsp</result>
<result name="success">/pages/success.jsp</result>
</action>
The progress bar is in my wait.jsp.
Thanks,
Sudhir
--
View this message in context: http://struts.1045723.n5.nabble.com/Display-progress-bar-in-same-page-request-page-using-struts2-execAndWait-Interceptor-tp5711924.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: struts 2 session share
Posted by Chris Pratt <th...@gmail.com>.
Your best bet is probably to store the cart in the database. Another
advantage is that it allows the user to leave the site without losing their
cart contents.
(*Chris*)
On Sun, Mar 10, 2013 at 9:01 AM, john lee <sh...@yahoo.com> wrote:
>
>
> after user login our e-commerce site successfuly, he was granted an
> session.
>
> his shopping cart is saved into an session object.
>
> sometimes, customer need help for his shopping cart, in order to do that,
> we need to access his cart/session object.
>
> how can we do session share in struts2 ? in other words,we need to save
> sth(such as the accessary parts) in his shopping cart..
>
>
> any example?
>
> thanks in advance
>
> john
Re: struts 2 start problem struts2-gxp-plugin-2.3.7.jar
Posted by Lukasz Lenart <lu...@apache.org>.
2013/3/11 john lee <sh...@yahoo.com>:
> alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib # ls
> antlr-2.7.2.jar google-gxp-0.2.4-beta.jar spring-core-3.0.5.RELEASE.jar struts2-oval-plugin-2.3.7.jar
> aopalliance-1.0.jar jackson-core-asl-1.9.2.jar spring-expression-3.0.5.RELEASE.jar struts2-pell-multipart-plugin-2.3.7.jar
> asm-3.3.jar jackson-mapper-asl-1.9.2.jar spring-test-3.0.5.RELEASE.jar struts2-plexus-plugin-2.3.7.jar
> asm-commons-3.3.jar javassist-3.11.0.GA.jar spring-web-3.0.5.RELEASE.jar struts2-portlet-plugin-2.3.7.jar
> asm-tree-3.3.jar json-lib-2.3-jdk15.jar struts-core-1.3.10.jar struts2-rest-plugin-2.3.7.jar
> c3p0-0.9.2-pre8.jar juli-6.0.18.jar struts2-codebehind-plugin-2.3.7.jar struts2-sitegraph-plugin-2.3.7.jar
> classworlds-1.1.jar junk struts2-config-browser-plugin-2.3.7.jar struts2-sitemesh-plugin-2.3.7.jar
> commons-beanutils-1.8.0.jar ognl-3.0.5.jar struts2-convention-plugin-2.3.7.jar struts2-spring-plugin-2.3.7.jar
> commons-chain-1.2.jar org.apache.felix.bundlerepository-1.2.1.jar struts2-core-2.3.7.jar struts2-struts1-plugin-2.3.7.jar
> commons-collections-3.1.jar org.apache.felix.framework-1.4.1.jar struts2-dojo-plugin-2.3.7.jar struts2-testng-plugin-2.3.7.jar
> commons-digester-2.0.jar org.apache.felix.main-1.4.1.jar struts2-dwr-plugin-2.3.7.jar struts2-tiles-plugin-2.3.7.jar
> commons-fileupload-1.2.2.jar org.apache.felix.shell-1.0.2.jar struts2-embeddedjsp-plugin-2.3.7.jar testng-5.1-jdk15.jar
> commons-io-2.0.1.jar org.apache.felix.shell.tui-1.0.2.jar struts2-gxp-plugin-2.3.7.jar tiles-api-2.0.6.jar
> commons-lang-2.4.jar oro-2.0.8.jar struts2-jasperreports-plugin-2.3.7.jar tiles-core-2.0.6.jar
> commons-lang3-3.1.jar oval-1.31.jar struts2-javatemplates-plugin-2.3.7.jar tiles-jsp-2.0.6.jar
> commons-logging-1.1.1.jar plexus-container-default-1.0-alpha-10.jar struts2-jfreechart-plugin-2.3.7.jar velocity-1.6.3.jar
> commons-logging-api-1.1.jar plexus-utils-1.2.jar struts2-jsf-plugin-2.3.7.jar xmlpull-1.1.3.1.jar
> commons-validator-1.3.1.jar sitemesh-2.4.2.jar struts2-json-plugin-2.3.7.jar xpp3_min-1.1.4c.jar
> dwr-1.1.1.jar spring-aop-3.0.5.RELEASE.jar struts2-junit-plugin-2.3.7.jar xstream-1.4.2.jar
> ezmorph-1.0.6.jar spring-asm-3.0.5.RELEASE.jar struts2-osgi-admin-bundle-2.3.7.jar xwork-core-2.3.7.jar
> freemarker-2.3.19.jar spring-beans-3.0.5.RELEASE.jar struts2-osgi-demo-bundle-2.3.7.jar
> google-collections-1.0.jar spring-context-3.0.5.RELEASE.jar struts2-osgi-plugin-2.3.7.jar
For sure I must reduce the number of jars - you are using all the
available plugins and its dependencies which isn't good ;-)
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: struts 2 presentation layer
Posted by Dave Newton <da...@gmail.com>.
Uh... no.
On Mar 11, 2013 1:41 PM, "john lee" <sh...@yahoo.com> wrote:
> struts 2 presentation layer
>
>
> support JSP, freemaker
>
> as i know.
>
> does it support PHP?
>
> what is the presentation layer it support?
>
> thanks
>
> john
>
>
>
> ________________________________
> From: Martin Gainty <mg...@hotmail.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Monday, March 11, 2013 5:33 AM
> Subject: RE: struts 2 start problem struts2-gxp-plugin-2.3.7.jar
>
> rename struts2-gxp-plugin-2.3.7.jar e.g.
>
> mv
> /var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar
> /var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar.old
>
> or delete struts2-gxp-plugin-2.3.7.jar
>
> stop your session and redeploy usually works BUT i would bounce the server
> just ot make sure you start ecommerce webapp clean
>
> Martin
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>
>
>
> > Date: Sun, 10 Mar 2013 20:32:41 -0700
> > From: sh_thorn_bird@yahoo.com
> > Subject: struts 2 start problem struts2-gxp-plugin-2.3.7.jar
> > To: user@struts.apache.org
> >
> > i try to start tomcat, but giving the following error
> >
> > Unable to load configuration...---- struts2-gxp-plugin-2.3.7.jar...
> >
> > in the CLASSPTH, i even did not load struts2-gxp-plugin-2.3.7.jar at
> all, why this happen?
> >
> > please advise
> >
> > thanks in advance
> >
> > john
> >
> >
> > SEVERE: Dispatcher initialization failed
> > Unable to load configuration. - bean -
> jar:file:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar!/struts-plugin.xml:8:162
> > at
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:71)
> > at
> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)
> > at
> org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:471)
> > at
> org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
> > at
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
> > at
> org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:278)
> > at
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
> > at
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
> > at
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:104)
> > at
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
> > at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
> > at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> > at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
> > at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
> > at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> > at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> > at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)
> > Caused by: Unable to load bean:
> type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer
> class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean -
> jar:file:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar!/struts-plugin.xml:8:162
> > at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
> > at
> org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
> > at
> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:215)
> > at
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:68)
> > ... 18 more
> > Caused by: java.lang.ClassNotFoundException:
> org.apache.struts2.views.gxp.inject.InjectedObjectContainer
> > at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
> > at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
> > at
> com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
> > at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)
> > ... 21 more
> >
> >
> > alpha:/var/apache-tomcat-7.0.34/logs # env |grep CLASSPATH
> >
> >
> CLASSPATH=/usr/java/jdk1.6.0/lib/dt.jar:/usr/java/jdk1.6.0/lib/tools.jar:/var/apache-tomcat-7.0.34/lib:/var/apache-tomcat-7.0.34/lib/jsp-api.jar:/var/apache-tomcat-7.0.34/lib/servlet-api.jar:/var/apache-tomcat-7.0.34/lib/mysql-connector-java-5.0.5-bin.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/c3p0-0.9.2-pre8.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-fileupload-1.2.2.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-io-2.0.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-lang-2.4.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-lang3-3.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-logging-1.1.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-logging-api-1.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-validator-1.3.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/json-lib-2.3
> >
> -jdk15.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/ognl-3.0.5.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-core-2.3.7.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/freemarker-2.3.19.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/xwork-core-2.3.7.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/javassist-3.11.0.GA.jar
> >
> > alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib # ls
> > antlr-2.7.2.jar google-gxp-0.2.4-beta.jar
> spring-core-3.0.5.RELEASE.jar struts2-oval-plugin-2.3.7.jar
> > aopalliance-1.0.jar jackson-core-asl-1.9.2.jar
> spring-expression-3.0.5.RELEASE.jar
> struts2-pell-multipart-plugin-2.3.7.jar
> > asm-3.3.jar jackson-mapper-asl-1.9.2.jar
> spring-test-3.0.5.RELEASE.jar struts2-plexus-plugin-2.3.7.jar
> > asm-commons-3.3.jar javassist-3.11.0.GA.jar
> spring-web-3.0.5.RELEASE.jar struts2-portlet-plugin-2.3.7.jar
> > asm-tree-3.3.jar json-lib-2.3-jdk15.jar
> struts-core-1.3.10.jar struts2-rest-plugin-2.3.7.jar
> > c3p0-0.9.2-pre8.jar juli-6.0.18.jar
> struts2-codebehind-plugin-2.3.7.jar
> struts2-sitegraph-plugin-2.3.7.jar
> > classworlds-1.1.jar junk
> struts2-config-browser-plugin-2.3.7.jar
> struts2-sitemesh-plugin-2.3.7.jar
> > commons-beanutils-1.8.0.jar ognl-3.0.5.jar
> struts2-convention-plugin-2.3.7.jar struts2-spring-plugin-2.3.7.jar
> > commons-chain-1.2.jar
> org.apache.felix.bundlerepository-1.2.1.jar struts2-core-2.3.7.jar
> struts2-struts1-plugin-2.3.7.jar
> > commons-collections-3.1.jar org.apache.felix.framework-1.4.1.jar
> struts2-dojo-plugin-2.3.7.jar struts2-testng-plugin-2.3.7.jar
> > commons-digester-2.0.jar org.apache.felix.main-1.4.1.jar
> struts2-dwr-plugin-2.3.7.jar struts2-tiles-plugin-2.3.7.jar
> > commons-fileupload-1.2.2.jar org.apache.felix.shell-1.0.2.jar
> struts2-embeddedjsp-plugin-2.3.7.jar testng-5.1-jdk15.jar
> > commons-io-2.0.1.jar org.apache.felix.shell.tui-1.0.2.jar
> struts2-gxp-plugin-2.3.7.jar tiles-api-2.0.6.jar
> > commons-lang-2.4.jar oro-2.0.8.jar
> struts2-jasperreports-plugin-2.3.7.jar tiles-core-2.0.6.jar
> > commons-lang3-3.1.jar oval-1.31.jar
> struts2-javatemplates-plugin-2.3.7.jar tiles-jsp-2.0.6.jar
> > commons-logging-1.1.1.jar plexus-container-default-1.0-alpha-10.jar
> struts2-jfreechart-plugin-2.3.7.jar velocity-1.6.3.jar
> > commons-logging-api-1.1.jar plexus-utils-1.2.jar
> struts2-jsf-plugin-2.3.7.jar xmlpull-1.1.3.1.jar
> > commons-validator-1.3.1.jar sitemesh-2.4.2.jar
> struts2-json-plugin-2.3.7.jar xpp3_min-1.1.4c.jar
> > dwr-1.1.1.jar spring-aop-3.0.5.RELEASE.jar
> struts2-junit-plugin-2.3.7.jar xstream-1.4.2.jar
> > ezmorph-1.0.6.jar spring-asm-3.0.5.RELEASE.jar
> struts2-osgi-admin-bundle-2.3.7.jar xwork-core-2.3.7.jar
> > freemarker-2.3.19.jar spring-beans-3.0.5.RELEASE.jar
> struts2-osgi-demo-bundle-2.3.7.jar
> > google-collections-1.0.jar spring-context-3.0.5.RELEASE.jar
> struts2-osgi-plugin-2.3.7.jar
> >
> >
> > alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF # cat web.xml
> > <?xml version="1.0" encoding="UTF-8"?>
> > <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> > <filter>
> > <filter-name>struts2</filter-name>
> >
> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
> > <!--
> > <filter-class>org.apache.struts2.dispatcher.FilterDispatcher
> </filter-class>
> > -->
> > </filter>
> > <filter-mapping>
> > <filter-name>struts2</filter-name>
> > <url-pattern>/*</url-pattern>
> > </filter-mapping>
> > </web-app>
Re: struts 2 presentation layer
Posted by Łukasz Lenart <lu...@gmail.com>.
11 mar 2013 18:41, "john lee" <sh...@yahoo.com> napisał(a):
> what is the presentation layer it support?
also Velocity, Google pages (gxp)
> thanks
>
> john
>
>
>
> ________________________________
> From: Martin Gainty <mg...@hotmail.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Monday, March 11, 2013 5:33 AM
> Subject: RE: struts 2 start problem struts2-gxp-plugin-2.3.7.jar
>
> rename struts2-gxp-plugin-2.3.7.jar e.g.
>
> mv
/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar
/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar.old
>
> or delete struts2-gxp-plugin-2.3.7.jar
>
> stop your session and redeploy usually works BUT i would bounce the
server just ot make sure you start ecommerce webapp clean
>
> Martin
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
dient lediglich dem Austausch von Informationen und entfaltet keine
rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>
>
>
> > Date: Sun, 10 Mar 2013 20:32:41 -0700
> > From: sh_thorn_bird@yahoo.com
> > Subject: struts 2 start problem struts2-gxp-plugin-2.3.7.jar
> > To: user@struts.apache.org
> >
> > i try to start tomcat, but giving the following error
> >
> > Unable to load configuration...---- struts2-gxp-plugin-2.3.7.jar...
> >
> > in the CLASSPTH, i even did not load struts2-gxp-plugin-2.3.7.jar at
all, why this happen?
> >
> > please advise
> >
> > thanks in advance
> >
> > john
> >
> >
> > SEVERE: Dispatcher initialization failed
> > Unable to load configuration. - bean -
jar:file:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar!/struts-plugin.xml:8:162
> > at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:71)
> > at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)
> > at
org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:471)
> > at
org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
> > at
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
> > at
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:278)
> > at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
> > at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
> > at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:104)
> > at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
> > at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
> > at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> > at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
> > at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
> > at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> > at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> > at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)
> > Caused by: Unable to load bean:
type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer
class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean -
jar:file:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar!/struts-plugin.xml:8:162
> > at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
> > at
org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
> > at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:215)
> > at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:68)
> > ... 18 more
> > Caused by: java.lang.ClassNotFoundException:
org.apache.struts2.views.gxp.inject.InjectedObjectContainer
> > at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
> > at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
> > at
com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
> > at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)
> > ... 21 more
> >
> >
> > alpha:/var/apache-tomcat-7.0.34/logs # env |grep CLASSPATH
> >
> >
CLASSPATH=/usr/java/jdk1.6.0/lib/dt.jar:/usr/java/jdk1.6.0/lib/tools.jar:/var/apache-tomcat-7.0.34/lib:/var/apache-tomcat-7.0.34/lib/jsp-api.jar:/var/apache-tomcat-7.0.34/lib/servlet-api.jar:/var/apache-tomcat-7.0.34/lib/mysql-connector-java-5.0.5-bin.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/c3p0-0.9.2-pre8.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-fileupload-1.2.2.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-io-2.0.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-lang-2.4.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-lang3-3.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-logging-1.1.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-logging-api-1.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-validator-1.3.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/json-lib-2.3
> >
-jdk15.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/ognl-3.0.5.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-core-2.3.7.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/freemarker-2.3.19.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/xwork-core-2.3.7.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/javassist-3.11.0.GA.jar
> >
> > alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib # ls
> > antlr-2.7.2.jar google-gxp-0.2.4-beta.jar
spring-core-3.0.5.RELEASE.jar struts2-oval-plugin-2.3.7.jar
> > aopalliance-1.0.jar jackson-core-asl-1.9.2.jar
spring-expression-3.0.5.RELEASE.jar
struts2-pell-multipart-plugin-2.3.7.jar
> > asm-3.3.jar jackson-mapper-asl-1.9.2.jar
spring-test-3.0.5.RELEASE.jar struts2-plexus-plugin-2.3.7.jar
> > asm-commons-3.3.jar javassist-3.11.0.GA.jar
spring-web-3.0.5.RELEASE.jar
struts2-portlet-plugin-2.3.7.jar
> > asm-tree-3.3.jar json-lib-2.3-jdk15.jar
struts-core-1.3.10.jar struts2-rest-plugin-2.3.7.jar
> > c3p0-0.9.2-pre8.jar juli-6.0.18.jar
struts2-codebehind-plugin-2.3.7.jar
struts2-sitegraph-plugin-2.3.7.jar
> > classworlds-1.1.jar junk
struts2-config-browser-plugin-2.3.7.jar
struts2-sitemesh-plugin-2.3.7.jar
> > commons-beanutils-1.8.0.jar ognl-3.0.5.jar
struts2-convention-plugin-2.3.7.jar struts2-spring-plugin-2.3.7.jar
> > commons-chain-1.2.jar
org.apache.felix.bundlerepository-1.2.1.jar struts2-core-2.3.7.jar
struts2-struts1-plugin-2.3.7.jar
> > commons-collections-3.1.jar org.apache.felix.framework-1.4.1.jar
struts2-dojo-plugin-2.3.7.jar struts2-testng-plugin-2.3.7.jar
> > commons-digester-2.0.jar org.apache.felix.main-1.4.1.jar
struts2-dwr-plugin-2.3.7.jar struts2-tiles-plugin-2.3.7.jar
> > commons-fileupload-1.2.2.jar org.apache.felix.shell-1.0.2.jar
struts2-embeddedjsp-plugin-2.3.7.jar testng-5.1-jdk15.jar
> > commons-io-2.0.1.jar org.apache.felix.shell.tui-1.0.2.jar
struts2-gxp-plugin-2.3.7.jar tiles-api-2.0.6.jar
> > commons-lang-2.4.jar oro-2.0.8.jar
struts2-jasperreports-plugin-2.3.7.jar tiles-core-2.0.6.jar
> > commons-lang3-3.1.jar oval-1.31.jar
struts2-javatemplates-plugin-2.3.7.jar tiles-jsp-2.0.6.jar
> > commons-logging-1.1.1.jar
plexus-container-default-1.0-alpha-10.jar
struts2-jfreechart-plugin-2.3.7.jar velocity-1.6.3.jar
> > commons-logging-api-1.1.jar plexus-utils-1.2.jar
struts2-jsf-plugin-2.3.7.jar xmlpull-1.1.3.1.jar
> > commons-validator-1.3.1.jar sitemesh-2.4.2.jar
struts2-json-plugin-2.3.7.jar xpp3_min-1.1.4c.jar
> > dwr-1.1.1.jar spring-aop-3.0.5.RELEASE.jar
struts2-junit-plugin-2.3.7.jar xstream-1.4.2.jar
> > ezmorph-1.0.6.jar spring-asm-3.0.5.RELEASE.jar
struts2-osgi-admin-bundle-2.3.7.jar xwork-core-2.3.7.jar
> > freemarker-2.3.19.jar spring-beans-3.0.5.RELEASE.jar
struts2-osgi-demo-bundle-2.3.7.jar
> > google-collections-1.0.jar spring-context-3.0.5.RELEASE.jar
struts2-osgi-plugin-2.3.7.jar
> >
> >
> > alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF # cat web.xml
> > <?xml version="1.0" encoding="UTF-8"?>
> > <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> > <filter>
> > <filter-name>struts2</filter-name>
> >
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
struts 2 presentation layer
Posted by john lee <sh...@yahoo.com>.
struts 2 presentation layer
support JSP, freemaker
as i know.
does it support PHP?
what is the presentation layer it support?
thanks
john
________________________________
From: Martin Gainty <mg...@hotmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Monday, March 11, 2013 5:33 AM
Subject: RE: struts 2 start problem struts2-gxp-plugin-2.3.7.jar
rename struts2-gxp-plugin-2.3.7.jar e.g.
mv /var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar /var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar.old
or delete struts2-gxp-plugin-2.3.7.jar
stop your session and redeploy usually works BUT i would bounce the server just ot make sure you start ecommerce webapp clean
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Date: Sun, 10 Mar 2013 20:32:41 -0700
> From: sh_thorn_bird@yahoo.com
> Subject: struts 2 start problem struts2-gxp-plugin-2.3.7.jar
> To: user@struts.apache.org
>
> i try to start tomcat, but giving the following error
>
> Unable to load configuration...---- struts2-gxp-plugin-2.3.7.jar...
>
> in the CLASSPTH, i even did not load struts2-gxp-plugin-2.3.7.jar at all, why this happen?
>
> please advise
>
> thanks in advance
>
> john
>
>
> SEVERE: Dispatcher initialization failed
> Unable to load configuration. - bean - jar:file:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar!/struts-plugin.xml:8:162
> at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:71)
> at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)
> at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:471)
> at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
> at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
> at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:278)
> at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
> at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
> at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:104)
> at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
> at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: Unable to load bean: type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean - jar:file:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar!/struts-plugin.xml:8:162
> at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
> at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
> at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:215)
> at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:68)
> ... 18 more
> Caused by: java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainer
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
> at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
> at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)
> ... 21 more
>
>
> alpha:/var/apache-tomcat-7.0.34/logs # env |grep CLASSPATH
>
> CLASSPATH=/usr/java/jdk1.6.0/lib/dt.jar:/usr/java/jdk1.6.0/lib/tools.jar:/var/apache-tomcat-7.0.34/lib:/var/apache-tomcat-7.0.34/lib/jsp-api.jar:/var/apache-tomcat-7.0.34/lib/servlet-api.jar:/var/apache-tomcat-7.0.34/lib/mysql-connector-java-5.0.5-bin.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/c3p0-0.9.2-pre8.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-fileupload-1.2.2.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-io-2.0.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-lang-2.4.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-lang3-3.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-logging-1.1.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-logging-api-1.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-validator-1.3.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/json-lib-2.3
> -jdk15.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/ognl-3.0.5.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-core-2.3.7.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/freemarker-2.3.19.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/xwork-core-2.3.7.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/javassist-3.11.0.GA.jar
>
> alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib # ls
> antlr-2.7.2.jar google-gxp-0.2.4-beta.jar spring-core-3.0.5.RELEASE.jar struts2-oval-plugin-2.3.7.jar
> aopalliance-1.0.jar jackson-core-asl-1.9.2.jar spring-expression-3.0.5.RELEASE.jar struts2-pell-multipart-plugin-2.3.7.jar
> asm-3.3.jar jackson-mapper-asl-1.9.2.jar spring-test-3.0.5.RELEASE.jar struts2-plexus-plugin-2.3.7.jar
> asm-commons-3.3.jar javassist-3.11.0.GA.jar spring-web-3.0.5.RELEASE.jar struts2-portlet-plugin-2.3.7.jar
> asm-tree-3.3.jar json-lib-2.3-jdk15.jar struts-core-1.3.10.jar struts2-rest-plugin-2.3.7.jar
> c3p0-0.9.2-pre8.jar juli-6.0.18.jar struts2-codebehind-plugin-2.3.7.jar struts2-sitegraph-plugin-2.3.7.jar
> classworlds-1.1.jar junk struts2-config-browser-plugin-2.3.7.jar struts2-sitemesh-plugin-2.3.7.jar
> commons-beanutils-1.8.0.jar ognl-3.0.5.jar struts2-convention-plugin-2.3.7.jar struts2-spring-plugin-2.3.7.jar
> commons-chain-1.2.jar org.apache.felix.bundlerepository-1.2.1.jar struts2-core-2.3.7.jar struts2-struts1-plugin-2.3.7.jar
> commons-collections-3.1.jar org.apache.felix.framework-1.4.1.jar struts2-dojo-plugin-2.3.7.jar struts2-testng-plugin-2.3.7.jar
> commons-digester-2.0.jar org.apache.felix.main-1.4.1.jar struts2-dwr-plugin-2.3.7.jar struts2-tiles-plugin-2.3.7.jar
> commons-fileupload-1.2.2.jar org.apache.felix.shell-1.0.2.jar struts2-embeddedjsp-plugin-2.3.7.jar testng-5.1-jdk15.jar
> commons-io-2.0.1.jar org.apache.felix.shell.tui-1.0.2.jar struts2-gxp-plugin-2.3.7.jar tiles-api-2.0.6.jar
> commons-lang-2.4.jar oro-2.0.8.jar struts2-jasperreports-plugin-2.3.7.jar tiles-core-2.0.6.jar
> commons-lang3-3.1.jar oval-1.31.jar struts2-javatemplates-plugin-2.3.7.jar tiles-jsp-2.0.6.jar
> commons-logging-1.1.1.jar plexus-container-default-1.0-alpha-10.jar struts2-jfreechart-plugin-2.3.7.jar velocity-1.6.3.jar
> commons-logging-api-1.1.jar plexus-utils-1.2.jar struts2-jsf-plugin-2.3.7.jar xmlpull-1.1.3.1.jar
> commons-validator-1.3.1.jar sitemesh-2.4.2.jar struts2-json-plugin-2.3.7.jar xpp3_min-1.1.4c.jar
> dwr-1.1.1.jar spring-aop-3.0.5.RELEASE.jar struts2-junit-plugin-2.3.7.jar xstream-1.4.2.jar
> ezmorph-1.0.6.jar spring-asm-3.0.5.RELEASE.jar struts2-osgi-admin-bundle-2.3.7.jar xwork-core-2.3.7.jar
> freemarker-2.3.19.jar spring-beans-3.0.5.RELEASE.jar struts2-osgi-demo-bundle-2.3.7.jar
> google-collections-1.0.jar spring-context-3.0.5.RELEASE.jar struts2-osgi-plugin-2.3.7.jar
>
>
> alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF # cat web.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> <filter>
> <filter-name>struts2</filter-name>
> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
> <!--
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher </filter-class>
> -->
> </filter>
> <filter-mapping>
> <filter-name>struts2</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> </web-app>
RE: struts 2 start problem struts2-gxp-plugin-2.3.7.jar
Posted by Martin Gainty <mg...@hotmail.com>.
rename struts2-gxp-plugin-2.3.7.jar e.g.
mv /var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar /var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar.old
or delete struts2-gxp-plugin-2.3.7.jar
stop your session and redeploy usually works BUT i would bounce the server just ot make sure you start ecommerce webapp clean
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Date: Sun, 10 Mar 2013 20:32:41 -0700
> From: sh_thorn_bird@yahoo.com
> Subject: struts 2 start problem struts2-gxp-plugin-2.3.7.jar
> To: user@struts.apache.org
>
> i try to start tomcat, but giving the following error
>
> Unable to load configuration...---- struts2-gxp-plugin-2.3.7.jar...
>
> in the CLASSPTH, i even did not load struts2-gxp-plugin-2.3.7.jar at all, why this happen?
>
> please advise
>
> thanks in advance
>
> john
>
>
> SEVERE: Dispatcher initialization failed
> Unable to load configuration. - bean - jar:file:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar!/struts-plugin.xml:8:162
> at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:71)
> at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)
> at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:471)
> at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
> at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
> at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:278)
> at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
> at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
> at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:104)
> at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
> at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: Unable to load bean: type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean - jar:file:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar!/struts-plugin.xml:8:162
> at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
> at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
> at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:215)
> at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:68)
> ... 18 more
> Caused by: java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainer
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
> at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
> at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)
> ... 21 more
>
>
> alpha:/var/apache-tomcat-7.0.34/logs # env |grep CLASSPATH
>
> CLASSPATH=/usr/java/jdk1.6.0/lib/dt.jar:/usr/java/jdk1.6.0/lib/tools.jar:/var/apache-tomcat-7.0.34/lib:/var/apache-tomcat-7.0.34/lib/jsp-api.jar:/var/apache-tomcat-7.0.34/lib/servlet-api.jar:/var/apache-tomcat-7.0.34/lib/mysql-connector-java-5.0.5-bin.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/c3p0-0.9.2-pre8.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-fileupload-1.2.2.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-io-2.0.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-lang-2.4.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-lang3-3.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-logging-1.1.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-logging-api-1.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-validator-1.3.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/json-lib-2.3
> -jdk15.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/ognl-3.0.5.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-core-2.3.7.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/freemarker-2.3.19.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/xwork-core-2.3.7.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/javassist-3.11.0.GA.jar
>
> alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib # ls
> antlr-2.7.2.jar google-gxp-0.2.4-beta.jar spring-core-3.0.5.RELEASE.jar struts2-oval-plugin-2.3.7.jar
> aopalliance-1.0.jar jackson-core-asl-1.9.2.jar spring-expression-3.0.5.RELEASE.jar struts2-pell-multipart-plugin-2.3.7.jar
> asm-3.3.jar jackson-mapper-asl-1.9.2.jar spring-test-3.0.5.RELEASE.jar struts2-plexus-plugin-2.3.7.jar
> asm-commons-3.3.jar javassist-3.11.0.GA.jar spring-web-3.0.5.RELEASE.jar struts2-portlet-plugin-2.3.7.jar
> asm-tree-3.3.jar json-lib-2.3-jdk15.jar struts-core-1.3.10.jar struts2-rest-plugin-2.3.7.jar
> c3p0-0.9.2-pre8.jar juli-6.0.18.jar struts2-codebehind-plugin-2.3.7.jar struts2-sitegraph-plugin-2.3.7.jar
> classworlds-1.1.jar junk struts2-config-browser-plugin-2.3.7.jar struts2-sitemesh-plugin-2.3.7.jar
> commons-beanutils-1.8.0.jar ognl-3.0.5.jar struts2-convention-plugin-2.3.7.jar struts2-spring-plugin-2.3.7.jar
> commons-chain-1.2.jar org.apache.felix.bundlerepository-1.2.1.jar struts2-core-2.3.7.jar struts2-struts1-plugin-2.3.7.jar
> commons-collections-3.1.jar org.apache.felix.framework-1.4.1.jar struts2-dojo-plugin-2.3.7.jar struts2-testng-plugin-2.3.7.jar
> commons-digester-2.0.jar org.apache.felix.main-1.4.1.jar struts2-dwr-plugin-2.3.7.jar struts2-tiles-plugin-2.3.7.jar
> commons-fileupload-1.2.2.jar org.apache.felix.shell-1.0.2.jar struts2-embeddedjsp-plugin-2.3.7.jar testng-5.1-jdk15.jar
> commons-io-2.0.1.jar org.apache.felix.shell.tui-1.0.2.jar struts2-gxp-plugin-2.3.7.jar tiles-api-2.0.6.jar
> commons-lang-2.4.jar oro-2.0.8.jar struts2-jasperreports-plugin-2.3.7.jar tiles-core-2.0.6.jar
> commons-lang3-3.1.jar oval-1.31.jar struts2-javatemplates-plugin-2.3.7.jar tiles-jsp-2.0.6.jar
> commons-logging-1.1.1.jar plexus-container-default-1.0-alpha-10.jar struts2-jfreechart-plugin-2.3.7.jar velocity-1.6.3.jar
> commons-logging-api-1.1.jar plexus-utils-1.2.jar struts2-jsf-plugin-2.3.7.jar xmlpull-1.1.3.1.jar
> commons-validator-1.3.1.jar sitemesh-2.4.2.jar struts2-json-plugin-2.3.7.jar xpp3_min-1.1.4c.jar
> dwr-1.1.1.jar spring-aop-3.0.5.RELEASE.jar struts2-junit-plugin-2.3.7.jar xstream-1.4.2.jar
> ezmorph-1.0.6.jar spring-asm-3.0.5.RELEASE.jar struts2-osgi-admin-bundle-2.3.7.jar xwork-core-2.3.7.jar
> freemarker-2.3.19.jar spring-beans-3.0.5.RELEASE.jar struts2-osgi-demo-bundle-2.3.7.jar
> google-collections-1.0.jar spring-context-3.0.5.RELEASE.jar struts2-osgi-plugin-2.3.7.jar
>
>
> alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF # cat web.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> <filter>
> <filter-name>struts2</filter-name>
> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
> <!--
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher </filter-class>
> -->
> </filter>
> <filter-mapping>
> <filter-name>struts2</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> </web-app>
struts 2 start problem struts2-gxp-plugin-2.3.7.jar
Posted by john lee <sh...@yahoo.com>.
i try to start tomcat, but giving the following error
Unable to load configuration...---- struts2-gxp-plugin-2.3.7.jar...
in the CLASSPTH, i even did not load struts2-gxp-plugin-2.3.7.jar at all, why this happen?
please advise
thanks in advance
john
SEVERE: Dispatcher initialization failed
Unable to load configuration. - bean - jar:file:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar!/struts-plugin.xml:8:162
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:71)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:471)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:278)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:104)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: Unable to load bean: type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean - jar:file:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-gxp-plugin-2.3.7.jar!/struts-plugin.xml:8:162
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:215)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:68)
... 18 more
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainer
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)
... 21 more
alpha:/var/apache-tomcat-7.0.34/logs # env |grep CLASSPATH
CLASSPATH=/usr/java/jdk1.6.0/lib/dt.jar:/usr/java/jdk1.6.0/lib/tools.jar:/var/apache-tomcat-7.0.34/lib:/var/apache-tomcat-7.0.34/lib/jsp-api.jar:/var/apache-tomcat-7.0.34/lib/servlet-api.jar:/var/apache-tomcat-7.0.34/lib/mysql-connector-java-5.0.5-bin.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/c3p0-0.9.2-pre8.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-fileupload-1.2.2.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-io-2.0.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-lang-2.4.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-lang3-3.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-logging-1.1.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-logging-api-1.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-validator-1.3.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/json-lib-2.3
-jdk15.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/ognl-3.0.5.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-core-2.3.7.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/freemarker-2.3.19.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/xwork-core-2.3.7.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/javassist-3.11.0.GA.jar
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib # ls
antlr-2.7.2.jar google-gxp-0.2.4-beta.jar spring-core-3.0.5.RELEASE.jar struts2-oval-plugin-2.3.7.jar
aopalliance-1.0.jar jackson-core-asl-1.9.2.jar spring-expression-3.0.5.RELEASE.jar struts2-pell-multipart-plugin-2.3.7.jar
asm-3.3.jar jackson-mapper-asl-1.9.2.jar spring-test-3.0.5.RELEASE.jar struts2-plexus-plugin-2.3.7.jar
asm-commons-3.3.jar javassist-3.11.0.GA.jar spring-web-3.0.5.RELEASE.jar struts2-portlet-plugin-2.3.7.jar
asm-tree-3.3.jar json-lib-2.3-jdk15.jar struts-core-1.3.10.jar struts2-rest-plugin-2.3.7.jar
c3p0-0.9.2-pre8.jar juli-6.0.18.jar struts2-codebehind-plugin-2.3.7.jar struts2-sitegraph-plugin-2.3.7.jar
classworlds-1.1.jar junk struts2-config-browser-plugin-2.3.7.jar struts2-sitemesh-plugin-2.3.7.jar
commons-beanutils-1.8.0.jar ognl-3.0.5.jar struts2-convention-plugin-2.3.7.jar struts2-spring-plugin-2.3.7.jar
commons-chain-1.2.jar org.apache.felix.bundlerepository-1.2.1.jar struts2-core-2.3.7.jar struts2-struts1-plugin-2.3.7.jar
commons-collections-3.1.jar org.apache.felix.framework-1.4.1.jar struts2-dojo-plugin-2.3.7.jar struts2-testng-plugin-2.3.7.jar
commons-digester-2.0.jar org.apache.felix.main-1.4.1.jar struts2-dwr-plugin-2.3.7.jar struts2-tiles-plugin-2.3.7.jar
commons-fileupload-1.2.2.jar org.apache.felix.shell-1.0.2.jar struts2-embeddedjsp-plugin-2.3.7.jar testng-5.1-jdk15.jar
commons-io-2.0.1.jar org.apache.felix.shell.tui-1.0.2.jar struts2-gxp-plugin-2.3.7.jar tiles-api-2.0.6.jar
commons-lang-2.4.jar oro-2.0.8.jar struts2-jasperreports-plugin-2.3.7.jar tiles-core-2.0.6.jar
commons-lang3-3.1.jar oval-1.31.jar struts2-javatemplates-plugin-2.3.7.jar tiles-jsp-2.0.6.jar
commons-logging-1.1.1.jar plexus-container-default-1.0-alpha-10.jar struts2-jfreechart-plugin-2.3.7.jar velocity-1.6.3.jar
commons-logging-api-1.1.jar plexus-utils-1.2.jar struts2-jsf-plugin-2.3.7.jar xmlpull-1.1.3.1.jar
commons-validator-1.3.1.jar sitemesh-2.4.2.jar struts2-json-plugin-2.3.7.jar xpp3_min-1.1.4c.jar
dwr-1.1.1.jar spring-aop-3.0.5.RELEASE.jar struts2-junit-plugin-2.3.7.jar xstream-1.4.2.jar
ezmorph-1.0.6.jar spring-asm-3.0.5.RELEASE.jar struts2-osgi-admin-bundle-2.3.7.jar xwork-core-2.3.7.jar
freemarker-2.3.19.jar spring-beans-3.0.5.RELEASE.jar struts2-osgi-demo-bundle-2.3.7.jar
google-collections-1.0.jar spring-context-3.0.5.RELEASE.jar struts2-osgi-plugin-2.3.7.jar
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF # cat web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
<!--
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher </filter-class>
-->
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
struts 2 session share
Posted by john lee <sh...@yahoo.com>.
after user login our e-commerce site successfuly, he was granted an session.
his shopping cart is saved into an session object.
sometimes, customer need help for his shopping cart, in order to do that, we need to access his cart/session object.
how can we do session share in struts2 ? in other words,we need to save sth(such as the accessary parts) in his shopping cart..
any example?
thanks in advance
john
Re: struts 2 validation if use with spring
Posted by Lukasz Lenart <lu...@apache.org>.
2013/3/9 john lee <sh...@yahoo.com>:
> i just checked your demo, looks like the first tricky is to define proxy action name signin in struts.xml
It isn't any trick, it's the normal why how to define many actions
base on one action class.
> struts.xml
>
> <action name="signin" method="signin" class="loginAction">
> <result name="input">/example/Login.jsp</result>
> <result type="redirectAction">Welcome</result>
> </action>
>
> ************************************************
>
> and second tricky to define signin method in the file LoginAction.java
>
>
> LoinAction.java
> ...
>
> public String signin() {
> return SUCCESS;
> }
> ...
>
> ************************************************
>
> my question next is:
>
> why can not use Login-validation.xml directly ? but have to use your "proxy method" to work around?
You can but then the validation will be fired also when you just enter
the login page which isn't what user expect - to be more specific,
validation will be fired for each action defined base on Login class.
> is this the only way to lett struts2/spring validation works?
As I said no, but thus presents the clear way what is validated when.
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: struts 2 validation if use with spring
Posted by john lee <sh...@yahoo.com>.
Luckasz,
thanks for your great help,
i just checked your demo, looks like the first tricky is to define proxy action name signin in struts.xml
struts.xml
<action name="signin" method="signin" class="loginAction">
<result name="input">/example/Login.jsp</result>
<result type="redirectAction">Welcome</result>
</action>
************************************************
and second tricky to define signin method in the file LoginAction.java
LoinAction.java
...
public String signin() {
return SUCCESS;
}
...
************************************************
my question next is:
why can not use Login-validation.xml directly ? but have to use your "proxy method" to work around?
is this the only way to lett struts2/spring validation works?
thanks so much in advance
john
________________________________
From: Lukasz Lenart <lu...@apache.org>
To: Struts Users Mailing List <us...@struts.apache.org>; john lee <sh...@yahoo.com>
Sent: Friday, March 8, 2013 7:27 AM
Subject: Re: struts 2 validation if use with spring
2013/3/8 john lee <sh...@yahoo.com>:
> Lukasz,
>
> thanks for your help, i just tried, but still not works
>
> any other suggestion?
I have prepared a small demo app
https://github.com/lukaszlenart/struts2-spring-validation
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: struts 2 validation if use with spring
Posted by Lukasz Lenart <lu...@apache.org>.
2013/3/8 john lee <sh...@yahoo.com>:
> Lukasz,
>
> thanks for your help, i just tried, but still not works
>
> any other suggestion?
I have prepared a small demo app
https://github.com/lukaszlenart/struts2-spring-validation
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: struts 2 validation if use with spring
Posted by john lee <sh...@yahoo.com>.
Lukasz,
thanks for your help, i just tried, but still not works
any other suggestion?
thanks in advance
john
________________________________
From: Lukasz Lenart <lu...@apache.org>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Friday, March 8, 2013 12:01 AM
Subject: Re: struts 2 validation if use with spring
2013/3/8 john lee <sh...@yahoo.com>:
> <action name="signin" class="loginAction">
As specified in the docs [1][2], validation file name must match schema:
class-name-validation.xml -> LoginAction-signin-validation.xml
[1] http://struts.apache.org/development/2.x/docs/validation.html#Validation-DefiningValidationRules
[2] http://struts.apache.org/development/2.x/docs/struts-2-spring-2-jpa-ajax.html
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: struts 2 validation if use with spring
Posted by Lukasz Lenart <lu...@apache.org>.
2013/3/8 john lee <sh...@yahoo.com>:
> <action name="signin" class="loginAction">
As specified in the docs [1][2], validation file name must match schema:
class-name-validation.xml -> LoginAction-signin-validation.xml
[1] http://struts.apache.org/development/2.x/docs/validation.html#Validation-DefiningValidationRules
[2] http://struts.apache.org/development/2.x/docs/struts-2-spring-2-jpa-ajax.html
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
struts 2 validation if use with spring
Posted by john lee <sh...@yahoo.com>.
Problem
I use struts2/spring 3 as integration, and need to use struts2
validation.xml as well,
Basically, the action name in the login.jsp/struts.xml is pseudo class name, but is implemented in
the applicationContext.xml
In order to let validation.xml works, I defined all the possible XXXvalidation.xml for both matched
psesuo action class name and actually class name, but looks like no one works.
Is XXXvalidation.xml only works for struts2 actual class
name only? But not works if used in struts2/spring proxy action forward?
Pelase advise.
john
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce # cat
login.jsp
<%@ taglib prefix="s"
uri="/struts-tags"%>
<s:actionerror/>
<s:form action="signin">
<s:textfield name="loginId"
label="login"/>
<s:textfield name="password"
label="password"/>
<s:submit value="logint"/>
</s:form>
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF
# cat applicationContext.xml
……
<bean
id="loginAction" class="neuco.AcctAction"
scope="prototype"> </bean>
........
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/classes
# cat struts.xml
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD
Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package
name="default" extends="struts-default">
<action name="signin" class="loginAction">
<result
name="success">success.jsp</result>
<result
name="error">login.jsp</result>
</action>
</package></struts>
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/src/neuco
# cat AcctAction.java
package neuco;
public class AcctAction extends
ActionSupport {
private
String loginId;
private String password;
public void setLoginId(String loginId) { this.loginId=loginId; }
public void setPassword(String password) { this.password=password; }
public String getLoginId() { return loginId; }
public String getPassword() { return password; }
public String execute() throws
Exception {
Map
session=ActionContext.getContext().getSession();
if (login.equals("test" ) ) {
session.put("loginid",login_return);
addActionMessage("Login
Success");
return "success";
}
else
addActionError("loginid/password
not match");
return "error";
}
}
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/classes
# cat Signin-Validation.xml
<!DOCTYPE validators PUBLIC
"-//Apache Struts//XWork Validator 1.0.3//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
<validators>
<field name="loginId">
<field-validator
type="requiredstring">
<param
name="trim">true</param>
<message="errors.required" />
</field-validator>
</field>
</validators>
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/classes
# ls *Validation.xml
AcctAction-Validation.xml LoginAction-Validation.xml Signin-Validation.xml
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/classes/neuco
# ls *Validation.xml
AcctAction-Validation.xml LoginAction-Validation.xml Signin-Validation.xml
Re: struts 2 validation error
Posted by Lukasz Lenart <lu...@apache.org>.
2013/3/7 john lee <sh...@yahoo.com>:
> Java backtrace for programmers:
> ----------
> freemarker.template.TemplateModelException: Method public java.util.List org.apache.struts2.components.Form.getValidators(java.lang.String) threw an exception when invoked on org.apache.struts2.components.Form@d6147e
> at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:130)
> at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
Could you post the whole stacktrace from console?
> alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce # cat login.jsp
How did you access the page? Via action or directly ->
http://localhost:8080/login.jsp?
> alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/classes # cat signin-valition.xml
signin-valition.xml??? It has to be -validation.xml
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
struts 2 validation error
Posted by john lee <sh...@yahoo.com>.
please advise
thanks in advance
john
******************************************************************************************
error:
Template processing error: "Method public java.util.List org.apache.struts2.components.Form.getValidators(java.lang.String) threw an exception when invoked on org.apache.struts2.components.Form@d6147e"
Method public java.util.List org.apache.struts2.components.Form.getValidators(java.lang.String) threw an exception when invoked on org.apache.struts2.components.Form@d6147e
The problematic instruction:
----------
==> list tag.getValidators("${tagName}") as validator [on line 46, column 9 in template/xhtml/form-close-validate.ftl]
in include "/${parameters.templateDir}/xhtml/form-close-validate.ftl" [on line 25, column 1 in template/xhtml/form-close.ftl]
----------
Java backtrace for programmers:
----------
freemarker.template.TemplateModelException: Method public java.util.List org.apache.struts2.components.Form.getValidators(java.lang.String) threw an exception when invoked on org.apache.struts2.components.Form@d6147e
at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:130)
at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
*****************************************************************************
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce # cat login.jsp
<%@ taglib prefix="s" uri="/struts-tags"%>
<s:actionerror/>
<s:form action="signin" validate="true">
<s:textfield name="loginId" label="login"/>
<s:textfield name="password" label="password"/>
<s:submit value="logint"/>
</s:form>
*************************************************************************
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/classes # cat struts.xml
<?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>
<package name="default" extends="struts-default">
<action name="signin" class="loginAction">
<result name="success">success.jsp</result>
<result name="error">login.jsp</result>
</action>
</package>
</struts>
*****************************************************************************
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/classes # cat signin-valition.xml
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.3//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
<validators>
<field name="loginId">
<field-validator type="requiredstring">
<param name="trim">true</param>
<message="errors.required" />
</field-validator>
</field>
</validators>
Re: Struts 2 -> java.lang.ClassNotFoundException
Posted by Lukasz Lenart <lu...@apache.org>.
2013/3/6 john lee <sh...@yahoo.com>:
> Invalid action class configuration that references an unknown class named [loginAction]
> Stacktraces
> java.lang.RuntimeException: Invalid action class configuration that references an unknown class named [loginAction]
> java.lang.ClassNotFoundException: loginAction
Looks like Spring integration doesn't work. Do you see such a message
in the logs:
Initializing Struts-Spring integration...
Did you add struts2-spring-plugin jar and all the needed dependencies?
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Struts 2 -> java.lang.ClassNotFoundException
Posted by john lee <sh...@yahoo.com>.
________________________________
I use struts at
webserver, and create proxy action , that proxy action forward to
spring, but when executed result is the following
please advise
thanks in advance
john
[CODE]
Struts Problem Report
Struts has detected an unhandled exception:
Messages: loginAction
Invalid action class configuration that references an unknown class named [loginAction]
Stacktraces
java.lang.RuntimeException: Invalid action class configuration that references an unknown class named [loginAction]
java.lang.ClassNotFoundException: loginAction
[/CODE]
[CODE]
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce # cat login.jsp
<s:actionerror/>
<s:form action="login">
<s:textfield name="loginId" label="login"/>
<s:textfield name="password" label="password"/>
<s:submit value="logint"/>
</s:form>
[/CODE]
[CODE]
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF # cat web.xml
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
</web-app>
[/CODE]
[CODE]
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/classes # cat struts.xml
<struts>
<include file="struts-default.xml"/>
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="true" />
<constant name="struts.objectFactory" value="spring" />
<package name="default" extends="struts-default">
<action name="login" class="loginAction">
<result name="success">success.jsp</result>
<result name="error">error.jsp</result>
</action>
</package>
</struts>[/CODE]
[CODE]
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF # cat applicationContext.xml
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="mappingResources">
<list>
<value>Acctsecurity.hbm.xml</value>
</list>
</property>
</bean>
<bean id="loginAction" class="neuco.AcctAction" scope="prototype">
<property name="mgr" ref="acctmgr"/>
</bean>
<bean id="acctsecurityDao" class="neuco.AcctsecurityDaoHibernate">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="acctmgr" class="neuco.AcctManagerImpl">
<property name="acctsecurityDao" ref="acctsecurityDao"/>
</bean>
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="get*" read-only="true"/>
<tx:method name="*"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="leePointcut" expression="execution(* neuco.*Impl.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="leePointcut"/>
</aop:config>
</beans>
[/CODE]
[CODE]
alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/classes/neuco # ls *.class
AcctAction.class AcctManagerImpl.class AcctsecurityDao.class
AcctManager.class Acctsecurity.class AcctsecurityDaoHibernate.class
[/CODE]
Re: Display progress bar in same page (request page) using
struts2 execAndWait Interceptor
Posted by Eric Reed <ER...@MAIL.NYSED.GOV>.
Pretty straight forward, google AJAX... basically you use java script to send and receive requests without the need for user interaction. Kind of off topic when it comes to struts and there are many examples out there, use the GOOG. Also this is a lot of work for a progress bar going from one page to another, which should not be needed unless you are doing intense processing of some action or uploading a file.
Javascript complicates code, is browser dependant, and relies on fast computers on the client end, thus I try to avoid it unless a real biz requirement must be met.
But just to help you out quick because I have the code right here...
function updateBar()
{
var xmlhttp;
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
} else { // code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
if (xmlhttp.responseText == 'SUCCESS') {
if (count <= 10) {
updateBar(xmlhttp); // UPDATE THE BAR
} else {
processSuccess(); // CALL THE SERVER
}
}
}
}
}
Eric
>>> SudhirSahoo <su...@gmail.com> 3/5/2013 10:30 AM >>>
Sir,
Thank you for your reply.
It would great if anyone provide example code/url/github/svn etc to achieve
this scenario.
~Sudhir
--
View this message in context: http://struts.1045723.n5.nabble.com/Display-progress-bar-in-same-page-request-page-using-struts2-execAndWait-Interceptor-tp5711924p5711927.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Display progress bar in same page (request page) using struts2
execAndWait Interceptor
Posted by SudhirSahoo <su...@gmail.com>.
Sir,
Thank you for your reply.
It would great if anyone provide example code/url/github/svn etc to achieve
this scenario.
~Sudhir
--
View this message in context: http://struts.1045723.n5.nabble.com/Display-progress-bar-in-same-page-request-page-using-struts2-execAndWait-Interceptor-tp5711924p5711927.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Display progress bar in same page (request page) using struts2
execAndWait Interceptor
Posted by Lukasz Lenart <lu...@apache.org>.
If you want to achieve this you must use Ajax, to stay on the same
page and wait for response from backend when validation pass. And
during that period you can show the progress bar.
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org