Re: concatenate Strings in tag attributes

2007-11-19 Thread Anton Pussep
> value="%{'/jsp/'+#parameters.file[0]}" I thought I tried that one out already, but apparently I remembered wrong, since it really works, which is great! Anyway, for my part this is very inconvenient. Also I don't know a way to pass an array to request parameters. Thus IMHO there should be a m

Re: concatenate Strings in tag attributes

2007-11-18 Thread Anton Pussep
JIRA for a known problem > and resort to something more reliable like calling a static method > > > > Hope that helps, > Jeromy Evans > > PS: s:text evaluates the name attribute as a string,whereas s:set > evaluates the value attribute as an object. This accounts for t

Re: concatenate Strings in tag attributes

2007-11-18 Thread Anton Pussep
Results in the same as which means that a remains unset. Same for: Best, Anton Saul Qunming Yuan wrote: > Hi > > You may want to try the following to set variable "a": > > > > > > just a thought. > > Saul > > Anton Pussep

concatenate Strings in tag attributes

2007-11-18 Thread Anton Pussep
Hello, I am trying to concatenate strings in tag attributes and get results that I don't understand: prints out "/jsp/test.jsp", whereas prints out "/jsp/[Ljava.lang.String;@1bd2184", same for whereas the following does not work: What is the way to concatenate strings in the set tag a

Re: Struts 2, file tag, accept attribute not working?

2007-11-03 Thread Anton Pussep
this.contentType = contentType; > * } > * > * public void setUploadFileName(String filename) { > * this.filename = filename; > * } > * > * ... > * } > * > * > * > */ > public class FileUploadInterceptor extends Abstr

Re: Struts 2, file tag, accept attribute not working?

2007-11-02 Thread Anton Pussep
There is no s:head tag, since I am not using Ajax. Thus it should be the default xhtml. Best, Anton Martin Gainty wrote: > Hi Anton > > which theme is specified in your s:head tag? > > Martin- > - Original Message ----- > From: "Anton Pussep" <[EMAIL

Struts 2, file tag, accept attribute not working?

2007-11-02 Thread Anton Pussep
Hello, I am using the following tag for uploading text files: I expected it to recognise wrong content types, but it accepts any files I upload. What might be the problem here? I tried this with Struts 2.0.9 and 2.0.11. Best, Anton --

Own TextProvider implementation for validation

2007-10-03 Thread Anton Pussep
I would like to use an own i18n system with the validation provided by Struts 2 and XWork 2. The action-validation.xml will contain keys as messages and those keys should be used in order to retrieve the messages from my i18n system. There seems to be a TextProvider interface, thus I could probably

Re: Login implementation, how to forward user to original destination?

2007-10-01 Thread Anton Pussep
requests (yes -- the > actual request object) is stored in the session when the user's credentials > are challenged. If they then succeed at the login page, the original request > is taken from the session and forwarded along. > > Paul > > On 9/30/07, Anton Pussep &l

Login implementation, how to forward user to original destination?

2007-09-30 Thread Anton Pussep
I spent quite a few hours today trying to forward the user to his original destination when he has to login in between. I have an interceptor (Authentication) that is called before an action and it forwards to Login.action if the user is not logged in. The problem is that if Login.action returns S

Stop Struts 2 from adding request parameters to all links?

2007-07-26 Thread Anton Pussep
When I call a page or action with a request parameter (like "index.jsp?param=xyz") then Struts seems to automatically add it to all links on the page. In my case I have a parameter that should not be added to any links, it should just be set for this one page/action call. Is there a way to do that?

Re: Can Tiles provide highly configurable UI?

2007-07-25 Thread Anton Pussep
> Antonio > > > 2007/7/25, Anton Pussep <[EMAIL PROTECTED]>: >> My company started to implement a framework that will allow us to build >> up highly customizable layouts, based on components, >> description/configuration files and parameters. The objective is

Can Tiles provide highly configurable UI?

2007-07-25 Thread Anton Pussep
My company started to implement a framework that will allow us to build up highly customizable layouts, based on components, description/configuration files and parameters. The objective is it to allow every customer to have an own layout, such that we can make our service appear in the same layout

Re: Adding global-exception-mappings tag to struts.xml causes SAXParseException

2007-07-03 Thread Anton Pussep
> The DTD warning is giving you the expected *order* of > elements. Aha, good to know. =) Yes, it works perfectly fine. Thanks a lot! Best, Anton signature.asc Description: OpenPGP digital signature

