Re: Struts2 Action instances are not getting garbage collected

2008-03-26 Thread Alex Shneyderman
> yeah, for some action classes spring inject singleton scoped service > dependecies so that might be reason for those action for not getting garbage > collected This can not be. The only way your action will not be garbage collected if that action instance is refferenced from a long lived obje

Re: Struts2 Action instances are not getting garbage collected

2008-03-26 Thread Prajapati Manish Narandas
Thanx Laurie Harper, I am using jprofiler to monitor instances. you are right that it may be possible that my action classes might be referencing to any long lived objects and that prevents it from being garbage collected. yeah, for some action classes spring inject singleton scoped service depend

Help on migration from struts1 to struts2

2008-03-26 Thread vj,sandeep
Hi, I am migrating an existing application from struts 1 to struts 2. It uses MessageResources. I found out that the replacement for the same in struts2 (2.0.11)is WrapperMessageResources which extends from the MessageResources. But to use the WrapperMessageRessource I need to use the struts 1.

Re: Struts2 Annotation based Validation

2008-03-26 Thread Dave Newton
--- Tauri Valor <[EMAIL PROTECTED]> wrote: > I tried as you advised. I get the default error message 'Please enter a > value for first name ' which is in the "message" . > > Im expecting the error messaage from the properties file. > > I think Im placing my properties file in the wrong location.

Re: Struts2 Annotation based Validation

2008-03-26 Thread Tauri Valor
Lukasz, I tried as you advised. I get the default error message 'Please enter a value for first name ' which is in the "message" . Im expecting the error messaage from the properties file. I think Im placing my properties file in the wrong location. And therefore my validation returns me the d

Re: Struts 2.1 autocompleter, get the value

2008-03-26 Thread sassien
Yes I mean to use the value on my action, and I did set name="myVar" and I do have a "myVar" field and a public setMyVar() method on my action. This is strange, because when I write my autocompleter this way: here the value is "stored" and I can use it in my action. But if I write exactly the s

@ExpressionValidator - how to set the expression correctly ? (amount either greater than 0 or null? )

2008-03-26 Thread xianwinwin
Hi, I have the following Expression Validator: @ExpressionValidator(expression = "amount > 0", message = "err message") what should come in the expression if amount can be either greater than 0 or null? thank you! -- View this message in context: http://www.nabble.com/%40ExpressionValidator

Re: how to do: a double validation?

2008-03-26 Thread Dave Newton
--- xianwinwin <[EMAIL PROTECTED]> wrote: > yes, this works for checking the range but I wish to check the validity of > the field. meaning, I'd like to provide my error message in case the user > gave wrong input. how do I do that? That would depend on what "wrong input" means. If the existing

Re: how to do: a double validation?

2008-03-26 Thread xianwinwin
Thank you Dave!!! yes, this works for checking the range but I wish to check the validity of the field. meaning, I'd like to provide my error message in case the user gave wrong input. how do I do that? Thank you again newton.dave wrote: > > --- xianwinwin <[EMAIL PROTECTED]> wrote: >> >> say

Re: Struts2 Action instances are not getting garbage collected

2008-03-26 Thread Laurie Harper
Prajapati Manish Narandas wrote: Hi All, I am using struts2 with spring object factory. Here, spring is creating action class objects with request scope and injecting service layer dependency and service layer objects are singleton scope. here, even i have given request scope it doesnt ensure 1

Re: OGNL runtime viewer

2008-03-26 Thread stanlick
2.0.11 On Wed, Mar 26, 2008 at 4:00 PM, Musachy Barroso <[EMAIL PROTECTED]> wrote: > If you are on 2.1 you can use the context browser to navigate the > context. I think the value stack object is in the context, but I don't > remember the key and don't have the code at hand now. > > musachy > > O

Re: OGNL runtime viewer

2008-03-26 Thread Musachy Barroso
If you are on 2.1 you can use the context browser to navigate the context. I think the value stack object is in the context, but I don't remember the key and don't have the code at hand now. musachy On Wed, Mar 26, 2008 at 3:21 PM, stanlick <[EMAIL PROTECTED]> wrote: > > Wes -- > > I have a sit

Re: how to do: a double validation?

