Re: Using Variables with Messages in Struts

2008-02-19 Thread Nuwan Chandrasoma
Hi, why dont you try the tag with filter attribute as false. Thanks, Nuwan Jeromy Evans wrote: Oh, sorry, I assumed you were using Struts 2. That's a feature of the default tag library. Sorry, I don't know the answer for Struts 1.x Asad Habib wrote: Hello Jeromy. What tag library are you

Re: Struts 2 Container Security problem

2008-02-19 Thread Wes Wannemacher
On Wed, 2008-02-20 at 05:15 +, Kelly Graus wrote: > Wes Wannemacher wantii.com> writes: > > > I'm jumping in late, so if I refer to something that came up in a > > previous post, I apologize ahead of time. I'm guessing that you're using > > tomcat. Tomcat is picky about certain things being

is session efficient way to persist the action properties

2008-02-19 Thread Prashant Khanal
Hello all, I have two jsp pages say Page1 and Page2 backed by their corresponding action. When the Page1 is first loaded the corresponding action's prepare() method is used to provide the data for the page based on the parameter sent by the page that precedes the Page1. Upon submit the user is nav

Re: [S2] IE does not refresh page

2008-02-19 Thread Jeromy Evans
Hmm...this is a guess, but there's a relevant issue in IE's innerHTML implementation. Dojo uses this to insert the response into the page. This particular issue is that tables must be xhtml-compliant. Specifically, they must contain all the required tags including and . Try adding those tag

Re: [S2] IE does not refresh page

2008-02-19 Thread carmi_cd
hi, yes my submit reached my action because the record is saved/updated in the database. yes the list is the response from the action. the list is refreshing in Firefox but not in IE..here is part of list.jsp

Re: Struts 2 Container Security problem

2008-02-19 Thread Kelly Graus
Wes Wannemacher wantii.com> writes: > I'm jumping in late, so if I refer to something that came up in a > previous post, I apologize ahead of time. I'm guessing that you're using > tomcat. Tomcat is picky about certain things being actual filesystem > resources. There are two possible solutions (

Re: Using Variables with Messages in Struts

2008-02-19 Thread Jeromy Evans
Oh, sorry, I assumed you were using Struts 2. That's a feature of the default tag library. Sorry, I don't know the answer for Struts 1.x Asad Habib wrote: Hello Jeromy. What tag library are you using for this? - Asad On Feb 19, 2008 11:19 PM, Jeromy Evans <[EMAIL PROTECTED]> wrote: You

Re: Using Variables with Messages in Struts

2008-02-19 Thread Asad Habib
Hello Jeromy. What tag library are you using for this? - Asad On Feb 19, 2008 11:19 PM, Jeromy Evans <[EMAIL PROTECTED]> wrote: > You may be able to do it with s:property, disabling escaping of the html: > > > > > Asad Habib wrote: > > Hello. How do I represent the following in a message resou

Re: Using Variables with Messages in Struts

2008-02-19 Thread Jeromy Evans
You may be able to do it with s:property, disabling escaping of the html: Asad Habib wrote: Hello. How do I represent the following in a message resources file? Representing a string literal is easy but the following string contains a link. Can this even be done? I have used variables with the

Using Variables with Messages in Struts

2008-02-19 Thread Asad Habib
Hello. How do I represent the following in a message resources file? Representing a string literal is easy but the following string contains a link. Can this even be done? I have used variables with the validator before but there is no validator involved in this case. Thank you. Please click here

Re: [S2] Ajax Tags Reference - submit?

2008-02-19 Thread Jeromy Evans
hezjing wrote: Hi In http://struts.apache.org/2.0.11/docs/ui-tag-reference.html Clicking on submit of the Ajax Tags will redirect to the Confluence's login page. Is this OK? Thanks. This one has already been corrected in the latest version. It's also helpful to create your own account in

Re: [S2] /2.x/tagreference.html not found on server?

