one bean between actions

2009-02-03 Thread Anton Bashmakov
Hi, I Use struts 2 for my application. And I need to use the same bean in different actions and JSPs. Like user has found an object we show him details page, than he is able to edit the object, it's another JSPs but object is the same (in this case there is even no action class between these two vi

RE: Setting up Struts for JSP application.

2009-02-03 Thread Son Nguyen
No, I haven't I been mostly looking at the mail Reader example. I tried to follow the Mailreader Training course but was unsuccessful. Can you send me the link for the Step-by-Step tutorial on the Struts 2. Thanks, -Original Message- From: Dave Newton [mailto:newton.d...@yahoo.com] Sen

Re: How to display composite listValue in listValue tag in Struts 2 without using iterator

2009-02-03 Thread Saikat Podder
Thank you Sonny, It worked wonderfully :) But apparently the same expression does not work for all types of attributes. Sonny Gill wrote: > > Didn't you also post this at Javaranch > (http://www.coderanch.com/t/429374/Struts/show-composite-string-listValue-attribute)? > > I answered it there

Re: Display XMLGregorianCalendar as date on jsp page using type converter

2009-02-03 Thread dusty
Here is a Calendar converter class. Modify as necessary for your calendar object: import ognl.DefaultTypeConverter; import org.apache.commons.lang.time.DateUtils; import org.apache.commons.lang.time.FastDateFormat; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFacto

Re: How to display composite listValue in listValue tag in Struts 2 without using iterator

2009-02-03 Thread Sonny Gill
Didn't you also post this at Javaranch (http://www.coderanch.com/t/429374/Struts/show-composite-string-listValue-attribute)? I answered it there, have a look. Cheers, S. On Wed, Feb 4, 2009 at 2:58 AM, Saikat Podder wrote: > > Hello Friends, > > > I am new to Struts 2 & I need your little help

Re: Setting up Struts for JSP application.

2009-02-03 Thread Dave Newton
Son Nguyen wrote: Hi, I am completely new to struts. I am having a hard time following some of the codes from the sample struts application. I have loaded the example mail reader and rest show case as well as some of the other application. They seem to be working with my tomcat 6.0 Now I am t

Re: Tag s:url

2009-02-03 Thread Dave Newton
Moacyr Prado wrote: I`m using a tag url but this tag are not evaluate a expression "[0].getActionsName" on action parameter.Is it normal? example: The last Action called has getActionName() and getLinkText() methods. In browser shows http://localhost/App/[0].getActionName[] I'm not sure t

Tag s:url

2009-02-03 Thread Moacyr Prado
Hi, I`m using a tag url but this tag are not evaluate a expression "[0].getActionsName" on action parameter.Is it normal? example: The last Action called has getActionName() and getLinkText() methods. In browser shows http://localhost/App/[0].getActionName[] Can anybody help me?

Re: Display XMLGregorianCalendar as date on jsp page using type converter

2009-02-03 Thread Dave Newton
bilobag wrote: I have a collection of XMLGregorianCalendar objects that I would like to display on a jsp page as a formatted date. So far I have tried creating my own converter class to convert XMLGregorianCalendar to java.util.Date, but I can't seem to get it called properly. What is the best

Display XMLGregorianCalendar as date on jsp page using type converter

2009-02-03 Thread bilobag
I have a collection of XMLGregorianCalendar objects that I would like to display on a jsp page as a formatted date. So far I have tried creating my own converter class to convert XMLGregorianCalendar to java.util.Date, but I can't seem to get it called properly. What is the best way to get this

Re: What may cause ognl.InappropriateExpressionException warning ?

2009-02-03 Thread Musachy Barroso
If you are, the params interceptor doesn't like parameters with spaces in the name (this was fixed in xwork already), to fix it, set "acceptedParamNames" to "[[\p{Graph}\s]&&[^,#:=]]*" in your param interceptor. musachy On Tue, Feb 3, 2009 at 5:36 PM, Musachy Barroso wrote: > That looks familiar

Re: What may cause ognl.InappropriateExpressionException warning ?