Adding global-exception-mappings tag to struts.xml causes SAXParseException

2007-07-03 Thread Anton Pussep
Hello, I created a very simple application in order to test exception handling. Unfortunately when I add a global-exception-mappings tag to my struts.xml (see file below) the application is not even deployed anymore, and here is what Tomcat complains about: The content of element type "package" m

Re: How to avoid users changing values of hidden fields using the URL?

2007-06-29 Thread Anton Pussep
Thanks Jeff and Gorka for the competent (and fast) replies! > if you are using Struts there is a transparent solution > for that: HDIV It sound very interesting. I will sure have a closer look at it. Thanks for the great reference! > The rule of web applications (heck...all multi-tiered apps) is

Design patterns, additional output in JSP if action wants so

2007-06-28 Thread Anton Pussep
Hello, I am wondering what a nice design pattern would be for a JSP that shall display an additional form if the action wants so (and not display it at all if not). I think that it is a bad solution to have a parameter "displayForm" that is set by the action, because the action should not know an

How to avoid users changing values of hidden fields using the URL?

2007-06-28 Thread Anton Pussep
Hello, I am not sure how to deal with the problem that a user can pass own parameter values to the action class by changing the URL if there are setters provided. For example I often have a hidden field in a form that stores the ID and the action class provides a getter and a setter. But the user

Re: Method prefix with additional parameters

2007-06-12 Thread Anton Pussep
Sorry for the annoyance, I found the answer myself by trying a thing I never expected to work. I just encapsulated a param-tag with the submit-tag and it worked... Nice! Thanks and sorry for the unnecessary request, Anton Anton Pussep wrote: > Hello, > > I am using method prefix in or

Method prefix with additional parameters

2007-06-12 Thread Anton Pussep
Hello, I am using method prefix in order to be able to forward the form content to different methods in my action class. Now I need several buttons that call all the same method, but a parameter shall tell the method what to do (e.g. which entry to delete in an ArrayList). Is there a way to pass a

Re: sort entries by the selected tag

2007-06-11 Thread Anton Pussep
riate Comparator implementation and using it in the > constructor for the TreeMap. > > I've done this because imho your view should just be about presentation, and > the logic for determining and implementing your sort should be in your > action. > > -Original Message- >

Re: In a merged iterator, know which iterator current item belongs

2007-06-10 Thread Anton Pussep
>> but now I need to know to which iterator the >> currently processed entry belongs to, since they >> have to be treated differently. > > Are the items of the same type? > > If so, I'm not sure what you can do. > In this case numbers is of type double[] and operators is of type String[]. Woul

In a merged iterator, know which iterator current item belongs

2007-06-10 Thread Anton Pussep
Hello, I want to successively call several iterators. This works perfectly fine with a merged iterator, but now I need to know to which iterator the currently processed entry belongs to, since they have to be treated differently. See the small example below that illustrates my intention. Currentl

sort entries by the selected tag

2007-06-10 Thread Anton Pussep
Hello, I would like to sort the menu created by the selected tag. So far I just pass a TreeMap where the entries are sorted already. However, I think that the View should decide whether to sort or not to sort, but I could not find a way to force the selected tag to sort. Is there anything you can

Exchange data between two actions

2007-06-07 Thread Anton Pussep
I would like to exchange data between two actions, say A and B. Currently I just store the String in the session, but is there probably a nicer way? When A returns SUCCESS the client is redirected to the action B (see struts.xml below). Now I would like A to pass a String to B. I don't like storin