Discard large file upload

2009-05-14 Thread Sanganak-Guru
Hi, I am working on a piece of code related to file upload using struts. I want to abort/discard a file upload request from browser in case the file size being uploaded is larger than what is currently configured. Is there any way to discard / abort file upload request and show user an error in

Re: convention plug-in question

2009-05-14 Thread Jim Collings
Musachy Barroso wrote: > if you add a "/" to the action name, it won't append the namespace to > it, but use it as the whole action name. If your namespace is > "myactions", and you set the name as "/action", the action name is > "/action", if you set it to "action" then the action name will be > "

Re: DWRValidator not working in Struts 2.1.6

2009-05-14 Thread j alex
Martin, I tried with : ActionProxy proxy = actionProxyFactory.createActionProxy(namespace, mapping.getName(), "execute", ctx); Somehow the method name is coming in as null, so i hardcoded it to execute for now ; need to see why. This seems to work fine, i'm getting the errors as an alert box on

Re: DWRValidator not working in Struts 2.1.6

2009-05-14 Thread j alex
Hi Martin, I had seen the configs in the struts-showcase, and used all of them as-is ; just added a javascript fn. to invoke DWR and was getting the NPE. So, looks like there's something broken in the default distro. I'll try your suggestion of using : * public* ActionProxy createActionProxy(Str

RE: DWRValidator not working in Struts 2.1.6

2009-05-14 Thread Martin Gainty
the DWR configuration you will need is located at struts-showcase\WEB-INF\dwr.xml http://www.getahead.ltd.uk/dwr/dwr10.dtd";> where the servlet would be defined in WEB-INF/web.xml configuration dwr uk

Re: DWRValidator not working in Struts 2.1.6

2009-05-14 Thread j alex
martin, i had seen the StrutsPrepareFilter API and as it says "Prepares the request for execution by a later StrutsExecuteFilter filter instance. " . I've both the StrutsPrepare and Execute filters configured plus the DWR servlet. You were mentioning a working example of DWRValidator in the showc

Re: [S2] Annotation Validation - string substitution in message

2009-05-14 Thread Dave Newton
Norris Shelton wrote: I need some clarification. I should have the following in my globalMessages? required.string.message=${get(fieldName)} is required How would I specify field name? Hmm, in retrospect, I don't know if this technique works with annotations. With XML validation "fieldName"

DefaultActionInvocation - vaf set in StrutsPrepareFilter but not for DWR

2009-05-14 Thread j alex
Hi, I'm stuck wtih a problem where the valueStackFactory is null, and this causes DWRValidator to fail. I had posted the stacktrace earlier, but didn't get much responses. Please confirm some of my assumptions reg the initialization process, so that i can do some meaningful debugging: 1. Dispatche

RE: DWRValidator not working in Struts 2.1.6

2009-05-14 Thread Martin Gainty
StrutsPrepareFilter documentation is available at http://struts.apache.org/2.1.6/struts2-core/apidocs/org/apache/struts2/dispatcher/ng/filter/StrutsPrepareFilter.html there is a brand new feature that musachy put in svn on monday to specifically work-around action execute i would ping him to see

Re: Login page first time display

2009-05-14 Thread Paweł Wielgus
Hi Ed, what i do is redirecting to a page for the first time, or creating a LoginPage action that is just a redirect. Best greetings, Paweł Wielgus. 2009/5/14 Ed : > Im using Tiles, in my sidebar "tile" I have a link to a login action, as > follows: > > Login > > and mapped in struts-config like

Re: convention plug-in question

2009-05-14 Thread Musachy Barroso
if you add a "/" to the action name, it won't append the namespace to it, but use it as the whole action name. If your namespace is "myactions", and you set the name as "/action", the action name is "/action", if you set it to "action" then the action name will be "/myaction/action". musachy On T

Re: convention plug-in question

2009-05-14 Thread Jim Collings
So I have this working but I had to specify a value for @Action. I don't think I should have to do this. There should be a convention in the convention plugin of assuming that a result mapped the way I tried to map it is for the current method using it's conventional url when value is left blank.

Re: [S2] Annotation Validation - string substitution in message

2009-05-14 Thread Norris Shelton
I need some clarification. I should have the following in my globalMessages? required.string.message=${get(fieldName)} is required How would I specify field name? Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Shelton Consulting, LLC ICQ# 26487421 AIM NorrisEShelton YIM no

Re: [S2] Annotation Validation - string substitution in message

2009-05-14 Thread Dave Newton
Norris Shelton wrote: I am using the following annotation for validation: @RequiredStringValidator(key = "required.string.message") I have the following in my globalMessages: required.string.message=${string.name} is required Is there a way to substitute the name of the field or a string that I

Re: xml validation

2009-05-14 Thread Dave Newton
manub wrote: - I'm not able to perform an equality check on two parameters. I've got password and confirmPassword which I try to validate using something like: confirmPassword.equals(password) ... What am

getRequestURI() returns query parameters for path="/submit.do?my=Update

2009-05-14 Thread mule_user
In WebSphere 5.1 test server for Struts 1.1 application, I noticed that request.getRequestURI() also returns the query string, if the forward happens to have query parameters like below: request.getRequestURI() call inside an Action class returns /MyProjWeb/submit.do?my=Update Acco

Re: DWRValidator not working in Struts 2.1.6

2009-05-14 Thread j alex
Just wanted to make sure my email reached the full users' list. I still havent been able to make any progress on this. Has anyone got the DWRValidator working in Struts 2.1? On 4/24/09, j alex wrote: > Martin, > > I want DWRServlet to handle only the Action validations, not Action > execution. I'

Login page first time display

2009-05-14 Thread Ed
Im using Tiles, in my sidebar "tile" I have a link to a login action, as follows: Login and mapped in struts-config like this: Then I have the corresponding ActionForm and Action The problem comes when I click the link, Action's execute method is invoked. In execute method I do s

Re: convention plug-in question

2009-05-14 Thread Jim Collings
Currently I have no unusual interceptors or changes thereto. I've been holding off trying to learn em just yet. First things, first. I'm using the default stack. Jim C. On Thu, May 14, 2009 at 1:34 PM, Musachy Barroso wrote: > Do you have a custom stack interceptor? If the fields are not > pop

Re: convention plug-in question

2009-05-14 Thread Musachy Barroso
Do you have a custom stack interceptor? If the fields are not populated in the action, then the params interceptor is not getting applied, it is hard to say without more details. musachy On Thu, May 14, 2009 at 1:30 PM, Jim Collings wrote: > I have an action with "execute" in the superclass (Act

convention plug-in question

2009-05-14 Thread Jim Collings
I have an action with "execute" in the superclass (ActionSupport) being called by one activity and another method of the same Action called "doSomething" being called by ! notation in a form submit. I've noticed that when I annotate the "doSomething" method with: @Action(results = {...@result(nam

Re: YUI Plugin - parameters in Action are not set

2009-05-14 Thread Jan Rosendahl
I've found some issues. Writing about this will solve the whole thing :-) 1) the argument sent to the action is named 'query' (hard coded) while I assumed it would be taken from the 'name' ( -> product in my case. ( That would be nice to be mentioned in the documentation ( at http://cwiki.apa

[S2] Annotation Validation - string substitution in message

2009-05-14 Thread Norris Shelton
I am using the following annotation for validation: @RequiredStringValidator(key = "required.string.message") I have the following in my globalMessages: required.string.message=${string.name} is required Is there a way to substitute the name of the field or a string that I specify take the place

Re: Struts 2.1.6 Test Examples

2009-05-14 Thread Greg Lindholm
If you just want to test your actions in isolation then the statement is true. In a test case just create a new action object, call the setters, call the execute method, check the results. This simplistic test case really doesn't need examples but it also doesn't really feel like you have fully u

RE: Griffy..

2009-05-14 Thread Martin Gainty
looking for a low cost alternative to Visio i noticed their customer base includes University of Chicago impressive! Martin Gainty __ Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité This message

Re: struts2+spring+hibernate, objects instantiate order?

2009-05-14 Thread Jim Kiley
1) is correct. I can't tell you the number of times that, on app startup, I've gotten reams and reams of error messages because Spring couldn't instantiate some bean or another.2) is both -- which you could determine for yourself pretty easily by putting a logging statement in the action's constru

Re: Griffy..

2009-05-14 Thread Wes Wannemacher
Martin, I don't think it was Ted's project. I think he had just pointed out that Griffy existed. I've actually used it since he pointed it out, it's quite nice and was a better choice for me than buying visio. BTW, it's called Gliffy -> http://www.gliffy.com/ Ted's original observation was that

Re: YUI Plugin - parameters in Action are not set

2009-05-14 Thread Jan Rosendahl
sorry for the mess, Thunderbird scrambled my text a little bit ... Jan - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

YUI Plugin - parameters in Action are not set

2009-05-14 Thread Jan Rosendahl
Hi, I try to use the yui:autocompleter (struts2yuiplugin-0.1-ALPHA-7.jar + jsonplugin-0.33.jar ) Problem: The parameters in my Action class are not set ( by the params interceptor ). Maybe I have to put the params to the action-URL myself ? short extract of my JSP is this: .. <%@ taglib prefi

Re: Struts basic forwards

2009-05-14 Thread Paweł Wielgus
Hi, try Hello notice no white spaces inside Also have You imported html tags in index.jsp? <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> Best greetings, Paweł Wielgus. 2009/5/14 Jesús Gallardo : > Forgive me, you have reason. > > Using urls like: > > http://localhost:8180/Tuto/Sa

Re: Struts basic forwards

2009-05-14 Thread Jesús Gallardo
Forgive me, you have reason. Using urls like: http://localhost:8180/Tuto/SayHello.do http://localhost:8180/Tuto/SayGoodBye.do It show 2 messages the Hello and Goodbye, correctly. The problem occurs in which the index should be 2 links: Hello Adios Logically if I remo

STRUTS2: Problem package.properties and UTF-8

2009-05-14 Thread Marc Eckart
Hi, we are using UTF-8 in out jsp-sites. We have put our texts into the package.properties which is encoded in ISO-8859-1, because properties files should be encoded in the ISO charset as referred in the java api ("The load(InputStream) / store(OutputStream, String) methods work the same way as

Re: Struts basic forwards

2009-05-14 Thread Paweł Wielgus
Hi Jesús, first of all without globalforwards block it should work as well. Then try not to put anything inside those jsp files, maybe something is wrong there. In browser entering address like: http://yourserver/yourapp/SayHello.do should show hello.jsp where yourapp is application context or not

Struts basic forwards

2009-05-14 Thread Jesús Gallardo
Hi for all. Firstly thank you all for reading this email, I hope you can help me, I'm starting with struts. I want to do something as simple as 2 links to pass control to 2 different JPS. as follows. Hello Bye In struts-conf.xml have defined the following action-ma

xml validation

2009-05-14 Thread manub
Hi, I've got two problems with XML validation :( - I'm not able to perform an equality check on two parameters. I've got password and confirmPassword which I try to validate using something like: confirmPassword.equals(password)

Re: problems using tiles with struts 2

2009-05-14 Thread manub
Wes Wannemacher wrote: > > On Tuesday 12 May 2009 11:54:35 am Lukasz Lenart wrote: >> 2009/5/12 manub : >> > Yes, I'm behind a proxy. How to disable that functionality? Thanks in >> > advance. >> >> Sorry, no idea. It's related to Digester itself, try to look in that >> direction. >> >> > > If