Re: Localization in struts 2

2009-06-23 Thread Johnson nickel
I have specified in my header.jsp, lang.action?request_locale=en English | lang.action?request_locale=fr French | lang.action?request_locale=hi Hindi | In my Index.action file, public String execute() throws Exception{ System.out.println(Inside Index

Re: Display only 100 chars of a string

2009-06-23 Thread Stefano Tranquillini
About this link: http://www.opensymphony.com/ognl/html/LanguageGuide/staticMethods.html said: You can call a static method using the syntax @cl...@method(args). If you leave out class, it defaults to java.lang.Math, to make it easier to call min and max methods. If you specify the class, you must

Getting the default Locale in JSP

2009-06-23 Thread Vishnu Vyasan Nelliparmbil
Hi Friends, How can I get a default Locale settings from browser? Regards Vishnu

Re: Getting the default Locale in JSP

2009-06-23 Thread Antonio Petrelli
2009/6/23 Vishnu Vyasan Nelliparmbil vis...@mun.gov.bh How can I get a default Locale settings from browser? In JSP with EL: ${request.locale} Antonio

Re: Exceptions thrown by constructor different from those thown by execute() ?

2009-06-23 Thread Paweł Wielgus
Hi Jan, i'm not going into details of your solution but interceptors are a way better tool for that job, search the list for authentication subjects. You can also use libraries like acegi or similiar. Best greetings, Pawel Wielgus. 2009/6/22, Jan T. Kim j@uea.ac.uk: Dear All, I'm trying

Re: Exceptions thrown by constructor different from those thown by execute() ?

2009-06-23 Thread Jan T. Kim
On Tue, Jun 23, 2009 at 06:41:48AM -0200, Pawe? Wielgus wrote: Hi Jan, i'm not going into details of your solution but interceptors are a way better tool for that job, search the list for authentication subjects. You can also use libraries like acegi or similiar. thanks for this pointer, I

Re: Struts2 and Security

2009-06-23 Thread Dave Newton
aum strut wrote: Our requirement is to use good authentication framework for our application and as per the initial application draft we are not going to use spring in our application. as we have found that Spring Security is quite a matured framework so we are just investigating the option, if

Re: Localization in struts 2

2009-06-23 Thread Dave Newton
Johnson nickel wrote: public String execute() throws Exception{ System.out.println(Inside Index action); request.getSession().setAttribute(org.apache.struts.Globals.LOCALE_KEY, new java.util.Locale(fr,FR));

Re: Display only 100 chars of a string

2009-06-23 Thread Dave Newton
Stefano Tranquillini wrote: About this link: http://www.opensymphony.com/ognl/html/LanguageGuide/staticMethods.html said: You can call a static method using the syntax @cl...@method(args). If you leave out class, it defaults to java.lang.Math, to make it easier to call min and max methods. If

Re: Exceptions thrown by constructor different from those thown by execute() ?

2009-06-23 Thread Jim Kiley
Presumably the code calling execute() wraps it in a try/catch, but the call that is instantiating the action in the first place doesn't do that. You'd have to look at the source to be sure, but of course that's the nice part about working on open-source projects. From a philosophical perspective,

Re: Exceptions thrown by constructor different from those thown by execute() ?

2009-06-23 Thread Wes Wannemacher
On Tue, Jun 23, 2009 at 8:50 AM, Jim Kileyjhki...@summa-tech.com wrote: [...] From a philosophical perspective, though -- no clue, I don't have a lot of insight into why the devs make all the decisions they make. [...] The decisions I make are usually heavily weighted by how impressed girls

Update to Struts 2.1.7

2009-06-23 Thread Pro1712
Hello! I try to update from Struts 2.1.6 to 2.1.7. I've got simple actions like this: action name=Test1Action class=com.test.test1 result name=*/pages/Test1.jsp/result /action In Struts 2.1.6 'input' was called when invoking the action. In Struts 2.1.7 'execute' is called. Why is ecexute

Re: Update to Struts 2.1.7

2009-06-23 Thread Wes Wannemacher
Struts 2.1.7 is not officially released yet, it is being staged and voted on... And, I am not sure if your configuration makes sense, I have never mapped the * result before. Do you have a test1-validation.xml file alongside the class file? Does test1 have a 'validate' method? Also, how do you

Re: Exceptions thrown by constructor different from those thown by execute() ?

2009-06-23 Thread Jan T. Kim
On Tue, Jun 23, 2009 at 09:03:22AM -0400, Wes Wannemacher wrote: On Tue, Jun 23, 2009 at 8:50 AM, Jim Kileyjhki...@summa-tech.com wrote: [...] From a philosophical perspective, though -- no clue, I don't have a lot of insight into why the devs make all the decisions they make. [...]

Re: Exceptions thrown by constructor different from those thown by execute() ?

2009-06-23 Thread Wes Wannemacher
On Tue, Jun 23, 2009 at 9:56 AM, Jan T. Kimj@uea.ac.uk wrote: [...] I (again) agree that an interceptor is more suited for security. I'm undecided whether this is an issue suitable for a JIRA, it's more that based on the documentation on Exception Configuration

Forward to another page on Submit

2009-06-23 Thread Sam Wun
Dear all, I have a problem when I click a submit button of a page, it doesn't go straight to the next desired page. Here is my little project: Firstly, I want to show you how it supposed to flow: Input page - Help page But the problem is it does go to the Help page when I click the submit button

Re: Forward to another page on Submit

2009-06-23 Thread Sam Wun
sorry for the typo, I meant it DOESN't go to the Help page when I click the submit button on the Input page. On Wed, Jun 24, 2009 at 12:10 AM, Sam Wunswun2...@gmail.com wrote: Dear all, I have a problem when I click a submit button of a page, it doesn't go straight to the next desired page.

Re: Update to Struts 2.1.7

2009-06-23 Thread Pro1712
Thanks for your quick answer! There is no test1-validation.xml. test1 does not have a validate method . I have implemented the execute method to see if it is called because input does not get called any more... I also implemented validateExecute method for testing. And it get's called also. --

Re: Update to Struts 2.1.7

2009-06-23 Thread Musachy Barroso
If you can use * in a result, that's news for me. musachy On Tue, Jun 23, 2009 at 7:28 AM, Pro1712pro1...@yahoo.de wrote: Thanks for your quick answer! There is no test1-validation.xml. test1 does not have a validate method . I have implemented the execute method to see if it is called

Struts2 Validation Annotations - Message with params

2009-06-23 Thread Robson
Hi all! I have my validation: @RequiredStringValidator(key=erro.required) And in my package.properties: erro.required={0} is required How can i use this param ??? I tried: @RequiredStringValidator(message=%{getText('erro.required', new String[] {'Login'})}) But it's not working. Thanks!

Re: Struts2 static content

2009-06-23 Thread rtd
Musachy Barroso wrote: serving static content with struts 2 is probably not a good idea (performance and security wise) Can you expand upon that thought? At first blush, it strikes me as an over-generalization, but I'm always interested in learning. -- View this message in context:

Re: Struts2 static content

2009-06-23 Thread rtd
Musachy Barroso wrote: serving static content with struts 2 is probably not a good idea (performance and security wise) Can you expand upon that thought? At first blush, it strikes me as an over-generalization, but I'm always interested in learning. -- View this message in context:

RE: Update to Struts 2.1.7

2009-06-23 Thread Martin Gainty
possible he is alluding to wildcard mapping? The * in the path attribute allows the mapping to match the request URIs /editSubscription, editRegistration!-- Generic edit* mapping -- action name=/edit* class=org.apache.struts.webapp.example.Edit{1}Action result name=failure

Re: Struts2 static content

2009-06-23 Thread Musachy Barroso
Struts adds overhead for serving static content. Not that I have ever done any benchmarking on it, but I know that at my company(large online retailer), just suggesting to serve static content thru tomcat instead of apache is a big offense. musachy On Tue, Jun 23, 2009 at 8:25 AM,

Re: Update to Struts 2.1.7

2009-06-23 Thread Wes Wannemacher
Yea, it works for actions, but it doesn't seem to make sense for result names. -W On Tue, Jun 23, 2009 at 11:41 AM, Martin Gaintymgai...@hotmail.com wrote: possible he is alluding to wildcard mapping? The * in the path attribute allows the mapping to match the request URIs

Re: Struts2 static content

2009-06-23 Thread Wes Wannemacher
On Tue, Jun 23, 2009 at 11:45 AM, Musachy Barrosomusa...@gmail.com wrote: Struts adds overhead for serving static content. Not that I have ever done any benchmarking on it, but I know that at my company(large online retailer), just suggesting to serve static content thru tomcat instead of

Re: Struts2 static content

2009-06-23 Thread Wes Wannemacher
On Tue, Jun 23, 2009 at 12:11 PM, Wes Wannemacherw...@wantii.com wrote: On Tue, Jun 23, 2009 at 11:45 AM, Musachy Barrosomusa...@gmail.com wrote: Struts adds overhead for serving static content. Not that I have ever done any benchmarking on it, but I know that at my company(large online

Re: Struts2 static content

2009-06-23 Thread Musachy Barroso
this sounds like a good topic for Myth Buster /geek_out On Tue, Jun 23, 2009 at 9:25 AM, Wes Wannemacherw...@wantii.com wrote: On Tue, Jun 23, 2009 at 12:11 PM, Wes Wannemacherw...@wantii.com wrote: On Tue, Jun 23, 2009 at 11:45 AM, Musachy Barrosomusa...@gmail.com wrote: Struts adds overhead

Re: Struts2 static content

2009-06-23 Thread Wes Wannemacher
On Tue, Jun 23, 2009 at 12:29 PM, Musachy Barrosomusa...@gmail.com wrote: this sounds like a good topic for Myth Buster /geek_out Only if they do it in true MythBuster form and the servers blow up. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1,

Cannot find bean - Please HELP.

2009-06-23 Thread Sam Wun
Dear all, I was trying to going from one JSP page to another, where each JSP page has a submit button... and a Form bean as well. But when I click a submit button on the first JSP page, it said that the second Form bean is not found in the second JSP page. The workflow is supposed to be:

What is Struts 2 equivalent of PlugIn?

2009-06-23 Thread laredotornado
Hi, I'm migrating my app from struts 1 to Struts 2. In my Struts 1 app, I had this class ... public class RefreshAction extends Action implements PlugIn { ... } and this in my struts-config.xml file ... plug-in className=com.myco.regui.struts.refresh.RefreshAction /plug-in So how do I

RE: Struts2 static content

2009-06-23 Thread Martin Gainty
ive heard that too TC supports Cache-Control, Expires and Last-Modified for cache control // Required Cache Control Headers String maxage = 86400; // One day in Seconds response.setHeader(Cache-Control, max-age=+ maxage); long relExpiresInMillis = System.currentTimeMillis() + (1000 *

Struts FilterDispatcher issue with regard to specification 2.4

2009-06-23 Thread Struts Two
Hello All: In Servlet specification 2.4 filters are not supposed to be accessed directly as a resource. And anything other than a jsp page need to have a Servlet mapping in order to make it accessible (as per specification). Struts 1 had ActionServlet which allowed for servlet mapping of

Getting method or action from within prepare() method

2009-06-23 Thread Greg Lindholm
I started writing this as a question then I discovered the answer so thought I would share it as FYI. Question: I have Preparable CRUD actions that have multiple action methods like doNew(), doCreate(), doEdit(), doUpdate(), doDelete(). I have found at least one case where I need to know, in the

Selection of s:optgroup on page load

2009-06-23 Thread Rubbinio
Hi, i have the select below which uses s:optgroup to group my values. The soCustomerFiltration is TreeMapString, CustomObject[], while the customerFilter is an String[]. All work well in terms of rendering except that once I select something and press a button to update the page my selection is

Could not find property

2009-06-23 Thread Gustavo Straube
Hi all! I've been reading in this mailing list and other discussions about messages like this: Could not find property [org.apache.catalina.jsp_file] Everybody talks about turn the debug mode (struts.devMode) off. But I want to know if it's the best solution. What are you think about it? There

RE: Getting method or action from within prepare() method

2009-06-23 Thread Martin Gainty
this is good information can someone update the doc @ http://struts.apache.org/2.0.11/docs/prepare-interceptor.html Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie

Re: Getting method or action from within prepare() method

2009-06-23 Thread Dave Newton
Martin Gainty wrote: this is good information can someone update the doc @ http://struts.apache.org/2.0.11/docs/prepare-interceptor.html Update it to say what? It already states: 1. if the action class have prepare{MethodName}(), it will be invoked 2. else if the action class have

Re: Exceptions thrown by constructor different from those thown by execute() ?

2009-06-23 Thread Dave Newton
Wes Wannemacher wrote: On Tue, Jun 23, 2009 at 8:50 AM, Jim Kileyjhki...@summa-tech.com wrote: [...] From a philosophical perspective, though -- no clue, I don't have a lot of insight into why the devs make all the decisions they make. [...] The decisions I make are usually heavily weighted

Re: Struts2 and Security

2009-06-23 Thread aum strut
Thanks Dave for the details, as my self also not very much known about the spring so may be we have to look in to this and in the draft in more details. On Tue, Jun 23, 2009 at 5:54 PM, Dave Newton newton.d...@yahoo.com wrote: aum strut wrote: Our requirement is to use good authentication