Re: Running Struts1 and Struts2 together?

2010-08-30 Thread Stephen Turner
On Mon, 23 Aug 2010 14:22:54 -0400, Greg Lindholm wrote: Is there any issues with running Struts1 and Struts2 together in the same application? I have a couple old Struts1 applications which I plan on converting to Struts2 over time, but would like to start doing new development in Struts2 i

Re: Interceptor - Dynamically Add Result Config to Action Config

2010-08-24 Thread Stephen Turner
iner.inject(srd); srd.setLocation("SearchHelp.action?"+request.getQueryString()); srd.setPrependServletContext(true); srd.execute(actionInvocation); return Action.NONE; This is similar to the injection of the FreeMarkerResult in execAndWait. Thanks, Steve -- Stephen Turner

Re: Interceptor - Dynamically Add Result Config to Action Config

2010-08-24 Thread Stephen Turner
On Tue, 24 Aug 2010 10:59:29 -0400, Martin Gainty wrote: //reiterate 2.1.8 functionality: com.opensymphony.xwork2.ActionInvocation action_invocation; ActionProxy proxy=action_invocation.getProxy() ActionConfig config =proxy.getConfig(); //where ActionConfig contains the addResultConfig me

Interceptor - Dynamically Add Result Config to Action Config

2010-08-24 Thread Stephen Turner
I have a Struts 2.0 interceptor that dynamically creates a result config and adds it to the action config. It does it like this: String newResult = "shRes"; ResultConfig cfg = new ResultConfig(newResult, ServletRedirectResult.class.getName()); cfg.addParam("location", "SearchHelp.actio

Re: Running Struts1 and Struts2 together?

2010-08-23 Thread Stephen Turner
On Mon, 23 Aug 2010 14:22:54 -0400, Greg Lindholm wrote: Is there any issues with running Struts1 and Struts2 together in the same application? I have a couple old Struts1 applications which I plan on converting to Struts2 over time, but would like to start doing new development in Struts2 i

Re: Struts 2.2.1 - Unit Testing Interceptors

2010-08-18 Thread Stephen Turner
On Wed, 18 Aug 2010 16:22:37 -0400, Lukasz Lenart wrote: 2010/8/18 Stephen Turner : Unit tests for interceptors in Struts 2.2.1 In TokenInterceptorTest I see a reference to org.apache.struts2.TestConfigurationProvider, but I can't find this class in a jar file. I do see the source

Struts 2.2.1 - Unit Testing Interceptors

2010-08-18 Thread Stephen Turner
Unit tests for interceptors in Struts 2.2.1 In TokenInterceptorTest I see a reference to org.apache.struts2.TestConfigurationProvider, but I can't find this class in a jar file. I do see the source code though. Which jar should I be using for TestConfigurationProvider? Thanks, Steve -

Re: s:url tag - multiple params with same name

2010-08-09 Thread Stephen Turner
On Fri, 06 Aug 2010 20:49:03 -0400, Martin Gainty wrote: if the action collection accessor formats the array to deliver each attribute of CartItem as expected by param within url then grab the array from the action.. Martin Gainty Mr Gainty wins the prize. For referenc

Re: Re : s:url tag - multiple params with same name

2010-08-09 Thread Stephen Turner
7;s the result: URL 1: a.b?pn=thirdval I'm using Struts 2.0.11 Steve -- Stephen Turner Senior Programmer/Analyst - MIT IS&T - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

s:url tag - multiple params with same name

2010-08-06 Thread Stephen Turner
Hello all, I'd like to format a URL with multiple parameters having the same name, eg: ?pn=firstval&pn=secondval&pn=thirdval Is this possible using ? I've tried this: This doesn't work - I get: ?pn=thirdval Doing something similar with the JSTL tag does work, but I'd li

Re: [FRIDAY] Mime Type Validation

2010-07-21 Thread Stephen Turner
On Fri, 16 Jul 2010 10:26:11 -0400, Christopher Schultz wrote: If filename extensions are sufficient, you can get this information directly from the servlet container using ServletContext.getMimeType. There's also the activation framework's MimetypesFileMap.getContentType. Another option mi

[FRIDAY] Mime Type Validation

2010-07-16 Thread Stephen Turner
We're using Struts 2 for file uploading, and we're filtering the types of files people can upload by checking the file's content type against a list of allowed mime types. This turns out not to be reliable enough. Firefox in particular seems to sometimes provide the wrong mime type, so some

Re: i need more documentation on applicationContext.xml

2010-06-21 Thread Stephen Turner
On Mon, 21 Jun 2010 00:56:19 -0400, Jake Vang wrote: hi, i've been reading and studying http://struts.apache.org/2.0.14/docs/struts-2-spring-2-jpa-ajax.html. i want to know what is actually going on in applicationContext.xml. for example, what do these two lines do? please explain or refer

Re: Redirect in an interceptor

2010-06-17 Thread Stephen Turner
@Inject public void setContainer(Container container) { this.container = container; } Steve On Wed, 16 Jun 2010 17:23:51 -0400, Stephen Turner wrote: We are investigating moving from Struts 2.0.x to 2.1.8. We have an interceptor that does a redirect like this: Re

Redirect in an interceptor

2010-06-16 Thread Stephen Turner
We are investigating moving from Struts 2.0.x to 2.1.8. We have an interceptor that does a redirect like this: ResultConfig cfg = new ResultConfig("shRes", ServletRedirectResult.class.getName()); cfg.addParam("location", "MyAction.action?"+request.getQueryString()); actionInvocat

Re: Linking page

2010-05-21 Thread Stephen Turner
On Fri, 21 May 2010 11:39:56 -0400, ch...@chrismiles.org wrote: If you are not populating/building a view then it makes no sense to go through the controller. It is counter intuitive just pass through an action which does nothing, when the JSP would get filtered anyway. Chris That's yo

Re: Linking page

2010-05-21 Thread Stephen Turner
On Fri, 21 May 2010 11:01:43 -0400, Denis Cabasson wrote: I personnaly prefer to use the same Action for things that are logically grouped. So in your case, I would use the execute method to return SUCCESS, pointing to the jsp, and a doSearch method with SEARCH result, pointing to the other J

Re: Struts vs SpringMVC

2010-04-16 Thread Stephen Turner
On Thu, 15 Apr 2010 22:04:53 -0400, Frans Thamura wrote: have anyone read this? http://www.java4learners.com/struts/faq/what-are-advantages-spring-mvc-over-struts any comment? Kind of bizzare to publish

profiling = too true

2010-02-26 Thread Stephen Turner
ode is not turned on. Is there an app-wide setting that would activate this profiling that we might have turned on by mistake? Thanks, Steve -- Stephen Turner Senior Programmer/Analyst - SAIS MIT IS&T - To unsubscribe

Re: Struts 2 - Global Validation

2010-02-04 Thread Stephen Turner
rplexes the new user... If you could fix this, then there won't be confusion to the newbies who post. Regards Arul The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Stephe

Re: How to handle input from iterated output

2010-02-01 Thread Stephen Turner
e in the list: http://struts.apache.org/2.0.8/docs/type-conversion.html Basically this would involve a "Myaction-conversion.properties" file alongside the action class. It would contain: Element_MyList=mypackage.MyClass Also, there's a pretty good section on this in "Stru

Re: Problem with excel download file from Action (S 2.1.8)

2010-01-22 Thread Stephen Turner
vs. "save it" question is ambiguous and not guaranteed to get you the result you want. -Dale Dale, Thanks for the explanation - this works much better now. We were basically deferring the handling of this to the browser, and by using "attachment;" we now get consistent be

Re: Problem with excel download file from Action (S 2.1.8)

2010-01-22 Thread Stephen Turner
On Fri, 22 Jan 2010 09:59:52 -0500, Dale Newfield wrote: Glad you were able to get that working. Where did you find the documentation that suggested this part of your stream result? Oscar wrote: filename="nameoffile.xls" The filename can also be specified, but the only valid "content

Re: Example of dumping the valuestack?

2009-12-28 Thread Stephen Turner
his before but I can't seem to find it via searching. Reminder anyone? Jim, Adding debug=xml to the URL will show the value stack as XML. I think you need to have struts.devMode=true set in the struts config as well. Steve -- Stephen Turner Senior Programmer/Analyst

Re: Struts 1.0 and Spring?

2009-12-11 Thread Stephen Turner
On Fri, 11 Dec 2009 13:26:46 -0500, Paul Benedict wrote: Have you looked at the Spring API for its Struts support? All I've seen in the Spring code refers to Struts 1.1 Steve On Fri, Dec 11, 2009 at 12:13 PM, Stephen Turner wrote: I maintain a Struts 1.0 app and need to make

Struts 1.0 and Spring?

2009-12-11 Thread Stephen Turner
I maintain a Struts 1.0 app and need to make some changes. While I'm working on the app, I'm wondering if there's any chance I could integrate Spring into the app, to manage Struts action classes. I found a plugin for Struts 1.1, but I don't want to upgrade the Struts version at this point.

Type Conversion and Lists

2009-09-25 Thread Stephen Turner
Hello, I'm trying to get objects placed in a List using the type conversion functionality built into Struts 2 (2.0.14)/Java 1.4. The bean that should be in the list is called "Grocery", with attributes "name" and "quantity". My action class has a List called "groceries". I have a conversi

Re: realtive path and absolute path

2009-09-11 Thread Stephen Turner
On Fri, 11 Sep 2009 07:59:38 -0400, Martin Gainty wrote: (i dont know what a realtive path is) Martin Gainty I think he spelt it like that to confuse bots... Steve - To unsubscribe, e-mail: user-unsubscr...@struts.apach

Re: Struts2 - ScopedModelDriven - Unable to update the model and set the latest Model data in session

2009-08-25 Thread Stephen Turner
eptor will do that the first time, and will pull the object out of session after that, and inject it into your action class. Steve -- Stephen Turner Senior Programmer/Analyst - SAIS MIT IS&T - To unsubscribe, e-m

Re: Using Map as option list source with tag

2009-08-11 Thread Stephen Turner
On Tue, 11 Aug 2009 09:59:06 -0400, Johannes Geppert wrote: I'am not sure, but I think you can access the attributes of your bean with value.myattribute Best Regards Johannes Geppert Hello Johannes, You are indeed correct! Thanks for the help. Steve -- Stephen Turner Senior Progr

Using Map as option list source with tag

2009-08-11 Thread Stephen Turner
in the tag to get a PayPeriod bean attribute showing as the rendered value? I know I can cheat by defining a toString() method in the bean, but I wondered if there's a cleaner way of doing this. Thanks, Steve -- Stephen Turner S

Re: Interceptor Execution Tracing

2009-07-02 Thread Stephen Turner
Best greetings, Paweł Wielgus. Thanks Paweł, that's exactly what I was looking for - Steve -- Stephen Turner Sr. Analyst/Programmer MIT IS&T - SAIS - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For a

Interceptor Execution Tracing

2009-07-02 Thread Stephen Turner
Is it possible to easily see a record of all the interceptors executed during an action invocation? I want to see the actual interceptors that are executed, not the config (which shows me what I _think_ is happening). Thanks, Steve -- Stephen Turner Sr. Analyst/Programmer MIT IS&T -

Scoped Model Driven Example?

2009-06-19 Thread Stephen Turner
Would someone be kind enough to point me to an example of the Scoped Model Driven usage? Both the xml config part and the Action code. I've googled this, and delved into the sample source code, and not come up with anything - Thanks, Steve -

Re: Struts 2 Portlet/Oracle Portal Problems

2009-04-22 Thread Stephen Turner
And which version of Oracle Portal are you using? Nils-H -- Stephen Turner Senior Programmer/Analyst - SAIS MIT IS&T - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Struts 2 Portlet/Oracle Portal Problems

2009-04-16 Thread Stephen Turner
: PortletActionContext.getRenderRequest().getPortletSession() Invalidating the PortletSession object gives me an IllegalState exception - Steve -- Stephen Turner Senior Programmer/Analyst - SAIS MIT IS&T - To unsubscribe, e-mail: user-unsu

Re: Struts 2 Portlet/Oracle Portal Problems

2009-04-16 Thread Stephen Turner
meter behaviour? Nils-H No, I don't know if there's a bug report - but we have a contact for Oracle support so I'm going to run it by them. Thanks for the help- Steve -- Stephen Turner Senior Programmer/Analyst - SAIS MIT IS&T --

Re: Struts 2 Portlet/Oracle Portal Problems

2009-04-16 Thread Stephen Turner
sn't seem to please my JVM. The form action uses a POST method. Thanks, Steve -- Stephen Turner Senior Programmer/Analyst - SAIS MIT IS&T - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Struts 2 Portlet/Oracle Portal Problems

2009-04-16 Thread Stephen Turner
ind action or result There is no Action mapped for action name WSRPBaseService. - [unknown location] We are accessing our portlets through WSRP - "WSRPBaseService" is used in the markup URL. No idea why this is being interpreted as a Struts action though! Steve -- Stephen Turn

Struts 2 Portlet/Oracle Portal Problems

2009-04-16 Thread Stephen Turner
event phase. Presumably because of struts.portlet.action value of "StrutsTestRender" in the form's action URL. Also we now have both "apple" and "cherry" in the "pie" parameter values: "apple" from being embedded in the URL, "cherry