Re: struts 1.2 html:select and submit button
You can simply call a struts action through AJAX. A little bit of AJAX can help to do your task. If you know AJAX, you can call struts action while sending request as req.open(GET, someaction.do, true); On Tue, Mar 18, 2008 at 9:20 AM, Sonu S [EMAIL PROTECTED] wrote: HI, I am using struts 1.2 in my web application. I have to display one html:select html:options list list will be build dynamically. User can select any option. base on the user's selection page will be refreshed (need to hit the database and display information in other fields on same page.) I need to know two things: 1) there is one submit button on that page and one action is associated with that submit button. i can call the associated action class once the user finish the form and click the submit button. When user select from list i need to call another action class. I want to know how to call another action class, (when user select something from list), as list control is inside the same html:form tag. 2) When user selects some value from list i need to refresh the page and populate the other fields. I would like to know, Lets say there are ten values and user has selected third option, how to keep selected that third option as page is already refreshed? I am beginner in struts.. any sample code would be a great help for me Thank you for time and help. sonu
Something odd with deployment to WL 10
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
Re: How to implement ajax in struts 1.1
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 [EMAIL PROTECTED] wrote: 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to implement ajax in struts 1.1
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 [EMAIL PROTECTED] wrote: 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Something odd with deployment to WL 10
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 [EMAIL PROTECTED] wrote: 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
Re: Something odd with deployment to WL 10
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 [EMAIL PROTECTED] wrote: 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
Re: Struts2 Annotation based Validation
Thanks Jeromy and Lukasz! I could manage to get the field specific error messages using : s:fielderror s:paramfirstName/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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts2-Annotation-based-Validation-tp16089678p16115634.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Strtus 2.0.11 AJAX TabbedPanel with Remote tabs: How to load the result page in another tab
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 -- View this message in context: http://www.nabble.com/Strtus-2.0.11-AJAX-TabbedPanel-with-Remote-tabs%3A-How-to-load-the-result-page-in-another-tab-tp16115694p16115694.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Something odd with deployment to WL 10
I have done a bit more digging and somehow, somehwere there is a call to com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(Class, ListInjector) 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 [EMAIL PROTECTED] wrote: 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 [EMAIL PROTECTED] wrote: 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
Custom validation with Struts2
Hello everybody, I need to validate only 1 field on the jsp. It value should be between 1 and 99. 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=allowedRolesWTT_CARDS_EDITOR/param /interceptor-ref !-- interceptor-ref name=workflow/-- interceptor-ref name=workflow/ result type=tiles name=SUCCESSdef_page_employee_card/result result type=tiles name=input def_page_employee_card /result /action Jsp: %@ page language=java contentType=text/html; charset=UTF-8 pageEncoding=UTF-8% %@ taglib prefix=s uri=/struts-tags % !--Reference to the Employee profile-- div s:url id=url_fio action=GetEmployee includeParams=none s:param name=employeeIds: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 99) { addFieldError(cardNo, Must be int); System.out.println(INPUT...); } } } catch (Exception e) { e.printStackTrace(); } } Thanx a lot. Best regards, Filippov Andrey
Re: Struts2 Annotation based Validation
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 . Maybe you are redirecting to the next page? Could you paste snippet for your struts.xml and jsp? Regards -- Lukasz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom validation with Struts2
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); Remove this part above this.setCardNo(tmpInt); You don't have to do this, it will be done by Struts2 System.out.println(Card no (validation) = + cardNo); if (cardNo 1 || cardNo 99) { addFieldError(cardNo, Must be int); System.out.println(INPUT...); } That's all you have to have in your validate() method (if cardNo has getter and setter defined in action class) Remove also validate=true from your form, because you don't use client side validation. Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts 1.2 html:select and submit button
2008/3/18, Sonu S [EMAIL PROTECTED]: 1) there is one submit button on that page and one action is associated with that submit button. i can call the associated action class once the user finish the form and click the submit button. When user select from list i need to call another action class. I want to know how to call another action class, (when user select something from list), as list control is inside the same html:form tag. Use Javascript. 2) When user selects some value from list i need to refresh the page and populate the other fields. I would like to know, Lets say there are ten values and user has selected third option, how to keep selected that third option as page is already refreshed? You have two options: 1) the simplest (but I don't like it because it can cause some side effects): use a session-scoped form bean; 2) the action is called on the onchange event of the select tag. The new value of the select tag itself is submitted. You process it and you reput it inside the HttpServletRequest. In the JSP page, you can process it (e.g. with the use of EL) to show the previously selected value. HTH Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 Annotation based Validation
Hi Lukasz, Thanks for responding.. Snippet of Jsp: form name=myForm method=post action=MyAction.do validate=true/ tr td width=115First Name/td td width=142input type=text name=firstName id=firstName class=form_field/td td s:fielderror s:paramfirstName/s:param /s:fielderror /td My Struts-config: action name=MyAction class=activationPendingAction result name=input type=tilesMyForm/result result name=failure type=tilesMyForm/result result name=success type=tilesSuccessPage/result /action Thats the snippet of my code. Thanks, Tauri. Lukasz Lenart wrote: 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 . Maybe you are redirecting to the next page? Could you paste snippet for your struts.xml and jsp? Regards -- Lukasz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts2-Annotation-based-Validation-tp16089678p16116146.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 Annotation based Validation
I get the following log in my console: 2008-Mar-18 16:21:17,671 - DEBUG freemarker.cache - Could not find template in cache, creating new one; id=[template/xhtml/fielderror.ftl[en_US,UTF-8,parsed] ] 2008-Mar-18 16:21:17,671 - DEBUG freemarker.cache - template/simple/fielderror.ftl[en_US,UTF-8,parsed] cached copy not yet stale; using cached. Does it have anything to do with caching of the page? Thanks, Tauri. Tauri Valor wrote: Hi Lukasz, Thanks for responding.. Snippet of Jsp: form name=myForm method=post action=MyAction.do validate=true/ tr td width=115First Name/td td width=142input type=text name=firstName id=firstName class=form_field/td td s:fielderror s:paramfirstName/s:param /s:fielderror /td My Struts-config: action name=MyAction class=activationPendingAction result name=input type=tilesMyForm/result result name=failure type=tilesMyForm/result result name=success type=tilesSuccessPage/result /action Thats the snippet of my code. Thanks, Tauri. Lukasz Lenart wrote: 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 . Maybe you are redirecting to the next page? Could you paste snippet for your struts.xml and jsp? Regards -- Lukasz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts2-Annotation-based-Validation-tp16089678p16116284.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 Annotation based Validation
form name=myForm method=post action=MyAction.do validate=true/ tr td width=115First Name/td td width=142input type=text name=firstName id=firstName class=form_field/td td s:fielderror s:paramfirstName/s:param /s:fielderror /td But as I see, you don't use s:textfield for your form and that's way you don't see values in the form. If you want to add html tags as above, use theme=simple and s:textfield Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s:date
Has anyone had success with s:date / and setting the struts.date.format property? meeboo wrote: Hi all I have set my struts.date.format properties but they seem to have no effect at all. The set value is struts.date.format=-MM-dd but when using the s:date tag the format is for example Jan 14, 2008 8:00:00 AM. All my other properties take effect so there's no problem with setting other values via the struts.properties file. In this case am trying to print a java.util.Date object with s:date name=starts /. It will print out fine if I for instance use s:date name=myDate format=[EMAIL PROTECTED]@MY_FORMAT} / I've also noticed that since you can't nest S2 tags the s:date tag becomes pretty useless because you can't use it within s:url actions. Is there a way around this? Thanks! -- View this message in context: http://www.nabble.com/%3Cs%3Adate%3E-tp16084868p16116709.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Custom validation with Struts2
Thanks a lot for your answer. Concerning request = ServletActionContext.getRequest(); and tmp = request.getParameter(cardNo); - I am doing it cause I did not manage to use getCardNo() method - it always return 0 in the case of int. Here is my action class - probably you will help me again..)) JAVA class: package com.my.intra4.actions; import java.util.ArrayList; import java.util.Enumeration; import java.util.Iterator; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts2.ServletActionContext; import org.apache.struts2.interceptor.ServletRequestAware; import org.hsqldb.lib.Set; import com.opensymphony.xwork2.ActionSupport; import com.my.intra4.ejb.cf.session.PersonalInfoInterface; import com. my.intra4.ejb.cf.session.UserManagerInterface; import com. my.intra4.ejb.wtt.CardsVO; import com. my.intra4.ejb.wtt.WTT; import com. my.intra4.util.Functions; import com. my.intra4.util.GetPropsSingle; import com. my.intra4.util.Menu; public class EmployeeCard extends ActionSupport implements ServletRequestAware { private static final long serialVersionUID = 564633345679L; private HttpServletRequest request; private HttpServletResponse response; private ArrayListMenu menu_items = null; private ArrayListMenu page_menu_items = null; private ArrayListMenu page_menu_manager_items = null; private String actionName; private PersonalInfoInterface pInfoInterface = null; private String fio; private String EmpNo; private CardsVO card; private Integer cardNo; private String cardN; boolean addCard = false; boolean editCard = false; private String UserId; private int fieldName; private UserManagerInterface uManagerInterface = null; public String getUserId() { return UserId; } public void setUserId(String userId) { UserId = userId; } public UserManagerInterface getUManagerInterface() { return uManagerInterface; } public void setUManagerInterface(UserManagerInterface managerInterface) { uManagerInterface = managerInterface; } public boolean isAddCard() { return addCard; } public void setAddCard(boolean addCard) { this.addCard = addCard; } public boolean isEditCard() { return editCard; } public void setEditCard(boolean editCard) { this.editCard = editCard; } public Integer getCardNo() { return this.cardNo; } public void setCardNo(Integer cardNo) { this.cardNo = cardNo; } public void validate() { // request = ServletActionContext.getRequest(); // String tmp = ; try { // tmp = request.getParameter(cardNo); // Integer i = this.getCardNo(); // System.out.println(Card no from get = + i); // 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 ) { // // addFieldError(cardNo, Must be int); // // Map map = request.getParameterMap(); // Set set = (Set) map.keySet(); // Iterator it = (Iterator) set.iterator(); // // while (it.hasNext()) { // String elem = (String) it.next(); // // System.out.println(Param + i + = + map.get(elem)); // // } // // // System.out.println(INPUT...); // } // } System.out.println(Card no (validation) = + getCardNo()); if (getCardNo() != null (getCardNo() 0 || getCardNo() 99)) { addFieldError(cardNo, Must be int); System.out.println(INPUT...); } } catch (Exception e) { e.printStackTrace(); } } public String execute()
Re: s:date
Hi, On 18/03/2008, meeboo [EMAIL PROTECTED] wrote: Has anyone had success with s:date / and setting the struts.date.format property? meeboo wrote: Hi all I have set my struts.date.format properties but they seem to have no effect at all. [snip] I've also noticed that since you can't nest S2 tags the s:date tag becomes pretty useless because you can't use it within s:url actions. Is there a way around this? I can't help you with your issue about setting the struts.date.format property (I never needed the s:date tag so far), but as for nesting S2 tags, most often it can easily be done using the s:param tag. See the examples in the tag reference [1]. HTH, alexis [1] http://struts.apache.org/2.0.11/docs/url.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 Annotation based Validation
Thanks Lukasz it worked for textfields using s:textfield But I have the same problem when I use it for s:password this is my listbox: tr td s:select label=Country name=country headerKey=1 headerValue=Please Select list=#{'AU':'Australia', 'CN':'China', 'HK':'Hong Kong', 'IN':'India', 'ID':'Indonesia', 'JP':'Japan', 'MY':'Malaysia', 'NZ':'New Zealand', 'PL':'Philippines', 'SG':'Singapore', 'KR':'South Korea', 'TW':'Taiwan', 'TH':'Thailand'}//td /tr And my password fields: tr tds:password name=pwd label=Your Password//td /tr tr tds:password name=confirmPassword label=Confirm your Password //td /tr Please suggest. Thanks, Tauri I used Lukasz Lenart wrote: form name=myForm method=post action=MyAction.do validate=true/ tr td width=115First Name/td td width=142input type=text name=firstName id=firstName class=form_field/td td s:fielderror s:paramfirstName/s:param /s:fielderror /td But as I see, you don't use s:textfield for your form and that's way you don't see values in the form. If you want to add html tags as above, use theme=simple and s:textfield Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts2-Annotation-based-Validation-tp16089678p16118342.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
More WebLogic troubles.
It seems that anything I do today with WL and struts 2 does not seem to be working :-( So, now I have an interceptor (S2 interceptor). I would like to wire a spring managed service on it. So, I use spring plugin + autowire by name convention. There is nothing fancy really just a declaration. but when I run the application in my local jetty setup everything works normally. I deploy to local WLS (but I do not think this would be anything different if I deployed remotely) The service does not get autowired. Anyone has a clue as to what's wrong with this? I setup my WL server to prefer classes and libs in WEB-INF so the classloading issues that might be should not be a problem. There is something that WL does that seems unconventional I wonder if anyone had similar experiences and what you guys were doing to tame the beast ? Thanks, Alex. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 Annotation based Validation
tds:password name=pwd label=Your Password//td By default s:password tag don't shows value of your password, you can change such behaviour by adding attribute showPassword=true, but you should consider security issue. Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom validation with Struts2
I'm not sure were is the problem but I've just checked such simple example below and everything is ok. Maybe you should consider to use Long instead of Integer, because when you enter more then 2147483647 to the field you will get some strange value back to the input (because you loose precision ;-) class EmployeeAction extends ActionSupport { private Integer cardNo; // getter setter public void validate() { if (cardNo == null) { addFieldError(cardNo, Should be integer!); } else if ( cardNo 1 || cardNo 99) { addFieldError(cardNo, Should be integer!); } } } JSP s:textfield label=Card Number name=cardNo / Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More WebLogic troubles.
Well upon further investigation ... the following does not work on WL but works on jetty !-- Listeners -- context-param param-namecontextConfigLocation/param-name param-valueclasspath*:applicationContext*.xml/param-value /context-param listener listener-classorg.springframework.web.context.ContextLoaderListener/listener-class /listener WL becomes happy if this is specified: !-- Listeners -- context-param param-namecontextConfigLocation/param-name param-value/WEB-INF/applicationContext.xml/param-value /context-param listener listener-classorg.springframework.web.context.ContextLoaderListener/listener-class /listener The first is the sample from archetype. So, does anyone know why WL is this retarded and how to make it load ctx from the classpath ? Alex. On Tue, Mar 18, 2008 at 12:05 PM, Alex Shneyderman [EMAIL PROTECTED] wrote: It seems that anything I do today with WL and struts 2 does not seem to be working :-( So, now I have an interceptor (S2 interceptor). I would like to wire a spring managed service on it. So, I use spring plugin + autowire by name convention. There is nothing fancy really just a declaration. but when I run the application in my local jetty setup everything works normally. I deploy to local WLS (but I do not think this would be anything different if I deployed remotely) The service does not get autowired. Anyone has a clue as to what's wrong with this? I setup my WL server to prefer classes and libs in WEB-INF so the classloading issues that might be should not be a problem. There is something that WL does that seems unconventional I wonder if anyone had similar experiences and what you guys were doing to tame the beast ? Thanks, Alex. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] DEBUG NPE
I have created a template which utilizes parameters that are passed into it to generate HTML conditionally based on those parameters. For example: s:component theme=scaTheme templateDir=template template=Header.jsp s:param name=titleKey value=%{'title.appNpc'} / s:param name=helpPage value=%{'Non_Premier_Contract_Home_Page.htm'} / /s:component However, I do not wish to require that all the parameters be required. For example, it would be ok if the helpPage parameter was not specified. At runtime, everything works fine if I do not specify the helpPage parameter. However if I place my logging level at DEBUG, I my log is cluttered with NPEs like the one below. I cannot seem to find any kind of syntax to reference the parameter to even test if it is null without generating this NPE in DEBUG. Does anyone know if it is possible to avoid these NPEs? I make heavy use of templates with optional parameters and it is really cluttering up the logs when trying to debug. Am I doing something wrong? Should this maybe be readdressed in the Struts code base? I understand why the DEBUG statement is logged. Just not sure since it is a DEBUG statement, if the stack trace is warranted. Thanks in advance! 2008-03-14 14:30:14,364 DEBUG (http-127.0.0.1-8080-2:) [com.opensymphony.xwork2.util.DefaultObjectTypeDeterminer] Error while retrieving generic property class for property=parameters java.lang.NullPointerException at com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer.getClass(Gener icsObjectTypeDeterminer.java:222) at com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer.getKeyClass(Ge nericsObjectTypeDeterminer.java:44) at com.opensymphony.xwork2.util.XWorkMapPropertyAccessor.getKey(XWorkMapPro pertyAccessor.java:136) at com.opensymphony.xwork2.util.XWorkMapPropertyAccessor.getProperty(XWorkM apPropertyAccessor.java:68) at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1643) at ognl.ASTProperty.getValueBody(ASTProperty.java:92) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) at ognl.SimpleNode.getValue(SimpleNode.java:210) at ognl.ASTChain.getValueBody(ASTChain.java:109) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) at ognl.SimpleNode.getValue(SimpleNode.java:210) at ognl.ASTNotEq.getValueBody(ASTNotEq.java:49) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) at ognl.SimpleNode.getValue(SimpleNode.java:210) at ognl.ASTAnd.getValueBody(ASTAnd.java:56) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) at ognl.SimpleNode.getValue(SimpleNode.java:210) at ognl.Ognl.getValue(Ognl.java:333) at com.opensymphony.xwork2.util.OgnlUtil.getValue(OgnlUtil.java:194) at com.opensymphony.xwork2.util.OgnlValueStack.findValue(OgnlValueStack.jav a:238) at org.apache.struts2.components.Component.findValue(Component.java:322) at org.apache.struts2.components.If.start(If.java:85) at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTag Support.java:54) at org.apache.jsp.template.scaTheme.Header_jsp._jspx_meth_s_005fif_005f0(He ader_jsp.java:273) - ***Note:The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the Sender immediately by replying to the message and deleting it from your computer. Thank you. Premier Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Something odd with deployment to WL 10
I don't have a good answer for you... But I have experienced this with WebLogic 9.2 MP2. Oddly, WebLogic 9.2 MP1 does not experience this issue. After adding the jar(s) to satisfy any NoClassDefFoundError exceptions, I noticed that the Struts2 web application ran incredibly slow on MP2, whereas it ran just fine on MP1. Any other WebLogic developers out there experience any of these issues? - Patrick. -Original Message- From: Alex Shneyderman [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 2:45 AM To: Struts Users Mailing List Subject: Re: Something odd with deployment to WL 10 I have done a bit more digging and somehow, somehwere there is a call to com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(Class, ListInjector) 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 [EMAIL PROTECTED] wrote: 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 [EMAIL PROTECTED] wrote: 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(R eferenceCache.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(Refere nceCache.java:81) at com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.ja va: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(R eferenceCache.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(Refere nceCache.java:81) at com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.ja va:121) at com.opensymphony.xwork2.inject.ContainerImpl.getConstructor(ContainerImp l.java:562) at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:4 60) at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:5 01) at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl .java:549) at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:4 99) at com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFac tory.java:32) at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilde r.java:134) at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:49) at com.opensymphony.xwork2.inject.ContainerImpl$ParameterInjector.inject(Co ntainerImpl.java:431) at com.opensymphony.xwork2.inject.ContainerImpl.getParameters(ContainerImpl .java:446) at com.opensymphony.xwork2.inject.ContainerImpl.access$000(ContainerImpl.ja va:48) at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(Conta inerImpl.java:288) at com.opensymphony.xwork2.inject.ContainerImpl$2.call(ContainerImpl.java:1 17) at com.opensymphony.xwork2.inject.ContainerImpl$2.call(ContainerImpl.java:1 15) at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl .java:542) at com.opensymphony.xwork2.inject.ContainerImpl.injectStatics(ContainerImpl .java:114) at
Re: Strtus 2.0.11 AJAX TabbedPanel with Remote tabs: How to load the result page in another tab
Put a div inside tab2 and make that inner div the target. If you target the tab you're trying overwrite the markup for the tab widget. By targeting a div inside the tab you can replace just the content of tab. You may also prefer to make the inner div a remote div and the tab non-ajax because you get better control. ie. in the jsp below, the target is a div inside the second tab s:tabbedPanel id=incorpContainer s:div theme=ajax id=dInc1 label=Company href=%{incUrl1} executeScripts=true/s:div s:div id=dInc2 label=Employee s:div theme=ajax id=theTarget href=%{incUrl2} executeScripts=true/div /s:div manisha5 wrote: 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: authentication question
Is this considered the Best Practice: Keeping all JSP's under the WEB-INF directory? We have not done that on my project, I am curious if there are plus' and minus' to this? Thanks, John The easiest way is to always have the user call an action to get a JSP, even if it is a simple page. You then also ensure that all data necessary for that page has been obtained. The, by placing the JSP's in the WEB-INF directory you will prevent access directly from a browser (only from the s2 dispatcher). Otherwise, I would suggest a servlet filter or header code for all JSPs that make the necessary checks. /Ian -- View this message in context: http://www.nabble.com/authentication-question-tp16006710p16121577.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [struts] Struts 2 and JSP 2.0 tags
Thanks Dale very much for your help. Dale Newfield [EMAIL PROTECTED] wrote: Kalpesh Modi wrote: Is there anyway to use the JSP 2.0 tag files and the Struts 2.0 tags together. Yes, all you have to do is add the taglib at the top of your .tag file so that you can refer to the s: tags. The difficulty comes in passing arguments. At first I was only able to successfully pass the top of the VS, but that's brittle (and only really supports 1 argument well), so I've changed over to passing objects as tag attributes. In order to do this you must pass using EL, not OGNL. I found that arguments from one .tag file to another didn't work correctly in tomcat6. (But it does in tomcat5.5 and in glassfish.) -Dale - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
Re: authentication question
I've been told that some older containers don't allow you to forward to JSP's behind /WEB-INF. It wouldn't surprise me. Other than that I've found Ian's suggestion to be the most effective way to ensure users can't access JSPs directly, IMO a must for Tiles, html fragments and any page using struts tags. The only issue I've experienced is when (bad) scriptets within the JSP manipulate the request object directly, which is assumed to use the /xxx.jsp URI but is actually /WEB-INF/results/xxx.jsp. Many would argue that best practice is to not use JSPs at all. Another group would argue that Acegi should be used rather than rolling your own filter. Hope that helps. mojoRising wrote: Is this considered the Best Practice: Keeping all JSP's under the WEB-INF directory? We have not done that on my project, I am curious if there are plus' and minus' to this? Thanks, John The easiest way is to always have the user call an action to get a JSP, even if it is a simple page. You then also ensure that all data necessary for that page has been obtained. The, by placing the JSP's in the WEB-INF directory you will prevent access directly from a browser (only from the s2 dispatcher). Otherwise, I would suggest a servlet filter or header code for all JSPs that make the necessary checks. /Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 1.3 : DynaValidatorActionForm missing input form data on errors display
eod wrote: Hi, I'm seeing input form data disappear if the validation fails the page is re-displayed; have Googled around but found nothing specific to dyna forms, so I'm hoping someone has come across this know what the issue is; I had tried setting the action's scope to session as a test, but the form data still disappears. The form is declared as a DynaValidatorActionForm b/c I hope to re-use it in later actions. I'm using an initial setup action w/ validation off which forwards to the page in question that captures user data. Thanks in advance for any help. Here are the relevant form, actions validation declarations : struts-config.xml : form-bean name=shippingBillingAddressForm type=org.apache.struts.validator.DynaValidatorActionForm form-property name=firstName type=java.lang.String / form-property name=lastName type=java.lang.String / form-property name=address1 type=java.lang.String / form-property name=address2 type=java.lang.String / form-property name=city type=java.lang.String / form-property name=state type=java.lang.String / form-property name=zip type=java.lang.String / form-property name=phone type=java.lang.String / form-property name=shipping type=java.lang.String / /form-bean !-- setup action that navigates to the shipping page; existance is solely to render the initial shipping page w/o validaton errors showing -- action path=/shippingSetup name=shippingBillingAddressForm input=shipping.page validate=false scope=request forward name=toShipping path=shipping.page/ /action action path=/shipping name=shippingBillingAddressForm input=shipping.page validate=true scope=request forward name=toBilling path=billing.page/ /action validation.xml : formset form name=/shipping field property=firstName depends=required arg0 key=addressForm.firstName/ /field /form What does shipping.page refer to? A Tiles definition? The 'input' attribute of your form handling action should probably point back to the setup action. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] variable of variable in OGNL?
GF wrote: I have something like %{#application.one.two.three} is it possible to do something like: %{#application.%{stringVariable}.two.three} Perhaps something like %{#application[stringVariable].two.three}? L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can validation be evaluated ahead of time to paint JQuery validation rules?
matt.payne wrote: I really like the treatment the JQuery http://jquery.bassistance.de/validate/demo/ validation plugin (not struts plugin), gives for a user experience. I would really like the rules to come from back end rules and decorate the form fields the same way if the back end bounces a validation error. Is there anyway to evaluate the validation config ahead of time, so jquery rules can be written? I don't know what you mean by 'evaluate the validation config ahead of time,' but depending on what JQuery code you need to generate I would imaging you could do it either in the JSP or, perhaps a more general solution, by re-writing the client-side validation Javascript (assuming you want to use JQuery to perform client-side validation, not just to render errors from server-side validation). L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 1 return stream (documents)
The techniques shown in the earlier examples would work equally well in the byte stream example. How you determine the source of the data to send back to the browser is really up to you. - configure it statically in struts-config.xml (as per the first two exxamples - take it from a request parameter - derive it from some other user or request data L. bhaarat Sharma wrote: Quick question in all other examples on that page they show how the fileName is retrieved. But for Byte Array Example they do not mention anything regarding the fileName. How are we suppose to supply the fileName? On Mon, Mar 17, 2008 at 10:41 PM, Dave Newton [EMAIL PROTECTED] wrote: --- bhaarat Sharma [EMAIL PROTECTED] wrote: Thanks! I remember you helped me with similar problem in S2 as well I'm very good at using the work of others to make me look good ;) Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom validation with Struts2
Lukasz Lenart wrote: I'm not sure were is the problem but I've just checked such simple example below and everything is ok. Maybe you should consider to use Long instead of Integer, because when you enter more then 2147483647 to the field you will get some strange value back to the input (because you loose precision ;-) class EmployeeAction extends ActionSupport { private Integer cardNo; // getter setter public void validate() { if (cardNo == null) { addFieldError(cardNo, Should be integer!); } else if ( cardNo 1 || cardNo 99) { addFieldError(cardNo, Should be integer!); } } } JSP s:textfield label=Card Number name=cardNo / Regards You may also want to consider declarative validation [1], either using an XML file or annotations. Struts has built-in support for validating an integer input is in a given range [2]. As to the problem of getCardNo() always returning 0, that shouldn't happen; you may have a conversion error happening, or perhaps something else is mis-configured somewhere. Struts should call setCardNo() for you to pass the form data in. L. [1] http://struts.apache.org/2.0.11/docs/validation.html [2] http://struts.apache.org/2.0.11/docs/int-validator.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: authentication question
Plus: nothing under WEB-INF can be referenced by a browser, so JSPs stored there can't be called directly. Minus: nothing under WEB-INF can be referenced by a browser, so JSPs stored there can't be called directly... :-) It depends on your requirements. But generally you will want to route requests for all but the simplest of pages through an action. By placing the corresponding JSP under WEB-INF, you ensure it can never be accessed *except* through an action. L. mojoRising wrote: Is this considered the Best Practice: Keeping all JSP's under the WEB-INF directory? We have not done that on my project, I am curious if there are plus' and minus' to this? Thanks, John The easiest way is to always have the user call an action to get a JSP, even if it is a simple page. You then also ensure that all data necessary for that page has been obtained. The, by placing the JSP's in the WEB-INF directory you will prevent access directly from a browser (only from the s2 dispatcher). Otherwise, I would suggest a servlet filter or header code for all JSPs that make the necessary checks. /Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: authentication question
I use Acegi security to make sure that all of my pages are secure. I find it very flexiable, but not always easy to configure. If you are already using spring as you IoC, then you might as well take advantage of Acegi. Jeromy Evans wrote: I've been told that some older containers don't allow you to forward to JSP's behind /WEB-INF. It wouldn't surprise me. Other than that I've found Ian's suggestion to be the most effective way to ensure users can't access JSPs directly, IMO a must for Tiles, html fragments and any page using struts tags. The only issue I've experienced is when (bad) scriptets within the JSP manipulate the request object directly, which is assumed to use the /xxx.jsp URI but is actually /WEB-INF/results/xxx.jsp. Many would argue that best practice is to not use JSPs at all. Another group would argue that Acegi should be used rather than rolling your own filter. Hope that helps. mojoRising wrote: Is this considered the Best Practice: Keeping all JSP's under the WEB-INF directory? We have not done that on my project, I am curious if there are plus' and minus' to this? Thanks, John The easiest way is to always have the user call an action to get a JSP, even if it is a simple page. You then also ensure that all data necessary for that page has been obtained. The, by placing the JSP's in the WEB-INF directory you will prevent access directly from a browser (only from the s2 dispatcher). Otherwise, I would suggest a servlet filter or header code for all JSPs that make the necessary checks. /Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Spam/Virus scanning by CanIt Pro For more information see http://www.kgbinternet.com/SpamFilter.htm To control your spam filter, log in at http://filter.kgbinternet.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Checking Field Error
Hi, I've been looking for a check (in a JSP) if a certain field has an error assigned. I know (so far) that I can display the error message by using: s:fielderror s:param value=%{'fieldName'} / /s:fielderror That's not what I'm looking for. I want to display a block if the field has an error like: s:if test=...CheckIamLookingFor... display this... display that... /s:if Is there a way? thx, Stefan -- View this message in context: http://www.nabble.com/Checking-Field-Error-tp16122105p16122105.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: Struts 1 return stream (documents)
Forgive me if I am on the wrong track here, I think I picked up this thread in the middle... but I think I would answer: How are we suppose to supply the fileName? By setting a response header: response.setHeader(Content-Disposition, inline;filename=foo.xyz); MG -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: Tuesday, March 18, 2008 9:48 AM To: user@struts.apache.org Subject: Re: Struts 1 return stream (documents) The techniques shown in the earlier examples would work equally well in the byte stream example. How you determine the source of the data to send back to the browser is really up to you. - configure it statically in struts-config.xml (as per the first two exxamples - take it from a request parameter - derive it from some other user or request data L. bhaarat Sharma wrote: Quick question in all other examples on that page they show how the fileName is retrieved. But for Byte Array Example they do not mention anything regarding the fileName. How are we suppose to supply the fileName? On Mon, Mar 17, 2008 at 10:41 PM, Dave Newton [EMAIL PROTECTED] wrote: --- bhaarat Sharma [EMAIL PROTECTED] wrote: Thanks! I remember you helped me with similar problem in S2 as well I'm very good at using the work of others to make me look good ;) Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Checking Field Error
--- Stefan Schwarz [EMAIL PROTECTED] wrote: I want to display a block if the field has an error like: s:if test=...CheckIamLookingFor... display this... display that... /s:if Is there a way? JavaDocs are your friend. ActionSupport's getFieldErrors method [1] returns a map keyed from the input field name. Dave [1] http://struts.apache.org/2.0.11.1/struts2-core/apidocs/com/opensymphony/xwork2/ValidationAware.html#getFieldErrors() - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: authentication question
Thanks. That's interesting. I am using Weblogic9.2, and I seem to have no problem using the request object in the jsp( for getParameter at least). I am wondering what type of request object manipulation, as you are referring to, may cause issues? Jeromy Evans - Blue Sky Minds wrote: The only issue I've experienced is when (bad) scriptets within the JSP manipulate the request object directly, which is assumed to use the /xxx.jsp URI but is actually /WEB-INF/results/xxx.jsp. Many would argue that best practice is to not use JSPs at all. Another group would argue that Acegi should be used rather than rolling your own filter. Hope that helps. mojoRising wrote: Is this considered the Best Practice: Keeping all JSP's under the WEB-INF directory? We have not done that on my project, I am curious if there are plus' and minus' to this? Thanks, John The easiest way is to always have the user call an action to get a JSP, even if it is a simple page. You then also ensure that all data necessary for that page has been obtained. The, by placing the JSP's in the WEB-INF directory you will prevent access directly from a browser (only from the s2 dispatcher). Otherwise, I would suggest a servlet filter or header code for all JSPs that make the necessary checks. /Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/authentication-question-tp16006710p16123101.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Newbie question
Hi, I'm trying to find a decent hosting company that supports STRUTS 2. Are there any recommendations? Thanks, Ed -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16125218.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie question
I like KGBInternet.com. They are affordable and will provide you with the services that you need. maitre wrote: Hi, I'm trying to find a decent hosting company that supports STRUTS 2. Are there any recommendations? Thanks, Ed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie question
I think you need to rephrase your question. Apache Struts 2 is a specific Java Web Application framework technology and Java Web Application is the more general and generic term I think you meant to say. In terms of Web Hosting, you would be interested in Web Hosting Providers that allows deployment of Java Web Applications. I hope that helps you to narrow your search. On 18/03/2008, maitre [EMAIL PROTECTED] wrote: Hi, I'm trying to find a decent hosting company that supports STRUTS 2. Are there any recommendations? Thanks, Ed -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16125218.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using token-session with IE
Hi, I have a rather strange problem. I am using token-session interceptor to deal with the multiple requests problem. The relevant part of the struts.xml file is appended below. This works fine in Firefox (2 and 3 beta) but fails in IE7. When the form (which contains the s:token tag) submit button is clicked rapidly several times, a blank screen is displayed and the URL shown is the URL of the action. This is probably something to do with IE, and I would really appreciate any advice on how to solve this ... Thanks! -- struts.xml snip -- constant name=struts.devMode value=true / package name=lwbc3-default namespace=/applications extends=struts-default action name=ApplicationSubmitAction.do class=test.action.ApplicationAction interceptor-ref name=defaultStack/ interceptor-ref name=token-session/ result name=success type=redirectthanks.html/result result name=input/applications/application.jsp/result result name=invalid.tokenthanks.html/result /action - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strtus 2.0.11 AJAX TabbedPanel with Remote tabs: How to load the result page in another tab
Hi Jeromy, That did not work. It still posting as a new page. One more thing is the tabbedPanel is already inside another tabbedpanel (2nd level nested). Will that cause this problem? thx Jeromy Evans - Blue Sky Minds wrote: Put a div inside tab2 and make that inner div the target. If you target the tab you're trying overwrite the markup for the tab widget. By targeting a div inside the tab you can replace just the content of tab. You may also prefer to make the inner div a remote div and the tab non-ajax because you get better control. ie. in the jsp below, the target is a div inside the second tab s:tabbedPanel id=incorpContainer s:div theme=ajax id=dInc1 label=Company href=%{incUrl1} executeScripts=true/s:div s:div id=dInc2 label=Employee s:div theme=ajax id=theTarget href=%{incUrl2} executeScripts=true/div /s:div -- View this message in context: http://www.nabble.com/Strtus-2.0.11-AJAX-TabbedPanel-with-Remote-tabs%3A-How-to-load-the-result-page-in-another-tab-tp16115694p16127001.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie question
Agreed. Look for a provider that offers the correct JDK and API specs. MG -Original Message- From: Alex Choi [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 12:55 PM To: Struts Users Mailing List Subject: Re: Newbie question I think you need to rephrase your question. Apache Struts 2 is a specific Java Web Application framework technology and Java Web Application is the more general and generic term I think you meant to say. In terms of Web Hosting, you would be interested in Web Hosting Providers that allows deployment of Java Web Applications. I hope that helps you to narrow your search. On 18/03/2008, maitre [EMAIL PROTECTED] wrote: Hi, I'm trying to find a decent hosting company that supports STRUTS 2. Are there any recommendations? Thanks, Ed -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16125218.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie question
Thanks, y'all. Where can I find the correct JDK and API specs so I can ask my hosting company? Ed Griffith, Michael * wrote: Agreed. Look for a provider that offers the correct JDK and API specs. MG -Original Message- From: Alex Choi [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 12:55 PM To: Struts Users Mailing List Subject: Re: Newbie question I think you need to rephrase your question. Apache Struts 2 is a specific Java Web Application framework technology and Java Web Application is the more general and generic term I think you meant to say. In terms of Web Hosting, you would be interested in Web Hosting Providers that allows deployment of Java Web Applications. I hope that helps you to narrow your search. On 18/03/2008, maitre [EMAIL PROTECTED] wrote: Hi, I'm trying to find a decent hosting company that supports STRUTS 2. Are there any recommendations? Thanks, Ed -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16125218.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16127371.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie question
A Java Web Application that uses Apache Struts 2 framework can be written or developed using JDK version 1.5. It is possible to use JDK 1.4 but your Java Software Developers must use the backward compatible Apache Struts 2 jars for JDK 1.4 for Struts 2 development Here are the details you are interested: http://struts.apache.org/2.x/docs/building-the-framework-from-source.html On 18/03/2008, maitre [EMAIL PROTECTED] wrote: Thanks, y'all. Where can I find the correct JDK and API specs so I can ask my hosting company? Ed Griffith, Michael * wrote: Agreed. Look for a provider that offers the correct JDK and API specs. MG -Original Message- From: Alex Choi [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 12:55 PM To: Struts Users Mailing List Subject: Re: Newbie question I think you need to rephrase your question. Apache Struts 2 is a specific Java Web Application framework technology and Java Web Application is the more general and generic term I think you meant to say. In terms of Web Hosting, you would be interested in Web Hosting Providers that allows deployment of Java Web Applications. I hope that helps you to narrow your search. On 18/03/2008, maitre [EMAIL PROTECTED] wrote: Hi, I'm trying to find a decent hosting company that supports STRUTS 2. Are there any recommendations? Thanks, Ed -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16125218.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16127371.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie question
Ed, Additional information here: http://struts.apache.org/primer.html MG -Original Message- From: Alex Choi [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 1:27 PM To: Struts Users Mailing List Subject: Re: Newbie question A Java Web Application that uses Apache Struts 2 framework can be written or developed using JDK version 1.5. It is possible to use JDK 1.4 but your Java Software Developers must use the backward compatible Apache Struts 2 jars for JDK 1.4 for Struts 2 development Here are the details you are interested: http://struts.apache.org/2.x/docs/building-the-framework-from-source.htm l On 18/03/2008, maitre [EMAIL PROTECTED] wrote: Thanks, y'all. Where can I find the correct JDK and API specs so I can ask my hosting company? Ed Griffith, Michael * wrote: Agreed. Look for a provider that offers the correct JDK and API specs. MG -Original Message- From: Alex Choi [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 12:55 PM To: Struts Users Mailing List Subject: Re: Newbie question I think you need to rephrase your question. Apache Struts 2 is a specific Java Web Application framework technology and Java Web Application is the more general and generic term I think you meant to say. In terms of Web Hosting, you would be interested in Web Hosting Providers that allows deployment of Java Web Applications. I hope that helps you to narrow your search. On 18/03/2008, maitre [EMAIL PROTECTED] wrote: Hi, I'm trying to find a decent hosting company that supports STRUTS 2. Are there any recommendations? Thanks, Ed -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16125218.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16127371.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie question
I don't want to build the framework from scratch, I just want to use the distribution package and customize it if that's possible. Ed Alex Choi wrote: A Java Web Application that uses Apache Struts 2 framework can be written or developed using JDK version 1.5. It is possible to use JDK 1.4 but your Java Software Developers must use the backward compatible Apache Struts 2 jars for JDK 1.4 for Struts 2 development Here are the details you are interested: http://struts.apache.org/2.x/docs/building-the-framework-from-source.html On 18/03/2008, maitre [EMAIL PROTECTED] wrote: Thanks, y'all. Where can I find the correct JDK and API specs so I can ask my hosting company? Ed Griffith, Michael * wrote: Agreed. Look for a provider that offers the correct JDK and API specs. MG -Original Message- From: Alex Choi [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 12:55 PM To: Struts Users Mailing List Subject: Re: Newbie question I think you need to rephrase your question. Apache Struts 2 is a specific Java Web Application framework technology and Java Web Application is the more general and generic term I think you meant to say. In terms of Web Hosting, you would be interested in Web Hosting Providers that allows deployment of Java Web Applications. I hope that helps you to narrow your search. On 18/03/2008, maitre [EMAIL PROTECTED] wrote: Hi, I'm trying to find a decent hosting company that supports STRUTS 2. Are there any recommendations? Thanks, Ed -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16125218.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16127371.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16127983.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie question
Ed, Last updated Mar 02 2006 -- so this might not be the best list... http://struts.sourceforge.net/community/hosts.html This is current... http://struts.apache.org/2.x/docs/application-servers.html MG -Original Message- From: maitre [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 1:42 PM To: user@struts.apache.org Subject: Re: Newbie question I don't want to build the framework from scratch, I just want to use the distribution package and customize it if that's possible. Ed Alex Choi wrote: A Java Web Application that uses Apache Struts 2 framework can be written or developed using JDK version 1.5. It is possible to use JDK 1.4 but your Java Software Developers must use the backward compatible Apache Struts 2 jars for JDK 1.4 for Struts 2 development Here are the details you are interested: http://struts.apache.org/2.x/docs/building-the-framework-from-source.htm l On 18/03/2008, maitre [EMAIL PROTECTED] wrote: Thanks, y'all. Where can I find the correct JDK and API specs so I can ask my hosting company? Ed Griffith, Michael * wrote: Agreed. Look for a provider that offers the correct JDK and API specs. MG -Original Message- From: Alex Choi [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 12:55 PM To: Struts Users Mailing List Subject: Re: Newbie question I think you need to rephrase your question. Apache Struts 2 is a specific Java Web Application framework technology and Java Web Application is the more general and generic term I think you meant to say. In terms of Web Hosting, you would be interested in Web Hosting Providers that allows deployment of Java Web Applications. I hope that helps you to narrow your search. On 18/03/2008, maitre [EMAIL PROTECTED] wrote: Hi, I'm trying to find a decent hosting company that supports STRUTS 2. Are there any recommendations? Thanks, Ed -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16125218.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16127371.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16127983.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can validation be evaluated ahead of time to paint JQuery validation rules?
I am using freemarker, but I do not think there would be an advantage to using JSP in this case. What I am looking for in and object graph of validation rules so I can paint my jquery validation rules from the the backend validation. Matt Laurie Harper wrote: matt.payne wrote: I really like the treatment the JQuery http://jquery.bassistance.de/validate/demo/ validation plugin (not struts plugin), gives for a user experience. I would really like the rules to come from back end rules and decorate the form fields the same way if the back end bounces a validation error. Is there anyway to evaluate the validation config ahead of time, so jquery rules can be written? I don't know what you mean by 'evaluate the validation config ahead of time,' but depending on what JQuery code you need to generate I would imaging you could do it either in the JSP or, perhaps a more general solution, by re-writing the client-side validation Javascript (assuming you want to use JQuery to perform client-side validation, not just to render errors from server-side validation). L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Can-validation-be-evaluated-ahead-of-time-to-paint-JQuery-validation-rules--tp16038820p16128359.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Actions for a single page. Is this possible
By chaining several actions together. All of the getters inside those actions are availible to the resulting .jsp/vm/or ftl. I have used chain in cases where I had a more generic action that supplied values for picklists and I needed those values supplied to several pages. The action definitions were configured to include that more generic action for the picklists. That is just one use case though. The above could be solved via inheritance as well, that has its own side effects. In the end are you trying to do a more wizard multi/step solution? Matt ravi_eze wrote: hi, We have a form in c.jsp which by some event makes an ajax call fetching b.jsp, a.jsp and rendering it. Now the requirement is that (1) i want to get this b.jsp by calling some other action class. (2) Once its rendered and i submit the page c.jsp the consecutive action class should be able to get all the entries made even in the b.jsp a.jsp (obtained by ajax call) i am not sure how action chanining/ s:action can help me. any hlep / pointers? regards, ravi -- View this message in context: http://www.nabble.com/Multiple-Actions-for-a-single-page.-Is-this-possible-tp16044652p16128576.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie question
MG, Thanks a lot. Ed Griffith, Michael * wrote: Ed, Last updated Mar 02 2006 -- so this might not be the best list... http://struts.sourceforge.net/community/hosts.html This is current... http://struts.apache.org/2.x/docs/application-servers.html MG -Original Message- From: maitre [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 1:42 PM To: user@struts.apache.org Subject: Re: Newbie question I don't want to build the framework from scratch, I just want to use the distribution package and customize it if that's possible. Ed Alex Choi wrote: A Java Web Application that uses Apache Struts 2 framework can be written or developed using JDK version 1.5. It is possible to use JDK 1.4 but your Java Software Developers must use the backward compatible Apache Struts 2 jars for JDK 1.4 for Struts 2 development Here are the details you are interested: http://struts.apache.org/2.x/docs/building-the-framework-from-source.htm l On 18/03/2008, maitre [EMAIL PROTECTED] wrote: Thanks, y'all. Where can I find the correct JDK and API specs so I can ask my hosting company? Ed Griffith, Michael * wrote: Agreed. Look for a provider that offers the correct JDK and API specs. MG -Original Message- From: Alex Choi [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 12:55 PM To: Struts Users Mailing List Subject: Re: Newbie question I think you need to rephrase your question. Apache Struts 2 is a specific Java Web Application framework technology and Java Web Application is the more general and generic term I think you meant to say. In terms of Web Hosting, you would be interested in Web Hosting Providers that allows deployment of Java Web Applications. I hope that helps you to narrow your search. On 18/03/2008, maitre [EMAIL PROTECTED] wrote: Hi, I'm trying to find a decent hosting company that supports STRUTS 2. Are there any recommendations? Thanks, Ed -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16125218.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16127371.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16127983.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Newbie-question-tp16125218p16128586.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Opinions of Struts 2 Design and Programming: A Tutorial (2nd edition)?
I'm looking for the best and up-to-date Struts2 books. I see that Struts 2 in Action is coming out a little later this year, but I also noticed Struts 2 Design and Programming: A Tutorial, which came out with a second edition in January. Has anyone here looked at this, outside of reading the Amazon reviews? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Opinions of Struts 2 Design and Programming: A Tutorial (2nd edition)?
I haven't read it myself, but I think I saw a review over at theserverside.com Nils-H On 18. mars. 2008, at 20.59, Karr, David [EMAIL PROTECTED] wrote: I'm looking for the best and up-to-date Struts2 books. I see that Struts 2 in Action is coming out a little later this year, but I also noticed Struts 2 Design and Programming: A Tutorial, which came out with a second edition in January. Has anyone here looked at this, outside of reading the Amazon reviews? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More WebLogic troubles.
On 9.2.1 and 9.2.2 I use param-valueclasspath:applicationContext.xml /WEB-INF/spring/otherAppContext.xml/param-value That is a space between the context file names. I don't use wildcards because I have contexts that I don't want loaded in WL. Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications From: Alex Shneyderman [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org Date: Tue, 18 Mar 2008 12:58:13 +0100 To: Struts Users Mailing List user@struts.apache.org Subject: Re: More WebLogic troubles. Well upon further investigation ... the following does not work on WL but works on jetty !-- Listeners -- context-param param-namecontextConfigLocation/param-name param-valueclasspath*:applicationContext*.xml/param-value /context-param listener listener-classorg.springframework.web.context.ContextLoaderListener/listene r-class /listener WL becomes happy if this is specified: !-- Listeners -- context-param param-namecontextConfigLocation/param-name param-value/WEB-INF/applicationContext.xml/param-value /context-param listener listener-classorg.springframework.web.context.ContextLoaderListener/listene r-class /listener The first is the sample from archetype. So, does anyone know why WL is this retarded and how to make it load ctx from the classpath ? Alex. On Tue, Mar 18, 2008 at 12:05 PM, Alex Shneyderman [EMAIL PROTECTED] wrote: It seems that anything I do today with WL and struts 2 does not seem to be working :-( So, now I have an interceptor (S2 interceptor). I would like to wire a spring managed service on it. So, I use spring plugin + autowire by name convention. There is nothing fancy really just a declaration. but when I run the application in my local jetty setup everything works normally. I deploy to local WLS (but I do not think this would be anything different if I deployed remotely) The service does not get autowired. Anyone has a clue as to what's wrong with this? I setup my WL server to prefer classes and libs in WEB-INF so the classloading issues that might be should not be a problem. There is something that WL does that seems unconventional I wonder if anyone had similar experiences and what you guys were doing to tame the beast ? Thanks, Alex. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This email and any attachments (Message) may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Opinions of Struts 2 Design and Programming: A Tutorial (2nd edition)?
I've had this book for about a week now. I bought it because I'm new to S2 and wanted something that could give more detail and examples than the S2 documentation wiki and the in action book isn't available until May-ish. S2 Design and Programming serves the purpose but not with the depth I had hoped for. I'll probably also buy the in action book when it comes out. I don't regret the purchase though because I do find S2 Design and Programming useful. If you have more specific questions about the book perhaps I could answer. On 3/18/08 3:59 PM, Karr, David [EMAIL PROTECTED] wrote: I'm looking for the best and up-to-date Struts2 books. I see that Struts 2 in Action is coming out a little later this year, but I also noticed Struts 2 Design and Programming: A Tutorial, which came out with a second edition in January. Has anyone here looked at this, outside of reading the Amazon reviews? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Upload file cannot be read
Can anyone tell me where I can get some more in-depth details on the way the file upload interceptor works? Is there any documentation between the levels of how to use it and the source code? I'm trying to take an uploaded document and then transfer it to a backend in a different thread. But when I try to access the file in the other thread, I get a FileNotFoundException. My suspicion is that I've transgressed beyond the bounds of the temp in temp file. Whether that's in terms of time (because the thread might not start until after the action has run to completion) or just that one thread cannot access another's temp files, I'm not sure, but considering the difficulty with reliably reproducing thread timing issues, I was really hoping there's documentation around. Thanks for any links/advice. ~Dan Allen -- This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as KBC FP). This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided as is, without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Upload file cannot be read
--- Allen, Daniel [EMAIL PROTECTED] wrote: Can anyone tell me where I can get some more in-depth details on the way the file upload interceptor works? Is there any documentation between the levels of how to use it and the source code? Not that I'm aware of. The source code, however, is very short. I'm trying to take an uploaded document and then transfer it to a backend in a different thread. But when I try to access the file in the other thread, I get a FileNotFoundException. The file upload interceptor deletes the temporary file after the action executes (more or less). If you need other behavior then you can either copy the file to somewhere else (which could just as well be in the same temporary directory) and use the copy. You could also use the existing file upload interceptor as a template and create your own that doesn't delete the file. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strtus 2.0.11 AJAX TabbedPanel with Remote tabs: How to load the result page in another tab
That means the form is not being submitted via ajax. The problem is not with the target, but rather the div that contains the form.. Make sure it was loaded with with separateSripts=false and executeScripts=true (and parseContent=true if in 2.1). You can definitely have one tab inside another and and nest as far as you like, but it seems to be a common problem that the scripts are not executed or the markup is not parsed by dojo. manisha5 wrote: Hi Jeromy, That did not work. It still posting as a new page. One more thing is the tabbedPanel is already inside another tabbedpanel (2nd level nested). Will that cause this problem? thx Jeromy Evans - Blue Sky Minds wrote: Put a div inside tab2 and make that inner div the target. If you target the tab you're trying overwrite the markup for the tab widget. By targeting a div inside the tab you can replace just the content of tab. You may also prefer to make the inner div a remote div and the tab non-ajax because you get better control. ie. in the jsp below, the target is a div inside the second tab s:tabbedPanel id=incorpContainer s:div theme=ajax id=dInc1 label=Company href=%{incUrl1} executeScripts=true/s:div s:div id=dInc2 label=Employee s:div theme=ajax id=theTarget href=%{incUrl2} executeScripts=true/div /s:div - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strtus 2.0.11 AJAX TabbedPanel with Remote tabs: How to load the result page in another tab
Hi manisha5!.. look this: s:tabbedPanel id=TabsEdit doLayout=true name=TabsEdit required=true theme=ajax disabled=false selectedTab=%{pgNome} cssStyle=height: 290px; font-family: Verdana; font-weight:bold; width:85%; align: rigth s:div id=first label=--- theme = ajax cssStyle=display:none; font-weight: normal; padding: 10px; text-align: left; overflow:scroll; /s:div s:div id=second label=Pessoa theme = ajax href=edit_People.action refreshOnShow=true cssStyle=display:none; font-weight: normal; padding: 10px; text-align: left; overflow:scroll;/s:div s:div id=three label=Setor theme = ajax href=edit_Setor.action refreshOnShow=true cssStyle=display:none; font-weight: normal; padding: 1px; text-align: left; overflow:scroll;/s:div /s:tabbedPanel 1 - create a id different for each div. (here it is: first, second and three) 2 - in s:tabbedPanel line, use selectedTab tag: selectedTab=%{pgName} 3 - in active action bean, create a variable pgName, with get and set methods. 4 - when you wish load first div, set pgName with first and put in session: For first div: String pgName = first; session.setAtribute(pgName, pgName); return myDiv; For second div: String pgName = second; session.setAtribute(pgName, pgName); return myDiv; For three div: String pgName = three; session.setAtribute(pgName, pgName); return myDiv; in struts.xml action: result name=myDivpath for tabbedPanel' page/result I hope help you. - Original Message - From: manisha5 [EMAIL PROTECTED] To: user@struts.apache.org Sent: Tuesday, March 18, 2008 4:32 AM Subject: Strtus 2.0.11 AJAX TabbedPanel with Remote tabs: How to load the result page in another tab 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 -- View this message in context: http://www.nabble.com/Strtus-2.0.11-AJAX-TabbedPanel-with-Remote-tabs%3A-How-to-load-the-result-page-in-another-tab-tp16115694p16115694.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Informação do NOD32 IMON 2954 (20080318) __ Esta mensagem foi verificada pelo NOD32 sistema antivírus http://www.eset.com.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
About ActionErrors.GLOBAL_ERROR
Hi all, Can anyone tell me that the real value of constant ActionErrors.GLOBAL_ERROR? Or where to find it? Actually, I want to use the tag html:errors / to only display the error defined with ActionErrors.GLOBAL_ERROR. I have the struts javadoc api, but I cannot access the Internet. Thanks.
Re: About ActionErrors.GLOBAL_ERROR
My first reply to mailing list. Be gentle :) * ActionErrors.GLOBAL_ERROR* is deprecated. Use *ActionMessages.GLOBAL_MESSAGE* instead. From ActionMessages.java ... *public static final String GLOBAL_MESSAGE = org.apache.struts.action.GLOBAL_MESSAGE;** * djc On Tue, Mar 18, 2008 at 8:06 PM, Chen Chunwei [EMAIL PROTECTED] wrote: Hi all, Can anyone tell me that the real value of constant ActionErrors.GLOBAL_ERROR? Or where to find it? Actually, I want to use the tag html:errors / to only display the error defined with ActionErrors.GLOBAL_ERROR. I have the struts javadoc api, but I cannot access the Internet. Thanks.
Re: About ActionErrors.GLOBAL_ERROR
Thanks David But I still don't know which value should I set for name property of html:errors /, that is, which value should I fill xxx in html:errors name=xxx / ? Talos - Original Message - From: David Chapman [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, March 19, 2008 11:36 AM Subject: Re: About ActionErrors.GLOBAL_ERROR My first reply to mailing list. Be gentle :) * ActionErrors.GLOBAL_ERROR* is deprecated. Use *ActionMessages.GLOBAL_MESSAGE* instead. From ActionMessages.java ... *public static final String GLOBAL_MESSAGE = org.apache.struts.action.GLOBAL_MESSAGE;** * djc On Tue, Mar 18, 2008 at 8:06 PM, Chen Chunwei [EMAIL PROTECTED] wrote: Hi all, Can anyone tell me that the real value of constant ActionErrors.GLOBAL_ERROR? Or where to find it? Actually, I want to use the tag html:errors / to only display the error defined with ActionErrors.GLOBAL_ERROR. I have the struts javadoc api, but I cannot access the Internet. Thanks.