Re: Problem from defining JavaBean as an attribute inside ActionForm

2008-07-02 Thread Lukasz Lenart
Hi > We are using Struts 1.2.9 and writing the JSP page as below: > > > > > > > As I remember, Struts 1 don't support such evaluation, you can use Nested Tags [1] , example are here [2] [1] http://struts.apache.org/1.2.9/userGuide/struts-nested.html [2] http://www.mail-

Problem from defining JavaBean as an attribute inside ActionForm

2008-07-02 Thread Chandramouli P
Hi, I have the below scenario: I have a java bean as below: public class Address { private String city; private String state; and public getters/setters for the above attributes; } and I have the ActionForm as below: import Address; public class EmpForm extends ActionForm

Re: [struts] Slow performance with Struts2

2008-07-02 Thread Dale Newfield
yorlick kilroy wrote: I'm sorry but I only just read about javassist now, as I had no idea what it is nor does. How do I include it? do I just drop it in my lib folder like I do with other Struts plugins? How do I use it? and what exactly does it do? Yes, just drop the .jar into your WEB-INF/li

RE: XSLTResult problem

2008-07-02 Thread John Krueger
Are you using Java 6? I tried your example and it works for me with Java 5 but not with Java 6. I ran it through the debugger and the problem is in the struts class SimpleAdapterDocument. The getXmlStandalone method always throws the operationNotSupported exception. public boolean getXm

Re: Re: XSLTResult problem

2008-07-02 Thread Chris Pratt
It sounds like what you really want to do is get the OutputStream from the response and stream the XML to it, then return null from your action. (*Chris*) On Wed, Jul 2, 2008 at 12:31 PM, Eric Hamacher <[EMAIL PROTECTED]> wrote: > I have an org.w3c.dom.Document which needs to be streamed as XML.

Re: XSLTResult problem

2008-07-02 Thread Chris Pratt
If you don't have a stylesheet, what were you expecting the XSL result to do? (*Chris*) On Wed, Jul 2, 2008 at 10:46 AM, Eric Hamacher <[EMAIL PROTECTED]> wrote: > I took your last attachment, altered it (we don't use JDOM only the > org.w3c.dom stuff . . . but it looks like it should work for >

RE: zipping files for download

2008-07-02 Thread Eric Hamacher
I said : "The ideal solution would be to have a custom result which somehow receives from the action some type of object which contains Files in a tree hierarchy." I did just that. I invented an object "Directory" which holds files and other "directories". My action assembled this object. My

Re: zipping files for download

2008-07-02 Thread Roger
On Wednesday 02 July 2008 23:44:16 Eric Hamacher wrote: > Followed my instincts, problem is solved. No need to reply! > So what did your instinct tell you? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-

RE: zipping files for download

