Re: how to re-init / update parameter of an interceptor during runtime?

2009-04-03 Thread Joe Lam
thx for your reply. actually I am not going to change the param regularly. this is more like just in case I want to change the setting in the future. thx Joe Nils-Helge Garli wrote: Why do you need to do that? Nils-H On Fri, Apr 3, 2009 at 5:05 AM, Joe Lam joe@moni-media.net

how to re-init / update parameter of an interceptor during runtime?

2009-04-02 Thread Joe Lam
I got this in action mapping interceptor-ref name=MyInterceptor value01 /interceptor-ref that parameter actually is an instance property of that interceptor instance. private String param01; public void setParam01(String value){ param01= value; } I wonder if it is possible to

[S2] error 404 + sitemesh template

2007-11-22 Thread Joe Lam
I set this in web.xml error-page error-code404/error-code location/error404.jsp/location /error-page but the output doesnt come with the site template (using sitemesh) anyone know why and how to solve this?? btw, any chance to make error 404 to call an action ? like

[S2] regarding struts.configuration.xml.reload setting in struts.xml

2007-09-09 Thread Joe Lam
I have this in struts.xml constant name=struts.configuration.xml.reload value=true / and I have this constant injected to my class constant name=myConstant value=myValue / does this mean that whenever I change my constant's value in struts.xml, my class will get the updated value? by doing a

[S2] File Download Example in showcase doesn't work with contentType application/x-download using IE

2007-08-30 Thread Joe Lam
try to make a file download action without opening the file. I try the showcase file download example. change contentType to application/x-download in struts.xml lt;param name=contentTypegt;application/x-downloadlt;/paramgt; with firefox it works fine. with IE, it still open the gif in browser.

Re: [S2] File Download Example in showcase doesn't work with contentType application/x-download using IE

2007-08-30 Thread Joe Lam
and caused because you're writing to the output stream within a JSP that's already doing so. That code is better suited to its own servlet. Hope that helps, regards, Jeromy Evans Joe Lam wrote: try to make a file download action without opening the file. I try the showcase file

Re: [S2] how to get the constants in struts.xml programmatically?

2007-08-22 Thread Joe Lam
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

[S2] how to get the constants in struts.xml programmatically?

2007-08-17 Thread Joe Lam
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

[s2] what is your practice to do Sidebar thing??

2007-08-13 Thread Joe Lam
May I know what is your practice to do Sidebar thing? here the sidebar means a block lets say on the left side showing login form for guest user and showing user menu for logged in user. s:include ? s:action ? or do it in decorator level (sitemesh) ? thank you very much. Joe -- View this

Re: Is it possible to pass a dynamic parameter to a redirectAction?

2007-08-05 Thread Joe Lam
This might help http://www.vitarara.org/cms/struts_2_cookbook/post_and_redirect http://www.vitarara.org/cms/struts_2_cookbook/post_and_redirect Piero Sartini-3 wrote: I have the following situation: a searchfield is on top of a table presenting results. if there is only one result,

[S2] How to avoid FileUploadInterceptor to save the tmp file?

2007-07-30 Thread Joe Lam
Hi all, I wonder how to avoid FileUploadInterceptor to save the tmp file. because in my action I will process it anyway. IMO it is not efficient to have the interceptor to save a tmp file first and then have my action class to process the tmp file after. I think the most efficient way is to get