problem in file upload

2008-04-09 Thread Rajeev Sharma
Hi All, I am using file upload interceptor to upload a file. I am returning XML response (using result type as stream) to the caller in case of success or failure. Its all fine, if everything works as expected. When I try to upload a file which is bigger then the max allowed size, the file

Re: Struts 2 s:a URL tag problems

2008-04-09 Thread 袁嘉铭
hi try it s:url id=viewURL namespace=/account action=view / s:a href=%{viewURL} View Your Account /s:a My english is not good hope this can help you gordian On Wed, Apr 9, 2008 at 6:00 PM, ancatdubher [EMAIL PROTECTED] wrote: Hi, I use the Struts 2 tag to generate my URLs. For

Struts 2 s:a URL tag problems

2008-04-09 Thread ancatdubher
Hi, I use the Struts 2 tag to generate my URLs. For example to generate the URL /account/view.action, I do: s:url id=viewURL namespace=account action=view / s:a href=%{viewURL} View Your Account /s:a But each click on this URL inserts an extra namespace prefix into the generated URL. I

how to set dynamic name for html:radio

2008-04-09 Thread balaji.m.cs
hi... i am using html:radio tag lib in struts 1.3.5, I am in a requirement that we need to give the names of the html form components dynamically...(ie) if i say html:radio name=feedbackForm property=ratting indexed=true value=1 / html:radio

Re: date conversion

2008-04-09 Thread Alberto A. Flores
Also, consider to inject the format in your IoC container (Guice, Spring, etc). Zoran Avtarovski wrote: We had the same issue and went with writing a new converter (shown below). And then created a xwork-conversion.properties file pointing to it. Z. private final static SimpleDateFormat

Re: problem in file upload

2008-04-09 Thread Jeromy Evans
Rajeev Sharma wrote: When I try to upload a file which is bigger then the max allowed size, the file upload interceptor returns input and the control does not come to the execute method of my action class. In this case I can redirect the result to some JSP, to some other action etc, but how do

Re: Problem with struts in JSP

2008-04-09 Thread Jeromy Evans
This line: s:if test=${marca.claseDeMarca != null} should read: s:if test=%{marca.claseDeMarca != null} The first from instructs the container to evaluate the expression as EL. The second form instructs the tag to evaluate the expression as OGNL. You must be using struts 2.0.10 as the

RE: date conversion

2008-04-09 Thread Brad A Cupit
the static SimpleDateFormat (assuming this code is in an S2 Action that is instantiated per request) is not thread safe. http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html#sy nchronization Brad Cupit Louisiana State University - UIS -Original Message- From: Zoran

Re: date conversion

2008-04-09 Thread Alberto A. Flores
Consider placing the SimpleDateFormat as a local variable (within the method) to avoid non-thread safe operations (guaranteed by the jvm spec). Brad A Cupit wrote: the static SimpleDateFormat (assuming this code is in an S2 Action that is instantiated per request) is not thread safe.

RE: date conversion

2008-04-09 Thread Brad A Cupit
Consider placing the SimpleDateFormat as a local variable exactly right or, consider using a ThreadLocal or, consider using commons-lang's FastDateFormat http://commons.apache.org/lang/api-release/org/apache/commons/lang/time/ FastDateFormat.html Brad Cupit Louisiana State University - UIS

struts.xml

2008-04-09 Thread Ian Meikle
Hi, Can anyone point me to where the seperate sections of the struts.xml file is described ? I am specifically looking at what the valid values in the result type=???/ element are ? Many thanks Ian

Re: struts.xml

2008-04-09 Thread Randy Burgess
All this is linked right from the Core Developers Guide at http://struts.apache.org/2.x/docs/guides.html. Click the result types link and there you go. Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications From: Ian Meikle [EMAIL PROTECTED] Reply-To: Struts Users Mailing

Re: struts.xml

2008-04-09 Thread Ian Meikle
Well this give me some info, but for example it does not explain what all the valid values of the type attribute are and what each value means. Is this documented anywhere ? Regards Ian

Re: struts.xml

2008-04-09 Thread Lukasz Lenart
Well this give me some info, but for example it does not explain what all the valid values of the type attribute are and what each value means. Is this documented anywhere ? Look into the struts2-core.jar and find struts-default.xml, that will give more information, then you can look

Re: problem in file upload

2008-04-09 Thread Rajeev Sharma
Hi Jeromy, Thanks for the help. I tried to do the same thing with an xml file. Instead of using failed.jsp, I returned an xml file failed.xml with some hard coded error message and error code. What if the file upload interceptor returned input for some other reason? I would be returning the

Re: struts.xml

2008-04-09 Thread Martin Gainty
ResultTypes are illustrated here http://struts.apache.org/2.x/docs/result-types.html Is there anything specific you were looking for? Tak/ Martin- - Original Message - From: Ian Meikle [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, April 09, 2008

Re: problem in file upload

2008-04-09 Thread Martin Gainty
If you dont mind using freemarker you can always use exception-interceptor.html http://struts.apache.org/2.x/docs/exception-interceptor.html M-- - Original Message - From: Rajeev Sharma [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, April 09, 2008