2008-07-02 Thread Eric Hamacher
Followed my instincts, problem is solved. No need to reply! -Original Message- From: Eric Hamacher [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2008 1:10 PM To: Struts Users Mailing List Subject: zipping files for download Hello: I started writing a Struts 2 action which zips

RE: XSLTResult problem

2008-07-02 Thread Eric Hamacher
Thanks for the response. Yes, it's there. I am starting to doubt whether XSLTResult will in fact transform my Document. I am looking at: http://cse-mjmcl.cse.bris.ac.uk/blog/2007/09/10/1189430125294.html as a reference for using XSLTResult without stylesheets. I was hoping that somebody else

Re: [S2] Simple forking

2008-07-02 Thread Struts Two
No, you do not. Those defaults are to make your job easier in most cases, you can return any string as long as it matches the "name" attributes. - Original Message From: Milan Milanovic <[EMAIL PROTECTED]> To: user@struts.apache.org Sent: Wednesday, July 2, 2008 3:21:33 PM Subject: Re:

Re: REST plugin URL syntax

2008-07-02 Thread Mike Watson
Thanks heaps Jeromy, I'll grab the 2.1.3 snapshot and try again. A vanilla sample app would be great (others would probably find it useful too). Cheers Mike 2008/7/3 Jeromy Evans <[EMAIL PROTECTED]>: > Mike Watson wrote: >> >> Hi Jeromy, >> >> I've finally found time to try to resolve this but

RE: XSLTResult problem

2008-07-02 Thread John Krueger
Do you have a public getDoc() method on your action? John > -Original Message- > From: Eric Hamacher [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 01, 2008 3:31 PM > To: Struts Users Mailing List > Subject: XSLTResult problem > > Struts 2.0.11 > > > > Hello: > > > > > >

RE: Re: XSLTResult problem

2008-07-02 Thread Eric Hamacher
I have an org.w3c.dom.Document which needs to be streamed as XML. I originally got the idea of using XSLTResult to achieve this from a blog: http://cse-mjmcl.cse.bris.ac.uk/blog/2007/09/10/1189430125294.html which claims that it could done with no stylesheet. In a way, this doesn't surprise me

[S2] Preserving messages across a Redirect in Struts 2

2008-07-02 Thread Greg Lindholm
Hi All, I took a look at using MessageStoreInterceptor  to preserve messages across a redirect and didn't like what I saw, it's too hard to configure.  So I wrote an Interceptor RedirectMessageInterceptor (included below) that will automatically preserve messages across a redirect or redirectAc

Re: [S2] Simple forking

2008-07-02 Thread Milan Milanovic
Oh, thank you Lukasz. So, I just return string, I don't need to use predefiend Action.SUCCESS, etc. -- Thx, Milan Lukasz Lenart wrote: > >> No, I haven't. But, how do I choose "result1" or "result2" from >> InputActions' >> "save" method ? > > Base on the result from execute() > > public Str

Re: Serialization DynaActionForm

2008-07-02 Thread Laurie Harper
STRUTS SL. Mailing List wrote: The Struts-config.xml is as follows: . . . and the catalina.out I get this error. WARN No puedo serializar atributo de sesi?n FormCircuitos para sesi?n 772D050829571AEA6C6E7135C8BE60DA That's not an error, it's a w

Re: XSLTResult problem

2008-07-02 Thread Laurie Harper
You don't have a stylesheet? What are you expecting the XSLTResult to do, if you don't have any XSLT to process? L. Eric Hamacher wrote: I took your last attachment, altered it (we don't use JDOM only the org.w3c.dom stuff . . . but it looks like it should work for org.w3c.dom.Document). Now

Re: [s] Validity of user session

2008-07-02 Thread Laurie Harper
Milan Milanovic wrote: I have an SessionAware-based action class, where I put some variables into session when user came to the page which is backed up with that action class. I'm wondering what is validity of that session object, because I'm not sure if I have possibility to clear user session ?

Re: [S2] adding serialVersionUID to actions

2008-07-02 Thread Laurie Harper
Gabriel Belingueres wrote: Hi, Is there any value in adding the serialVersionUID to all our actions? My idea is just to add a @SupressWarning("serial") to each action. AFAIK, the actions are newly created in each request and are never put into session or application scope (by Struts itself at l

[S2] Issues with extending themes

2008-07-02 Thread Nick Scavelli
I am struggling with the whole "extending theme" functionality in struts2. Either I'm doing something incredibly stupid or there's an issue with extending themes in struts2 (2.1.2 to be more clear). From what I've gathered from the Struts 2.x documentation is that I should be able to just simply

Re: [S2] Simple forking

2008-07-02 Thread Lukasz Lenart
> No, I haven't. But, how do I choose "result1" or "result2" from InputActions' > "save" method ? Base on the result from execute() public String execute() { if (something) { return "result1"; } else { return "result2"; } } Regards -- Lukasz http://www.lenart.org.pl/ ---

Re: [S2] Simple forking

2008-07-02 Thread Milan Milanovic
No, I haven't. But, how do I choose "result1" or "result2" from InputActions' "save" method ? -- Thx, Milan Struts Two wrote: > > Have you tried: >   > >     // First result >     /pages/Finish.jsp >   // Second result >     >   second >   /second

zipping files for download

2008-07-02 Thread Eric Hamacher
Hello: I started writing a Struts 2 action which zips up the contents of a directory on the filesystem and downloads it. Everything was fine until I discovered that java.util.zip.ZipOutputStream requires an OutputStream in its constructor. It doesn't seem like a good idea to get a reference t

RE: XSLTResult problem

2008-07-02 Thread Eric Hamacher
I took your last attachment, altered it (we don't use JDOM only the org.w3c.dom stuff . . . but it looks like it should work for org.w3c.dom.Document). Now when I use it within an as a result . . . ? Does ? need to be the location of a stylesheet? I don't have one, so can I just say:

Re: [S2] Simple forking

2008-07-02 Thread Struts Two
Have you tried:       // First result     /pages/Finish.jsp   // Second result       second   /secondparam>   true   ${id}     __ Connect wit

Re: [S2] Simple forking

2008-07-02 Thread Milan Milanovic
Dear Lukasz, no I need to have someting like this: // First result /pages/Finish.jsp // Second result second /secondparam> true ${id} And to choose it from my action class. How ?

Re: [S2] Simple forking

2008-07-02 Thread Lukasz Lenart
> So, that's it ? But, what in the case if my page should be supported with > another action class (in another namespace) ? You can use instead full file path, not just fille name Regards -- Lukasz http://www.lenart.org.pl/ -

Re: [S2] Simple forking

2008-07-02 Thread Milan Milanovic
Thanks Lukasz. So, that's it ? But, what in the case if my page should be supported with another action class (in another namespace) ? -- Thx, Milan Lukasz Lenart wrote: > > Use params in result > > >/pages/${pageName} > > > and in InputAction define getPageName() > > > Rega

Re: [S2] Simple forking

2008-07-02 Thread Lukasz Lenart
Use params in result /pages/${pageName} and in InputAction define getPageName() Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROT

Re: XSLTResult problem

2008-07-02 Thread Chris Pratt
The mail list software must have scraped it off. I'll send it to you offline. (*Chris*) On Wed, Jul 2, 2008 at 5:28 AM, Eric Hamacher <[EMAIL PROTECTED]> wrote: > Thanks Dave and Chris. Chris, there was no attachment on your email. > Could you send it again? Thanks again. > > -Original Me

[S2] Simple forking

2008-07-02 Thread Milan Milanovic
Hi, I need to choose sometimes one page to show, but someting another, from the same action. For example, when user click on "save" link in .jsp, I want to go to Finish.jsp, but sometimes I want to go to some other page, that is handled by another action class (so, it is not in current namespace)

Re: [struts] Slow performance with Struts2

2008-07-02 Thread yorlick kilroy
I'm sorry but I only just read about javassist now, as I had no idea what it is nor does. How do I include it? do I just drop it in my lib folder like I do with other Struts plugins? How do I use it? and what exactly does it do? On Tue, Jul 1, 2008 at 1:22 AM, DNewfield <[EMAIL PROTECTED]> wrote:

Re: Specific extension per namespace

2008-07-02 Thread Vanja Petreski
Hi Jeromy, I've just wrote the generic ExtendedActionMapper ;) Which is the best way to share stuff like this? V On Wed, Jul 2, 2008 at 3:33 PM, Jeromy Evans < [EMAIL PROTECTED]> wrote: > Vanja Petreski wrote: > >> Hello, >> >> Is it possible to solve the following problem in some other way th

Re: [s2] Problem with redirection - [resolved]

2008-07-02 Thread Milan Milanovic
O.K. Lukasz, this works now! Thanks. -- Milan Lukasz Lenart wrote: > >> >> >> >>showChanges >>/second >> >> > > Add staticParamIntreceptor [1] or use paramsPrepareParamsStack [2] and > define result like

Re: Struts2 application doesn't work with Firefox 3

2008-07-02 Thread Pierrot52
I'm sorry to have made you spent time. I think I just found what the problem is. It seems Firefox was waiting for an answer to remember the password for the logon screen. Unfortunately there was no indication whatsoever. I reloaded the page several times and I've noticed it. Thanks anyway for the

Re: Struts2 application doesn't work with Firefox 3

2008-07-02 Thread Jim Kiley
Do your logs show that the action is getting triggered? Can you provide the code for the JSP that is not getting rendered? jk On Wed, Jul 2, 2008 at 10:10 AM, Pierrot52 <[EMAIL PROTECTED]> wrote: > > I have an action that normally brings a signon form but for some reasons > Firefox hangs. The U

Re: Struts2 application doesn't work with Firefox 3

2008-07-02 Thread Pierrot52
I have an action that normally brings a signon form but for some reasons Firefox hangs. The URL to load the form is http://my_host:8080/cobbCalculator2/signonForm.action As I said it works fine with Firefox 2 but not with Firefox 3. The Struts2 application is running on a Glassfish server. I'm

s2: howto disable the user to input date in datetimepicker

2008-07-02 Thread xianwinwin
Hi all, I wish to prevent a user to input a date in my datetimepicker. For this, I'm using the command: disabled ="true" Unfortunately, the user is able to input the date. does anyone know what is the problem? -- View this message in context: http://www.nabble.com/s2%3A-howto-disable-the-use

Re: Struts2 application doesn't work with Firefox 3

2008-07-02 Thread Jim Kiley
We would need a lot more details than this. What should it be doing; what parts don't work? What code of yours appears to be causing problems? On Wed, Jul 2, 2008 at 9:50 AM, Pierrot52 <[EMAIL PROTECTED]> wrote: > > Hello, > I have developed a Struts2 application that works well under Firefox 2,

Struts2 application doesn't work with Firefox 3

2008-07-02 Thread Pierrot52
Hello, I have developed a Struts2 application that works well under Firefox 2, IE 6, IE 7, Safari, and Opera. Unfortunately it doesn't work under Firefox 3. Has anybody made this observation and found a solution to this problem? Regards. -- View this message in context: http://www.nabble.com/Str

Re: Specific extension per namespace

2008-07-02 Thread Jeromy Evans
Vanja Petreski wrote: Hello, Is it possible to solve the following problem in some other way then implementing the custom ActionMapper (Struts 2.0.11.1): 1) struts.action.extension=html 2) I am using the rome rss s2 plugin and have the special namespace for feeds: /feeds 3) I am accessing fee

Serialization DynaActionForm

2008-07-02 Thread STRUTS SL. Mailing List
The Struts-config.xml is as follows: . . . and the catalina.out I get this error. WARN No puedo serializar atributo de sesi?n FormCircuitos para sesi?n 772D050829571AEA6C6E7135C8BE60DA And the question is how the serialization DynaActionF

Re: REST plugin URL syntax

2008-07-02 Thread Jeromy Evans
Mike Watson wrote: Hi Jeromy, I've finally found time to try to resolve this but haven't had much luck. Just to recap, I'm looking to be able to do something similar to the following: /book -> returns a list of books /book/123 -> returns book with id 123 /book/123/chapter/1 -> return chapter wi

RE: XSLTResult problem

2008-07-02 Thread Eric Hamacher
Thanks Dave and Chris. Chris, there was no attachment on your email. Could you send it again? Thanks again. -Original Message- From: Chris Pratt [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2008 11:40 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: XSLTResult probl

Specific extension per namespace

2008-07-02 Thread Vanja Petreski
Hello, Is it possible to solve the following problem in some other way then implementing the custom ActionMapper (Struts 2.0.11.1): 1) struts.action.extension=html 2) I am using the rome rss s2 plugin and have the special namespace for feeds: /feeds 3) I am accessing feed f1 (for example) via .