2008-02-19 Thread Jeromy Evans
hezjing wrote: Hi At bottom of http://struts.apache.org/2.0.11/docs/ui-tag-reference.html, the link to http://struts.apache.org/2.x/tagreference.html (Tag Reference) does not exist on the server? Thanks, I've changed this to tag-reference.html on the live version.

[S2] /2.x/tagreference.html not found on server?

2008-02-19 Thread hezjing
Hi At bottom of http://struts.apache.org/2.0.11/docs/ui-tag-reference.html, the link to http://struts.apache.org/2.x/tagreference.html (Tag Reference) does not exist on the server? -- Hez - To unsubscribe, e-mail: [EMAIL PROT

[S2] Ajax Tags Reference - submit?

2008-02-19 Thread hezjing
Hi In http://struts.apache.org/2.0.11/docs/ui-tag-reference.html Clicking on submit of the Ajax Tags will redirect to the Confluence's login page. Is this OK? -- Hez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Struts 2 Container Security problem

2008-02-19 Thread Wes Wannemacher
On Tue, 2008-02-19 at 17:56 -0800, Dave Newton wrote: > --- Jeromy Evans <[EMAIL PROTECTED]> wrote: > > Wes Wannemacher wrote: > > > In this case a 0-byte file called login.action may do the trick. It's a > bit > > > of a hack, and I think when this comes up with the Tomcat peeps, they > > > point

Re: Struts 2 Container Security problem

2008-02-19 Thread Dave Newton
--- Jeromy Evans <[EMAIL PROTECTED]> wrote: > Wes Wannemacher wrote: > > In this case a 0-byte file called login.action may do the trick. It's a bit > > of a hack, and I think when this comes up with the Tomcat peeps, they > > point to the spec. > Excellent! I loathe using a redirect. This proba

Re: Struts 2 Container Security problem

2008-02-19 Thread Laurie Harper
Wes Wannemacher wrote: On Wed, 2008-02-20 at 00:43 +, Kelly Graus wrote: Jeromy Evans blueskyminds.com.au> writes: [snip] I would add a login action to the public namespace which prepares a login page. Unfortunately I don't think the container will allow you to specify "/login.action"

Re: Struts 2 Container Security problem

