Re: Tiles: definition without path
Please see: https://issues.apache.org/struts/browse/STR-1981 Paul On 8/21/07, Jose Luis Martinez Avial [EMAIL PROTECTED] wrote: I've tried to modify the execute method of TilesPreProcessor from ... if(uri == null) { log.debug(no uri computed, so pass to next command); return false; } if(controller != null) { log.trace(Execute controller: + controller); controller.execute(tileContext, sacontext.getRequest(), sacontext.getResponse(), sacontext.getContext()); } ... To ... if (controller != null) { log.trace(Execute controller: + controller); controller.execute(tileContext,sacontext.getRequest(),sacontext.getRespo nse(),sacontext.getContext()); } if (uri == null) { log.debug(no uri computed, so pass to next command); sacontext.setForwardConfig( null ); return false; } ... So it execute the controller even if the uri is null, and after that if the uri is null, it will put the ForwardConfig to null and return, because is the end of the processing. It works for me, but I don't know all the implications of this change. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Benedict Sent: Tuesday, August 21, 2007 18:32 PM To: Struts Users Mailing List Subject: Re: Tiles: definition without path I'll have to investigate this. On 8/21/07, Jose Luis Martinez Avial [EMAIL PROTECTED] wrote: The question is that I don't need to forward to a JSP. The controller takes the HttpServletResponse and writes in it, and that is the response to the user. Before that I put the image as an attribute in the request, and in a JSP template I recovered it form the request, and wrote it, but the tomcat always said that the Output stream had already been closed. Is there anyway to return a image to the user using a controller without using a JSP? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Benedict Sent: Tuesday, August 21, 2007 18:18 PM To: Struts Users Mailing List Subject: Re: Tiles: definition without path I don't understand why you haven't provided a path attribute on the definition. Definitions need to resolve to a resource. I don't see a JSP listed. On 8/21/07, Jose Luis Martinez Avial [EMAIL PROTECTED] wrote: I'm using Struts 1.3.9, with Tiles. I've one action that calls to a definition struts-config.xml action path=/customer/verGraphPortfolio forward=verGraphPortfolio.pantalla/ riles-def..xml definition name= verGraphPortfolio.pantalla controllerClass=com.bpi.isis.customer.web.vista.PortfolioValGraphContro ller/ In the PortfolioValGraphController I have this code response.setHeader(Content-Disposition, inline); response.setHeader(Cache-Control, no-cache); response.setHeader(Cache-Control, no-store); response.setHeader(Cache-Control, must-revalidate); response.getOutputStream().write(baos.toByteArray()); response.getOutputStream().flush(); response.getOutputStream().close(); response.setStatus(HttpServletResponse.SC_OK); baos.close(); baos = null; . If I don't put the path attribute in the definition, the controller is not invocated and the user doesn't see the image. In the logs your can see this: 21 Aug 2007 13:11:36,711 DEBUG org.apache.struts.tiles.ComponentDefinition - Controller created : [EMAIL PROTECTED] 21 Aug 2007 13:11:36,711 DEBUG org.apache.struts.tiles.commands.TilesPreProcessor - no uri computed, so pass to next command 21 Aug 2007 13:11:36,711 DEBUG org.apache.struts.chain.commands.ActionCommandBase - Executing org.apache.struts.chain.commands.servlet.PerformForward 21 Aug 2007 13:11:36,711 DEBUG org.apache.struts.util.RequestUtils - No actionId found for verGraphPortfolio.pantalla 21 Aug 2007 13:11:36,711 DEBUG org.apache.struts.chain.commands.ExceptionCatcher - Attempting to handle a thrown exception 21 Aug 2007 13:11:36,711 DEBUG org.apache.struts.chain.commands.ExceptionCatcher - Calling exceptionCommand 'servlet-exception' 21 Aug 2007 13:11:36,711 DEBUG org.apache.struts.chain.commands.ActionCommandBase - Executing org.apache.struts.chain.commands.servlet.ExceptionHandler 21 Aug 2007 13:11:36,711 DEBUG org.apache.struts.chain.commands.AbstractExceptionHandler - See if actionConfig ActionConfig[cancellable=false,path=/customer/verGraphPortfolio,validate =true,forward=verGraphPortfolio.pantalla,scope=session has an exceptionConfig for
how to use confirm dialog box
Hello experts, please suggest how to use confirmation dialog box in web application. i want to use this box in my application, where i list multiple files in JSP page. if i want to delete any file then first i want to show confirmation dialog like are u sure to delete? with yes or no option. if i click on yes then it will call action class delete. if i click no then it have to on the same page. please give me solution as soon as possible. thanks in advance. -- View this message in context: http://www.nabble.com/how-to-use-confirm-dialog-box-tf4309759.html#a12269061 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE how to use confirm dialog box
Google ? Search in nabble's forum ? http://www.nabble.com/how-to-use-confirmdialog-box-tf4303548.html#a12249806 kushi [EMAIL PROTECTED] 22/08/2007 08:56 Veuillez répondre à Struts Users Mailing List user@struts.apache.org A user@struts.apache.org cc Objet how to use confirm dialog box Hello experts, please suggest how to use confirmation dialog box in web application. i want to use this box in my application, where i list multiple files in JSP page. if i want to delete any file then first i want to show confirmation dialog like are u sure to delete? with yes or no option. if i click on yes then it will call action class delete. if i click no then it have to on the same page. please give me solution as soon as possible. thanks in advance. -- View this message in context: http://www.nabble.com/how-to-use-confirm-dialog-box-tf4309759.html#a12269061 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: the icons of datatimepicker cannot be displayed
I kept that one too. that's why I said all the script files are getting loaded also. maybe you forget to add s:head theme=ajax/ between the head/ tag 2007/8/21, vamsi [EMAIL PROTECTED]: I am facing some problem with datetimepicker datetimepicker not showing up any thing on the browser(any browser) But the all the dojo scripts are getting loaded everything is happening Even the error console in FireFox browser is also clear without any error is any specific reason for this I am using sitemesh and acegi security framework and struts 2.08 regards Vamsi - Original Message - From: Andvar Woo [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, August 21, 2007 7:54 AM Subject: Re: the icons of datatimepicker cannot be displayed Nobody encountered this problem? by the way,I use struts2.0.9. I type the path of the icon in the address bar of IE,only got a Not found error ? Anyone knows why? Seriously need your help. 2007/8/20, Andvar Woo [EMAIL PROTECTED]: when I use s:datetimepicker/, it works well except that the icons of that component cannot be displyed.eg. select a date, Up ,Down these icons do exist in the struts-core.jar. Why they cannot be displayed? Anyone knows? Thanks. - 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: Trouble getting to portlet render phase
Have you resolved this yet? Did you find anything in your startup logs? Nils-H On 8/16/07, Frederick N. Brier [EMAIL PROTECTED] wrote: I have deployed the struts-portlet example, and it works. I continue to make comparison's between all of its configuration files, my own, and other examples. For instance, your example does not specify a parent in your pom.xml. The example does. The example pom.xml has no plugins. Yours has the necessary ones for the jetty:run support and specifies dependencies. The Don Brown portlet does not have any actions defined in struts.xml. The struts-portlet example does. I really, really appreciate your help. The examples work, but when I attempt to merge the configurations into my own code, decisions and adjustments have to be made and then it does not work. I will try again this evening. Thank you. Fred Nils-Helge Garli wrote: What does your pom.xml look like? Going back to your original problem, are you sure you don't get any exceptions while running or starting up the portlet? Check your logs to see if you find any exceptions. Also, try deploying the struts2-portlet example portlet and see if that works. Nils-H - 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: [S2] tree tag and nodes customization
Hi, is there a way to specify different images for each node? Or are property such expandIconSrcPlus immutable for the entire tree? Thanks, P. ...ping? (Btw, I think it's not possibile because it's a tree attribute. Shouldn't properties like this belong to treenode?) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XWorkConversion of Date from string
Hi all, In my aplication I need to String to Date, it is working only for MM/dd/ format only I found strange that it is hardcode inside the XWorkConversion class. Is there any other place where I can set this date format. thanks to all regards Vamsi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use the s:param tag with s:textfield?
Ok... so you could create a Number format type converter, but what about getting the locale (i18n) format from resource bundles? I could not find a way to get a text from the message resource bundles (like getText('format.number') in the Action classes). Anyone facing the same problem? Luiz Henrique Rossetti wrote: I resolved the problem creating a class that extends a class StrutsTypeConverter. On 6/21/07, Célio Cidral Junior [EMAIL PROTECTED] wrote: I have the same problem, but as far as I could see, formatting support in S2 is nasty. You can format something with s:text using the format defined in your resource bundle, but you can't do that with s:textfield. WTF?! Man, so far I've spent 3 hours trying to do make that work, but just couldn't. I'm going crazy! Serious... Célio 2007/6/19, Luiz Henrique Rossetti [EMAIL PROTECTED]: Hi guys, How can I use the s: param with s:textfield? I need to format a Timestamp property of my Action using the mask dd/MM/. MyAction public BlablaAction extens ActionSupport{ private Employee employee; getters and setters } public class Employee{ private Timestamp finalDate; getters and setters } My jsp page s:textfield cssClass=textfield name=emp.finalDate maxlength=10 s:param name=value value=employee.finalDate/ /s:textfield My package.properties emp.finalDate = {dd/MM/} - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-use-the-%3Cs%3Aparam%3E-tag-with-%3Cs%3Atextfield%3E--tf3945930.html#a12270273 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Configuring OpenSessionInViewInterceptor as S2's interceptor
Hi I'm encountering this exception (when trying to iterate a list of orders for a specific customer in JSP), failed to lazily initialize a collection of role: com.dummy.Customer.orders, no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358) at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350) at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86) at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:249) at org.apache.struts2.util.MakeIterator.convert(MakeIterator.java:81) .. I'm using Struts 2, Hibernate and Spring (for creating actions, DAOs and etc). I read that Spring's OpenSessionInViewInterceptor will resolve this problem but can you describe how to configure OpenSessionInViewInterceptor in Struts2? And, is there a better alternative than using OpenSessionInViewInterceptor? -- Hez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring OpenSessionInViewInterceptor as S2's interceptor
You can't use the OpenSessionInViewInterceptor from Spring in Struts 2. Struts 2 interceptors are not compatible with Spring interceptors as they have their own interface. You'll have to use OpenSessionInViewFilter. Take a look here: http://www.springframework.org/docs/api/org/springframework/orm/hibernate/support/OpenSessionInViewFilter.html On 8/22/07, hezjing [EMAIL PROTECTED] wrote: Hi I'm encountering this exception (when trying to iterate a list of orders for a specific customer in JSP), failed to lazily initialize a collection of role: com.dummy.Customer.orders, no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException (AbstractPersistentCollection.java:358) at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected (AbstractPersistentCollection.java:350) at org.hibernate.collection.AbstractPersistentCollection.initialize( AbstractPersistentCollection.java:343) at org.hibernate.collection.AbstractPersistentCollection.read( AbstractPersistentCollection.java:86) at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:249) at org.apache.struts2.util.MakeIterator.convert(MakeIterator.java:81) .. I'm using Struts 2, Hibernate and Spring (for creating actions, DAOs and etc). I read that Spring's OpenSessionInViewInterceptor will resolve this problem but can you describe how to configure OpenSessionInViewInterceptor in Struts2? And, is there a better alternative than using OpenSessionInViewInterceptor? -- Hez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring OpenSessionInViewInterceptor as S2's interceptor
With OpenSessionInViewFilter, my web.xml will look like this filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter filter-namesessionFilter/filter-name filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping filter-mapping filter-namesessionFilter/filter-name url-pattern/*/url-pattern /filter-mapping Does it cause any conflict when both struts2 and sessionFilter are mapped to the same URL pattern? On 8/22/07, Toni Lyytikäinen [EMAIL PROTECTED] wrote: You can't use the OpenSessionInViewInterceptor from Spring in Struts 2. Struts 2 interceptors are not compatible with Spring interceptors as they have their own interface. You'll have to use OpenSessionInViewFilter. Take a look here: http://www.springframework.org/docs/api/org/springframework/orm/hibernate/support/OpenSessionInViewFilter.html On 8/22/07, hezjing [EMAIL PROTECTED] wrote: Hi I'm encountering this exception (when trying to iterate a list of orders for a specific customer in JSP), failed to lazily initialize a collection of role: com.dummy.Customer.orders, no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException (AbstractPersistentCollection.java:358) at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected (AbstractPersistentCollection.java:350) at org.hibernate.collection.AbstractPersistentCollection.initialize( AbstractPersistentCollection.java:343) at org.hibernate.collection.AbstractPersistentCollection.read( AbstractPersistentCollection.java:86) at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:249) at org.apache.struts2.util.MakeIterator.convert(MakeIterator.java:81) .. I'm using Struts 2, Hibernate and Spring (for creating actions, DAOs and etc). I read that Spring's OpenSessionInViewInterceptor will resolve this problem but can you describe how to configure OpenSessionInViewInterceptor in Struts2? And, is there a better alternative than using OpenSessionInViewInterceptor? -- Hez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hez
Re: Configuring OpenSessionInViewInterceptor as S2's interceptor
probably you'll need to invert the filter-mapping declaration order. hezjing wrote: With OpenSessionInViewFilter, my web.xml will look like this filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter filter-namesessionFilter/filter-name filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping filter-mapping filter-namesessionFilter/filter-name url-pattern/*/url-pattern /filter-mapping Does it cause any conflict when both struts2 and sessionFilter are mapped to the same URL pattern? On 8/22/07, Toni Lyytikäinen [EMAIL PROTECTED] wrote: You can't use the OpenSessionInViewInterceptor from Spring in Struts 2. Struts 2 interceptors are not compatible with Spring interceptors as they have their own interface. You'll have to use OpenSessionInViewFilter. Take a look here: http://www.springframework.org/docs/api/org/springframework/orm/hibernate/support/OpenSessionInViewFilter.html On 8/22/07, hezjing [EMAIL PROTECTED] wrote: Hi I'm encountering this exception (when trying to iterate a list of orders for a specific customer in JSP), failed to lazily initialize a collection of role: com.dummy.Customer.orders, no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException (AbstractPersistentCollection.java:358) at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected (AbstractPersistentCollection.java:350) at org.hibernate.collection.AbstractPersistentCollection.initialize( AbstractPersistentCollection.java:343) at org.hibernate.collection.AbstractPersistentCollection.read( AbstractPersistentCollection.java:86) at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:249) at org.apache.struts2.util.MakeIterator.convert(MakeIterator.java:81) .. I'm using Struts 2, Hibernate and Spring (for creating actions, DAOs and etc). I read that Spring's OpenSessionInViewInterceptor will resolve this problem but can you describe how to configure OpenSessionInViewInterceptor in Struts2? And, is there a better alternative than using OpenSessionInViewInterceptor? -- Hez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Roberto Nunnari Servizi Informatici SUPSI-DTI SUPSI-DTI - Via Cantonale - 6928 Manno - Switzerland email: mailto:[EMAIL PROTECTED] tel: +41-58-561 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring OpenSessionInViewInterceptor as S2's interceptor
And, is there a better alternative than using OpenSessionInViewInterceptor? Yes. It's important to realise that while OpenSessionInView feels very handy, it is not a particularly nice design pattern, as it can stress your database with lots of small queries. It's best to learn how to do eager fetching with Hibernate and use it for most cases and rely on OSIV only in some special cases where eager fetching is not possible. This way it's often possible to build entire web applications without resorting to use OSIV.
Re: Configuring OpenSessionInViewInterceptor as S2's interceptor
This is something new to me, I always thought that lazy initialization is to boost performance. So we should really use eager fetching by default and minimize the use of OSIV. On 8/22/07, Toni Lyytikäinen [EMAIL PROTECTED] wrote: And, is there a better alternative than using OpenSessionInViewInterceptor? Yes. It's important to realise that while OpenSessionInView feels very handy, it is not a particularly nice design pattern, as it can stress your database with lots of small queries. It's best to learn how to do eager fetching with Hibernate and use it for most cases and rely on OSIV only in some special cases where eager fetching is not possible. This way it's often possible to build entire web applications without resorting to use OSIV. -- Hez
Re: [S2] how to get the constants in struts.xml programmatically?
Anyone know the answer? Thank you very much Joe Lam wrote: In my class, I want to read a constant in struts.xml. I see some examples using @inject , somehow I cant make it work. May someone help me? just wanna to get those constants in struts.xml (don't want to use java properties file this time. I think it is easier to maintain in struts.xml) Thanks Joe -- View this message in context: http://www.nabble.com/-S2--how-to-get-the-constants-in-struts.xml-programmatically--tf4285007.html#a12271289 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: Configuring OpenSessionInViewInterceptor as S2's interceptor
Lazy initialization is to boost performance. The problem is that it doesn't apply to all cases. In cases where you have to iterate over a list of objects and those have lazy loading properties that you need, it will generate a lot of extra queries to to database. In those cases it's best to use eager loading to fetch the properties. However, if you eager load too many properties, the queries will become slow because of the joins. So it's all about finding a good balance that fits you database schema. In order to find the balance monitor the amount of queries your actions make, and the time it took to execute the queries. In some simple database schemas OSIV can be avoided but with complex schemas this isn't always the case. On 8/22/07, hezjing [EMAIL PROTECTED] wrote: This is something new to me, I always thought that lazy initialization is to boost performance. So we should really use eager fetching by default and minimize the use of OSIV. On 8/22/07, Toni Lyytikäinen [EMAIL PROTECTED] wrote: And, is there a better alternative than using OpenSessionInViewInterceptor? Yes. It's important to realise that while OpenSessionInView feels very handy, it is not a particularly nice design pattern, as it can stress your database with lots of small queries. It's best to learn how to do eager fetching with Hibernate and use it for most cases and rely on OSIV only in some special cases where eager fetching is not possible. This way it's often possible to build entire web applications without resorting to use OSIV. -- Hez
Re: [S2] File Upload: the request was rejected because its size (...) exceeds the configured maximum (2097152)
On Friday 17 August 2007 17:35:32 Pedro Herrera wrote: hi, putting the constant in strut.xls works fine ? constant name=struts.multipart.maxSize value=2597152 / This works great, thank you! Also thanks for pointing me to the JIRA issue, James. Herrera Bye, Sandro Sandro Giessl-2 wrote: Hi, I'm doing file upload using the following interceptor: interceptor-ref name=fileUpload 6291456 /interceptor-ref The parameter maximumSize works as expected when it's set below 2MByte. But I'm not able to configure it to accept bigger file uploads. I'm getting the mentioned message as actionError then. It seems to me that this might be related to a special Tomcat or servlet filter setting. Though, at the moment I'm unable to figure out how to change it. Regards, Sandro - 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: [S2] how to get the constants in struts.xml programmatically?
First, ensure that the object that Struts will be injecting to is created by Struts. Then, you can do: @Inject(StrutsConstants.SOME_CONSTANT_HERE) public void setSomeConstant(String val) {...} For example, Actions, Interceptors, and Result objects are generally processed for injections by Struts, so you could put the setter in one of those. Don On 8/17/07, Joe Lam [EMAIL PROTECTED] wrote: In my class, I want to read a constant in struts.xml. I see some examples using @inject , somehow I cant make it work. May someone help me? just wanna to get those constants in struts.xml (don't want to use java properties file this time. I think it is easier to maintain in struts.xml) Thanks Joe -- View this message in context: http://www.nabble.com/-S2--how-to-get-the-constants-in-struts.xml-programmatically--tf4285007.html#a12197579 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: [S2] File Upload: the request was rejected because its size (...) exceeds the configured maximum (2097152)
On Friday 17 August 2007 17:35:32 Pedro Herrera wrote: hi, putting the constant in strut.xls works fine ? constant name=struts.multipart.maxSize value=2597152 / This works great, thank you! Also thanks for pointing me to the JIRA issue, James. Herrera Bye, Sandro Sandro Giessl-2 wrote: Hi, I'm doing file upload using the following interceptor: interceptor-ref name=fileUpload 6291456 /interceptor-ref The parameter maximumSize works as expected when it's set below 2MByte. But I'm not able to configure it to accept bigger file uploads. I'm getting the mentioned message as actionError then. It seems to me that this might be related to a special Tomcat or servlet filter setting. Though, at the moment I'm unable to figure out how to change it. Regards, Sandro - 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: [S2] Autocompleter initial value and key
:(... so i´ve to change all my nice autocompleters :_( Pedro, I don´t know anything about DWR? have you did your own autocompleter using DWR ? or you get it from some place? do you have any link ? thanks a lot. Pedro Herrera wrote: I was having the same problem. What I did ? Autocompleter ? NO THANKS. i used DWR. Herrera rrecoba wrote: Please, this problem is making me crazy, I really need to solve this problem. Please HELP !! I´ve tryied a lot of things and nothing works.. Thanks. rrecoba wrote: Hi, I need to set an initial value and key for an autocompleter. How can id do this? I can set the initial value, but can´t never set the initial key. Thanks a lot. -- View this message in context: http://www.nabble.com/-S2--Autocompleter-initial-value-and-key-tf4291467.html#a12273267 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: Tiles: definition without path
It's not as easy as modifying the code the way I did, because if you use the validation in a form, and the validation fails, it goes through the tiles processor with and uri null, and because of the modifications it fails coming back to the original screen. So I've put the old code(in fact the normal code) and change the include/forward code from: ... if (doInclude) { log.info(Tiles process complete; doInclude with + uri); doInclude(sacontext, uri); } else { log.info(Tiles process complete; forward to + uri); doForward(sacontext, uri); } ... To ... uri = uri.trim(); if (uri.length()0) { if (doInclude) { log.info(Tiles process complete; doInclude with + uri); doInclude(sacontext, uri); } else { log.info(Tiles process complete; forward to + uri); doForward(sacontext, uri); } } ... And put path = in the tiles-def.xml. Again I don't know the implications, but at this moment it works for me. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Benedict Sent: Wednesday, August 22, 2007 02:43 AM To: Struts Users Mailing List Subject: Re: Tiles: definition without path Please see: https://issues.apache.org/struts/browse/STR-1981 Paul On 8/21/07, Jose Luis Martinez Avial [EMAIL PROTECTED] wrote: I've tried to modify the execute method of TilesPreProcessor from ... if(uri == null) { log.debug(no uri computed, so pass to next command); return false; } if(controller != null) { log.trace(Execute controller: + controller); controller.execute(tileContext, sacontext.getRequest(), sacontext.getResponse(), sacontext.getContext()); } ... To ... if (controller != null) { log.trace(Execute controller: + controller); controller.execute(tileContext,sacontext.getRequest(),sacontext.getRespo nse(),sacontext.getContext()); } if (uri == null) { log.debug(no uri computed, so pass to next command); sacontext.setForwardConfig( null ); return false; } ... So it execute the controller even if the uri is null, and after that if the uri is null, it will put the ForwardConfig to null and return, because is the end of the processing. It works for me, but I don't know all the implications of this change. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Benedict Sent: Tuesday, August 21, 2007 18:32 PM To: Struts Users Mailing List Subject: Re: Tiles: definition without path I'll have to investigate this. On 8/21/07, Jose Luis Martinez Avial [EMAIL PROTECTED] wrote: The question is that I don't need to forward to a JSP. The controller takes the HttpServletResponse and writes in it, and that is the response to the user. Before that I put the image as an attribute in the request, and in a JSP template I recovered it form the request, and wrote it, but the tomcat always said that the Output stream had already been closed. Is there anyway to return a image to the user using a controller without using a JSP? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Benedict Sent: Tuesday, August 21, 2007 18:18 PM To: Struts Users Mailing List Subject: Re: Tiles: definition without path I don't understand why you haven't provided a path attribute on the definition. Definitions need to resolve to a resource. I don't see a JSP listed. On 8/21/07, Jose Luis Martinez Avial [EMAIL PROTECTED] wrote: I'm using Struts 1.3.9, with Tiles. I've one action that calls to a definition struts-config.xml action path=/customer/verGraphPortfolio forward=verGraphPortfolio.pantalla/ riles-def..xml definition name= verGraphPortfolio.pantalla controllerClass=com.bpi.isis.customer.web.vista.PortfolioValGraphContro ller/ In the PortfolioValGraphController I have this code response.setHeader(Content-Disposition, inline); response.setHeader(Cache-Control, no-cache); response.setHeader(Cache-Control, no-store); response.setHeader(Cache-Control, must-revalidate); response.getOutputStream().write(baos.toByteArray()); response.getOutputStream().flush(); response.getOutputStream().close(); response.setStatus(HttpServletResponse.SC_OK); baos.close(); baos = null; . If I don't put the path attribute in the definition, the controller is not invocated and the user
Struts2 - troubles with ParameterAware
file set: Launch JSP page: TestActionParam.jsp Action: ActionParam.java Response JSP page: ActionParam.jsp Struts config file: struts.xml source code: TestActionParame.jsp ** %@ taglib prefix=s uri=/struts-tags % html head meta http-equiv=Content-Type content=text/html; charset=windows-1252/ titleTestActionParam/title /head body br centera href='actionparam.action?par=YES'test/a/center /body /html ActionParam.java package test; import com.opensymphony.xwork2.ActionSupport; import java.util.Map; import org.apache.struts2.interceptor.ParameterAware; public class ActionParam extends ActionSupport implements ParameterAware { public static final String MESSAGE = Test passed: ; private String message; private Map parameters; public String execute() throws Exception { String[] par = (String[])parameters.get(par); String parVal=((par!=null)?par[0]:NO); setMessage(MESSAGE + + parVal); return success; } public void setMessage(String message){ this.message = message; } public String getMessage(){ return message; } public void setParameters(Map parameters) { this.parameters=parameters; } public Map getParameters() { return parameters; } } ** ActionParam.jsp *** %@ taglib prefix=s uri=/struts-tags % html head meta http-equiv=Content-Type content=text/html; charset=windows-1252/ titleActionParam/title /head body h2s:property value=message//h2 /body /html *** struts.xml *** !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts package name=default extends=struts-default/package package name=test extends=struts-default action name=actionparam class=test.ActionParam result/ActionParam.jsp/result interceptor-ref name=servlet-config / interceptor-ref name=params/ /action /package /struts ** Result: passed par parameter always null ... (though it is actually present in the URL) WHERE'S THE DAMN PROBLEM?!? A very discouraged Struts 2 newbie... Thanks in advance. Ric ___ L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 - troubles with ParameterAware
I think that you'll need to declare the param, something in the likes of... action name=actionparam class=test.ActionParam result/ActionParam.jsp/result {1} !-- added this -- interceptor-ref name=servlet-config / interceptor-ref name=params/ /action not sure though since I don't have the time to thoroughly look through the code :p Riccardo Mollame wrote: file set: Launch JSP page: TestActionParam.jsp Action: ActionParam.java Response JSP page: ActionParam.jsp Struts config file: struts.xml source code: TestActionParame.jsp ** %@ taglib prefix=s uri=/struts-tags % html head meta http-equiv=Content-Type content=text/html; charset=windows-1252/ titleTestActionParam/title /head body br center actionparam.action?par=YES test /center /body /html ActionParam.java package test; import com.opensymphony.xwork2.ActionSupport; import java.util.Map; import org.apache.struts2.interceptor.ParameterAware; public class ActionParam extends ActionSupport implements ParameterAware { public static final String MESSAGE = Test passed: ; private String message; private Map parameters; public String execute() throws Exception { String[] par = (String[])parameters.get(par); String parVal=((par!=null)?par[0]:NO); setMessage(MESSAGE + + parVal); return success; } public void setMessage(String message){ this.message = message; } public String getMessage(){ return message; } public void setParameters(Map parameters) { this.parameters=parameters; } public Map getParameters() { return parameters; } } ** ActionParam.jsp *** %@ taglib prefix=s uri=/struts-tags % html head meta http-equiv=Content-Type content=text/html; charset=windows-1252/ titleActionParam/title /head body h2s:property value=message//h2 /body /html *** struts.xml *** !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts package name=default extends=struts-default/package package name=test extends=struts-default action name=actionparam class=test.ActionParam result/ActionParam.jsp/result interceptor-ref name=servlet-config / interceptor-ref name=params/ /action /package /struts ** Result: passed par parameter always null ... (though it is actually present in the URL) WHERE'S THE DAMN PROBLEM?!? A very discouraged Struts 2 newbie... Thanks in advance. Ric ___ L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts2---troubles-with-ParameterAware-tf4311574.html#a12274681 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 - troubles with ParameterAware
--- Riccardo Mollame [EMAIL PROTECTED] wrote: WHERE'S THE DAMN PROBLEM?!? The params interceptor [1] does not do what you think it does. You are assuming you have implemented ParameterAware [2, sorta], which is different. d. [1] http://struts.apache.org/2.x/docs/parameters-interceptor.html [2] http://struts.apache.org/2.x/docs/how-can-we-access-request-parameters-passed-into-an-action.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 - troubles with ParameterAware
Thanks anyway, I'll try it immediately... All my best Riccardo ___ L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with forward mapping when I invalidate the session
Hi, My web application allows a user to authenticate via a database. When he submits his username and password, the request goes to the AuthentificationAction. In this action, I want to clean the session if he already had something in the session (e.g. he connected with a username and then he wants to connect with another one - need to clean the session which he used with the first username) if(request.getSession().getAttribute(PLConstants.IS_AUTH) != null) request.getSession().invalidate(); The problem is that when I am in such a case (if the user had already something in session and tries to connect with another user), I invalidate the session but then when I try to forward: return mapping.findForward(isKnown); I stay in the authentication page. The URL has change though and if I press F5 I enter the main page. Can anyone help me with this error ? Thank you for any help ! -- View this message in context: http://www.nabble.com/Problem-with-forward-mapping-when-I-invalidate-the-session-tf4311774.html#a12275199 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: s:tree treeSelectedTopic property doesn't fire any event
Struts version is 2.0.9 I will try once again and repeat the steps you wrote here. Wish me luck. One question: Where exactly did you put the folder template/ajax in your application ? Thanks. Manu Mahajan-2 wrote: This is the link to the file that I used http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/tree.ftl?view=markuppathrev=528866 All I did was 1. added this file to a template/ajax folder in my app 2. modified the function treeNodeSelected in treeExampleStatic.jsp in the showcase app to the following (the only change is nodeId changed to message.node.widgetId) function treeNodeSelected(message) { dojo.io.bind({ url: s:url value='/tags/ui/ajax/staticTreeSelectAction.action'/?nodeId=+message.node.widgetId, load: function(type, data, evt) { var divDisplay = dojo.byId(displayIt); divDisplay.innerHTML=data; }, mimeType: text/html }); }; 3. restarted tomcat And it worked for me. I just tried this with the 2.0.8 and 2.0.9 showcase apps What version of struts are you using? GEDA wrote: No problem. I took the latest version from svn (it had the description with the topic notification fixed) and still doesn't fire any event because I tested it with an alert function. I also created the path /template/ajax and put the tree.ftl file in there. What's wrong with it ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/%3Cs%3Atree-treeSelectedTopic-property-doesn%27t-fire-any-event-tf4304332.html#a12275350 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sending value stack from Action A to Action B
Being new to Struts2, I was searching for an answer to a use case I developed: - Welcome page has login form (send to LoginAction) - LoginAction reads username and password and sends to ListStuffAction - ListStuffAction reads stuff from database and sends to Stuff page - Stuff page lists the stuff. In Suff page, I also have a welcome *username*, your password is *password* Now, in LoginAction the username and password are in the value Stack and I can access them. But when I reach the Stuff page, I get an odd Welcome, . Your password is . I'm guessing the value stack isn't sent among actions. I tried making LoginAction's result to be of type ServletActionRedirectResult and ActionChainResult, but both failed. My questions are: 1) How can values in the value stack be sent among actions, so that they are available in the final web page? 2) Isn't this a common scenario in struts2's web development? The reason I was trying this approach is the fact that I want to use the ListStuffAction repeatedly: when a user logs in, after a user inserts a new record so that the list can be updated with the new value, etc. Thank you for your answers! -- View this message in context: http://www.nabble.com/Sending-value-stack-from-Action-A-to-Action-B-tf4312075.html#a12276288 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: S2: OGNL beats me
no, standard EL is quite different, here we have value stack, if you don't specify the id by #id, then it retrieves everything from the root element which is your action, so to get from session or request, first use #request or #session Best, Aram Aram Mkhitaryan 52, 25 Lvovyan, Yerevan 375000, Armenia Mobile: +374 94 635063 E-mail: [EMAIL PROTECTED]
RE Sending value stack from Action A to Action B
1) How can values in the value stack be sent among actions, so that they are available in the final web page? Put your values in HttpSession wild_oscar [EMAIL PROTECTED] 22/08/2007 16:48 Veuillez répondre à Struts Users Mailing List user@struts.apache.org A user@struts.apache.org cc Objet Sending value stack from Action A to Action B Being new to Struts2, I was searching for an answer to a use case I developed: - Welcome page has login form (send to LoginAction) - LoginAction reads username and password and sends to ListStuffAction - ListStuffAction reads stuff from database and sends to Stuff page - Stuff page lists the stuff. In Suff page, I also have a welcome *username*, your password is *password* Now, in LoginAction the username and password are in the value Stack and I can access them. But when I reach the Stuff page, I get an odd Welcome, . Your password is . I'm guessing the value stack isn't sent among actions. I tried making LoginAction's result to be of type ServletActionRedirectResult and ActionChainResult, but both failed. My questions are: 1) How can values in the value stack be sent among actions, so that they are available in the final web page? 2) Isn't this a common scenario in struts2's web development? The reason I was trying this approach is the fact that I want to use the ListStuffAction repeatedly: when a user logs in, after a user inserts a new record so that the list can be updated with the new value, etc. Thank you for your answers! -- View this message in context: http://www.nabble.com/Sending-value-stack-from-Action-A-to-Action-B-tf4312075.html#a12276288 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
redirect to jsp when cancel button is pressed(without executing the corresponding action)
Hi!! i have a small problem.. in a particular jsp (which is a form), there is a cancel button(html:cancel/). i just want to know how to redirect to another page when the cancel button is pressed (instead of executing the corresponding Action of the form). for instance.. there is a page called AddAddress.jsp which contains a form to add a new address. it has two buttons submit and cancel. now i dont want the newly entered address to enter the database when i press 'cancel' (which happens when i click 'submit'), and instead i want to redirect to a different jsp. how to do this? thanks, abhiram - 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here.
Re: redirect to jsp when cancel button is pressed(without executing the corresponding action)
One of many options, I can think over the top of my head is, use just that button in a different form. Simple but I guess it would work. abhiram [EMAIL PROTECTED] 08/22/2007 08:30 AM Please respond to Struts Users Mailing List user@struts.apache.org To struts forum user@struts.apache.org cc Subject redirect to jsp when cancel button is pressed(without executing the corresponding action) Hi!! i have a small problem.. in a particular jsp (which is a form), there is a cancel button(html:cancel/). i just want to know how to redirect to another page when the cancel button is pressed (instead of executing the corresponding Action of the form). for instance.. there is a page called AddAddress.jsp which contains a form to add a new address. it has two buttons submit and cancel. now i dont want the newly entered address to enter the database when i press 'cancel' (which happens when i click 'submit'), and instead i want to redirect to a different jsp. how to do this? thanks, abhiram - 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here. ForwardSourceID:NT9F02
Re: S2: OGNL beats me
Thank you for your answer. I have picked up some information on OGML, and debug screen helped also. I am starting to be quite comfortable in Struts 2 and like it a lot. kuvera Aram Mkhitaryan írta: no, standard EL is quite different, here we have value stack, if you don't specify the id by #id, then it retrieves everything from the root element which is your action, so to get from session or request, first use #request or #session Best, Aram Aram Mkhitaryan 52, 25 Lvovyan, Yerevan 375000, Armenia Mobile: +374 94 635063 E-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE Sending value stack from Action A to Action B
I haven't tried it yet, but the Chaining Interceptor is also meant for this purpose. [EMAIL PROTECTED] wrote: 1) How can values in the value stack be sent among actions, so that they are available in the final web page? Put your values in HttpSession wild_oscar [EMAIL PROTECTED] 22/08/2007 16:48 Veuillez répondre à Struts Users Mailing List user@struts.apache.org A user@struts.apache.org cc Objet Sending value stack from Action A to Action B Being new to Struts2, I was searching for an answer to a use case I developed: - Welcome page has login form (send to LoginAction) - LoginAction reads username and password and sends to ListStuffAction - ListStuffAction reads stuff from database and sends to Stuff page - Stuff page lists the stuff. In Suff page, I also have a welcome *username*, your password is *password* Now, in LoginAction the username and password are in the value Stack and I can access them. But when I reach the Stuff page, I get an odd Welcome, . Your password is . I'm guessing the value stack isn't sent among actions. I tried making LoginAction's result to be of type ServletActionRedirectResult and ActionChainResult, but both failed. My questions are: 1) How can values in the value stack be sent among actions, so that they are available in the final web page? 2) Isn't this a common scenario in struts2's web development? The reason I was trying this approach is the fact that I want to use the ListStuffAction repeatedly: when a user logs in, after a user inserts a new record so that the list can be updated with the new value, etc. Thank you for your answers! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [S2] how to get the constants in struts.xml programmatically?
And what if you are using a different ObjectFactory... such as Spring? - Patrick. -Original Message- From: Don Brown [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 22, 2007 5:26 AM To: Struts Users Mailing List Subject: Re: [S2] how to get the constants in struts.xml programmatically? First, ensure that the object that Struts will be injecting to is created by Struts. Then, you can do: @Inject(StrutsConstants.SOME_CONSTANT_HERE) public void setSomeConstant(String val) {...} For example, Actions, Interceptors, and Result objects are generally processed for injections by Struts, so you could put the setter in one of those. Don On 8/17/07, Joe Lam [EMAIL PROTECTED] wrote: In my class, I want to read a constant in struts.xml. I see some examples using @inject , somehow I cant make it work. May someone help me? just wanna to get those constants in struts.xml (don't want to use java properties file this time. I think it is easier to maintain in struts.xml) Thanks Joe -- View this message in context: http://www.nabble.com/-S2--how-to-get-the-constants-in-struts.xml-prog rammatically--tf4285007.html#a12197579 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** Bear Stearns is not responsible for any recommendation, solicitation, offer or agreement or any information about any transaction, customer account or account activity contained in this communication. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring OpenSessionInViewInterceptor as S2's interceptor
In my experience, just having OSIV doesn't automatically imply that you expect all your data to be retrieved ad-hoc. (maybe the users do :) OSIV doesn't prevent the user from using eager fetching when necessary or useful ( and my experience delays it until your application is working and you're onto improving performance ). There's no reason I still can't Hibernate.initialize() or fetch join when I want to bring down the number of round-trips to the database. OSIV does provide a big boost ( to me, at least ) in being able to do rapid turn-around development. Toni Lyytikäinen wrote: Lazy initialization is to boost performance. The problem is that it doesn't apply to all cases. In cases where you have to iterate over a list of objects and those have lazy loading properties that you need, it will generate a lot of extra queries to to database. In those cases it's best to use eager loading to fetch the properties. However, if you eager load too many properties, the queries will become slow because of the joins. So it's all about finding a good balance that fits you database schema. In order to find the balance monitor the amount of queries your actions make, and the time it took to execute the queries. In some simple database schemas OSIV can be avoided but with complex schemas this isn't always the case. On 8/22/07, hezjing [EMAIL PROTECTED] wrote: This is something new to me, I always thought that lazy initialization is to boost performance. So we should really use eager fetching by default and minimize the use of OSIV. On 8/22/07, Toni Lyytikäinen [EMAIL PROTECTED] wrote: And, is there a better alternative than using OpenSessionInViewInterceptor? Yes. It's important to realise that while OpenSessionInView feels very handy, it is not a particularly nice design pattern, as it can stress your database with lots of small queries. It's best to learn how to do eager fetching with Hibernate and use it for most cases and rely on OSIV only in some special cases where eager fetching is not possible. This way it's often possible to build entire web applications without resorting to use OSIV. -- Hez -- View this message in context: http://www.nabble.com/Configuring-OpenSessionInViewInterceptor-as-S2%27s-interceptor-tf4310239.html#a12278172 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: s:tree treeSelectedTopic property doesn't fire any event
I put the folder in the root of the application, at the same level as WEB-INF All the best! May the force be with you ;) GEDA wrote: Struts version is 2.0.9 I will try once again and repeat the steps you wrote here. Wish me luck. One question: Where exactly did you put the folder template/ajax in your application ? Thanks. Manu Mahajan-2 wrote: This is the link to the file that I used http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/tree.ftl?view=markuppathrev=528866 All I did was 1. added this file to a template/ajax folder in my app 2. modified the function treeNodeSelected in treeExampleStatic.jsp in the showcase app to the following (the only change is nodeId changed to message.node.widgetId) function treeNodeSelected(message) { dojo.io.bind({ url: s:url value='/tags/ui/ajax/staticTreeSelectAction.action'/?nodeId=+message.node.widgetId, load: function(type, data, evt) { var divDisplay = dojo.byId(displayIt); divDisplay.innerHTML=data; }, mimeType: text/html }); }; 3. restarted tomcat And it worked for me. I just tried this with the 2.0.8 and 2.0.9 showcase apps What version of struts are you using? GEDA wrote: No problem. I took the latest version from svn (it had the description with the topic notification fixed) and still doesn't fire any event because I tested it with an alert function. I also created the path /template/ajax and put the tree.ftl file in there. What's wrong with it ? - 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: redirect to jsp when cancel button is pressed(without executing the corresponding action)
hi!! that was a smart way.. but i could make it work only in static html..and not in a jsp with struts tags. i want to use only struts tags . it is working if i write it this way.. html:form action=/AddressAction.do -- -- html:submit/ /html:form form action=MyAccount.jsp input type=submit value=cancel /form but if i write an html:form for the second form too.. it is not working.. as it was unable to identify mapping for the action /MyAccount (.jsp). i didnt understand what to write in my struts-config. here is wat i wrote for the second form in this case html:form action=MyAccount.jsphtml:cancel//html:form and in struts-config.xml, action path=/MyAccount forward=/MyAccount.jsp/ please help me out.. and please suggest the many other options u mentioned thanks, abhiram [EMAIL PROTECTED] wrote: One of many options, I can think over the top of my head is, use just that button in a different form. Simple but I guess it would work. abhiram 08/22/2007 08:30 AM Please respond to Struts Users Mailing List To struts forum cc Subject redirect to jsp when cancel button is pressed(without executing the corresponding action) Hi!! i have a small problem.. in a particular jsp (which is a form), there is a cancel button(). i just want to know how to redirect to another page when the cancel button is pressed (instead of executing the corresponding Action of the form). for instance.. there is a page called AddAddress.jsp which contains a form to add a new address. it has two buttons submit and cancel. now i dont want the newly entered address to enter the database when i press 'cancel' (which happens when i click 'submit'), and instead i want to redirect to a different jsp. how to do this? thanks, abhiram - 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here. ForwardSourceID:NT9F02 - Unlimited freedom, unlimited storage. Get it now
RE: redirect to jsp when cancel button is pressed(without executing the corresponding action)
Your form buttons do not have to invoke the same action. Try this ul class=formbuttons lis:submit name=save action=maintainChangeAction!save value=Save //li lis:submit name=cancel href=otherJsp.jsp value=Cancel //li /ul -Original Message- From: abhiram [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 22, 2007 11:30 AM To: struts forum Subject: redirect to jsp when cancel button is pressed(without executing the corresponding action) Hi!! i have a small problem.. in a particular jsp (which is a form), there is a cancel button(html:cancel/). i just want to know how to redirect to another page when the cancel button is pressed (instead of executing the corresponding Action of the form). for instance.. there is a page called AddAddress.jsp which contains a form to add a new address. it has two buttons submit and cancel. now i dont want the newly entered address to enter the database when i press 'cancel' (which happens when i click 'submit'), and instead i want to redirect to a different jsp. how to do this? thanks, abhiram - 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to specify derby home to the JVM
People in the list, I would like to specify derby home to the JVM so that the JVM can pickup the database.I added one line in catalina.bat. I added the last line to JAVA_OPTS as shown below: set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties -Dderby.system.home=C:\Absolute_Path_To_\sql but it still doesn't work. Apparentely the JVM is not picking it up. Any ideas? How to debug it? Thanks a lot! Ping - Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV.
Struts2 Tiles question
Hi everybody. I have a question. I included all necessary things in order to take advantage of tiles in Struts2. I included listened in web.xml I included result type in struts.xml so now I know that I need tiles-config.xml in my WEB-INF right. Well how does tile-config.xml look like. Could anyone give an example please thank you. -- Pavel Sapozhnikov xFact, Inc [EMAIL PROTECTED]
Re: Struts2: should we use Tiles or Sitemesh - Big Thanx!
Thanks so much for the detailed replies to my tiles/sitemesh question. Two thumbs up to this forum, and thanks for taking the time to share this useful information. :) Sol - Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
Re: How can I tell Struts 2 to throw/log exceptions for invalid OGNL Expressions
mraible wrote: I have the following class: public class TestAction { public static String concat(String str1, String str2) { return str1 + and + str2; } } In a JSP, I can write the following and it works fine: s:property value=@[EMAIL PROTECTED]('1', '2')/ However, if I change it to an invalid class name, it fails silently: s:property value=@[EMAIL PROTECTED]('1', '2')/ I've tried turning up the logging for org.apache.struts2, com.opensymphony.xwork2 and ognl - but it still fails silently. Any ideas how to get better error messages about invalid OGNL expressions? I'll take that as a no, it is not possible to get better error messages. That's too bad since it seems I get better type-safety and errors from scriptlets instead of OGNL. %@ page import=org.foo.bar.baz.SettingsServlet,org.foo.bar.baz.enums.EnumCodec % c:set var=q%=EnumCodec.URL.encode(SettingsServlet.ACTIONS.networkUpdates)%/c:set s:property value=url(@[EMAIL PROTECTED]).q('${q}')/ VS: s:property value=url(@[EMAIL PROTECTED]).q(@[EMAIL PROTECTED](@[EMAIL PROTECTED]))/ The framework I'm looking to migrate to Struts 2 has the ability for it's EL to read from imported Statics - a pretty cool feature IMO. ${url(pageBean.MAPPING.SETTINGS_SERVLET).q(EnumCodec.URL.encode(SettingsServlet.ACTIONS.networkUpdates))} Matt -- View this message in context: http://www.nabble.com/How-can-I-tell-Struts-2-to-throw-log-exceptions-for-invalid-OGNL-Expressions-tf4100102.html#a12282397 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
value attribute in the html:checkbox tag
On myForm, I have a collection (an array of Analyst objects), analystList, when I iterate through it, I want to render a check box for each row, and I specifically want to put the analyst id to value attribute of the checkbox tag, do you know how to do it? And also how to get the value of the check box? logic:iterate name=myForm property=analystList id=oneAnalyst html:checkbox name=oneAnalyst property=analystName value=??? indexed=true/html:checkbox /logic:iterate Many Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
MutableTilesContainer
Hi I am getting this error could anyone help please. I am trying to use tiles in Strut2 thanks javax.servlet.ServletException: Unable to define definition for a container which does not implement MutableTilesContainer -- Pavel Sapozhnikov xFact, Inc [EMAIL PROTECTED]
Re: Action within Action result
Hi You need to use a different result type: action name=action class=com.rs.MyAction result type=redirect-action param name=actionNameanotherAction/param /result /action On 8/21/07, Sawan [EMAIL PROTECTED] wrote: Hello Experts, I want to call an Action within the Action result and I am trying following Struts XML. action name=Action1 class=MyCalss result/Action2.action/result /action But its not working. How can I fulfill this requirement..? I am really looking forward to get any solution as soon as possible... Thanks Sawan -- View this message in context: http://www.nabble.com/Action-within-Action-result-tf4303336.html#a12249191 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: S2 Validation XML -- multiple methods on same Action
Resend On 8/20/07, j alex [EMAIL PROTECTED] wrote: Hi, Just checking one more time if someone has an answer to my below email. We decided to go with XML validation, and as i understand it, we cannot have validation files based on action methods, but can only name it by action alias. This makes me create a new action alias entry in struts.xml for each action method, and also change the buttons/links in jsp accordingly. It'll be great if someone can provide inputs before i embark on this huge refactoring. Thanks, Joseph On 8/17/07, j alex [EMAIL PROTECTED] wrote: Dave, How do we use the action-alias XML approach if we've the same alias but different methods on the same action ? ex : action name=abc class=com.mysite.myAction / say myAction has methodA(), methodB() etc. which are invoked using different submit buttons in the jsp s:submit value=button1 method=methodA/ s:submit value=button1 method=methodB/ In this case, we could have myAction-abc-validation.xml , but how will it differentiate b/n methodA and methodB? i tried myAction-methodA-validation.xml ; but it didn't seem to work. Thanks, Joseph On 8/15/07, Dave Newton [EMAIL PROTECTED] wrote: --- j alex [EMAIL PROTECTED] wrote: ex : if an Action has multiple methods and only certain fields are tied to each method, we can bunch together validations for each method using annotations, but this is not possible using XML You can create validation XML files on an action-alias basis. d. Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidscs=bz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
MutableTilesContainer error
Hello everybody. I am getting this error when I am trying to use tiles in struts2. If anybody could help that would be terrific. Any input will be greatly appreciated. Thank you. javax.servlet.ServletException: Unable to define definition for a container which does not implement MutableTilesContainer -- Pavel Sapozhnikov xFact, Inc [EMAIL PROTECTED]
how to print check value of boolean variable
Hello, i want to know how i can print value of a boolean variable in struts ,which i used in my java class. thanks -- View this message in context: http://www.nabble.com/how-to-print---check-value-of-boolean-variable-tf4315530.html#a12287717 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
hide unhide hyperlink
Hello , i want to know how to hide unhide a hyperlink. Thanks -- View this message in context: http://www.nabble.com/hide---unhide-hyperlink-tf4315531.html#a12287720 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: S2 Validation XML -- multiple methods on same Action
Use wildcards for your actions. action name=abc_* method={1} class=com.mypaysite.MyAction The action's alias now includes the method name. Refer to the action by it's alias matching the wildcard: s:submit value=button1 action=abc_methodA/ s:submit value=button2 action=abc_methodB/ Use the validation filenames ActionClassName-alias-validation.xml: MyAction-abc_methodA-validation.xml MyAction-abc_methodB-validation.xml References: http://struts.apache.org/2.0.9/docs/wildcard-mappings.html Hope that helps, Jeromy Evans j alex wrote: Hi, Just checking one more time if someone has an answer to my below email. We decided to go with XML validation, and as i understand it, we cannot have validation files based on action methods, but can only name it by action alias. This makes me create a new action alias entry in struts.xml for each action method, and also change the buttons/links in jsp accordingly. It'll be great if someone can provide inputs before i embark on this huge refactoring. Thanks, Joseph On 8/17/07, j alex [EMAIL PROTECTED] wrote: Dave, How do we use the action-alias XML approach if we've the same alias but different methods on the same action ? ex : action name=abc class=com.mysite.myAction / say myAction has methodA(), methodB() etc. which are invoked using different submit buttons in the jsp s:submit value=button1 method=methodA/ In this case, we could have myAction-abc-validation.xml , but how will it differentiate b/n methodA and methodB? i tried myAction-methodA-validation.xml ; but it didn't seem to work. Thanks, Joseph On 8/15/07, Dave Newton [EMAIL PROTECTED] wrote: --- j alex [EMAIL PROTECTED] wrote: ex : if an Action has multiple methods and only certain fields are tied to each method, we can bunch together validations for each method using annotations, but this is not possible using XML You can create validation XML files on an action-alias basis. d. Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidscs=bz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.484 / Virus Database: 269.12.1/963 - Release Date: 20/08/2007 5:44 PM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]