Re: date conversion

2008-04-09 Thread Alberto A. Flores
the synchronized is not needed Adam Hardy wrote: Actually I use it in a static method on a utility class, and call SimpleDateFormat inside a synchronized block. Brad A Cupit on 09/04/08 13:51, wrote: Consider placing the SimpleDateFormat as a local variable exactly right or, consider using

Need help getting started with remote tabs

2008-04-09 Thread Jiang, Jane (NIH/NCI) [C]
Is there a complete working example for the tabbedPanel tag? I found this example in the tag reference document. How do I set up the result for AjaxTest.action? I loaded the dynamic contents in that action and directed it to the jsp that displays that content. The action was invoked, but the

Struts2: How to put validation.xml and Action.java in separate folders

2008-04-09 Thread goelshek
For Struts 2: Does anyone know if it is possible to put the validation.xml for an Action in a folder other than where the action resides? If I have a 100 java classes in my action package, I would like their *-validation.xmls to be in a separate folder such that all .java's are together and all

Re: Local Host Error

2008-04-09 Thread Martin Gainty
I hope you have long legs because you're trying to climb 2 very steep mountains simultaneously 1st) subscribe to tomcat-users list..the folks that answer your question eat/live and breathe TC 24/7 http://tomcat.apache.org/lists.html#tomcat-users then of course you'll want to look at getting your

Re: Commons Validator Issue with Collections

2008-04-09 Thread Laurie Harper
Neither Commons Validator nor Struts knows how to process XML requests like that out of the box. Assuming Struts 1, the answer is that you will have to write your own logic to populate the form bean from the XML request, after which validation can be performed the same as you would with a

Re: Preparable Question

2008-04-09 Thread Laurie Harper
manishbel wrote: Hello, I am trying to use the Preparable but having some problems while the page is being rendered. I will try my best to explain the problem, please ask if you need more information as i might not be able to accurately explain the problem as i am pretty new to struts2.

Re: Struts2: How to put validation.xml and Action.java in separate folders

2008-04-09 Thread Laurie Harper
goelshek wrote: For Struts 2: Does anyone know if it is possible to put the validation.xml for an Action in a folder other than where the action resides? If I have a 100 java classes in my action package, I would like their *-validation.xmls to be in a separate folder such that all .java's are

Re: Struts2: How to put validation.xml and Action.java in separate folders

2008-04-09 Thread goelshek
as your build process copies them to the right place on the classpath. I don't think there's a way to have them in a different folder than the .class files though I don't really have a formal build process for now. So what's in my /WEB-INF/src folder is going to be in my /WEB-INF/classes folder

Re: i18n Tags in FreeMarker Decorator for SiteMesh

2008-04-09 Thread Jeromy Evans
Hi Matt, is it only the @s.text tag that isn't working? eg. is @s.property working? I've suspected there's a problem with the text tag and i18n tag not finding some resource bundles in the S2.1.1 branch but haven't had a chance to investigate. There's several related issues in JIRA and I

Most popular classes to be used in Struts

2008-04-09 Thread Sam Wun
Hi, What are the most popular classes to be used in Struts? Thanks __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

S2 Textfield tag date formatting

2008-04-09 Thread Steve Akins
I'm trying to use a textfield tag for date input. I need to format this in the form dd/MM/ HH:mm:ss The teaxtfield tag formats the date to a Locale based format DateFormat.SHORT via XWorkBasicConverter. For my locale this turns out to be dd/MM/yy. This is not the format I want.

Re: i18n Tags in FreeMarker Decorator for SiteMesh

2008-04-09 Thread mraible
I tried [EMAIL PROTECTED] value=text('key')/] and that doesn't seem to work either. I don't have a struts.xml or struts.properties in my project. I tried putting the i18n bundle in all packages using it at the Action level (ActionName.properties), but that didn't work either. Creating a

Re: i18n Tags in FreeMarker Decorator for SiteMesh

2008-04-09 Thread Jeromy Evans
mraible wrote: I tried [EMAIL PROTECTED] value=text('key')/] I've already found that in 2.0.x this OGNL expression executed getText(String) but in 2.1.x it only matches the method text(String). I'm not sure when that changed in the OGNL implementation, but the new form seems correct as it's

How to open a page in new window with s:a or s:url tag?

2008-04-09 Thread Mohiit
I am using Struts 2. I want to open the page in the new window when I click on an icon. I am using s:a tag and giving action by s:url tag. i.e., s:url id='abc' action='xyz',/s:url s:a href='%{abc}'/s:a This way it is opening an action in same page. I want it in the new window like in HTML

Using jsp tag in Value attribute of textfield tag in Struts2

2008-04-09 Thread Tauri Valor
Hi Is there a way to include value for textfield tag in struts2 , Im trying the following : tds:textfield name=firstName label=*First Name size=15 value=%=freshUser.getFirstName() %//td But I get tld error.. Please let me know how I could use jsp tag in the textfield tag, or let me