2008-02-19 Thread Jeromy Evans
Wes Wannemacher wrote: I'm jumping in late, so if I refer to something that came up in a previous post, I apologize ahead of time. I'm guessing that you're using tomcat. Tomcat is picky about certain things being actual filesystem resources. There are two possible solutions (if I'm right about T

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-02-19 Thread Jeromy Evans
No, it seems fine now. Turn on debugging: thanks you for the reply. I added the code: on top, plus but I get the same result - it goes to an empty page with the result and not to the DIV? :-( any idea? xianwinwin wrote: Hi all, I'm trying to return a result to DIV in a form

Re: Struts 2 Container Security problem

2008-02-19 Thread Wes Wannemacher
On Wed, 2008-02-20 at 00:43 +, Kelly Graus wrote: > Jeromy Evans blueskyminds.com.au> writes: [snip] > > > > I would add a login action to the public namespace which prepares a > > login page. Unfortunately I don't think the container will allow you to > > specify "/login.action" as the

Re: Type conversion questions

2008-02-19 Thread Jeromy Evans
Hi Jeromy I'm not clear what the performance problem you mention could be. This is what I'm doing myself and while my app's performance is OK, I would love to improve it. What do you mean by (e.g. select n+1 due to iteration)? All the best Adam --- Actually, I've assumed you're using ORM

Re: Struts 2 Container Security problem

2008-02-19 Thread Kelly Graus
Jeromy Evans blueskyminds.com.au> writes: > > > >> I would add a login action to the public namespace which prepares a > >> login page. Unfortunately I don't think the container will allow you to > >> specify "/login.action" as the login page though, but you can make > >> login.jsp redirect

Re: Type conversion questions

2008-02-19 Thread Adam Hardy
Jeromy Evans on 19/02/08 22:23, wrote: Daniel Baldes wrote: Hello, I have a web form where you can, generally speaking, assign objects to groups. This is done via a multiple select box which displays an object's name and uses its ID property as value. So, usually, my action would get back a

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-02-19 Thread xianwinwin
thanks you for the reply. I added the code: on top, plus but I get the same result - it goes to an empty page with the result and not to the DIV? :-( any idea? xianwinwin wrote: > > Hi all, > I'm trying to return a result to DIV in a form (in the example id='two') > > this is my

Re: Struts 2 Container Security problem

2008-02-19 Thread Jeromy Evans
I would add a login action to the public namespace which prepares a login page. Unfortunately I don't think the container will allow you to specify "/login.action" as the login page though, but you can make login.jsp redirect to it. According to Practical Apache Struts 2, this should b

Re: Struts 2 Container Security problem

2008-02-19 Thread Dave Newton
--- Kelly Graus <[EMAIL PROTECTED]> wrote: > > I would add a login action to the public namespace which prepares a > > login page. Unfortunately I don't think the container will allow you to > > specify "/login.action" as the login page though, but you can make > > login.jsp redirect to it. >

Re: Struts 2 Container Security problem

2008-02-19 Thread Kelly Graus
Jeromy Evans blueskyminds.com.au> writes: > > Hi Kelly, > > In struts.xml, the namespace given to your package needs be in > /protected as well. > eg. > Otherwise, as you've seen, it's available in the root of the > application's context path. > > I usually split my struts2 application into

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-02-19 Thread Jeromy Evans
Your code looks valid, but have you included the tag in your head section? It looks like the default event is executing (submit form for new page) rather than Dojo using ajax to post it. Also, as your target is theForm2, add showLoadingText="false" to your submit button. Without that setting,

Re: Type conversion questions

2008-02-19 Thread Martin Gainty
package org.apache.struts2.showcase.conversion public class EnumTypeConverter extends StrutsTypeConverter { //old methods.. //new method to convert map contents to Strings.. @Override public String[] convertToStrings(Map context, Object o) { int j=0; Strings[] s; Li

Re: Struts 2 Container Security problem

2008-02-19 Thread Jeromy Evans
Hi Kelly, In struts.xml, the namespace given to your package needs be in /protected as well. eg. Otherwise, as you've seen, it's available in the root of the application's context path. I usually split my struts2 application into at least two packages: ... Which then allows you to apply

Re: Struts 2 Container Security problem

2008-02-19 Thread Kelly Graus
Martin Gainty hotmail.com> writes: > > start here > http://www.acegisecurity.org/guide/springsecurity.html > > M- Thank you for the response. I looked at Acegi, but it seemed overly complex for my requirements. This application is just a simple in house administration tool (and learning exerci

Re: Struts2 field validation and conversion

2008-02-19 Thread Jeromy Evans
Filipe David Manana wrote: So my question, is the RequiredFieldValidator is applied after conversion? If conversion fails, the RequiredFieldValidator catches a blank value for the field? Yes, validation is performed on your action instance, after the parameters have all been set, which means

Re: Type conversion questions

2008-02-19 Thread Jeromy Evans
Daniel Baldes wrote: Hello, I have a web form where you can, generally speaking, assign objects to groups. This is done via a multiple select box which displays an object's name and uses its ID property as value. So, usually, my action would get back a String array containing the IDs of the

Re: Map instead of List in action

2008-02-19 Thread Sessizlik
Hi Musachy, Thank you for your response, I am sorry but I can understand how to change getter and setter. How should be signatures of getter and setter? Just changing return type should not be enough ? Best Regards Sessizlik Musachy Barroso wrote: > > Change the setter and getter and acce

Re: populating ActionFormBean-s

2008-02-19 Thread Laurie Harper
Your Department class doesn't initialize its 'program' member when the no-arg constructor is called so when BeanUtils tries to fill in the data from the request, program will be null. I suspect that is your problem. Two things to try: 1) turn logging up to DEBUG for BeanUtils; that should show

Re: i18N jsp application on linux and windows

2008-02-19 Thread Laurie Harper
Raghuveer wrote: Hello Lauri, This is with reference.. http://www.mail-archive.com/user@struts.apache.org/msg72782.html [...] response.getCharacterEncoding()is returning ISO-8859-1. I have set it to charset - ISO-8859-2 in JSP pages but it is returning “charset - ISO-8859-1”. Then you have

Re: S2 NESTED iterators & FLAT HashMaps:

2008-02-19 Thread Randy Burgess
One is JSTL, the other is using OGNL and they are not the same. Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications > From: ravi_eze <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List > Date: Tue, 19 Feb 2008 08:44:06 -0800 (PST) > To: > Subject: Re: S2 NESTED it

Re: Struts 2 Container Security problem

2008-02-19 Thread Martin Gainty
start here http://www.acegisecurity.org/guide/springsecurity.html M- - Original Message - From: "Kelly Graus" <[EMAIL PROTECTED]> To: Sent: Tuesday, February 19, 2008 12:12 PM Subject: Struts 2 Container Security problem > Hi Everyone, > > I'm attempting to secure my first Struts 2 web

struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-02-19 Thread xianwinwin
Hi all, I'm trying to return a result to DIV in a form (in the example id='two') this is my form: initial content when the user clicks the GO2 --> the action, AjaxRemoteForm, is 'activated' (showing the 'data' the user has input) public String AjaxRemoteForm() {

Re: S2 NESTED iterators & FLAT HashMaps:

2008-02-19 Thread Dave Newton
--- ravi_eze <[EMAIL PROTECTED]> wrote: > The answers were a real help. I could get the things to things working... > > now when i use: fruits Val :${fruitsId.value} this displays: fruits Val > :[apple, banana, orange] > > but when i use: ${fruitsId.value.size()} its giving compile time > error

Struts 2 Container Security problem

2008-02-19 Thread Kelly Graus
Hi Everyone, I'm attempting to secure my first Struts 2 web app using container security with a DataSourceRealm. I'm using Tomcat 6 as my container. Here is how my project is setup: LicensingAdministration/ META-INF/ context.xml WEB-INF/ web.xml classes/ stru

Re: Map instead of List in action

2008-02-19 Thread Musachy Barroso
Change the setter and getter and access the map like: musachy On Feb 19, 2008 10:12 AM, Sessizlik <[EMAIL PROTECTED]> wrote: > > Hi all, > > I am completely new to Struts. I am studying about show-case examples. I > noticed that such a example: > > > The goal is updating multiple records at one

Re: S2 NESTED iterators & FLAT HashMaps:

2008-02-19 Thread ravi_eze
hi, The answers were a real help. I could get the things to things working... now when i use: fruits Val :${fruitsId.value} this displays: fruits Val :[apple, banana, orange] but when i use: ${fruitsId.value.size()} its giving compile time errors:tAttributes.jsp(98,16) The function size must

Re: struts2 s:if and displaytag question

2008-02-19 Thread Randy Burgess
It's because you have the property set on that column. Remove that attribute and if your condition is found then it will display that text. I don't think that if statement is correct either. This should look like: ... Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications

Re: struts2 s:if and displaytag question

2008-02-19 Thread Dave Newton
The "#element" is syntax meaning there's a named element "element" on the value stack; do the display tags interact with the S2 value stack? I'd be more likely to try "${element.abc}" as I would have assumed that the display tags did things with normal JEE contexts. Just an idea. Dave --- red p

struts2 s:if and displaytag question

2008-02-19 Thread red phoenix
I use Struts2 and displaytag, In testList,there is a abc attribute,it contains data like "english","france",when abc="english",I want to show En,else show Eu,my code is follows: En Eu when I execute code,I find it only shows english or france,I don't know why

Map instead of List in action

2008-02-19 Thread Sessizlik
Hi all, I am completely new to Struts. I am studying about show-case examples. I noticed that such a example: The goal is updating multiple records at one time. For that, in EditPersonAction.java List persons = new ArrayList(); And in EditPerson.java

Type conversion questions

2008-02-19 Thread Daniel Baldes
Hello, I have a web form where you can, generally speaking, assign objects to groups. This is done via a multiple select box which displays an object's name and uses its ID property as value. So, usually, my action would get back a String array containing the IDs of the selected objects. I w

Re: Unable to make Type Conversion work in Struts2

2008-02-19 Thread Jeromy Evans
Hi Maxx, Yeah, I've had no success with Enum's either for the same reason, however that's definitely fixed in Struts 2.1.1 (XWork 2.1) In theory, EnumMap should work in 2.1 as well, although I'm not sure what can be done about the constructor. regards, Jeromy Evans Maxx wrote: Thanks for yo

Differentiate Redirection of page if validator fails and action property setter fails.

2008-02-19 Thread neha bhatt
Hi All, I have made the page where userList is displayed page wise. There is the link 'createUser' on that page. I kept validation.xml file for CreateUser fields. If validation fails then it redirects to same 'UserDetail' page with validation Messages. Now..There is an integer variable 'page' in

Re: Unable to make Type Conversion work in Struts2

2008-02-19 Thread Maxx
Thanks for your answer. I partially fixed this, noticing the square brackets notation is the same for Lists and Maps, which is not so clear on the related doc page (I posted a comment about this, having had a conversion with Dave Newton about this in a more recent thread on the mailing-list), as w

Re: Tabbed panel problem

2008-02-19 Thread Jeromy Evans
Ok, that makes sense. This is a little hard to explain, but here goes... What I have done in the past is NOT use the href attribute on the tab itself. Instead include another ANOTHER div inside the tab and make this div the ajax target. ie. theme="simple"> ... Now, the inner div rath

Re: Struts2 actions' extension

2008-02-19 Thread Filipe David Manana
And, set it in the struts.properties file as the ActionMapper: struts.mapper.class=org.apache.struts2.dispatcher.mapper.LsfwebMapper On Feb 19, 2008 10:09 AM, Filipe David Manana <[EMAIL PROTECTED]> wrote: > I managed to find a solution to be able to use extensionless actions. > Just subclass t

Re: Struts2 actions' extension

2008-02-19 Thread Filipe David Manana
I managed to find a solution to be able to use extensionless actions. Just subclass the DefaultActionMapper like this: package org.apache.struts2.dispatcher.mapper; > > import java.util.*; > > public class LsfwebMapper extends DefaultActionMapper > { >private static List ignoredExtensions = ne

Re: How to come back to previous action?

2008-02-19 Thread Eduardo Yáñez Parareda
> > > You might want to include a Marker interface so that you don't collect all > the data from every request. If you have a BackAware interface (or > BackTarget, or something else meaningful). That's a good idea, but our app. saves the state depending on where you come from, not depending on w

Struts2 field validation and conversion

2008-02-19 Thread Filipe David Manana
Hi, I am using struts 2.0.11 and I am wondering about the following: I have an action with a Long property that is using both validation and conversion (a custom converter). I have a RequiredFieldValidator and a ConversionErrorFieldValidator set for that property, as follows: @Conversion @Valida

Re: Tabbed panel problem

2008-02-19 Thread Paranoid_Fabio
Yes. What I want to is to have the results of the action I call from inside the div shown inside the div again. Jeromy Evans - Blue Sky Minds wrote: > > I don't quite understand what you're asking for, but I suspect: > - you're doing the right thing using a remote tab/remote div to load > ht

Re: [S2] IE does not refresh page

2008-02-19 Thread Jeromy Evans
carmi_cd wrote: Hi i have program that when the user input data in the form and clicked the save button, it should display list of records that reflects changes made in the record edited thru the form. In Firefox it works perfectly but in IE the list does not reflect the changes made. It was refr