2008-03-26 Thread Dave Newton
--- xianwinwin <[EMAIL PROTECTED]> wrote: > > say a user inputs a value for a double field (say amount of money); the > value should be a double (eg, 53.23) > > Question: if the user enters something like ABCD how can I provide the > error message? > I would like to do that with annotation? (sa

how to do: a double validation?

2008-03-26 Thread xianwinwin
hi there, say a user inputs a value for a double field (say amount of money); the value should be a double (eg, 53.23) Question: if the user enters something like ABCD how can I provide the error message? I would like to do that with annotation? (sayyou enter an invalid value...) what ty

RE: OGNL runtime viewer

2008-03-26 Thread stanlick
Wes -- I have a situation where the ParametersInterceptor cannot set a value on my action on account of an invalid method signature. I know all about this, but I'm bewildered at what *is* happening! It appears to be setting the value someplace {valuestack?} because my subsequent page is reveal

Re: Struts 2.1 autocompleter, get the value

2008-03-26 Thread Musachy Barroso
By "get the selected value", do you mean to use the value on your action? If that is the case, all you have to do is set name="myVar", and then have a "myVar" field and a public setMyVar(...) method on your action. musachy On Wed, Mar 26, 2008 at 1:19 PM, sassien <[EMAIL PROTECTED]> wrote: > >

Struts2 / Spring not working a a WAR in Weblogic9.1

2008-03-26 Thread mpaschke
I'm having a problem with using Struts2 and Spring with Weblogic9.1. When I deploy the application as an exploded directory, no problem. Struts2 autowires without a problem. When I deploy as a WAR, with NO other changes, autowire can't find the beans. Is there some special classpath setting I'm mi

Struts 2.1 autocompleter, get the value

2008-03-26 Thread sassien
Hi everyone, I'm new to struts 2, and I finally managed to link 2 autocompleters using a few examples like this one: http://www.planetstruts.org/struts2-showcase/viewSource.action?page=/ajax/autocompleter/index.jsp or this one: http://struts.apache.org/2.x/docs/autocompleter.html As it is done

how to show error fields ONLY in validation?

2008-03-26 Thread xianwinwin
Hi guys, when a user clicks Submit in my form, a message is returned to an ID with the following errors: you have an error in your date entry! Invalid field value for field "age". 336r IL 3/15/07 the JSP page looks like this: <%@ taglib prefix="s" uri="/struts-tags" %> <% request.setA

Re: struts 2 ajax how to

2008-03-26 Thread Piero Sartini
Am Mittwoch, 26. März 2008 14:35:26 schrieb Daniel: > Hello, > What is the best solution to integrate struts 2 and ajax? What libraries? DOJO is shipped with Struts2 - but my impression is that most people do use other frameworks like jQuery or prototype, writing their AJAX code by hand. I will

Re: Use of ExtJS

2008-03-26 Thread Dave Newton
--- Martin Gainty <[EMAIL PROTECTED]> wrote: > so a conversion from Dojo to GWT ? I think ExtJS, if the subject line is any indication. > you would first have to scan all ftl > e.g. here are the contents of head.ftl > src="<@s.url value='/struts/ajax/dojoRequire.js' > includeParams='none

Re: Use of ExtJS

2008-03-26 Thread Martin Gainty
so a conversion from Dojo to GWT ? you would first have to scan all ftl e.g. here are the contents of head.ftl then replace ALL instances of Dojo's javascript .js with GWT equivalent Before attempting this conversion is there a specific component or feature you're looking for ? You might be ple

Re: S2: Actions/DAO interaction getting messy...

2008-03-26 Thread Eric D Nielsen
Adam Hardy on 26/03/08 00:28:43 >Eric D Nielsen on 25/03/08 14:29, wrote: >> Its a Struts2/Spring2/JPA(Hibernate) based project. I'm using a slightly >> modified version of the Generic DAO pattern shown in the Java persistence >> with Hibernate book and/or the IBM ThoughtWorks very similar example.

Re: Use of ExtJS

2008-03-26 Thread Frans Thamura
i am using GWT-Ext with S2, but still shocked with structure of GWT and Struts2 (EclipseDynamicProject) here. may be anyone have a share, that will be cool F

Re: Zero config and interceptors do not get along?

2008-03-26 Thread Ealden Escañan
On Wed, Mar 26, 2008 at 10:16 PM, Alex Shneyderman <[EMAIL PROTECTED]> wrote: > I have a custom interceptor that I define in the root of my profect > and then I define my custom interceptorStack and define that as > default interceptor stack. > > If any of my actions are running automatically vi

Re: Zero config and interceptors do not get along?

2008-03-26 Thread Dave Newton
I'd try using the @ParentPackage annotation in your actions first; that seems to be the workaround for not having appropriate interceptor annotations. Dave --- Alex Shneyderman <[EMAIL PROTECTED]> wrote: > I have a custom interceptor that I define in the root of my profect > and then I define my

Re: Struts2 validation issue when internet is not available in the application server.

2008-03-26 Thread Dave Newton
--- Dave Newton <[EMAIL PROTECTED]> wrote: > --- Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote: > > This is my xml file. when we run in a local machine that has internet > > access this works fine. > > > > > > > "-//OpenSymphony Group//XWork Validator 1.0.2//EN" > > "http://ww

Re: Struts2 validation issue when internet is not available in the application server.

2008-03-26 Thread Nuwan Chandrasoma
I am using jboss-4.0.5-GA Dave Newton wrote: --- Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote: This is my xml file. when we run in a local machine that has internet access this works fine. http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";> Hmm, AFAICT that's exactly what

Zero config and interceptors do not get along?

2008-03-26 Thread Alex Shneyderman
I have a custom interceptor that I define in the root of my profect and then I define my custom interceptorStack and define that as default interceptor stack. If any of my actions are running automatically via Zero-config option all works well but interceptor does not trigger. If I specify my acti

Re: Struts2 validation issue when internet is not available in the application server.

2008-03-26 Thread Dave Newton
--- Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote: > This is my xml file. when we run in a local machine that has internet > access this works fine. > > >"-//OpenSymphony Group//XWork Validator 1.0.2//EN" > "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";> Hmm,

Re: Struts2 validation issue when internet is not available in the application server.

2008-03-26 Thread Nuwan Chandrasoma
This is my xml file. when we run in a local machine that has internet access this works fine. http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";> Login name is required Password is required Dave New

RE : RE : How to eliminate an entry from an array with s2 tags

2008-03-26 Thread Ezequiel Puig
Hi, 1) I am not using the collection of checkboxes because the user can check products in different pages. 2) I was thinking in removing the element from the array with s2 tags because like that i can construct an url to emininate the product: . And why i want ot do that ? Because like that th

