Re: Any validation flag available to the action code?

2009-05-20 Thread Lukasz Lenart
2009/5/19 Qunhuan Mei q...@qm18.wanadoo.co.uk: When Struts validation is in place, the java action code appears to run fully twice by default. What you mean by that? The method execute() is called twice? Is there a flag or variable as such available? As I know nope, it's simply not needed.

Re: customize fielderror

2009-05-20 Thread manub
Yes. s:fielderror renders also ul and li tag, and I don't need them. I'm in need of a way to showing only the errors for a specific field without having any HTML tag (I need only the plain text). newton.dave wrote: manub wrote: I used the iterator trick described before and it works,

Re: passing form parameters to a custom validator

2009-05-20 Thread Lukasz Lenart
2009/5/19 manub e.bla...@reply.it: I'm trying to write a custom field validator which needs other fields to validate the field I need to validate. How can I pass field values (and not static params) to a field validator in the validation xml? I'm using Struts 2.1.6. Did you try

Re: passing form parameters to a custom validator

2009-05-20 Thread manub
Yes, I did. But in the action the string takes the value ${field} and not the field value. Lukasz Lenart wrote: 2009/5/19 manub e.bla...@reply.it: I'm trying to write a custom field validator which needs other fields to validate the field I need to validate. How can I pass field values

Re: passing form parameters to a custom validator

2009-05-20 Thread Lukasz Lenart
2009/5/20 manub e.bla...@reply.it: Yes, I did. But in the action the string takes the value ${field} and not the field value. Frankly, I don't understand, are you trying to pass data from validator xml configuration to action? Regards -- Lukasz http://www.lenart.org.pl/

Re: Problem with xwork convertor

2009-05-20 Thread Ikya Technical
Thanks. It worked. Regards, Sreekanth On Wed, May 20, 2009 at 11:22 AM, Wes Wannemacher w...@wantii.com wrote: It might be easier to grab the most recent snapshot builds from here - http://people.apache.org/builds/struts/nightlies/2.x/ Give them a try, they should include all of the

Re: passing form parameters to a custom validator

2009-05-20 Thread manub
Lukasz Lenart wrote: Frankly, I don't understand, are you trying to pass data from validator xml configuration to action? I've written a custom field validator, which needs other field values to validate his field. I need a way to pass that values to that field validator. -- View this

Re: passing form parameters to a custom validator

2009-05-20 Thread Lukasz Lenart
2009/5/20 manub e.bla...@reply.it: I've written a custom field validator, which needs other field values to validate his field. I need a way to pass that values to that field validator. Did you try to use param tag as below? field name=employee.employeeType field-validator type=expression

RE: Any validation flag available to the action code?

2009-05-20 Thread Qunhuan Mei
Lukasz, Thanks for your reply. I left some code in action code constructor by mistake. Sorry for causing the confusion. Have a nice day! Qunhuan -Original Message- From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com] Sent: 2009年5月20日 7:55 To: Struts Users Mailing List Subject: Re:

Re: upload and store img

