Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 18 Mar 2008 07:55:32 -0000 Issue 7932

user-digest-help

2008-03-18


Author LoginPost Reply

user Digest 18 Mar 2008 07:55:32 -0000 Issue 7932

Topics (messages 184373 through 184381):

Something odd with deployment to WL 10
 184373 by: Alex Shneyderman
 184376 by: Nils-Helge Garli Hegvik
 184377 by: Alex Shneyderman
 184380 by: Alex Shneyderman

Re: How to implement ajax in struts 1.1
 184374 by: Sudhan Maharjan
 184375 by: Sudhan Maharjan

Re: Struts2 Annotation based Validation
 184378 by: Tauri Valor

Strtus 2.0.11 AJAX TabbedPanel with Remote tabs: How to load the result page in another tab
 184379 by: manisha5

Custom validation with Struts2
 184381 by: Filippov, Andrey

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_184373.ezm (zipped)
I get an exception while deploying WAR to WL 10. Here is the stack trace:

java.lang.NoClassDefFoundError: Lorg/apache/velocity/app/VelocityEngine;
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields (Class.java:2259)
    at java.lang.Class.getDeclaredFields (Class.java:1715)
    at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors (ContainerImpl.java:102)
    at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:84)
    at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:82)
    at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:155)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
    at java.util.concurrent.FutureTask.run (FutureTask.java:123)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate (ReferenceCache.java:81)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.get (ReferenceCache.java:121)
    at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.<init>(ContainerImpl.java:329)
    at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:299)
    at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:298)
    at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:155)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
    at java.util.concurrent.FutureTask.run (FutureTask.java:123)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate (ReferenceCache.java:81)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.get (ReferenceCache.java:121)
    at com.opensymphony.xwork2.inject.ContainerImpl.getConstructor (ContainerImpl.java:562)
    at com.opensymphony.xwork2.inject.ContainerImpl.inject (ContainerImpl.java:460)
    at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:501)
    at com.opensymphony.xwork2.inject.ContainerImpl.callInContext (ContainerImpl.java:549)
    at com.opensymphony.xwork2.inject.ContainerImpl.inject (ContainerImpl.java:499)
    at com.opensymphony.xwork2.config.impl.LocatableFactory.create (LocatableFactory.java:32)
    at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:134)
    at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:49)
    at com.opensymphony.xwork2.inject.ContainerImpl$ParameterInjector.inject(ContainerImpl.java:431)
    at com.opensymphony.xwork2.inject.ContainerImpl.getParameters (ContainerImpl.java:446)
    at com.opensymphony.xwork2.inject.ContainerImpl.access$000(ContainerImpl.java:48)
    at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:288)
    at com.opensymphony.xwork2.inject.ContainerImpl$2.call(ContainerImpl.java:117)
    at com.opensymphony.xwork2.inject.ContainerImpl$2.call(ContainerImpl.java:115)
    at com.opensymphony.xwork2.inject.ContainerImpl.callInContext (ContainerImpl.java:542)
    at com.opensymphony.xwork2.inject.ContainerImpl.injectStatics (ContainerImpl.java:114)
    at com.opensymphony.xwork2.inject.ContainerBuilder.create (ContainerBuilder.java:494)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload (DefaultConfiguration.java:145)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration (ConfigurationManager.java:52)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration (Dispatcher.java:395)
    at org.apache.struts2.dispatcher.Dispatcher.init (Dispatcher.java:452)
    at org.apache.struts2.dispatcher.FilterDispatcher.init (FilterDispatcher.java:201)
    at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterManager.java:320)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.FilterManager.loadFilter(FilterManager.java:88)
    at weblogic.servlet.internal.FilterManager.preloadFilters(FilterManager.java:57)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1725)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2890)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:948)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:353)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:566)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:136)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:104)
    at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:139)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:320)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:816)
    at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1223)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:434)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:161)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)


The project is built with maven and when I deploy with jetty:run
everything work Ok. This is my dependency:tree output:

