where to download struts2.0 examples files?

2006-12-18 Thread red phoenix
In struts doc,I often see "org.apache.struts2.example.*",I want to know where I can download the example fiels?

Re: initialize a DynaValidatorForm property

2006-12-18 Thread Pille
mano dasanayake wrote: > Hi, > Yes you can initiate an attribute of type arrayList in the DynaForm as > follows, > > i know that. > > And in the action mapping specify the name of the Form Bean that you are > about to use. In this case the form bean that contains the List you'r going > to in

Re: S2:The value of checkbox getted in server-side is "false" when no any checkbox been selected.

2006-12-18 Thread Denis Ling
Hi Dave Newton, Thanks for your reply quickly! please see my problem: generated HTML source segment by S2 ... ... case1: if i checked all above checkboxs, the string array " {"ROLE_ADMIN","ROLE_SUPER_USER"} " will be getted at server-side. case2: if i only checked first checkbo

RE: initialize a DynaValidatorForm property

2006-12-18 Thread mano dasanayake
Hi, Yes you can initiate an attribute of type arrayList in the DynaForm as follows, And in the action mapping specify the name of the Form Bean that you are about to use. In this case the form bean that contains the List you'r going to initiate.. Regards, Mano -Original Message- From

Re: where to download 1.3.6 - broken link ?

2006-12-18 Thread Wendy Smoak
On 12/18/06, Lixin Chu <[EMAIL PROTECTED]> wrote: the linked provided on WiKi seems broken: http://people.apache.org/builds/struts/1.3.6 are we going to have a new release soon ? I changed the wiki to say "will be available here" since 1.3.

in struts2

2006-12-18 Thread red phoenix
I want to change my code from struts1 to struts2,I use displaytag and to show following code,it can run well, will show 1,2, <%@ taglib uri="/struts-tags" prefix="s" %> > I know struts2 will use and use to replace ,so I modify code like follows: <%@ taglib uri="/struts-tags" prefix="s"

where to download 1.3.6 - broken link ?

2006-12-18 Thread Lixin Chu
the linked provided on WiKi seems broken: http://people.apache.org/builds/struts/1.3.6 are we going to have a new release soon ? thanks

in Struts2

2006-12-18 Thread red phoenix
I put a String into a session,and I use to determine the session if it is exist,if exist,show OK,if not exist,it shows error,but when I run it,it shows error,I don't know why don't show OK? How to correct to show OK? my code is follows: <%@ page contentType="text/html; charset=UTF-8" %> <%@ tagli

initialize a DynaValidatorForm property

2006-12-18 Thread Pille
hi, how can i initialize a property of type ArrayList in a DynaValidatorForm? i saw that i can do some simple initialization with the initial attribute in the form-peoperty tag in struts-config. at the moment i do some initialization in a prepare action that sets the attributes some combo boxes.

Re: S2 v Stripes

2006-12-18 Thread Don Brown
Personally, I think it is the wrong question. What should be being asked is how can Struts 2 and Stripes work together more, or ideally, merge to create the better framework. We started Struts 2 with the idea of let's stop re-inventing the wheel. The idea of an Action-driven web framework has,

S2 v Stripes

2006-12-18 Thread Ron Chan
here's an interesting post about S2 http://www.oreillynet.com/onjava/blog/2006/12/struts_2_is_the_new_mini.html however it is being shot down in the comments by how much better Stripes is :( what say you to the statement "Try stripes out for a couple of days, and then you'll be asking 'What does

Re: S2 - Proper way interceptors to interact w/Session

2006-12-18 Thread Don Brown
If it is only for a single request, I'd recommend using the ActionContext, e.g. ActionContext.getContext().put(key,value) Then, the servlet container won't try to serialize the objects between instances in a cluster. Don On 12/18/06, Jon Wilmoth <[EMAIL PROTECTED]> wrote: I'm fairly new to the

Re: S2 - Proper way interceptors to interact w/Session

2006-12-18 Thread Jon Wilmoth
I'm fairly new to the S2 model and assumed the same IoC benefits applied to interceptors that apply to actions (i.e. my interceptor didn't need to know about a session if it was SessionAware). However, I might have been overjealous with the whole IoC concept. ;) I have changed my interceptors

Send Post/Read Post

2006-12-18 Thread Robert Harrison
Hello, I posted a similar question in another forum a few weeks ago but didn't get an answer that worked. I'm posting information to an off-site server. That server posts back to me (key/value pairs). I need to read the posted pairs and choose a forward based on their values. I've tried two basi

S2 - Interceptors & HTTP Response

2006-12-18 Thread Jon Wilmoth
Are there any rules the interceptors should be aware of when dealing with the HTTP response? I ask because I'm trying to save a cookie to the user's browser via an interceptor and although I'm adding the cookie (with a MaxAge attribute value = one year) to the response via ServletActionContext

Re: S2 - Proper way interceptors to interact w/Session