2009-05-20 Thread Stefano Tranquillini
hi, i've tried with db but is complex, i've do in this way: using the inteceptior of struts and the tag s:file in jsp private String saveFile(File file, String savePath, String fileName) { fileName = fileName.replace(' ', '_'); File dirPath = new File(savePath); if

Block accessing in some path with filter.

2009-05-20 Thread Stefano Tranquillini
Hi all. i need to block the path /admin/ for all the pepole. only the people logged in as root can access it. i've done a filter, but struts seems to dosen't works with its filter filter-namestruts2/filter-name

Re: customize fielderror

2009-05-20 Thread Dave Newton
manub wrote: Yes. s:fielderror renders also ul and li tag, and I don't need them. I'm in need of a way to showing only the errors for a specific field without having any HTML tag (I need only the plain text). You'd either need to create/extend/modify the theme, use CSS, or just do it

Re:Re: Struts2+ReST-plugin prolems need help!!!

2009-05-20 Thread xnpeng
Hi Dave! I'm using Struts2.1.6 and struts2-rest-plugin-2.1.6. first ,I need a global error page when exception happen like this: Stacktraces java.lang.NoSuchMethodException: com.xunan.sitexa.rest.MainController.a() java.lang.Class.getMethod(Unknown Source)

Re: Block accessing in some path with filter.

2009-05-20 Thread Andy Sykes
Put the mapping for the admin filter above the struts2 filter. Filters are invoked in the order in web.xml, first to last. The struts filter is catching the request first and dispatching it before it ever reaches the admin filter. On 20 May 2009, at 09:37, Stefano Tranquillini wrote: Hi

RE: JSON plugin class loading problem? (Part Deux)

2009-05-20 Thread Martin Gainty
he must be passing in JSONResult in one of the params to Action can we see web.xml struts.xml and struts-default.xml and struts-config.xml please display ALL xml files for your project thanks, Martin Gainty __ Jogi és Bizalmassági

Re: Block accessing in some path with filter.

2009-05-20 Thread Stefano Tranquillini
now is taked. but i've some problem with the dispacer. i've an action mapped in this way: action name=denied result type=tilesdenied/result /action namespace is / if i manually put in this url: http://localhost:8080//WAP-Shop-war/denied.action its WORKS. the filter,

struts2 on jboss java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable

2009-05-20 Thread Daniele Del Gaudio
of virus signature database 4090 (20090520) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h

RE: Struts2+ReST-plugin prolems need help!!!

2009-05-20 Thread Martin Gainty
let the StrutsDispatcher handle the navigation details you'll have to fill in any necessary java classes as well as input/output jsps but the basic structure is outlined in struts.xml illustrated below Martin Gainty __ Verzicht und

Re: Block accessing in some path with filter.

2009-05-20 Thread Andy Sykes
You need to include dispatcher elements in your filter mappings for the Struts filter. eg. filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern dispatcherREQUEST/dispatcher dispatcherFORWARD/dispatcher /filter-mapping With no dispatcher

RE: struts2 on jboss java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable

2009-05-20 Thread Martin Gainty
result type=tiles tiles.InsPianificPM/result /action /package /struts Thanks, daniele __ Information from ESET NOD32 Antivirus, version of virus signature database 4090 (20090520) __ The message was checked by ESET NOD32

Re: struts2 on jboss java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable

2009-05-20 Thread Daniele Del Gaudio
, daniele __ Information from ESET NOD32 Antivirus, version of virus signature database 4090 (20090520) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com - To unsubscribe, e-mail: user

Re: Multiple set of templates

2009-05-20 Thread Germán Castro
Hi, I found this s:set name=templateSuffix value='ftk' / or s:set name=templateDir value='template' scope=page / Is it posible do the same but with java code in a filter or controller? Thanks Germán On Fri, May 15, 2009 at 5:15 PM, Germán Castro german.cas...@nuwit.comwrote: Hi,

RE: Accessing protected resources via a login page

2009-05-20 Thread Steve
Thanks to Stuart, Lukasz and Wes for your advice. I decided to stick with a home-grown solution because I'm only interested in GET's right now and I don't want the complexity of adding Spring into the mix with EJB3, Struts and JPA already working well together. This is because I haven't used

Re: problems upgrading from struts 2.0 to 2.1

2009-05-20 Thread Musachy Barroso
are you using the REST plugin? I can't think of anything else that would add that .xhtml extension. musachy On Wed, May 20, 2009 at 11:48 AM, akoo ogen...@yahoo.com wrote: Hi guys, I am having some strange issues trying to upgrade from struts 2.0 to 2.1. I have this simple login form

Re: Accessing protected resources via a login page

2009-05-20 Thread Stuart Ellidge
Hi Steve, Glad to hear you got it working - just as an observation (and I really haven't tested this to check, so it is a question), but would HttpServletRequest.getQueryString() not have provided you with the original parameters? So a combination of both getRequestURL and getQueryString could

RE: struts2 on jboss java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable

2009-05-20 Thread Jon Pearson
result type=tiles tiles.InsPianificPM/result /action /package /struts Thanks, daniele __ Information from ESET NOD32 Antivirus, version of virus signature database 4090 (20090520) __ The message

RE: struts2 on jboss java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable

2009-05-20 Thread Jon Pearson
tiles.InsPianificPM/result /action /package /struts Thanks, daniele __ Information from ESET NOD32 Antivirus, version of virus signature database 4090 (20090520) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com

problems upgrading from struts 2.0 to 2.1

2009-05-20 Thread akoo
Hi guys, I am having some strange issues trying to upgrade from struts 2.0 to 2.1. I have this simple login form html headtitleSimple jsp page/title/head body s:form action=Login theme=simple method=post table tr tdUsername/td tds:textfield

RE: struts2 on jboss java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable

2009-05-20 Thread Jon Pearson
(20090520) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h

Re:RE: Struts2+ReST-plugin prolems need help!!!

2009-05-20 Thread xnpeng
Hi Martin, don't know howto do it. can you please give me some detailed materials? 在2009-05-20,Martin Gainty mgai...@hotmail.com 写道: let the StrutsDispatcher handle the navigation details you'll have to fill in any necessary java classes as well as input/output jsps but the basic

IllegalStateException: Cannot forward. Response already committed.

2009-05-20 Thread Hermann X Lau
Thanks in advance for any help on this... I understand we get this exception when the JSP attempts to write to the print stream after the response has been committed but I don't see how this is occurring in my situation since my JSP just contains a simple forward. Index.jsp %@ taglib

Re: IllegalStateException: Cannot forward. Response already committed.

2009-05-20 Thread Wes Wannemacher
The JSP compiler simple turns those % % tags inside out and everything outside of those tags is a string with an out.print... In your case, the first two things in the file generate returns... Whitespace is significant... Let me see if I can make it visually more understandable Index.jsp %@

Re: IllegalStateException: Cannot forward. Response already committed.

2009-05-20 Thread Dale Newfield
Sorry to hijack this thread, but it looks like Wes has already given you a pretty complete answer. At first I thought you were going to be asking about this: http://wiki.glassfish.java.net/Wiki.jsp?page=FaqWebAppUnableToSetRequestCharEncoding I get a warning in my glassfish logs for pretty

retrieving data from form that has unknown (changing) number of fields

2009-05-20 Thread Bhaarat Sharma
hi I have a form that will have varying number of fields inside it. The number of fields is generated dynamically and is not always the same. When I am submitting this form to my action class, is there a way to get all the fields back in a systematic manner? Does struts2 provide any mechanism

Re: retrieving data from form that has unknown (changing) number of fields

2009-05-20 Thread Wes Wannemacher
On Wednesday 20 May 2009 11:25:50 pm Bhaarat Sharma wrote: hi I have a form that will have varying number of fields inside it. The number of fields is generated dynamically and is not always the same. When I am submitting this form to my action class, is there a way to get all the fields