ajax and struts 2

2007-04-12 Thread David Harland
I am new to ajax and have just written my first ajax function. In my function I am passing a user id into the function and are being returned a List of Contacts to populate a select. Presently I am putting the id in a hidden field in the jsp and then passing it from there. What I would prefer

[s2] s:url escaping '' between params

2007-04-12 Thread Manu Mahajan
Hi I'm facing a very annoying problem with s:url. For some reason it is encoding the '' between the params to amp; Here's my code s:url action=getfilebrowserbody encode=false id=filebrowserurl s:param name=currentdirectory value=strcurrentdir / s:param name=rootdirectory

Re: Wrong Content Type text/plain

2007-04-12 Thread Teemu Tapper
hello, we had a similar problem and we solved it by using Tiles servlet instead of Tiles listener. Cheers, Teemu Torsten Römer wrote: I added Tiles to the struts2-blank-2.0.6 example webapp and started to work on my application. All works just fine on my Linux/Tomcat 5.5 development box

Re: [s2] s:url escaping '' between params

2007-04-12 Thread joey
I tried your code,but it worked fine! On 4/12/07, Manu Mahajan [EMAIL PROTECTED] wrote: Hi I'm facing a very annoying problem with s:url. For some reason it is encoding the '' between the params to amp; Here's my code s:url action=getfilebrowserbody encode=false id=filebrowserurl

Re: Tiles 2 woes

2007-04-12 Thread Antonio Petrelli
2007/4/11, [EMAIL PROTECTED] [EMAIL PROTECTED]: Also what supersedes the controllerClass tag? preparer attribute, and it must implement the ViewPreparer interface. Anyway this kind of question should be asked in the Tiles mailing list: http://tiles.apache.org/mail.html Antonio

[s2] Using struts-tags and Exception initializing TldLocationsCache

2007-04-12 Thread Max Pimm
Hi, I'm trying to set up the Struts 2.0.6 example blank application using the J4 distribution and i'm having problems using struts-tags. Any jsp that uses this tag library (that is all jsp's that include the line %@ taglib prefix=s uri=/struts-tags %) give compilation errors (see below). I

Re: [s2] Using struts-tags and Exception initializing TldLocationsCache

2007-04-12 Thread Alexis Pigeon
Hi Max On 12/04/07, Max Pimm [EMAIL PROTECTED] wrote: Hi, I'm trying to set up the Struts 2.0.6 example blank application using the J4 distribution and i'm having problems using struts-tags. Any jsp that uses this tag library (that is all jsp's that include the line %@ taglib prefix=s

Re: Struts 2 load problems?

2007-04-12 Thread Don Brown
I believe there is an open issue for localization, which is holding up the 2.0.8 release. Hopefully this will resolve the problem. Don On 4/10/07, Jeff C [EMAIL PROTECTED] wrote: This is an update to a queston I asked last week..with a little more info this time. We noticed last week the

Re: autocompleter not working on Firefox 1.5 on Linux

2007-04-12 Thread Rohit Dewan
Hi Musachy, I rebooted my linux machine for an unrelated reason and now cannot reproduce the issue. It is working now. Sorry for the bother. Regards, Rohit

Re: [s2] s:url escaping '' between params

2007-04-12 Thread Leon Rosenberg
I'm not sure that I understand you correctly, but has to be encoded to amp; in html. A html link http://bla?a=bc=d is invalid, the proper link would be http://bla?a=bamp;c=d regards Leon On 4/12/07, Manu Mahajan [EMAIL PROTECTED] wrote: Hi I'm facing a very annoying problem with s:url. For

Re: [s2] Using struts-tags and Exception initializing TldLocationsCache

2007-04-12 Thread Musachy Barroso
I'm getting this error on jetty from time to time, and cleaning up and re-running seems to work musachy On 4/12/07, Alexis Pigeon [EMAIL PROTECTED] wrote: Hi Max On 12/04/07, Max Pimm [EMAIL PROTECTED] wrote: Hi, I'm trying to set up the Struts 2.0.6 example blank application using the J4

Re: autocompleter not working on Firefox 1.5 on Linux

2007-04-12 Thread Musachy Barroso
I would expect that from a *windows* machine ;) musachy On 4/12/07, Rohit Dewan [EMAIL PROTECTED] wrote: Hi Musachy, I rebooted my linux machine for an unrelated reason and now cannot reproduce the issue. It is working now. Sorry for the bother. Regards, Rohit -- Hey you! Would you

Re: ajax and struts 2

2007-04-12 Thread Felipe Rodrigues
Did you realize about use struts tags? Inside an Action you can use ActionContext.getContext().getSession() to get a Map that represents the session. If you can't use Struts tags, then you can use DWR, but I don't know how to get session using DWR. Good Look. Felipe David Harland wrote:

Re: Wrong Content Type text/plain

2007-04-12 Thread Torsten Römer
Thanks Teemu, You provided the hint that solved the problem! Because I was too lazy to check how to use the Tiles servlet I tried to use org.apache.tiles.listener.TilesListener instead of org.apache.struts2.tiles.StrutsTilesListener and already like that it works. However the documentation

Re: Wrong Content Type text/plain

2007-04-12 Thread Antonio Petrelli
2007/4/12, Torsten Römer [EMAIL PROTECTED]: However the documentation states that The latter [StrutsTilesListener] provides tighter integration with Struts features such as freemarker integration. so I wonder if this applies to the Tiles servlet as well and if it would be better to use it

Re: Tiles 2 woes

2007-04-12 Thread stanlick
Thanks Antonio. This is what I decided after searching through the Tiles jar for prepare. Can you tell me if Tiles2 is documented somewhere. Also, is there a guide that explains the required changes when migrating Tiles1 to Tiles2? This looks like some really nice work and I'm happy to see

Re: Tiles 2 woes

2007-04-12 Thread Antonio Petrelli
2007/4/12, [EMAIL PROTECTED] [EMAIL PROTECTED]: Thanks Antonio. This is what I decided after searching through the Tiles jar for prepare. Can you tell me if Tiles2 is documented somewhere. Documentation is on the way, since we were busy preparing a release (and having Easter holidays :-) )

