Problem with Action-validation.xml files

2008-12-11 Thread taj uddin
Hi,    In my application, I have added Action-validation.xml file and in the jsp page I set the attribute validate="true" in the s:form tag. After starting the server when i run the application this is the error( shown below) i'm facing. 12:16:21,462 ERROR [UIBean   

How to use s:if

2008-12-11 Thread Juergen.Leeb
Hi, I don' t know who to use the s:if tag I want to call a action with a parameter: i.e. http:/appsever:8080/myapp/showaction?all=true in my jsp I want to use the s:if to display different strings i.e. all is set all is not set But how to write the test con

[Struts2] protecting resources via Actions

2008-12-11 Thread Lyallex
Hi Experts I have an application that supports a number of roles including staff and manager I have a resource (/secure/staff/staff.jsp) that is protected by a security constraint in web.xml ... ... /secure/staff/*

Re: How to use s:if

2008-12-11 Thread Lukasz Lenart
2008/12/11 <[EMAIL PROTECTED]>: > http:/appsever:8080/myapp/showaction?all=true > in my jsp I want to use the s:if to display different strings > i.e. > > ... > But how to write the test condition? Check with docs [1], it should be > By the way. What does the % in a condition like %{test} > An

Re: [Struts2] protecting resources via Actions

2008-12-11 Thread Lyallex
2008/12/11 Lyallex <[EMAIL PROTECTED]>: > Hi Experts > > I have an application that supports a number of roles including staff > and manager Er, apologies for this ... another google search has uncovered http://struts.apache.org/2.0.14/struts2-core/apidocs/org/apache/struts2/interceptor/RolesInter

AW: How to use s:if

2008-12-11 Thread Juergen.Leeb
Thanks for your help! But doesn' t work neither. The else part is displayed everytime. -Ursprüngliche Nachricht- Von: Lukasz Lenart [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Dezember 2008 10:27 An: Struts Users Mailing List Betreff: Re: How to use s:if 2008/12/11 <[EMAIL

Re: How to use s:if

2008-12-11 Thread Dirk Forchel
First of all I recommend reading a tutorial about Struts2 and OGNL. but to answer your questions, you have to add a form property to your POJO action class (don't miss the getter and setter methods) first: public class ShowAction extends ActionSupport { public boolean all = false; public void s

Re: cannot be greater than null characters

2008-12-11 Thread m.harig
i did it . but no changes still am getting the same -- View this message in context: http://www.nabble.com/cannot-be-greater-than-null-characters-tp20950855p20952645.html Sent from the Struts - User mailing list archive at Nabble.com. --

initialise a form file

2008-12-11 Thread elyes sallem
Hello, in a form, a define a

Re: initialise a form file

2008-12-11 Thread Andras Balogh
Hi, A HTML input of type file can't have a default value. This is a security issue. BR, Andras elyes sallem wrote: Hello, in a form, a define a - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

Re: initialise a form file

2008-12-11 Thread Robert Graf-Waczenski
Hi, short answer: This is not possible. This restriction is not imposed by Struts but is instead due to a restriction of the html tag, for which the value can not be prefilled or changed programmatically. In our app we therefore have the pattern that when a file is currently already uploaded

AW: How to use s:if

2008-12-11 Thread Juergen.Leeb
Thanks for the good explanation! Now it works. -Ursprüngliche Nachricht- Von: Dirk Forchel [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. Dezember 2008 10:49 An: user@struts.apache.org Betreff: Re: How to use s:if First of all I recommend reading a tutorial about Struts2 and OGNL. b

Re: [S2] Struts + JasperReports (iReport) - setting connection

2008-12-11 Thread Milan Milanovic
No one knows how to set-up Jasper report connection for this kind integration with Struts 2 ? -- M. Milan Milanovic wrote: > > Hi, > > I'm following this tutorial for integrating JasperReports in Struts app: > http://struts.apache.org/2.0.14/docs/jasperreports-tutorial.html > http://struts.a

Re: initialise a form file

2008-12-11 Thread elyes sallem
OK, thanks for your response if i understood well, there is no way to initialize the displayed path (the problem is that the client want a default value, which must be display and if the client make sumbmit i must make trt with it) furthermore ,in the trt, i want the absolute path which i give as p

compatibility between struts and java versions

2008-12-11 Thread pierre betz
Hi everybody, I'm new to the struts community, and today I've a project to develop using struts. As I have to use the jave *jre 1.3.1_02* , I would like to know if the version* 1.3.8 * of struts is working with this version of java ? And, if not, which struts version should I use ? Thanks for the

Re: compatibility between struts and java versions

2008-12-11 Thread elyes sallem
i recommend you the 1.5 version Regards Elyes 2008/12/11 pierre betz <[EMAIL PROTECTED]> > Hi everybody, > I'm new to the struts community, and today I've a project to develop using > struts. > > As I have to use the jave *jre 1.3.1_02* , > > I would like to know if the version* 1.3.8 * of stru

Re: compatibility between struts and java versions

2008-12-11 Thread pierre betz
thanks a lot for your answer ! 2008/12/11 elyes sallem <[EMAIL PROTECTED]> > i recommend you the 1.5 version > > Regards > Elyes > > > 2008/12/11 pierre betz <[EMAIL PROTECTED]> > > > Hi everybody, > > I'm new to the struts community, and today I've a project to develop > using > > struts. > > >

Re: initialise a form file

2008-12-11 Thread Robert Graf-Waczenski
No, the absolute path is not available and also completely irrelevant to a web application because the absolute path as seen by the client who uploaded the file may or may not be the same to another client who looks at the uploaded data. Again, this is due to how file uploads via HTTP work. The

Re: compatibility between struts and java versions

2008-12-11 Thread Nils-Helge Garli Hegvik
You can find the requirements here: http://struts.apache.org/1.3.8/userGuide/installation.html Nils-H On Thu, Dec 11, 2008 at 12:37 PM, pierre betz <[EMAIL PROTECTED]> wrote: > Hi everybody, > I'm new to the struts community, and today I've a project to develop using > struts. > > As I have to us

Re: [S2] Struts + JasperReports (iReport) - setting connection

2008-12-11 Thread Dave Newton
--- On Thu, 12/11/08, Milan Milanovic wrote: > No one knows how to set-up Jasper report connection for this > kind integration with Struts 2 ? You've gotta have a little more patience. I'll see how my report is configured, but I don't recall anything about a factory in the report itself; I though

[S2] Displaying custom 403 Error Code page

2008-12-11 Thread Lyallex
Hi I have the following configuration in web.xml 403 /403Forbidden.jsp In my action intervener /secure/staff/intervener/manageInterventions.jsp /friendlyError.jsp If I log in with intervener role then I can access the

Re: initialise a form file

2008-12-11 Thread Dave Newton
--- On Thu, 12/11/08, Robert Graf-Waczenski wrote: > No, the absolute path is not available and also completely > irrelevant to a web application because the absolute path > as seen by the client who uploaded the file may or may not > be the same to another client who looks at the uploaded data.

Re: How to use s:if

2008-12-11 Thread Lukasz Lenart
2008/12/11 <[EMAIL PROTECTED]>: > But doesn' t work neither. > > The else part is displayed everytime. You can try something like this Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: compatibility between struts and java versions

2008-12-11 Thread Gustavo Felisberto
Acording to SUN even the 1.3.1_24 is no longer supported on most platforms. Only on solaris 8 there may be support http://java.sun.com/j2se/1.3/download.html If you'll use tomcat it will have to be a very old unsupported 5.0 version. You are going to have lots of problems running anything on such

Re: [S2] Struts + JasperReports (iReport) - setting connection

2008-12-11 Thread Milan Milanovic
Dear Dave, O.K. Thank you. When Jasper report is designed I need to set datasource for it and for every type of data source I need to fill those elements (data source class, method which return data source elements, etc.). There is no such things explained in Struts 2 JasperReports Tutorial. --

Re: [S2] Struts + JasperReports (iReport) - setting connection

2008-12-11 Thread Dave Newton
--- On Thu, 12/11/08, Milan Milanovic wrote: > O.K. Thank you. When Jasper report is designed I need to > set datasource for it and for every type of data source > I need to fill those elements (data source class, method > which return data source elements, etc.). There is no > such things explai

Re: [S2] Struts + JasperReports (iReport) - setting connection

2008-12-11 Thread Milan Milanovic
Dear Dave, it would be great if you can, because I'm just not sure what to set up in Jasper for datasource in this case, because it have more than 10 possible data sources to set. Is it JavaBeans set data source where I need to set Factory class and static method to call to retrieve array of the

Validation throwing IllegalArgumentException

2008-12-11 Thread DavidCAIT
I am using Struts 2 with the XML based validation and it is throwing the following exception: info: CORE3282: stdout: ERROR - ValidatorFactory.parseValidators(335) | Unable to load file:C:/Projects/test/webapps/default/WEB-INF/classes info: CORE3282: stdout: java.lang.IllegalArgumentException: UR

Problem with tree tag (event selected)

2008-12-11 Thread Juanjo Cuadrado
Hi, I'm working with s:tree tag, but it not working for me. I have this code in my jsp ... dojo.even.topic.subscribe("treeSelected", function(e){ alert("The id is:" + e.node.widgetId); }); ...

Re: Problem with tree tag (event selected)

2008-12-11 Thread Juanjo Cuadrado
Sorry... I'm using Struts 2.0.11.2 2008/12/11 Juanjo Cuadrado <[EMAIL PROTECTED]> > Hi, > > I'm working with s:tree tag, but it not working for me. > > I have this code in my jsp > > ... > > dojo.even.topic.subscribe("treeSelected", function(e){ > alert("The

RE: Validation throwing IllegalArgumentException

2008-12-11 Thread Martin Gainty
the call to getResources with null resourceName is causing this error referencing the javadoc for rev 117 located@ http://www.opensymphony.com/xwork/api/ getResources public static Iterator getResources(String resourceName, Class callingClass,

[S2] Locating a file or resource in Web application (classpath issue)

2008-12-11 Thread Milan Milanovic
Hi, I have S2 application where my project is Web-tools 2.0 project, in Eclipse 3.3. My application is deployed with Tomcat 5.5. Well, I have problem with locating my resource files from my action classes when my application is deployed on Tomcat or in test. For example, even if I put some file

RE: Validation throwing IllegalArgumentException

2008-12-11 Thread Dave Newton
--- On Thu, 12/11/08, Martin Gainty wrote: > so deploying from Struts 2.1.3.GA will fix this > error..please let us know if this is not the case There is no 2.1.3GA yet. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

javax.servlet.jsp.JspException at org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:164)

2008-12-11 Thread sabriz naduvilothi
Hi I am getting this error on my oracle application server 10.1.2.I am using struts javax.servlet.jsp.JspException at org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:164) at _drlmEditProfileSelect._jspService(_drlmEditProfileSelect.java:66) [SRC:/drl

[OT] Re: [S2] Locating a file or resource in Web application (classpath issue)

2008-12-11 Thread Dave Newton
--- On Thu, 12/11/08, Milan Milanovic wrote: > If I try to say e.g.: > PropertiesConfiguration config = new > PropertiesConfiguration("/WEB-INF/users.properties"); You're assuming path names are magically converted into web-app-relative paths inside a web application; this isn't the case. No

Re: javax.servlet.jsp.JspException at org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:164)

2008-12-11 Thread Dave Newton
... It might be helpful to include the portion of the JSP that's generating the error. Dave --- On Thu, 12/11/08, sabriz naduvilothi <[EMAIL PROTECTED]> wrote: > From: sabriz naduvilothi <[EMAIL PROTECTED]> > Subject: javax.servlet.jsp.JspException at > org.apache.struts.taglib.template.Inse

Re: javax.servlet.jsp.JspException at org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:164)

2008-12-11 Thread sabriz naduvilothi
Hi This is the jsp i am using. <%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %> The fact is I cannot change from *templates* to *tiles* as this is a huge application running for a GOVT company in the US Any pointes would be appreciated. The actual error

How to secure which HTTP parameters should be graphed onto model

2008-12-11 Thread stanlick
I am aware that OGNL will convert incoming parameters and apply them to the business model in my action. However, I would like to leverage role based permissions so that only authorized parameters are processed. What is the prescribed solution for this? Scott -- View this message in context:

S1: interceptor plugin

2008-12-11 Thread farmer2008
Hi, http://struts.sourceforge.net/saif/index.html SAIF says it only supports struts 1.1 but in its requirements section it says it requires struts 1.1 or greater. I tried using it in struts 1.3.5 but failed. Has anyone use the plugin in struts 1.3.5? I'm using struts 1.3.5. Is there any other i

Re: S1: interceptor plugin

2008-12-11 Thread Dave Newton
--- On Thu, 12/11/08, farmer2008 wrote: > http://struts.sourceforge.net/saif/index.html SAIF says it > only supports struts 1.1 but in its requirements section it > says it requires struts 1.1 or greater. I tried using it in > struts 1.3.5 but failed. Has anyone use the plugin in struts 1.3.5?

Re: How to secure which HTTP parameters should be graphed onto model

2008-12-11 Thread Musachy Barroso
You can use ParameterNameAware. The params interceptor has ways to block/allow parameters based on regular expressions also. musachy On Thu, Dec 11, 2008 at 1:33 PM, stanlick wrote: > > I am aware that OGNL will convert incoming parameters and apply them to the > business model in my action. Ho

[S2] modifying parameters before they are set on the action?

2008-12-11 Thread James Carr
Hi All, I want to write an interceptor for some of my actions. These actions have values that are set on an object graph (i.e. request.configuration.hosts.ip) that I would like to have a more shorthand version. In other words, I'd like to have "id" map to "request.configuration.hosts.ip" and reset

Re: [OT] Re: [S2] Locating a file or resource in Web application (classpath issue)

2008-12-11 Thread Milan Milanovic
O.K. Thanks. When I deploy application to local Tomcat from my Eclipse environment it don't use WAR, but if I want to run my app on server's Tomcat I'll need to have application in war, isn't it ? -- M. newton.dave wrote: > > --- On Thu, 12/11/08, Milan Milanovic wrote: >> If I try to say e.g

Re: [S2] modifying parameters before they are set on the action?

2008-12-11 Thread Dave Newton
--- On Thu, 12/11/08, James Carr wrote: > I want to write an interceptor for some of my actions. > These actions have values that are set on an object graph > (i.e. request.configuration.hosts.ip) that I would like to > have a more shorthand version. In other words, I'd like to > have "id" map to

Re: [OT] Re: [S2] Locating a file or resource in Web application (classpath issue)

2008-12-11 Thread Dave Newton
--- On Thu, 12/11/08, Milan Milanovic wrote: > When I deploy application to local Tomcat from my Eclipse > environment it don't use WAR, but if I want to run my app > on server's Tomcat I'll need to have application in war, > isn't it ? Perhaps unsurprisingly, I am unfamiliar with your deploymen

Re: [S2] modifying parameters before they are set on the action?

2008-12-11 Thread Musachy Barroso
If you really need to do that, look at the AliasInterceptor, it does exactly that. musachy On Thu, Dec 11, 2008 at 2:09 PM, Dave Newton wrote: > --- On Thu, 12/11/08, James Carr wrote: >> I want to write an interceptor for some of my actions. >> These actions have values that are set on an objec

Re: [S2] modifying parameters before they are set on the action?

2008-12-11 Thread Dave Newton
--- On Thu, 12/11/08, Musachy Barroso wrote: > If you really need to do that, look at the AliasInterceptor, > it does exactly that. Does that work on anything, or just stuff on the stack? I thought I had tried that once and it didn't work for me. Maybe it was a stack ordering thing? Hmm... now I

Re: [OT] Re: [S2] Locating a file or resource in Web application (classpath issue)

2008-12-11 Thread Milan Milanovic
O.K. So, I supose that you are familiar with Tomcat server ? Do you maybe know how can I set up some files to classpath that I'll can get in my S2 application deployed to Tomcat ? -- Thx, M. newton.dave wrote: > > --- On Thu, 12/11/08, Milan Milanovic wrote: >> When I deploy application to lo

Re: [S2] modifying parameters before they are set on the action?

2008-12-11 Thread Musachy Barroso
Just with things on the stack I guess. I have never used it, but the code looks straightforward. musachy On Thu, Dec 11, 2008 at 2:13 PM, Dave Newton wrote: > --- On Thu, 12/11/08, Musachy Barroso wrote: >> If you really need to do that, look at the AliasInterceptor, >> it does exactly that. > >

using struts 1.1

2008-12-11 Thread sabriz naduvilothi
javax.servlet.jsp.JspException at org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:164) at _drlmEditProfileSelect._jspService(_drlmEditProfileSelect.java:66) [SRC:/drlmEditProfileSelect.jsp:4] at com.orionserver[Oracle Application Server Containers

Re: javax.servlet.jsp.JspException at org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:164)

2008-12-11 Thread sabriz naduvilothi
Hi Dave Any idea about this problem.I am using struts 1.1 Thanks Sabriz On Thu, Dec 11, 2008 at 12:32 PM, Dave Newton wrote: > ... > > It might be helpful to include the portion of the JSP that's generating the > error. > > Dave > > > --- On Thu, 12/11/08, sabriz naduvilothi wrote: > > > Fro

[Struts2] cannot access a mapped servlet when using /* for the struts filter

2008-12-11 Thread Dasgupta, Ranjan
ver 2.1.2. Running under jdev 10.1.3 Here's the original web.xml snippet struts2 /* REQUEST ERROR TestServlet wf.feed.servlet.TestServlet 2 TestServlet /testservlet When I try to access http://

RE: [OT] Re: [S2] Locating a file or resource in Web application (classpath issue)

2008-12-11 Thread Martin Gainty
eclipse 3.2 file/new/Java/Tomcat Project(war) follow dave's advice using ServletContext.getRealPath(...) to get absolute path from relative path.. hth Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relat

Re: [Struts2] cannot access a mapped servlet when using /* for the struts filter

2008-12-11 Thread Nils-Helge Garli Hegvik
Considering your filter mapping says to intercept all requests, I'm not surprised that it's invoked... Check section SRV.6.2.4 in the Servlet spec [1] Nils-H [1] - http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html On Thu, Dec 11, 2008 at 9:24 PM, Dasgupta, Ranjan wrote: > ver 2.

Struts 2 - Conditional Validation

2008-12-11 Thread Richu
My form contains a checkbox and a text field. Entering a value in the text field is mandatory only if the checkbox is selected. How to write the conditional validation for this? I tried the validation entry as below but it is not working– (checkbox == true) and

RE: [Struts2] cannot access a mapped servlet when using /* for the struts filter

2008-12-11 Thread Dasgupta, Ranjan
Hi Nils-H, Thanks for pointing that out. So the only resolution is to provide multiple mappings for the same filter? Thanks, -Ranjan -Original Message- From: Nils-Helge Garli Hegvik [mailto:nil...@gmail.com] Sent: Thursday, December 11, 2008 4:05 PM To: Struts Users Mailing List Subje

struts 2 howto mulitiple dynamic buttons in a form

2008-12-11 Thread Ruel Loehr
Guys, I've just started working with struts 2 but I am beating my head against a problem. I have a jsp which displays a number of rows by using an iterator. In each of those rows, I want a delete button. When the user clicks one of the delete buttons I kick off an action which will get t

Re: struts 2 howto mulitiple dynamic buttons in a form

2008-12-11 Thread Jim Kiley
If nothing else, the error message tells you that you aren't closing your s:property tag. You have and you should have . jk On Thu, Dec 11, 2008 at 6:42 PM, Ruel Loehr wrote: > Guys, > > > > I've just started working with struts 2 but I am beating my head against > a problem. > > > > I have a

Re: Help with S:Select

2008-12-11 Thread Faraz Ali
Can you share us the solution which you have found for reading the multiple values for a select tag. I also need it. On Thu, Dec 11, 2008 at 6:10 AM, Richa Pandharikar < richa.pandhari...@tdktech.com> wrote: > I also found out the solution for reading the multiple values for a select > tag. > >

Re: Struts 2 - Conditional Validation

2008-12-11 Thread ManiKanta G
> > (checkbox == true) and (textbox).equals("") > Unless u wrote ur custom validator dealig the 'checkbox == true' comparison, by default these type of comparisons will not work. You have to specify the check box's value (check box based which you want to perform conditional v

Maybe a bug on S2 2.0.14 : ServletRedirectResult

2008-12-11 Thread Luis Gervaso
Hello *private* *static* *boolean* isPathUrl(String url) { *// filter out "http:", "https:", "mailto:";, "file:", "ftp:" **// since the only valid places for : in URL's is before the path specification **// either before the port, or after the protocol **return* (ur

Re: Maybe a bug on S2 2.0.14 : ServletRedirectResult

2008-12-11 Thread Luis Gervaso
This works for me public class ServletRedirectResultExt extends ServletRedirectResult { private static final Log log = LogFactory.getLog(ServletRedirectResult.class); protected void doExecute(String finalLocation, ActionInvocation invocation) throws Exception { ActionContext ctx