2006-12-18 Thread Don Brown
On 12/18/06, Jon Wilmoth <[EMAIL PROTECTED]> wrote: I'm working on a custom S2 Interceptor and I'm not sure what the best way to interact with the session and/or other Interceptors for that matter is. First the session. I read http://struts.apache.org/2.x/docs/how-do-we-get-access-to-the-sess

S2 - Proper way interceptors to interact w/Session

2006-12-18 Thread Jon Wilmoth
I'm working on a custom S2 Interceptor and I'm not sure what the best way to interact with the session and/or other Interceptors for that matter is. First the session. I read http://struts.apache.org/2.x/docs/how-do-we-get-access-to-the-session.html and I tried applying the concept of using a

Re: DynaValidatorForm - cannot find bean

2006-12-18 Thread Pille
Christopher Schultz wrote: > Philippe, > > Pille wrote: how can i set a property of a dyna form from within an action? >>> That's easy: just do the same thing you do in your SaveAction to get a >>> reference to the form bean. Then, instead of just calling accessors to >>> get the data our,

Re: DynaValidatorForm - cannot find bean

2006-12-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Philippe, Pille wrote: >>> how can i set a property of a dyna form from within an action? >> >> That's easy: just do the same thing you do in your SaveAction to get a >> reference to the form bean. Then, instead of just calling accessors to >> get the

Re: DynaValidatorForm - cannot find bean

2006-12-18 Thread Pille
mano dasanayake wrote: > Hi, > Use PropertyUtils.setSimpleProperty(yourForm,"proptyName",object); > > And > > PropertyUtils.getsimplePropert(yourform,"proprtyname") --> cast it to the > required type.. ok, but i have a prepare action for the DynaValidatorForm where i initialize one bean, put

Re: DynaValidatorForm - cannot find bean

2006-12-18 Thread Pille
Christopher Schultz wrote: > Philippe, > > Pille wrote: >> how can i set a property of the form, that is used and needed in the jsp >> of the form after editing? > > I usually add that property to the form bean itself and then use a > hidden parameter. For instance, if I'm editing a database reco

RE: [S2] Spring autowiring question...

2006-12-18 Thread Dave Newton
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of > If I understand the question, it's not specifc to Spring. It wouldn't > matter how the domain objects are being crated, only what can be done > with them once they exist. Correct; as an example I'm injecting DAOs into my Actions (or

Re: [S2] Spring autowiring question...

2006-12-18 Thread Ted Husted
If I understand the question, it's not specifc to Spring. It wouldn't matter how the domain objects are being crated, only what can be done with them once they exist. If there are "problematic" properties on the domain objects, then sure. But many domain objects are simply value or data transfer

[S2] Spring autowiring question...

2006-12-18 Thread Dave Newton
Hi, I am currently using the Spring autowiring functionality. Is this a bad idea due to someone being able to craft a request that might walk on one of the injected objects? (Unlikely perhaps, but...) Thanks, Dave - To unsubs

RE: [s2] CheckBox issues

2006-12-18 Thread Shardayyy
Why don't you try this FORM = Private String permission = "N";// set the default to N JSP === DATABASE = -- You would store a char(1) in the DB If the check box IS checked and submitted the "Y" values gets submitted to the backend, if the checkbox is NOT checked and sub

Re: DynaValidatorForm - cannot find bean