eclipse and struts 2

2008-03-26 Thread Prashant Saraf
Hi, I am using eclipse for creating struts 2 application. I have few doubts. 1. does it is necessary to put all pojo classes(action/form) into WEB-INF/classes/appName? 2. can someone provide project structure of struts 2 project in eclipse? ---

RE: struts 2 ajax how to

2008-03-26 Thread Deepak Kumar
HI, Dojo comes with struts 2. You can use dojo in your struts 2 applications. Please learn it from http://www.roseindia.net/struts/struts2/struts2ajax/index.shtml Thanks -Original Message- From: Daniel [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2008 7:05 PM To: user@struts.ap

Re: Struts2 validation issue when internet is not available in the application server.

2008-03-26 Thread Martin Gainty
So to take an example in the supplied validators xml 1 100 Invalid Count! 20 80 Smaller Invalid Count: ${count} The xwork package ValidatorFileParser.java hunts for type attribu

Re: Struts2 validation issue when internet is not available in the application server.

2008-03-26 Thread Dave Newton
Is your DTD correct? As a trivial test I turned off my WiFi and restarted a webapp that uses a validation configuration file and no issues throught he startup or validation process. Dave --- Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote: > Hi All, > > Has any one come across this issue? . we do

struts 2 ajax how to

2008-03-26 Thread Daniel
Hello, What is the best solution to integrate struts 2 and ajax? What libraries?

Struts2 validation issue when internet is not available in the application server.

2008-03-26 Thread Nuwan Chandrasoma
Hi All, Has any one come across this issue? . we dont have internet in our app server and the struts2 validation fails as it cant access www.opensymphony.com. Thanks, Nuwan. Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Meth