Re: [s2] Problem with redirection

2008-07-02 Thread Milan Milanovic
Dear Lukasz, yes, that's exactly because I'm wondering why id is not passed in my example ? -- Thx, Milan Lukasz Lenart wrote: > > Hi, > >> does paramsPrepareParamsStack by default exist ? > > Upsss once again, paramsPrepareParamsStack exist and already > contain staticParams intercepto

S2 i18n wrong locale selection!

2008-07-02 Thread Igor Vlasov
Hello, I did a sample s2 page with multilanguage. I did sample.properties for action for [default,en,ru,es,de] I have default language=ru for server. Then I change "accept-language" to [az|en] in FF browser. When i enter the page with it shows "П

Struts2 file upload and div contol in same form

2008-07-02 Thread Saqib Shehzad
Hi, I am trying to use ajax div and file control in same form. But div is not loading properly instead it shows [object HTMLDocument] on firefox and [object] on IE. But if I try to use them separately then both are working fine. Anyone has has any idea what is happening ??? Here is the code /*

Re: How to get Web Application path at Run-Time

2008-07-02 Thread Lukasz Lenart
> I am developing a web application using the struts 2 framework. In one > of the actions, I need to create a file at the run-time at a particular > location relative to the path where my web-application is deployed. How > can I retrieve the path at which my Web-app is deployed at run-time in > my

Re: How to get Web Application path at Run-Time

2008-07-02 Thread Paweł Wielgus
Hi, for example: filterConfig.getServletContext().getRealPath("") in FilterDispatcher.init(...) method. Best greetings, Paweł Wilegus. On 02/07/2008, Aggarwal, Rajat <[EMAIL PROTECTED]> wrote: > Hi All, > > > > I am developing a web application using the struts 2 framework. In one > of the acti

How to get Web Application path at Run-Time

2008-07-02 Thread Aggarwal, Rajat
Hi All, I am developing a web application using the struts 2 framework. In one of the actions, I need to create a file at the run-time at a particular location relative to the path where my web-application is deployed. How can I retrieve the path at which my Web-app is deployed at run-time in m

Re: Showing messages after a redirect

2008-07-02 Thread Dimitris Mouchritsas
Adam Hardy wrote: Dimitris Mouchritsas on 01/07/08 16:50, wrote: Yes, for Struts 1.3.8, sorry I forgot to mention. Actually what I did (but it's more or less specific for the action) is to just forward, not redirect. But I've got another question now? Is there a way I can pass a parameter in