...
[INFO] [dependency:tree]
[INFO] mypackage:webclient:war:0.5-SNAPSHOT
[INFO] +- org.testng:testng:jar:jdk15:5.6:test
[INFO] | \- junit:junit:jar:3.8.1:test
[INFO] +- org.apache.struts:struts2-core:jar:2.0.11:compile
[INFO] | +- com.opensymphony:xwork:jar:2.0.4:compile
[INFO] | +- commons-logging:commons-logging:jar:1.0.4:compile
[INFO] | +- opensymphony:ognl:jar:2.6.11:compile
[INFO] | +- freemarker:freemarker:jar:2.3.8:compile
[INFO] | \- com.sun:tools:jar:1.5.0:system
[INFO] +- org.apache.struts:struts2-spring-plugin:jar:2.0.11:compile
[INFO] | +- org.springframework:spring-beans:jar:2.0.5:compile
[INFO] | +- org.springframework:spring-core:jar:2.0.5:compile
[INFO] | +- org.springframework:spring-context:jar:2.0.5:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | \- org.springframework:spring-web:jar:2.0.5:compile
[INFO] +- org.apache.struts:struts2-sitemesh-plugin:jar:2.0.11:compile
[INFO] | \- opensymphony:sitemesh:jar:2.2.1:compile
[INFO] +- org.apache.struts:struts2-codebehind-plugin:jar:2.0.11:compile
[INFO] +- javax.servlet:servlet-api:jar:2.4:provided
[INFO] +- javax.servlet:jsp-api:jar:2.0:provided
[INFO] +- commons-fileupload:commons-fileupload:jar:1.1.1:compile
[INFO] | \- commons-io:commons-io:jar:1.1:compile
...

Doe anyone have a clue as to what's going on with this?

TIA,
Alex.

Attachment: user_184376.ezm (zipped)
It's looking for some velocity classes on the classpath. You're
probably missing some velocity jars in your WEB-INF/lib folder.

Nils-H

On 18. mars. 2008, at 07.54, "Alex Shneyderman"
<a.shneyderman@(protected):

