Re: Performance issues in showcase sample struts 2.1.6 application

2009-06-27 Thread Wes Wannemacher
In particular, look for the section on creating a production profile. The tag library searches various locations for the freemarker templates, the last place it looks is inside the core jar file. Copying the template you use out of the jar will help quite a bit. Also, if performance is a huge conce

Re: Interceptor Use

2009-06-27 Thread Jim Kiley
This is a very appropriate use for interceptors. You might also want to look at Spring Security, which does this and a lot more without too much configuration pain. jk On Sat, Jun 27, 2009 at 12:25 PM, Robin Mannering wrote: > Hello, > > Struts 2.1.6 > > I wish to ensure a user is logged into an

Re: Interceptor Use

2009-06-27 Thread Dave Newton
Robin Mannering wrote: I wish to ensure a user is logged into an application before allowing him/her to execute certain tasks. Would using an Interceptor be a good way to go? Yep. Dave - To unsubscribe, e-mail: user-unsubsc

How to correct this syntax for multiple submit buttons?

2009-06-27 Thread Sam Wun
Hi, here are the offending lines in my jsp file: Errors on console: org.apache.jasper.JasperException: /html/portlet/onlinepayment_portlet/sign_in.jsp(110,18) equal symbol expected org.apache.jasper.JasperException: /html/portlet/onlinepayment_portlet/sign_in.jsp(110,18) equal symbol expecte

Interceptor Use

2009-06-27 Thread Robin Mannering
Hello, Struts 2.1.6 I wish to ensure a user is logged into an application before allowing him/her to execute certain tasks. Would using an Interceptor be a good way to go? My idea is to retrieve session data in the intercept() method of the interceptor and verify a certain attribute is held

Re: prepare{MethodName} not working

2009-06-27 Thread Jim Kiley
Reread what I wrote: "You probably have the @Override annotation on prepareSave(), and *you don't need it*." Delete the annotation. jk On Sat, Jun 27, 2009 at 11:52 AM, Praveen.V.Kumar < praveenkuma...@spanservices.com> wrote: > I have the @Override annotations on prepareSave() but still it is

RE: prepare{MethodName} not working

2009-06-27 Thread Praveen . V . Kumar
I have the @Override annotations on prepareSave() but still it is saying The method prepareSave() of type ManageGeneralSetupAction must override or implement a supertype method -Original Message- From: Jim Kiley [mailto:jhki...@summa-tech.com] Sent: Saturday, June 27, 2009 9:20 PM To: S

Re: prepare{MethodName} not working

2009-06-27 Thread Jim Collings
> Hi, > While referring the below link I came to know that we can have > prepare{MethodName}() that will run before the invocation of the particular > method. > > http://struts.apache.org/2.1.6/docs/prepare-interceptor.html > > I was trying the same. In my action class, I have a save() method a

Re: prepare{MethodName} not working

2009-06-27 Thread Jim Kiley
You probably have the @Override annotation on prepareSave(), and you don't need it. On Sat, Jun 27, 2009 at 11:40 AM, Praveen.V.Kumar < praveenkuma...@spanservices.com> wrote: > Hi, > > While referring the below link I came to know that we can have > prepare{MethodName}() that will run before the

Re: How to set a file name using a header in the response?

2009-06-27 Thread Jim Collings
john feng wrote: > Putthese code in servlet or action class. don't put in the jsp file. ... >> is possible? This idea seems promising. So I have an action that results in the jsp in question and I'm using the Convention plug-in. Presumably, I would have to apply one of the *Aware interfaces to th

prepare{MethodName} not working

2009-06-27 Thread Praveen . V . Kumar
Hi, While referring the below link I came to know that we can have prepare{MethodName}() that will run before the invocation of the particular method. http://struts.apache.org/2.1.6/docs/prepare-interceptor.html I was trying the same. In my action class, I have a save() method and the action

Re: How to set a file name using a header in the response?

2009-06-27 Thread john feng
Putthese code in servlet or action class. don't put in the jsp file. On Sat, Jun 27, 2009 at 9:25 AM, Jim Collings wrote: > Dave Newton wrote: >> Jim Collings wrote: >>> <%response.setHeader("Content-Disposition", "attachment; >>> filename=\"filename_${fromDate}-${toDate}.doc\""); %> >>> >>> The a

Re: How to set a file name using a header in the response?

2009-06-27 Thread Dave Newton
Jim Collings wrote: Dave Newton wrote: Jim Collings wrote: <%response.setHeader("Content-Disposition", "attachment; filename=\"filename_${fromDate}-${toDate}.doc\""); %> The above is what I currently have but I think there is a new way to do it that doesn't involve using a scriptlet. Also, th

Re: How to set a file name using a header in the response?

2009-06-27 Thread Jim Collings
Dave Newton wrote: > Jim Collings wrote: >> <%response.setHeader("Content-Disposition", "attachment; >> filename=\"filename_${fromDate}-${toDate}.doc\""); %> >> >> The above is what I currently have but I think there is a new way to >> do it that doesn't involve using a scriptlet. Also, the "fromD

Re: Struts 2 and Velocity

2009-06-27 Thread Dave Newton
Robin Mannering wrote: Hi Dave, It worked ! It seems to be case sensitive. Thanks for your help. Can you please tell me how you knew to specify 'fieldName' ? I cannot find it documented anywhere In the S2 tag reference [1] on the fielderror tag page [2]. Dave [1] http://struts.apache.org

Re: Struts 2 and Velocity

2009-06-27 Thread Robin Mannering
Hi Dave, It worked ! It seems to be case sensitive. Thanks for your help. Can you please tell me how you knew to specify 'fieldName' ? I cannot find it documented anywhere Dave Newton wrote: It might be fieldName; case-sensitive. I'm not very familiar with the Velocity tag support, but it

Re: Struts 2 and Velocity

2009-06-27 Thread Dave Newton
It might be fieldName; case-sensitive. I'm not very familiar with the Velocity tag support, but it may be similar to Freemarker in that some tags are in-line tags, some are block tags, and decisions were made at some point to try and cover the most common use-case. If that's the case then yo

Re: Struts 2 and Velocity

2009-06-27 Thread Robin Mannering
Thanks for your response. Unfortunately, #sfielderror ("fieldname=username") does not work. All the current field errors are rendered in an unordered list. Using struts2 tags, it would be: field1 field2 OR These are two tags nested which I'm having

Re: Struts 2 and Velocity

2009-06-27 Thread Dave Newton
Robin Mannering wrote: From the documentation at http://struts.apache.org/2.1.6/docs/velocity-tags.html, I see the format is: #s**tag **(...) ... #end However, I'm having difficult using the tags. The following is ok and works as expected #stextfield ("label=Employee Name" "name=emp

Struts 2 and Velocity

2009-06-27 Thread Robin Mannering
Hi all I've recently switched from Struts 1.x to Struts 2.1.6 and would like to continue using velocity to render the view. I also wish to take advantage of the Struts 2 tag library by using velocity directly. From the documentation at http://struts.apache.org/2.1.6/docs/velocity-tags.html