2006-12-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Philippe, Pille wrote: > how can i access the getters and setters in of a DynaValidatorForm from > within an action method? You can use them as before. > when i had a own form class i could do the following in a action method: > > productForm = (My

Re: DynaValidatorForm - cannot find bean

2006-12-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Philippe, Pille wrote: > how can i set a property of the form, that is used and needed in the jsp > of the form after editing? I usually add that property to the form bean itself and then use a hidden parameter. For instance, if I'm editing a databas

Re: No taglib element in web.xml v2.4 ?

2006-12-18 Thread Vijay Venkataraman
Mikolaj Rydzewski wrote: Thomas Thomas wrote: Well how am I supposed to declare my Struts taglibs then ? You don't. All tld files are present in META-INF directory of specific jars. Servlet container looks for those files in that location and it works ;-) Of course you can still put tld file

RE: No taglib element in web.xml v2.4 ?

2006-12-18 Thread Dave Newton
From: Dave Newton [mailto:[EMAIL PROTECTED] > From: Thomas Thomas [mailto:[EMAIL PROTECTED] > > Weird that in Eclipse it doesnt show the taglib element ! > > > > But I placed this somewhere and it works ! > > You don't need taglib directives in 2.4. Um, just to clarify, I meant you don't need the

RE: S2:The value of checkbox getted in server-side is "false" when no any checkbox been selected.

2006-12-18 Thread Dave Newton
From: Denis Ling [mailto:[EMAIL PROTECTED] > the retrieved value of "roleId" is {"false"} when user doesn't select > any checkbox elements. In my opinion, this case should returns null > directly. Why? S2 automagically deals with one of the headaches of HTTP (not returning unchecked box values) b

RE: in struts2

2006-12-18 Thread Dave Newton
? > -Original Message- > From: red phoenix [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 17, 2006 8:26 PM > To: Struts Users Mailing List > Subject: in struts2 > > I want to realize in Struts2,when session attribute is > exist,it show "login",if it is not exist,it shows "not login"

RE: No taglib element in web.xml v2.4 ?

2006-12-18 Thread Dave Newton
From: Thomas Thomas [mailto:[EMAIL PROTECTED] > Weird that in Eclipse it doesnt show the taglib element ! > > But I placed this somewhere and it works ! You don't need taglib directives in 2.4. Dave - To unsubscribe, e-mail: [E

Re: Can it be done in Struts

2006-12-18 Thread ahmet hassan
You may try this; "Krishna, Hari (FTT-CInternet)" <[EMAIL PROTECTED]> wrote: Hi I have a peculiar requirement where i have to show user selected questions and their corresponding answers in text boxes in the Edit page. I know how to show user sel

MessageResourcesFactory.createFactory java.lang.VerifyError: (class: org/apache/struts/util/RequestUtils, method: getActionMappingURL signature: (Ljava/lang/String;Ljavax/servlet/jsp/PageContext;

2006-12-18 Thread malin76
Hi, I'm having problems starting up an Struts application in Websphere application server. Below is the error message I get, does anyone know how to fix this? Thanks, Malin INFO org.apache.struts.action.ActionServlet - inside init [2006-12-18 11:46:45:340 CET] 33b9f334 SystemOut O 20

S2:The value of checkbox getted in server-side is "false" when no any checkbox been selected.

2006-12-18 Thread Denis Ling
jsp section: action section: private String[] roleId; public String[] getRoleId() { return roleId; } public void setRoleId(String[] roleId) { this.roleId = roleId; } . the retrieved value of "roleId" is {"fals

Re: [OT] Re: read/display image from Database using struts

2006-12-18 Thread Kranti
Thank you very much Dariusz. I shall try this and update you. On 12/18/06, Antonio Petrelli <[EMAIL PROTECTED]> wrote: Dariusz Wojtas ha scritto: > On 12/18/06, Kranti <[EMAIL PROTECTED]> wrote: >> Dear Dariusz , >> >> this is the first time for me to solve this kind of problem. >> could you

[OT] Re: read/display image from Database using struts

2006-12-18 Thread Antonio Petrelli
Dariusz Wojtas ha scritto: On 12/18/06, Kranti <[EMAIL PROTECTED]> wrote: Dear Dariusz , this is the first time for me to solve this kind of problem. could you provide some sample code to address this. thanks in advance This is something simplified, may not compile - but exactly shows what.

Re: read/display image from Database using struts

2006-12-18 Thread Dariusz Wojtas
On 12/18/06, Kranti <[EMAIL PROTECTED]> wrote: Dear Dariusz , this is the first time for me to solve this kind of problem. could you provide some sample code to address this. thanks in advance This is something simplified, may not compile - but exactly shows what needs to be done. Passing of

validatorform NoSuchMethodError

2006-12-18 Thread Kranti
* i am using validatorform for validating the fields it is giving java.lang.NoSuchMethodError: org.apache.commons.validator.Validator.addResource (Ljava/lang/String;Ljava/lang/Object please suggest *

Re: read/display image from Database using struts

2006-12-18 Thread Niall Pemberton
Alternatively you could use a "download" action: http://wiki.apache.org/struts/StrutsFileDownload Niall On 12/18/06, Dariusz Wojtas <[EMAIL PROTECTED]> wrote: Custom servlet which retrieves data from DB, writes it to the output stream. It should define correct headers first (mimeType, Expire

RE: read/display image from Database using struts

2006-12-18 Thread mano dasanayake
Hi kranti, You have to use BLOB's to store images in the DB.. Get the Out Stream from the BLOB and then write the byte[] to it.. http://wiki.apache.org/struts/StrutsFileUpload Regards, Mano -Original Message- From: Kranti [mailto:[EMAIL PROTECTED] Sent: Monday, December 18, 2006 2:2

Re: read/display image from Database using struts

2006-12-18 Thread Kranti
Dear Dariusz , this is the first time for me to solve this kind of problem. could you provide some sample code to address this. thanks in advance On 12/18/06, Dariusz Wojtas <[EMAIL PROTECTED]> wrote: Custom servlet which retrieves data from DB, writes it to the output stream. It should defi

Re: read/display image from Database using struts

2006-12-18 Thread Dariusz Wojtas
Custom servlet which retrieves data from DB, writes it to the output stream. It should define correct headers first (mimeType, Expires, Date). Map it to some url like /images/* and you may pass identifiers by composing URLs like /images/.jpg Dariusz Wojtas On 12/18/06, Kranti <[EMAIL PROTECTE

read/display image from Database using struts

2006-12-18 Thread Kranti
Hi, How should I read/display image from Database...which is stored interms of bytes in the Database. Please suggest me some way to render the image in JSP.