Re: Wrong Content Type text/plain

2007-04-12 Thread Torsten Römer
Antonio Petrelli wrote: 2007/4/12, Torsten Römer [EMAIL PROTECTED]: However the documentation states that The latter [StrutsTilesListener] provides tighter integration with Struts features such as freemarker integration. so I wonder if this applies to the Tiles servlet as well and if it

Losing session attributes between requests...

2007-04-12 Thread Peter L. Berghold
Hi folks, Have just started seeing a new problem in an application that is baffling me. I run this using Struts 1.3 on an Apache Tomcat server as I have been for a while. What I'm seeing is on one form I have information stashed away in a session as a session attribute as such:

Re: Wrong Content Type text/plain

2007-04-12 Thread Antonio Petrelli
2007/4/12, Torsten Römer [EMAIL PROTECTED]: Antonio Petrelli wrote: I'll gladly wait. I'm already happy that it works now, and I am glad I tried Struts2 after making two minor webapps with JSF/MyFaces/Tomahawk/Tiles - maybe a cumbersome combination It seems that you did not try Shale

[s2] How to use s:hidden

2007-04-12 Thread Ezequiel Puig
Hi, I am trying to use the s:hidden tag but i am having some problems. What i want to do is to fill the hidden tag with an array that I create using Javascript. My code: * In the jsp part i have this: a href=s:url action=Compare.do includeParams=get/s:url onclick=return

Re: ajax and struts 2

2007-04-12 Thread Martin Gainty
Good Morning David- I would start with looking at the ajax examples from struts2-showcase-2.0.6 and find the example which mostly closely exemplifies your task for example example7 illustrates population of a div tag in your form and if you run struts from localhost on port 8080 you can view

SOLVED!!!! Re: Losing session attributes between requests...

2007-04-12 Thread Peter L. Berghold
Nevermind folks... I found it. I found a particularly inventive way of shooting myself in the foot when I installed a session listener. The offending line: session.setMaxInactiveInterval(3600); which was set originally to a ridiculously low value. That's what I get for developing code while