Automatic creation of beans

2008-03-26 Thread Joachim Ansorg
Hi there, I have an action which is configured to use the paramsPrepareParams interceptor. Basically the action is: public class UserAdminAction implements Preparable { // user is an interface, prepare() assign an implementation to the field private User user; private String username;

Struts2 Action instances are not getting garbage collected

2008-03-26 Thread Prajapati Manish Narandas
Hi All, I am using struts2 with spring object factory. Here, spring is creating action class objects with request scope and injecting service layer dependency and service layer objects are singleton scope. here, even i have given request scope it doesnt ensure 100 % garbage collection of my all a

interceptor throwing global exception

2008-03-26 Thread Hartrich, James CTR USTRANSCOM J6
I'm struggling with configuring struts.xml global-results and global-exception-mappings for any exception thrown from an interceptor. What do I need to do to keep a request out of my action and instead go to the configured global-result? James smime.p7s Description: S/MIME cryptographic signat

Re: Use of ExtJS

2008-03-26 Thread Alvaro Sanchez-Mariscal
> Can we use ExtJS with Struts 2 Tags? Nope. However, you can use ExtJS (or any other) directly without S2 ajax tags. Alvaro. -- Alvaro Sanchez-Mariscal Arnaiz Java EE Architect & Instructor [EMAIL PROTECTED] - To unsubscrib

Re: RE : How to eliminate an entry from an array with s2 tags

2008-03-26 Thread Dave Newton
Why wouldn't you just use the collection of checkboxes that have been checked? Maybe I'm not understanding correctly, but I don't see any reason to remove anything from an array; whether you're using JavaScript to build the URL or not. Why do you need to remove the ID from the array? Dave --- Ez

Struts 2 and an array of textfields

2008-03-26 Thread Eugen Stoianovici
How do i handle an array of textfields? I have a form from which the user must check a list of checkboxes and enter some text in a textfield that must be associated with a textbox My action extends ActionSupport and i'm using s2

Use of ExtJS

2008-03-26 Thread Prashant Saraf
Hi, Can we use ExtJS with Struts 2 Tags? Regards, Prashant. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

struts2 dojo plugin (ajax)

2008-03-26 Thread Daniel
I am trying to integrate struts and ajax trough dojo plugin. Freemarker is trowing me an error : freemarker.core.InvalidReferenceException: Expression parameters.pushId is undefined on line 97, column 6 in template/ajax/submit.ftl. Anyone know what that mean? This is my jsp page :

Re: How to enable the client side validation?

2008-03-26 Thread Chen Chunwei
Sorry for mis-typing. >But I wonder know ... should be But I wanna know... Talos - Original Message - From: "Chen Chunwei" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, March 26, 2008 5:34 PM Subject: Re: How to enable the client side validation? I found the

Re: How to enable the client side validation?

2008-03-26 Thread Antonio Petrelli
2008/3/26, Chen Chunwei <[EMAIL PROTECTED]>: > > There's an attribute in named method. You can specify a > name in this attribute such as validateForm. Then specify the onsubmit event > of the actual form with "return validateForm(this);". After all, the > javascript works. > > The above solution

Re: Problem

2008-03-26 Thread Lukasz Lenart
> http://struts.apache.org/2.x/docs/ognl-basics.html Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How to enable the client side validation?

2008-03-26 Thread Chen Chunwei
I found the answer. There's an attribute in named method. You can specify a name in this attribute such as validateForm. Then specify the onsubmit event of the actual form with "return validateForm(this);". After all, the javascript works. The above solution comes from my colleague. But I wond

Re: How to enable the client side validation?

2008-03-26 Thread Antonio Petrelli
2008/3/26, Chen Chunwei <[EMAIL PROTECTED]>: > > Well, the case is that the Javascript code was generated well, but it was > not triggered. Well, that's strange. Can you post, the generated HTML and Javascript code? What browser are you using? Changing browser changes anything? Antonio

Re: How to enable the client side validation?

2008-03-26 Thread Chen Chunwei
Well, the case is that the Javascript code was generated well, but it was not triggered. Talos - Original Message - From: "Antonio Petrelli" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, March 26, 2008 5:10 PM Subject: Re: How to enable the client side validation

Re: How to enable the client side validation?

2008-03-26 Thread Antonio Petrelli
2008/3/26, Chen Chunwei <[EMAIL PROTECTED]>: > > As I said, I've already used . Of course, I've alse done > the other stuff found in the document you refer to (offline version). But it > does not work. What exactly does not work? Give more details, for example, exceptions at startup of the appli

Re: How to enable the client side validation?

2008-03-26 Thread Chen Chunwei
Thanks Antonio As I said, I've already used . Of course, I've alse done the other stuff found in the document you refer to (offline version). But it does not work. Can you give some more details of using client-side validation? Talos - Original Message - From: "Antonio Petrelli" <[EM

Re: Struts2 Annotation based Validation

2008-03-26 Thread Lukasz Lenart
Hi, You mess too many thing, please try like this: @RequiredStringValidator(key = "error.required", message = "Please enter a value for First name") error.required = ${fieldName} is required! Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart ---

RE : How to eliminate an entry from an array with s2 tags

2008-03-26 Thread Ezequiel Puig
Hi Dave, Thanks for your reponse. Anyway, I will try to convince you ;) Some background: i have a page where a list of products are shown. In that page there is a button to compare products. What the button does is collect all the selected product's id and call an action: CompareProducts.do?pr

Re: How to enable the client side validation?

2008-03-26 Thread Antonio Petrelli
2008/3/26, Chen Chunwei <[EMAIL PROTECTED]>: > > My struts version is 1.1. And I tried to add formName="submitForm" /> in my jsp file which needs validation. But it seems > not working. See: http://struts.apache.org/1.1/userGuide/building_view.html#validator Antonio

Re: How to enable the client side validation?

2008-03-26 Thread Chen Chunwei
My struts version is 1.1. And I tried to add in my jsp file which needs validation. But it seems not working. Talos - Original Message - From: "Nils-Helge Garli Hegvik" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, March 26, 2008 4:39 PM Subject: Re: How to enab

Problem

2008-03-26 Thread Marc Eckart
Hi, I want to use s:if with a Constant from a java class: But this does not work. It works if I use: Is there a way to use the constants class? Best Regards, Marc

Re: Struts2 Annotation based Validation

2008-03-26 Thread Tauri Valor
Thanks again. I tried the following: In my action: @RequiredStringValidator(key = "error.message", message = "") public String getFirstName() { return firstName; } I created the properties file just under my action with the name "MyActionName.properties" with th

Re: How to enable the client side validation?

2008-03-26 Thread Nils-Helge Garli Hegvik
http://struts.apache.org/2.x/docs/client-side-validation.html Nils-H On Wed, Mar 26, 2008 at 9:34 AM, Chen Chunwei <[EMAIL PROTECTED]> wrote: > Hi all, > > just as title > > Thanks. > > Talos - To unsubscribe, e-mail: [EMAIL

How to enable the client side validation?

2008-03-26 Thread Chen Chunwei
Hi all, just as title Thanks. Talos

Re: Struts2 Annotation based Validation

2008-03-26 Thread Lukasz Lenart
> Is it possible for me to have multilingual Validations using Annotation > Based Validations in Struts2 ? Yes, you can, just add key = some.error.message to your annotation, like below @RequiredStringValidator(key = "some.key") public void setFirstName(String firstName) { this.

Re: Struts2 Annotation based Validation

2008-03-26 Thread Tauri Valor
Hi Is it possible for me to have multilingual Validations using Annotation Based Validations in Struts2 ? Please let me know how I can achieve this . Thanks, Tauri. Tauri Valor wrote: > > Thanks Lukasz > > > > Lukasz Lenart wrote: >> >>> >> >> By default s:password tag don't shows v

Re: Struts2 Annotation based Validation

2008-03-26 Thread Tauri Valor
Thanks Lukasz Lukasz Lenart wrote: > >> > > By default s:password tag don't shows value of your password, you can > change such behaviour by adding attribute showPassword=true, but you > should consider security issue. > > > Regards > -- > Lukasz > > http://www.linkedin.com/in/lukaszlena