2009-02-03 Thread Musachy Barroso
That looks familiar, are you using displaytag? musachy On Tue, Feb 3, 2009 at 4:39 PM, Dave Newton wrote: > Wouldn't it make sense to include the JSP/expression that's causing the > error? > > Dave > > Emi Lu wrote: >>> >>> When switching query result page by page (online), I got the following >

Re: trouble deploying struts2 app to tomcat 1.5.0.05

2009-02-03 Thread Musachy Barroso
The first time you listed the jars, the struts and xwork jars were not in lib. Drop to a shell and run $ unzip -l your_war_name.war | grep lib and post the output. musachy On Tue, Feb 3, 2009 at 3:45 PM, Wick, Dan wrote: > Is there a way to get a good log of what's actually happening? Can't >

Re: What may cause ognl.InappropriateExpressionException warning ?

2009-02-03 Thread Dave Newton
Wouldn't it make sense to include the JSP/expression that's causing the error? Dave Emi Lu wrote: When switching query result page by page (online), I got the following warning message: WARNING: Error setting value ognl.InappropriateExpressionException: Inappropriate OGNL expression: (d - 6

Re: What may cause ognl.InappropriateExpressionException warning ?

2009-02-03 Thread Emi Lu
When switching query result page by page (online), I got the following warning message: WARNING: Error setting value ognl.InappropriateExpressionException: Inappropriate OGNL expression: (d - 6836677) - p I am lost. Could someone tell me what may cause this warning please? Info searched for

What may cause ognl.InappropriateExpressionException warning ?

2009-02-03 Thread Emi Lu
Good morning, When switching query result page by page (online), I got the following warning message: WARNING: Error setting value ognl.InappropriateExpressionException: Inappropriate OGNL expression: (d - 6836677) - p I am lost. Could someone tell me what may cause this warning please? Th

RE: trouble deploying struts2 app to tomcat 1.5.0.05

2009-02-03 Thread Wick, Dan
Is there a way to get a good log of what's actually happening? Can't seem to get a stack that points at a specific problem. I've been staring at this so long that I don't know where to look next! --Dan Feb 3, 2009 2:28:21 PM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception

Re: Struts 2 In Action Sample Application

2009-02-03 Thread Wes Wannemacher
On Tuesday 03 February 2009 15:27:02 SanJ.SANJAY wrote: > I actually do not have in WEB-INF/lib, I have all the jars in a shred lib > and add them in Eclipse and build. This is how I do for other projects > also. > There is some sort of problem with the XML in parsing. I would try re-creating the

Re: Problem moving from 2.0.14 to 2.1.6

2009-02-03 Thread Oleg T.
It eliminated the error, however, now field specific message defined for the Model does not get displayed. I am still testing and will try the same implementing ModelDriven. Thanks, Oleg On Mon, Jan 26, 2009 at 6:20 PM, Gustave Pheiffers wrote: > Thanks Peter. > > That fixed the problem, althoug

Setting up Struts for JSP application.

2009-02-03 Thread Son Nguyen
Hi, I am completely new to struts. I am having a hard time following some of the codes from the sample struts application. I have loaded the example mail reader and rest show case as well as some of the other application. They seem to be working with my tomcat 6.0 Now I am trying to implant the

Re: Struts 2 In Action Sample Application

2009-02-03 Thread SanJ.SANJAY
I actually do not have in WEB-INF/lib, I have all the jars in a shred lib and add them in Eclipse and build. This is how I do for other projects also. Wes Wannemacher wrote: > > On Tuesday 03 February 2009 15:11:06 SanJ.SANJAY wrote: >> Even if I use the top content form your applicationConte

Re: Struts 2 In Action Sample Application

2009-02-03 Thread Wes Wannemacher
On Tuesday 03 February 2009 15:11:06 SanJ.SANJAY wrote: > Even if I use the top content form your applicationContext.xml in chapter > 4, I get the same error..so wondering what else could eb the issue. Do you have multiple versions of Spring, or anything else that might attempt to parse XML in yo

Re: Struts 2 In Action Sample Application

2009-02-03 Thread SanJ.SANJAY
Even if I use the top content form your applicationContext.xml in chapter 4, I get the same error..so wondering what else could eb the issue. Here is what I used this time : 1 2 http://www.springframework.org/schema/beans"; 3xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 4

Re: Struts 2 In Action Sample Application

2009-02-03 Thread Wes Wannemacher
On Tuesday 03 February 2009 14:54:55 SanJ.SANJAY wrote: > Has anyone faced this issue with Sample application?? > > SanJ.SANJAY wrote: > > Has anyone here tried and tested the Sample Application code that comes > > for this book "Struts 2 In Action" ? > > I am having hard time to fix it. Currently

Re: Struts 2 In Action Sample Application

2009-02-03 Thread SanJ.SANJAY
Has anyone faced this issue with Sample application?? SanJ.SANJAY wrote: > > Has anyone here tried and tested the Sample Application code that comes > for this book "Struts 2 In Action" ? > I am having hard time to fix it. Currently I am facing the issues in > applicationContext.xml file. >

Re: [S2] Ajax Anchor Tag

2009-02-03 Thread Wes Wannemacher
On Tuesday 03 February 2009 14:48:54 you wrote: > That is what I had hoped for. Unfortunately, it appears that the formId > property is only considered when using the ajax theme. > > Thanks, > Ken > Oh, I guess I misunderstood the question. There is no struts-y way to do it, other than using th

RE: [S2] Ajax Anchor Tag

2009-02-03 Thread Hoying, Ken
That is what I had hoped for. Unfortunately, it appears that the formId property is only considered when using the ajax theme. Thanks, Ken -Original Message- From: Wes Wannemacher [mailto:w...@wantii.com] Sent: Tuesday, February 03, 2009 2:45 PM To: Struts Users Mailing List Subject: R

Re: [S2] Ajax Anchor Tag

2009-02-03 Thread Wes Wannemacher
On Tuesday 03 February 2009 14:39:25 Hoying, Ken wrote: > I would like to take advantage of the Struts 2 Ajax Anchor tag's > functionality to build the url on the client based on an href and the > parameters for a given form (formId). However, I do not want the call to > be made asynchronously.

[S2] Ajax Anchor Tag

2009-02-03 Thread Hoying, Ken
I would like to take advantage of the Struts 2 Ajax Anchor tag's functionality to build the url on the client based on an href and the parameters for a given form (formId). However, I do not want the call to be made asynchronously. I just want it to build the url and then get it normally. I

ClassCastException: org.apache.struts.taglib.html.MessagesTei

2009-02-03 Thread Ken Bowen
Hi, I have an old app which was developed under struts 1.2.8 using struts- tiles, and has undergone steady development. However, /AS FAR AS I KNOW/, no changes to the tags library files have been made for a long time. Yet today, after rebuilding the project (using Project > Clean in Eclipse

Re: Null element in List

2009-02-03 Thread Dave Newton
Use 's "emptyOption" attribute? I mean, you can't just put a "null" into a list and expect to get a value from it--you could put an empty string, maybe; that might work with an Integer object to avoid getting a 0. Dave DavidCAIT wrote: Actually that didn't work out when I tested it. A Tree

Re: Null element in List

2009-02-03 Thread DavidCAIT
Actually that didn't work out when I tested it. A TreeMap sorts elements by calling Object.equals. When it encounters my null element, it tries to de-reference it and throws an exception. HashMap does not produce any exceptions, but leaves my numbers in a very strange order like: 3, 2, 4, 1, 5,

Re: Null element in List

2009-02-03 Thread DavidCAIT
I did find a workaround which is a bit undesirable. If I change my ArrayList to a TreeMap and store the same value for the key and the value then the problem disappears. However, it is a bit wasteful to store each value in the list twice. Any other ideas? If not, my workaround is good enough for

populate items using struts2

2009-02-03 Thread unnii
Hi all, am new to struts2.. am struggling to get the result for populating items from DB. my requirement is to populate country, which is stored in DB, using struts2 and when u choose a particular country, another select box populate its cities, which also stored in DB.. at first i tried, fetch

Null element in List

2009-02-03 Thread DavidCAIT
Hi, I have a list of Integers and I want one of the options to be null (since it is a search field). However, I get the following freemarker exception when rendering my JSP: >> FreeMarker template error! >> Error on line 73, column 13 in template/simple/select.ftl >> stack.findValue('top') is u