Re: [s2] How to use s:hidden

2007-04-12 Thread Musachy Barroso
This is not an Struts question, but I will give you some hints. The anchor tag does not submit a form to the server (unless you are using the AJAX theme, but that's another story), so you should put those checkboxes inside a form with a submit tag, and add an onsubmit event to the form for

Re: [OT] Re: Eclipse WTP / Struts 2 - Not working!!

2007-04-12 Thread Manickam-Periaswamy . Vignesh
Sorry, still I did not understand it quite well. But my non-struts web project is working fine along with Eclipse WTP. So that means the deployment is proper right? I understand that I sound dumb here. But why I get this problem when I include struts? which works fine when I deploy it

Re: [OT] Re: Eclipse WTP / Struts 2 - Not working!!

2007-04-12 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: So that means the deployment is proper right? It means the deployment for the other web project is right; I have no real way of knowing if it is for the Struts project. But why I get this problem when I include struts? which works fine when I deploy it separately

Re: [OT] Re: Eclipse WTP / Struts 2 - Not working!!

2007-04-12 Thread Piero Sartini
If I do understand it right then your s2 app works when deploying the war manually to tomcat. But if you try to start within eclipse it does not work? There _must_ be some configuration issue with WTP. I guess there are some libraries from s2 that are packaged in the war but are not included if

Struts in Servlet 2.4

2007-04-12 Thread Slattery, Tim - BLS
I'm still trying to move Struts apps from WL 8 (servlet 2.3 environment) to WL 9 (servlet 2.4 environment). I've change the top line in my web.xml to the long, complicated string that specifies 2.4. The app runs the first Action module, then forwards to a jsp page. In that page are both JSTL and

Re: Struts in Servlet 2.4

2007-04-12 Thread Dave Newton
--- Slattery, Tim - BLS [EMAIL PROTECTED] wrote: c:forEach items=${RespData} var=resp Andit points to items and gives this message: This attribute does not support request time values. I don't recall, but did the TLD URIs change between 2.3/2.4? (I don't even know if it would matter if

Re: [OT] Re: Eclipse WTP / Struts 2 - Not working!!

2007-04-12 Thread Martin Gainty
suggest searching for Struts2 Eclipse plugin here is a place to start looking http://cwiki.apache.org/WW/plugins.html With either sitemesh or tiles plugin You would have to -find the missing class -find the jar which contains the missing class -from Eclipse Go to 'Java Build Path' -add external

RE: Struts in Servlet 2.4

2007-04-12 Thread Frank Russo
Did you change the version of your jstl jars? I forget which version you need, but I think jstl 1.0 was 2.3 compliant, and 1.1 was 2.4 compliant. You'll need to upgrade both jstl.jar and standard.jar... -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Thursday,

Re: Struts in Servlet 2.4

2007-04-12 Thread Musachy Barroso
Did you change web.xml to this? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 musachy On 4/12/07, Frank Russo [EMAIL

[OT] Mascot?

2007-04-12 Thread Torsten Römer
OK, maybe I have been working too much and now I had some beer... came to think that so many great OSS products have mascots... and in Swedish a Struts is an Ostrich (Struthio camelus), and an Ostrich's legs neck look like struts, don't you agree? ;-)

Problem passing form fields with autocompleter

2007-04-12 Thread Scott Nesbitt
I have a form with an autocompleter like this: s:form id=mainForm theme=simple validate=false s:url id=autosportsteam action=LookupSportsTeam/ div class=form-edit s:autocompleter name=sportsTeam id=sportsTeam keyName=sportsTeamKey

Re: Problem passing form fields with autocompleter

2007-04-12 Thread Musachy Barroso
You should have a getBar() defined on your action, not a getFoo() regards musachy On 4/12/07, Scott Nesbitt [EMAIL PROTECTED] wrote: I have a form with an autocompleter like this: s:form id=mainForm theme=simple validate=false s:url id=autosportsteam action=LookupSportsTeam/ div

Re: Problem passing form fields with autocompleter

2007-04-12 Thread Harring Figueiredo
Scott: I had a similar problem, and I got around it by getting the parameter myself... (I know.. a little pain, but got it done) Let me know if you get the _correct_ way working. hf. On 4/12/07, Scott Nesbitt [EMAIL PROTECTED] wrote: I have a form with an autocompleter like this: s:form

RE: Struts in Servlet 2.4

2007-04-12 Thread Slattery, Tim - BLS
--- Slattery, Tim - BLS [EMAIL PROTECTED] wrote: c:forEach items=${RespData} var=resp Andit points to items and gives this message: This attribute does not support request time values. I don't recall, but did the TLD URIs change between 2.3/2.4? (I don't even know if it would

Re: Problem passing form fields with autocompleter

2007-04-12 Thread Scott Nesbitt
Not sure why it should be getBar(). The name of the hidden field is foo, so shouldn't that be the variable that has the getter and setter? Regarding passing the field as a parameter, I am not too proud for that. Could you post a little example code? I tried to do something like this: s:url

Re: Problem passing form fields with autocompleter

2007-04-12 Thread Harring Figueiredo
I am sure it should NOT be getBar() either. It should be getFoo(). Perhaps there is a bug with the framework on not processing/doing reflection on hidden fields? hf. On 4/12/07, Scott Nesbitt [EMAIL PROTECTED] wrote: Not sure why it should be getBar(). The name of the hidden field is foo,

Re: Problem passing form fields with autocompleter

2007-04-12 Thread Musachy Barroso
the value for the field comes from the value attribute, which is evaluated against the Value Stack. musachy On 4/12/07, Harring Figueiredo [EMAIL PROTECTED] wrote: I am sure it should NOT be getBar() either. It should be getFoo(). Perhaps there is a bug with the framework on not

RE: Struts in Servlet 2.4

2007-04-12 Thread Slattery, Tim - BLS
-Original Message- From: Frank Russo [mailto:[EMAIL PROTECTED] Sent: Thursday, April 12, 2007 2:40 PM To: Struts Users Mailing List Subject: RE: Struts in Servlet 2.4 Did you change the version of your jstl jars? I forget which version you need, but I think jstl 1.0 was 2.3

Re: S2 Action Validation

2007-04-12 Thread stanlick
Laurie -- Thanks girl. I guess I'm just going to have to bite the bullet and consider the theme modifications another step. I guess it's not a problem with new releases overlaying these modified files? Scott On 4/11/07, Laurie Harper [EMAIL PROTECTED] wrote: I think labelPosition will only

Re: S2 Action Validation

2007-04-12 Thread James Mitchell
IIRC, 'Laurie' is short for Lawrence (not a girl) :D -- James Mitchell On Apr 12, 2007, at 5:07 PM, [EMAIL PROTECTED] wrote: Laurie -- Thanks girl. I guess I'm just going to have to bite the bullet and consider the theme modifications another step. I guess it's not a problem with

Re: S2 Action Validation

2007-04-12 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: Laurie -- Thanks girl. Ouch. I guess I'm just going to have to bite the bullet and consider the theme modifications another step. I guess it's not a problem with new releases overlaying these modified files? What do you mean by that? The distro files are in

Re: Problem passing form fields with autocompleter

2007-04-12 Thread Dave Newton
--- Scott Nesbitt [EMAIL PROTECTED] wrote: Not sure why it should be getBar(). The name of the hidden field is foo, so shouldn't that be the variable that has the getter and setter? You guys are both right. The argument to the 'value' attribute is an object: s:hidden name=foo

java.lang.SecurityException: No class by name: validator

2007-04-12 Thread Felipe Rodrigues
Hi guys, Have somebody ever seen this message when trying to validate a form with ajax theme? java.lang.SecurityException: No class by name: validator and of course, knows how to fix that? I think it can be a classpath problem or something I'm missing, but can't figure out what is that. I've

Re: java.lang.SecurityException: No class by name: validator

2007-04-12 Thread Felipe Rodrigues
Seems to me it is the same issue from the Showcase App. Does Anyone knows how to fix that? Thanks, Felipe Felipe Rodrigues wrote: Hi guys, Have somebody ever seen this message when trying to validate a form with ajax theme? java.lang.SecurityException: No class by name: validator