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.(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 (ModuleState
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.(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.inte
Re: Struts2 Annotation based Validation
Thanks Jeromy and Lukasz! I could manage to get the field specific error messages using : firstName 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: /load_content.jsp Sample code: index.jsp: main_content.jsp: images/Continue.jpg 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, List) 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.(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.di
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: WTT_CARDS_EDITOR def_page_employee_card def_page_employee_card Jsp: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> 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 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: First Name firstName My Struts-config: MyForm MyForm SuccessPage 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: > > > > > > >width="115">First Name >width="142"> id="firstName" class="form_field"> > > > > > > > firstName > > > > > > > My Struts-config: > > > MyForm > MyForm > SuccessPage > > > > > > > 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
> > > width="115">First Name > width="142"> class="form_field"> > > > > > > > firstName > > > But as I see, you don't use 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:
Has anyone had success with 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 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 name="starts" />. It will print out fine if I for instance use name="myDate" format="[EMAIL PROTECTED]@MY_FORMAT}" /> > > I've also noticed that since you can't nest S2 tags the tag > becomes pretty useless because you can't use it within 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 ArrayList menu_items = null; private ArrayList page_menu_items = null; private ArrayList 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(); } } publ
Re:
Hi, On 18/03/2008, meeboo <[EMAIL PROTECTED]> wrote: > > Has anyone had success with 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 tag > > becomes pretty useless because you can't use it within 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 tag so far), but as for "nesting" S2 tags, most often it can easily be done using the 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 But I have the same problem when I use it for this is my listbox: And my password fields: Please suggest. Thanks, Tauri I used Lukasz Lenart wrote: > >> >> >> >> First Name >> >> > class="form_field"> >> >> >> >> >> >> >> >> firstName >> >> >> >> > > But as I see, you don't use 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
> 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 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 contextConfigLocation classpath*:applicationContext*.xml org.springframework.web.context.ContextLoaderListener WL becomes happy if this is specified: contextConfigLocation /WEB-INF/applicationContext.xml org.springframework.web.context.ContextLoaderListener 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: 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, List) 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.( 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.opensymphon
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 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: /load_content.jsp Sample code: index.jsp: executeScripts="true"> href="%{incUrl4}" executeScripts="true"/> main_content.jsp: images/Continue.jpg 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 : validation.xml : 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 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: That's not what I'm looking for. I want to display a block if the field has an error like: display this... display that... 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: > > > display this... > display that... > > > 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 --> thanks.html /applications/application.jsp thanks.html - 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 > > > executeScripts="true"> > >executeScripts="true"> > > > > > > > -- 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 classpath:applicationContext.xml /WEB-INF/spring/otherAppContext.xml 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 > Date: Tue, 18 Mar 2008 12:58:13 +0100 > To: Struts Users Mailing List > Subject: Re: More WebLogic troubles. > > Well upon further investigation ... the following does not work on WL > but works on jetty > > > > contextConfigLocation > classpath*:applicationContext*.xml > > > > org.springframework.web.context.ContextLoaderListener r-class> > > > WL becomes happy if this is specified: > > > > contextConfigLocation > /WEB-INF/applicationContext.xml > > > > org.springframework.web.context.ContextLoaderListener r-class> > > > 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 - 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: required="true" theme="ajax" disabled="false" selectedTab="%{pgNome}" cssStyle="height: 290px; font-family: Verdana; font-weight:bold; width:85%; align: rigth"> > refreshOnShow="true" cssStyle="display:none; font-weight: normal; padding: 10px; text-align: left; overflow:scroll;"> refreshOnShow="true" cssStyle="display:none; font-weight: normal; padding: 1px; text-align: left; overflow:scroll;"> 1 - create a id different for each div. (here it is: first, second and three) 2 - in 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: path for tabbedPanel' page I hope help you. - Original Message - From: "manisha5" <[EMAIL PROTECTED]> To: 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: /load_content.jsp Sample code: index.jsp: main_content.jsp: images/Continue.jpg 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 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 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 , that is, which value should I fill xxx in ? Talos - Original Message - From: "David Chapman" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" 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 to only display the error > defined with ActionErrors.GLOBAL_ERROR. > > I have the struts javadoc api, but I cannot access the Internet. > > Thanks.