> I get an exception while deploying WAR to WL 10. Here is the stack
> trace:
>
> java.lang.NoClassDefFoundError: Lorg/apache/velocity/app/
> VelocityEngine;
>     at java.lang.Class.getDeclaredFields0(Native Method)
>     at java.lang.Class.privateGetDeclaredFields (Class.java:2259)
>     at java.lang.Class.getDeclaredFields (Class.java:1715)
>     at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors
> (ContainerImpl.java:102)
>     at com.opensymphony.xwork2.inject.ContainerImpl$1.create
> (ContainerImpl.java:84)
>     at com.opensymphony.xwork2.inject.ContainerImpl$1.create
> (ContainerImpl.java:82)
>     at com.opensymphony.xwork2.inject.util.ReferenceCache
> $CallableCreate.call(ReferenceCache.java:155)
>     at java.util.concurrent.FutureTask$Sync.innerRun
> (FutureTask.java:269)
>     at java.util.concurrent.FutureTask.run (FutureTask.java:123)
>     at
> com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate
> (ReferenceCache.java:81)
>     at com.opensymphony.xwork2.inject.util.ReferenceCache.get
> (ReferenceCache.java:121)
>     at com.opensymphony.xwork2.inject.ContainerImpl
> $ConstructorInjector.<init>(ContainerImpl.java:329)
>     at com.opensymphony.xwork2.inject.ContainerImpl$5.create
> (ContainerImpl.java:299)
>     at com.opensymphony.xwork2.inject.ContainerImpl$5.create
> (ContainerImpl.java:298)
>     at com.opensymphony.xwork2.inject.util.ReferenceCache
> $CallableCreate.call(ReferenceCache.java:155)
>     at java.util.concurrent.FutureTask$Sync.innerRun
> (FutureTask.java:269)
>     at java.util.concurrent.FutureTask.run (FutureTask.java:123)
>     at
> com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate
> (ReferenceCache.java:81)
>     at com.opensymphony.xwork2.inject.util.ReferenceCache.get
> (ReferenceCache.java:121)
>     at com.opensymphony.xwork2.inject.ContainerImpl.getConstructor
> (ContainerImpl.java:562)
>     at com.opensymphony.xwork2.inject.ContainerImpl.inject
> (ContainerImpl.java:460)
>     at com.opensymphony.xwork2.inject.ContainerImpl$7.call
> (ContainerImpl.java:501)
>     at com.opensymphony.xwork2.inject.ContainerImpl.callInContext
> (ContainerImpl.java:549)
>     at com.opensymphony.xwork2.inject.ContainerImpl.inject
> (ContainerImpl.java:499)
>     at com.opensymphony.xwork2.config.impl.LocatableFactory.create
> (LocatableFactory.java:32)
>     at com.opensymphony.xwork2.inject.ContainerBuilder$4.create
> (ContainerBuilder.java:134)
>     at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:
> 49)
>     at com.opensymphony.xwork2.inject.ContainerImpl
> $ParameterInjector.inject(ContainerImpl.java:431)
>     at com.opensymphony.xwork2.inject.ContainerImpl.getParameters
> (ContainerImpl.java:446)
>     at com.opensymphony.xwork2.inject.ContainerImpl.access$000
> (ContainerImpl.java:48)
>     at com.opensymphony.xwork2.inject.ContainerImpl
> $MethodInjector.inject(ContainerImpl.java:288)
>     at com.opensymphony.xwork2.inject.ContainerImpl$2.call
> (ContainerImpl.java:117)
>     at com.opensymphony.xwork2.inject.ContainerImpl$2.call
> (ContainerImpl.java:115)
>     at com.opensymphony.xwork2.inject.ContainerImpl.callInContext
> (ContainerImpl.java:542)
>     at com.opensymphony.xwork2.inject.ContainerImpl.injectStatics
> (ContainerImpl.java:114)
>     at com.opensymphony.xwork2.inject.ContainerBuilder.create
> (ContainerBuilder.java:494)
>     at
> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload
> (DefaultConfiguration.java:145)
>     at
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration
> (ConfigurationManager.java:52)
>     at
> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration
> (Dispatcher.java:395)
>     at org.apache.struts2.dispatcher.Dispatcher.init
> (Dispatcher.java:452)
>     at org.apache.struts2.dispatcher.FilterDispatcher.init
> (FilterDispatcher.java:201)
>     at weblogic.servlet.internal.FilterManager
> $FilterInitAction.run(FilterManager.java:320)
>     at weblogic.security.acl.internal.AuthenticatedSubject.doAs
> (AuthenticatedSubject.java:321)
>     at weblogic.security.service.SecurityManager.runAs(Unknown
> Source)
>     at weblogic.servlet.internal.FilterManager.loadFilter
> (FilterManager.java:88)
>     at weblogic.servlet.internal.FilterManager.preloadFilters
> (FilterManager.java:57)
>     at
> weblogic.servlet.internal.WebAppServletContext.preloadResources
> (WebAppServletContext.java:1725)
>     at weblogic.servlet.internal.WebAppServletContext.start
> (WebAppServletContext.java:2890)
>     at weblogic.servlet.internal.WebAppModule.startContexts
> (WebAppModule.java:948)
>     at weblogic.servlet.internal.WebAppModule.start
> (WebAppModule.java:353)
>     at weblogic.application.internal.flow.ModuleStateDriver$3.next
> (ModuleStateDriver.java:204)
>     at weblogic.application.utils.StateMachineDriver.nextState
> (StateMachineDriver.java:26)
>     at weblogic.application.internal.flow.ModuleStateDriver.start
> (ModuleStateDriver.java:60)
>     at weblogic.application.internal.flow.ScopedModuleDriver.start
> (ScopedModuleDriver.java:200)
>     at
> weblogic.application.internal.flow.ModuleListenerInvoker.start
> (ModuleListenerInvoker.java:117)
>     at weblogic.application.internal.flow.ModuleStateDriver$3.next
> (ModuleStateDriver.java:204)
>     at weblogic.application.utils.StateMachineDriver.nextState
> (StateMachineDriver.java:26)
>     at weblogic.application.internal.flow.ModuleStateDriver.start
> (ModuleStateDriver.java:60)
>     at
> weblogic.application.internal.flow.StartModulesFlow.activate
> (StartModulesFlow.java:26)
>     at weblogic.application.internal.BaseDeployment$2.next
> (BaseDeployment.java:635)
>     at weblogic.application.utils.StateMachineDriver.nextState
> (StateMachineDriver.java:26)
>     at weblogic.application.internal.BaseDeployment.activate
> (BaseDeployment.java:212)
>     at
> weblogic.application.internal.DeploymentStateChecker.activate
> (DeploymentStateChecker.java:154)
>     at
> weblogic.deploy.internal.targetserver.AppContainerInvoker.activate
> (AppContainerInvoker.java:80)
>     at
> weblogic.
> deploy.internal.targetserver.operations.AbstractOperation.activate
> (AbstractOperation.java:566)
>     at
> weblogic.
> deploy.
> internal.targetserver.operations.ActivateOperation.activateDeployment
> (ActivateOperation.java:136)
>     at
> weblogic.
> deploy.internal.targetserver.operations.ActivateOperation.doCommit
> (ActivateOperation.java:104)
>     at
> weblogic.
> deploy.internal.targetserver.operations.StartOperation.doCommit
> (StartOperation.java:139)
>     at
> weblogic.
> deploy.internal.targetserver.operations.AbstractOperation.commit
> (AbstractOperation.java:320)
>     at
> weblogic.
> deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit
> (DeploymentManager.java:816)
>     at
> weblogic.
> deploy.internal.targetserver.DeploymentManager.activateDeploymentList
> (DeploymentManager.java:1223)
>     at
> weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit
> (DeploymentManager.java:434)
>     at
> weblogic.
> deploy.internal.targetserver.DeploymentServiceDispatcher.commit
> (DeploymentServiceDispatcher.java:161)
>     at
> weblogic.
> deploy.
> service.
> internal.
> targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback
> (DeploymentReceiverCallbackDeliverer.java:181)
>     at
> weblogic.
> deploy.
> service.
> internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100
> (DeploymentReceiverCallbackDeliverer.java:12)
>     at
> weblogic.
> deploy.
> service.internal.targetserver.DeploymentReceiverCallbackDeliverer
> $2.run(DeploymentReceiverCallbackDeliverer.java:67)
>     at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run
> (SelfTuningWorkManagerImpl.java:464)
>     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
>     at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
>
>
> The project is built with maven and when I deploy with jetty:run
> everything work Ok. This is my dependency:tree output:
>
> ...
> [INFO] [dependency:tree]
> [INFO] mypackage:webclient:war:0.5-SNAPSHOT
> [INFO] +- org.testng:testng:jar:jdk15:5.6:test
> [INFO] | \- junit:junit:jar:3.8.1:test
> [INFO] +- org.apache.struts:struts2-core:jar:2.0.11:compile
> [INFO] | +- com.opensymphony:xwork:jar:2.0.4:compile
> [INFO] | +- commons-logging:commons-logging:jar:1.0.4:compile
> [INFO] | +- opensymphony:ognl:jar:2.6.11:compile
> [INFO] | +- freemarker:freemarker:jar:2.3.8:compile
> [INFO] | \- com.sun:tools:jar:1.5.0:system
> [INFO] +- org.apache.struts:struts2-spring-plugin:jar:2.0.11:compile
> [INFO] | +- org.springframework:spring-beans:jar:2.0.5:compile
> [INFO] | +- org.springframework:spring-core:jar:2.0.5:compile
> [INFO] | +- org.springframework:spring-context:jar:2.0.5:compile
> [INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
> [INFO] | \- org.springframework:spring-web:jar:2.0.5:compile
> [INFO] +- org.apache.struts:struts2-sitemesh-plugin:jar:2.0.11:compile
> [INFO] | \- opensymphony:sitemesh:jar:2.2.1:compile
> [INFO] +- org.apache.struts:struts2-codebehind-plugin:jar:
> 2.0.11:compile
> [INFO] +- javax.servlet:servlet-api:jar:2.4:provided
> [INFO] +- javax.servlet:jsp-api:jar:2.0:provided
> [INFO] +- commons-fileupload:commons-fileupload:jar:1.1.1:compile
> [INFO] | \- commons-io:commons-io:jar:1.1:compile
> ...
>
> Doe anyone have a clue as to what's going on with this?
>
> TIA,
> Alex.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment: user_184377.ezm (zipped)
hmm it seems that there is an unresolved issue:

https://issues.apache.org/struts/browse/WW-2228

any idea beyond what is in the comments? I mean I understand that
sitemesh has velocity as optional jar but it is optional for a reason,
I do not understand why an exception needs to be thrown.

odd.

On Tue, Mar 18, 2008 at 7:54 AM, Alex Shneyderman
<a.shneyderman@(protected):
> I get an exception while deploying WAR to WL 10. Here is the stack trace:
>
> java.lang.NoClassDefFoundError: Lorg/apache/velocity/app/VelocityEngine;
>      at java.lang.Class.getDeclaredFields0(Native Method)
>      at java.lang.Class.privateGetDeclaredFields (Class.java:2259)
>      at java.lang.Class.getDeclaredFields (Class.java:1715)
>      at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors (ContainerImpl.java:102)
>      at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:84)
>      at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:82)
>      at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:155)
>      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
>      at java.util.concurrent.FutureTask.run (FutureTask.java:123)
>      at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate (ReferenceCache.java:81)
>      at com.opensymphony.xwork2.inject.util.ReferenceCache.get (ReferenceCache.java:121)
>      at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.<init>(ContainerImpl.java:329)
>      at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:299)
>      at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:298)
>      at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:155)
>      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
>      at java.util.concurrent.FutureTask.run (FutureTask.java:123)
>      at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate (ReferenceCache.java:81)
>      at com.opensymphony.xwork2.inject.util.ReferenceCache.get (ReferenceCache.java:121)
>      at com.opensymphony.xwork2.inject.ContainerImpl.getConstructor (ContainerImpl.java:562)
>      at com.opensymphony.xwork2.inject.ContainerImpl.inject (ContainerImpl.java:460)
>      at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:501)
>      at com.opensymphony.xwork2.inject.ContainerImpl.callInContext (ContainerImpl.java:549)
>      at com.opensymphony.xwork2.inject.ContainerImpl.inject (ContainerImpl.java:499)
>      at com.opensymphony.xwork2.config.impl.LocatableFactory.create (LocatableFactory.java:32)
>      at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:134)
>      at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:49)
>      at com.opensymphony.xwork2.inject.ContainerImpl$ParameterInjector.inject(ContainerImpl.java:431)
>      at com.opensymphony.xwork2.inject.ContainerImpl.getParameters (ContainerImpl.java:446)
>      at com.opensymphony.xwork2.inject.ContainerImpl.access$000(ContainerImpl.java:48)
>      at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:288)
>      at com.opensymphony.xwork2.inject.ContainerImpl$2.call(ContainerImpl.java:117)
>      at com.opensymphony.xwork2.inject.ContainerImpl$2.call(ContainerImpl.java:115)
>      at com.opensymphony.xwork2.inject.ContainerImpl.callInContext (ContainerImpl.java:542)
>      at com.opensymphony.xwork2.inject.ContainerImpl.injectStatics (ContainerImpl.java:114)
>      at com.opensymphony.xwork2.inject.ContainerBuilder.create (ContainerBuilder.java:494)
>      at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload (DefaultConfiguration.java:145)
>      at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration (ConfigurationManager.java:52)
>      at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration (Dispatcher.java:395)
>      at org.apache.struts2.dispatcher.Dispatcher.init (Dispatcher.java:452)
>      at org.apache.struts2.dispatcher.FilterDispatcher.init (FilterDispatcher.java:201)
>      at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterManager.java:320)
>      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>      at weblogic.security.service.SecurityManager.runAs(Unknown Source)
>      at weblogic.servlet.internal.FilterManager.loadFilter(FilterManager.java:88)
>      at weblogic.servlet.internal.FilterManager.preloadFilters(FilterManager.java:57)
>      at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1725)
>      at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2890)
>      at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:948)
>      at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:353)
>      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
>      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
>      at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
>      at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
>      at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
>      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
>      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
>      at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
>      at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
>      at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
>      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
>      at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
>      at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
>      at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
>      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:566)
>      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:136)
>      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:104)
>      at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:139)
>      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:320)
>      at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:816)
>      at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1223)
>      at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:434)
>      at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:161)
>      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
>      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
>      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
>      at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
>      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
>      at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
>
>
> The project is built with maven and when I deploy with jetty:run
> everything work Ok. This is my dependency:tree output:
>
> ...
> [INFO] [dependency:tree]
> [INFO] mypackage:webclient:war:0.5-SNAPSHOT
> [INFO] +- org.testng:testng:jar:jdk15:5.6:test
> [INFO] | \- junit:junit:jar:3.8.1:test
> [INFO] +- org.apache.struts:struts2-core:jar:2.0.11:compile
> [INFO] | +- com.opensymphony:xwork:jar:2.0.4:compile
> [INFO] | +- commons-logging:commons-logging:jar:1.0.4:compile
> [INFO] | +- opensymphony:ognl:jar:2.6.11:compile
> [INFO] | +- freemarker:freemarker:jar:2.3.8:compile
> [INFO] | \- com.sun:tools:jar:1.5.0:system
> [INFO] +- org.apache.struts:struts2-spring-plugin:jar:2.0.11:compile
> [INFO] | +- org.springframework:spring-beans:jar:2.0.5:compile
> [INFO] | +- org.springframework:spring-core:jar:2.0.5:compile
> [INFO] | +- org.springframework:spring-context:jar:2.0.5:compile
> [INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
> [INFO] | \- org.springframework:spring-web:jar:2.0.5:compile
> [INFO] +- org.apache.struts:struts2-sitemesh-plugin:jar:2.0.11:compile
> [INFO] | \- opensymphony:sitemesh:jar:2.2.1:compile
> [INFO] +- org.apache.struts:struts2-codebehind-plugin:jar:2.0.11:compile
> [INFO] +- javax.servlet:servlet-api:jar:2.4:provided
> [INFO] +- javax.servlet:jsp-api:jar:2.0:provided
> [INFO] +- commons-fileupload:commons-fileupload:jar:1.1.1:compile
> [INFO] | \- commons-io:commons-io:jar:1.1:compile
> ...
>
> Doe anyone have a clue as to what's going on with this?
>
> TIA,
> Alex.
>

Attachment: user_184380.ezm (zipped)
I have done a bit more digging and

somehow, somehwere there is a call to

com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(Class, List<Injector>)

the class in arguments list is org.apache.struts2.views.velocity.VelocityManager

So somehow xwork is instructed to add injectors to that class.

The other mystery is of course why it does not happen with jetty.

So, if anyone got some clue as to what needs to be adjusted for an
exception to go away (besides adding un-needed dep)
I am all ears.

Thanks,
Alex.

On Tue, Mar 18, 2008 at 8:06 AM, Alex Shneyderman
<a.shneyderman@(protected):
> hmm it seems that there is an unresolved issue:
>
> https://issues.apache.org/struts/browse/WW-2228
>
> any idea beyond what is in the comments? I mean I understand that
> sitemesh has velocity as optional jar but it is optional for a reason,
> I do not understand why an exception needs to be thrown.
>
> odd.
>
> On Tue, Mar 18, 2008 at 7:54 AM, Alex Shneyderman
>
> <a.shneyderman@(protected):
>
>
> > I get an exception while deploying WAR to WL 10. Here is the stack trace:
> >
> > java.lang.NoClassDefFoundError: Lorg/apache/velocity/app/VelocityEngine;
> >      at java.lang.Class.getDeclaredFields0(Native Method)
> >      at java.lang.Class.privateGetDeclaredFields (Class.java:2259)
> >      at java.lang.Class.getDeclaredFields (Class.java:1715)
> >      at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors (ContainerImpl.java:102)
> >      at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:84)
> >      at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:82)
> >      at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:155)
> >      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> >      at java.util.concurrent.FutureTask.run (FutureTask.java:123)
> >      at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate (ReferenceCache.java:81)
> >      at com.opensymphony.xwork2.inject.util.ReferenceCache.get (ReferenceCache.java:121)
> >      at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.<init>(ContainerImpl.java:329)
> >      at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:299)
> >      at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:298)
> >      at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:155)
> >      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> >      at java.util.concurrent.FutureTask.run (FutureTask.java:123)
> >      at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate (ReferenceCache.java:81)
> >      at com.opensymphony.xwork2.inject.util.ReferenceCache.get (ReferenceCache.java:121)
> >      at com.opensymphony.xwork2.inject.ContainerImpl.getConstructor (ContainerImpl.java:562)
> >      at com.opensymphony.xwork2.inject.ContainerImpl.inject (ContainerImpl.java:460)
> >      at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:501)
> >      at com.opensymphony.xwork2.inject.ContainerImpl.callInContext (ContainerImpl.java:549)
> >      at com.opensymphony.xwork2.inject.ContainerImpl.inject (ContainerImpl.java:499)
> >      at com.opensymphony.xwork2.config.impl.LocatableFactory.create (LocatableFactory.java:32)
> >      at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:134)
> >      at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:49)
> >      at com.opensymphony.xwork2.inject.ContainerImpl$ParameterInjector.inject(ContainerImpl.java:431)
> >      at com.opensymphony.xwork2.inject.ContainerImpl.getParameters (ContainerImpl.java:446)
> >      at com.opensymphony.xwork2.inject.ContainerImpl.access$000(ContainerImpl.java:48)
> >      at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:288)
> >      at com.opensymphony.xwork2.inject.ContainerImpl$2.call(ContainerImpl.java:117)
> >      at com.opensymphony.xwork2.inject.ContainerImpl$2.call(ContainerImpl.java:115)
> >      at com.opensymphony.xwork2.inject.ContainerImpl.callInContext (ContainerImpl.java:542)
> >      at com.opensymphony.xwork2.inject.ContainerImpl.injectStatics (ContainerImpl.java:114)
> >      at com.opensymphony.xwork2.inject.ContainerBuilder.create (ContainerBuilder.java:494)
> >      at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload (DefaultConfiguration.java:145)
> >      at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration (ConfigurationManager.java:52)
> >      at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration (Dispatcher.java:395)
> >      at org.apache.struts2.dispatcher.Dispatcher.init (Dispatcher.java:452)
> >      at org.apache.struts2.dispatcher.FilterDispatcher.init (FilterDispatcher.java:201)
> >      at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterManager.java:320)
> >      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
> >      at weblogic.security.service.SecurityManager.runAs(Unknown Source)
> >      at weblogic.servlet.internal.FilterManager.loadFilter(FilterManager.java:88)
> >      at weblogic.servlet.internal.FilterManager.preloadFilters(FilterManager.java:57)
> >      at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1725)
> >      at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2890)
> >      at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:948)
> >      at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:353)
> >      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
> >      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
> >      at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
> >      at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
> >      at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
> >      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
> >      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
> >      at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
> >      at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
> >      at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
> >      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
> >      at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
> >      at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
> >      at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
> >      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:566)
> >      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:136)
> >      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:104)
> >      at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:139)
> >      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:320)
> >      at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:816)
> >      at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1223)
> >      at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:434)
> >      at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:161)
> >      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
> >      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
> >      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
> >      at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
> >      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
> >      at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
> >
> >
> > The project is built with maven and when I deploy with jetty:run
> > everything work Ok. This is my dependency:tree output:
> >
> > ...
> > [INFO] [dependency:tree]
> > [INFO] mypackage:webclient:war:0.5-SNAPSHOT
> > [INFO] +- org.testng:testng:jar:jdk15:5.6:test
> > [INFO] | \- junit:junit:jar:3.8.1:test
> > [INFO] +- org.apache.struts:struts2-core:jar:2.0.11:compile
> > [INFO] | +- com.opensymphony:xwork:jar:2.0.4:compile
> > [INFO] | +- commons-logging:commons-logging:jar:1.0.4:compile
> > [INFO] | +- opensymphony:ognl:jar:2.6.11:compile
> > [INFO] | +- freemarker:freemarker:jar:2.3.8:compile
> > [INFO] | \- com.sun:tools:jar:1.5.0:system
> > [INFO] +- org.apache.struts:struts2-spring-plugin:jar:2.0.11:compile
> > [INFO] | +- org.springframework:spring-beans:jar:2.0.5:compile
> > [INFO] | +- org.springframework:spring-core:jar:2.0.5:compile
> > [INFO] | +- org.springframework:spring-context:jar:2.0.5:compile
> > [INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
> > [INFO] | \- org.springframework:spring-web:jar:2.0.5:compile
> > [INFO] +- org.apache.struts:struts2-sitemesh-plugin:jar:2.0.11:compile
> > [INFO] | \- opensymphony:sitemesh:jar:2.2.1:compile
> > [INFO] +- org.apache.struts:struts2-codebehind-plugin:jar:2.0.11:compile
> > [INFO] +- javax.servlet:servlet-api:jar:2.4:provided
> > [INFO] +- javax.servlet:jsp-api:jar:2.0:provided
> > [INFO] +- commons-fileupload:commons-fileupload:jar:1.1.1:compile
> > [INFO] | \- commons-io:commons-io:jar:1.1:compile
> > ...
> >
> > Doe anyone have a clue as to what's going on with this?
> >
> > TIA,
> > Alex.
> >
>

Attachment: user_184374.ezm (zipped)
If you know how to use AJAX in general websites, its not much of difficulty
to implement AJAX in struts. Just include action while sending request to
server. like req.open("GET", someaction.do, true); where req is
HttpXmlRequest Object. Rest you can get the data as manipulate as usual.



On Thu, Mar 13, 2008 at 5:07 PM, Raghu varma bhupathiraju <
raghuvarmabh@(protected):

>
> Hi friends
>
> Can any one tell me how to implement ajax in struts 1.1 with simple
> example.Can any one provide complete code for that.
> Thanks in advance
> Raghu Varma Bhupathiraju
> --
> View this message in context:
> http://www.nabble.com/How-to-implement-ajax-in-struts-1.1-tp16024761p16024761.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_184375.ezm (zipped)
Also you can use different frameworks like DWR, GWT ..... etc,

Please visit: http://wiki.apache.org/struts/AjaxStruts

On Thu, Mar 13, 2008 at 5:07 PM, Raghu varma bhupathiraju <
raghuvarmabh@(protected):

>
> Hi friends
>
> Can any one tell me how to implement ajax in struts 1.1 with simple
> example.Can any one provide complete code for that.
> Thanks in advance
> Raghu Varma Bhupathiraju
> --
> View this message in context:
> http://www.nabble.com/How-to-implement-ajax-in-struts-1.1-tp16024761p16024761.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_184378.ezm (zipped)

Thanks Jeromy and Lukasz!

I could manage to get the field specific error messages using :

<s:fielderror>
                  <s:param>firstName</s:param>

</s:fielderror>


I have a new problem, when validating the page I get error messages as
desired.

Eg: Mandatory field validation gives out message saying "Field is
mandatory".

But when I enter the value in the textbox and click submit again, the
validation error for next is displayed correctly but entered value
disappears in the textbox which is abnormal .

Why is this happening ? Please help me understand.

Thanks,
Tauri






Lukasz Lenart wrote:
>
>> In Struts2 error messages are stored in the ValueStack in an object
>
> Yes, I made mistake, I've mean in request scope, not in request object ;-)
>
>
> Regards
> --
> Lukasz
>
> ---------------------------------------------------------------------
> 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_184379.ezm (zipped)

Hi,
I just started working on Struts 2 + Ajax. I am stuck on one problem. Can
somebody help me?

I have main page which has tabbedPanel with 3 remote tabs.
When i click submit in remote page in tab1, i want to load result page in
tab2.

I gave tab2 div id as target for the submit but the page does not load
inside tabbedPanel.


Struts.xml snippet:

    <action name="continue" class="com.foo.action.ContinueAction">
       <result name="success">/load_content.jsp</result>
    </action>

Sample code:

index.jsp:

<s:url id="incUrl4" value="/corpinfo_content.jsp"/>
<s:url id="incUrl2" value="/AjaxTest.action" />
<s:url id="incUrl1" value="/main_content.jsp" />


  <s:tabbedPanel id="incorpContainer">
    <s:div theme="ajax" id="dInc1" label="Company" href="%{incUrl1}"
executeScripts="true"></s:div>
    <s:div theme="ajax" id="dInc2" label="Employee" href="%{incUrl2}"
executeScripts="true"></s:div>
    <s:div theme="ajax" id="dInc4" label="Corporate Info"
href="%{incUrl4}" executeScripts="true"/>
   </s:tabbedPanel>

main_content.jsp:

          <s:url id="continueAct" value="Continue.action"></s:url>
          <s:a href="%{continueAct}" targets="dInc2" >
            images/Continue.jpg </s:a>


Any help or suggestion is appreciated.
Thanks
Manisha
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_184381.ezm (zipped)
Hello everybody,



I need to validate only 1 field on the jsp. It value should be between 1 and 999999. Initially I started to implement through int validation but it seemed to go wrong - it works with some limitation - maximum value should not exceed 1000 or something like that. I am trying to implement validation through overriding validate() method. I use tiles together with Struts 2.0.11. I could not tune it to work correctly. Could someone help, please?



Here are my snippets:





Struts.xml:



            <action name="EmployeeCard"

                  class="com.tsystems.tintra4.actions.EmployeeCard">

                  <interceptor-ref name="i18n" />

                  <interceptor-ref name="roles">

                        <param name="allowedRoles">WTT_CARDS_EDITOR</param>

                  </interceptor-ref>

                  <!-- interceptor-ref name="workflow"/-->

                  <interceptor-ref name="workflow"/>

                  <result type="tiles" name="SUCCESS">def_page_employee_card</result>

                  <result type="tiles" name="input">

                        def_page_employee_card

                  </result>

            </action>





Jsp:



<%@(protected)"

    pageEncoding="UTF-8"%>

<%@(protected)" %>



<!--Reference to the Employee profile-->



<div>

<s:url id="url_fio" action="GetEmployee" includeParams="none">

      <s:param name="employeeId"><s:property value="%{EmpNo}"/></s:param>

</s:url>

<s:a href="%{url_fio}">

      <s:property value="%{fio}"/>

</s:a>

</div>

<br/>



<!--Adding new card-->



<s:if test="addCard == true">

<s:text name="card_adding_proccess"></s:text>

<s:fielderror/>

<s:form method="GET" validate="true">

      <s:textfield name="cardNo" label="%{getText('card_add_edit_field')}"></s:textfield>

      <s:textfield name="EmpNo" value="%{EmpNo}"></s:textfield>

      <s:hidden name="editCard" value="%{true}"></s:hidden>

      <s:hidden name="addCardFinal" value="%{true}"></s:hidden>

      <s:submit value="%{getText('button_submit')}"/>

</s:form>

</s:if>



<!--Editing new card-->



<s:if test="editCard == true">

<s:text name="card_editing_proccess"></s:text>

<s:fielderror/>

<s:form method="GET" validate="true">

      <s:textfield name="cardNo" label="%{getText('card_add_edit_field')}"></s:textfield>

      <s:hidden name="EmpNo" value="%{EmpNo}"></s:hidden>

      <s:hidden name="editCard" value="%{true}"></s:hidden>

      <s:hidden name="editCardFinal" value="%{true}"></s:hidden>

      <s:submit value="%{getText('button_submit')}"/>

</s:form>

</s:if>



JAVA Action:



public void validate() {

            request = ServletActionContext.getRequest();

            String tmp = "";

            try {

                  tmp = request.getParameter("cardNo");

                  Integer i = this.getCardNo();

                  if (tmp != null && tmp.length() > 0) {

                        int tmpInt = Integer.parseInt(tmp);

                        this.setCardNo(tmpInt);

                        System.out.println("Card no (validation) = " + cardNo);

                        if (cardNo < 1 || cardNo > 999999) {



                             addFieldError("cardNo", "Must be int");

                            

                            

                             System.out.println("INPUT...");

                        }

                  }

            } catch (Exception e) {



                  e.printStackTrace();

            }



      }



Thanx a lot.



Best regards, Filippov Andrey

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