Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 2 Jul 2008 18:12:24 -0000 Issue 8121

user-digest-help

2008-07-02


Author LoginPost Reply

user Digest 2 Jul 2008 18:12:24 -0000 Issue 8121

Topics (messages 188389 through 188418):

How to get Web Application path at Run-Time
 188389 by: Aggarwal, Rajat
 188390 by: Pawe³ Wielgus
 188391 by: Lukasz Lenart

Struts2 file upload and div contol in same form
 188392 by: Saqib Shehzad

S2 i18n wrong locale selection!
 188393 by: Igor Vlasov

Re: [s2] Problem with redirection
 188394 by: Milan Milanovic

Specific extension per namespace
 188395 by: Vanja Petreski
 188399 by: Jeromy Evans
 188407 by: Vanja Petreski

Re: XSLTResult problem
 188396 by: Eric Hamacher
 188410 by: Chris Pratt
 188416 by: Eric Hamacher

Re: REST plugin URL syntax
 188397 by: Jeromy Evans

Serialization DynaActionForm
 188398 by: STRUTS SL. Mailing List

Struts2 application doesn't work with Firefox 3
 188400 by: Pierrot52
 188401 by: Jim Kiley
 188403 by: Pierrot52
 188404 by: Jim Kiley
 188405 by: Pierrot52

Re: howto disable the user to input date in datetimepicker
 188402 by: xianwinwin

Re: [s2] Problem with redirection - [resolved]
 188406 by: Milan Milanovic

Re: [struts] Slow performance with Struts2
 188408 by: yorlick kilroy

[S2] Simple forking
 188409 by: Milan Milanovic
 188411 by: Lukasz Lenart
 188412 by: Milan Milanovic
 188413 by: Lukasz Lenart
 188414 by: Milan Milanovic
 188415 by: Struts Two
 188418 by: Milan Milanovic

zipping files for download
 188417 by: Eric Hamacher

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------

Attachment: user_188389.ezm (zipped)
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
my action class?



An early response shall be appreciated



Thanks and regards



Rajat Aggarwal

Attachment: user_188390.ezm (zipped)
Hi,
for example:
filterConfig.getServletContext().getRealPath("")
in FilterDispatcher.init(...) method.

Best greetings,
Paweł Wilegus.

On 02/07/2008, Aggarwal, Rajat <rajat.aggarwal@(protected):
> 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
> my action class?
>
>
>
> An early response shall be appreciated
>
>
>
> Thanks and regards
>
>
>
> Rajat Aggarwal
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_188391.ezm (zipped)
> 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 action class?

You can implement in action ServletContextAware interface [1], you
will get access to ServletContext then you have getRealPath(String)

[1] http://struts.apache.org/2.1.2/struts2-core/apidocs/org/apache/struts2/util/ServletContextAware.html


Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment: user_188392.ezm (zipped)
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
/***************************************************************************
**********************************


<%@(protected)"
pageEncoding="UTF-8"%>
<%@(protected)" %>
<html>
<head>
<s:head theme="ajax" />
<link href="<s:url value="/css/campaign.css"/>" rel="stylesheet"
 type="text/css"/>
  <title>upload and ajax test</title>
</head>
<script>
function changeApplication()
{
    dojo.event.topic.publish("change_Application");
}
</script>
<body>
<s:url id="updateSecondList" action="updateSecondList" />
 
  <s:actionerror />
  <s:fielderror />
  <s:form id="test_form" name="test_form" action="FileAction"
method="POST" theme="ajax" enctype="multipart/form-data">
 
     <s:select
        label="First List"
       list="firstList"
       name="selectedItem"
       onchange="javascript:changeApplication();return false;">
    </s:select>
   
    <tr>
    <td class="tdLabel"><label class="label">Second List</label></td>
    <td>
    <s:div showLoadingText="false"
        id="details" href="%{updateSecondList}" theme="ajax"
        listenTopics="change_Application" formId="test_form">
     </s:div>                  
    </td>
    </tr>
   
    <s:file name="upload" label="File"/>
    <s:submit />
  </s:form>
</body>
</html>
/***************************************************************************
******************************/
Regards


Attachment: user_188393.ezm (zipped)

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 <s:text name="hello" /> it shows "Привет" in
russian ( It is because systemLanguage=ru IMHO)

BUT i think that i must recieve "hello english" in inglish because I have
accept-language=en.

Am I right?





--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188394.ezm (zipped)

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 interceptor You can also use defaultStack.
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188395.ezm (zipped)
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 .../feeds/f1.html, but I want
this: .../feeds/f1.xml

4) If I change 1) to struts.action.extension=html, xml then I can access via
both xml and html, but I don't want that

5) I want to access all my action that aren't in the feed namespace ONLY via
default html action extension, but actions in the package with the feed
namespace ONLY with xml extension

Thanx,
Vanja

Attachment: user_188399.ezm (zipped)
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 feed f1 (for example) via .../feeds/f1.html, but I want
> this: .../feeds/f1.xml
>
> 4) If I change 1) to struts.action.extension=html, xml then I can access via
> both xml and html, but I don't want that
>
> 5) I want to access all my action that aren't in the feed namespace ONLY via
> default html action extension, but actions in the package with the feed
> namespace ONLY with xml extension
>
> Thanx,
> Vanja
>
>  

No there's no built-in solution.
On the plus side, just because users are able to access /index.xml
instead of /index.html, it's unlikely they ever would as you never
provide links like that. This is one of those cases where it's annoying
to you, but users will rarely notice and if they do they there is no
consequence.

A quick solution is a URL filter. eg. in your config for mod_jk so your
container only sees .xml requests at /feeds/*



Attachment: user_188407.ezm (zipped)
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 <
jeromy.evans@(protected):

> 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 feed f1 (for example) via .../feeds/f1.html, but I want
>> this: .../feeds/f1.xml
>>
>> 4) If I change 1) to struts.action.extension=html, xml then I can access
>> via
>> both xml and html, but I don't want that
>>
>> 5) I want to access all my action that aren't in the feed namespace ONLY
>> via
>> default html action extension, but actions in the package with the feed
>> namespace ONLY with xml extension
>>
>> Thanx,
>> Vanja
>>
>>
>>
>
> No there's no built-in solution.
> On the plus side, just because users are able to access /index.xml instead
> of /index.html, it's unlikely they ever would as you never provide links
> like that. This is one of those cases where it's annoying to you, but users
> will rarely notice and if they do they there is no consequence.
>
> A quick solution is a URL filter. eg. in your config for mod_jk so your
> container only sees .xml requests at /feeds/*
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_188396.ezm (zipped)
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:thechrispratt@(protected)]
Sent: Tuesday, July 01, 2008 11:40 PM
To: Struts Users Mailing List; newton.dave@(protected)
Subject: Re: XSLTResult problem

You could try something like the attached Result instead.
(*Chris*)


On Tue, Jul 1, 2008 at 9:03 PM, Dave Newton <newton.dave@(protected)>
wrote:
> --- On Wed, 7/2/08, Dave Newton <newton.dave@(protected):
>> That's how the XSLT result works--see the XSLT result [...]
>
> I did, of course, mean "that's *not* how the XSLT result works..."
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_188410.ezm (zipped)
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 <eric.hamacher@(protected):
> 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:thechrispratt@(protected)]
> Sent: Tuesday, July 01, 2008 11:40 PM
> To: Struts Users Mailing List; newton.dave@(protected)
> Subject: Re: XSLTResult problem
>
> You could try something like the attached Result instead.
> (*Chris*)
>
>
> On Tue, Jul 1, 2008 at 9:03 PM, Dave Newton <newton.dave@(protected)>
> wrote:
>> --- On Wed, 7/2/08, Dave Newton <newton.dave@(protected):
>>> That's how the XSLT result works--see the XSLT result [...]
>>
>> I did, of course, mean "that's *not* how the XSLT result works..."
>>
>> Dave
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_188416.ezm (zipped)
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 <action> as a result
. . .

<result type="xsl">?????</result>

Does ????? need to be the location of a stylesheet? I don't have one,
so can I just say:

<result type="xsl"/>

Thanks.

-----Original Message-----
From: Chris Pratt [mailto:thechrispratt@(protected)]
Sent: Wednesday, July 02, 2008 11:02 AM
To: Struts Users Mailing List
Subject: Re: XSLTResult problem

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
<eric.hamacher@(protected):
> 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:thechrispratt@(protected)]
> Sent: Tuesday, July 01, 2008 11:40 PM
> To: Struts Users Mailing List; newton.dave@(protected)
> Subject: Re: XSLTResult problem
>
> You could try something like the attached Result instead.
> (*Chris*)
>
>
> On Tue, Jul 1, 2008 at 9:03 PM, Dave Newton <newton.dave@(protected)>
> wrote:
>> --- On Wed, 7/2/08, Dave Newton <newton.dave@(protected):
>>> That's how the XSLT result works--see the XSLT result [...]
>>
>> I did, of course, mean "that's *not* how the XSLT result works..."
>>
>> Dave
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


Attachment: user_188397.ezm (zipped)
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 with id 1, retrieved from book
> 123 (this is a simplistic example, all resources have a unique ID)
>
> I'd also like to be able to control access based on the
> context/namespace used to access a resource e.g.:
> /logo/abc -> read or update
> /book/123/logo/abc -> read only
> (would I need multiple LogoControllers for this?)
>
> Using Namespaces as described by Jeromy below certainly seems to make
> sense but as soon as I start to try the example provided I lose the
> ability to GET /book/123, and I've tried with BookController having
> namespace of "/" or "/book" and neither works. And so far I haven't
> been able to successfully hit the ChapterController using a url like
> /book/123/chapter.
>
> Am I missing something really obvious? Is there something I need to
> put in the struts.xml to configure the namespaces as well as using the
> @Namespace annotation?
>
> Jeromy, you seem to be pretty knowledgeable about this - can you think
> of anything I might be doing wrong?
>
> Thanks in advance for your help.
>
> Mike
>
>  

Hi Mike, I'll throw a quick answer together now and try to give you a
more in-depth one in a day or two by building an example.

The steps are:
1. ensure struts is up-to-date. (2.1.3-SNAPSHOT preferably, to ensure
you have the latest ActionMappingParamsInterceptor)
2. enable the NamedVariablePatternMatcher via struts.xml
3. Create the BookController in the root namespace. GET /book/123 will
invoke BookController.show() with id=123
4. Create the ChapterController in the namespace containing the book id
variable (/book/{bookid}). GET /book/123/chapter will invoke
ChapterContoller.index() with bookId=123.

ie.

@Namespace("/")
public class BookController implements ModelDriven<Book> { }


@Namespace("/book/{bookId}")
public class ChapterController implements ModelDriven<Chapter> { }


Now that's what *should* happen. I use it in a large application that
includes many other related tweaks so I'll throw together a vanilla
sample and post it somewhere.

I'll come back to the authorization issue separately. The quick answer
is that you can omit methods that are never permitted and/or filter URLs
based on a URI pattern and/or user's role.

regards,
Jeromy Evans


Attachment: user_188398.ezm (zipped)

The Struts-config.xml is as follows:

<form-bean dynamic="true" name="FormCircuitos" type="org.apache.struts.action.DynaActionForm" >
     <form-property name="Clase" type="java.lang.String" />
   .
   .
   .
</form-bean>

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 DynaActionForm.????????

Thanks.

Attachment: user_188400.ezm (zipped)

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.
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188401.ezm (zipped)
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 <pierre.lasante@(protected):

>
> 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/Struts2-application-doesn%27t-work-with-Firefox-3-tp18237909p18237909.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Attachment: user_188403.ezm (zipped)

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 using Toplink and MySQL as ORM.

Regards.



Jim Kiley wrote:
>
> 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 <pierre.lasante@(protected)>
> wrote:
>
>>
>> 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/Struts2-application-doesn%27t-work-with-Firefox-3-tp18237909p18237909.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> --
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188404.ezm (zipped)
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 <pierre.lasante@(protected):

>
> 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 using Toplink and MySQL as ORM.
>
> Regards.
>
>
>
> Jim Kiley wrote:
> >
> > 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 <pierre.lasante@(protected)>
> > wrote:
> >
> >>
> >> 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/Struts2-application-doesn%27t-work-with-Firefox-3-tp18237909p18237909.html
> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
> >
> >
> > --
> > Jim Kiley
> > Technical Consultant | Summa
> > [p] 412.258.3346 [m] 412.445.1729
> > http://www.summa-tech.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Struts2-application-doesn%27t-work-with-Firefox-3-tp18237909p18238338.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Attachment: user_188405.ezm (zipped)

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 reply.

Pierre.


Jim Kiley wrote:
>
> 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 <pierre.lasante@(protected)>
> wrote:
>
>>
>> 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/Struts2-application-doesn%27t-work-with-Firefox-3-tp18237909p18237909.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> --
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188402.ezm (zipped)

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?
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188406.ezm (zipped)

O.K. Lukasz, this works now! Thanks.

--
Milan


Lukasz Lenart wrote:
>
>> <action name="change" class="MySecondAction">
>>           <!-- Redirect to another namespace -->
>>           <result type="redirect-action">
>>             showChanges
>>             /second
>>           </result>
>> </action>
>
> Add staticParamIntreceptor [1] or use paramsPrepareParamsStack [2] and
> define result like that
>
> <result type="redirect-action">
>  <params name="actionName">second
>  <params name="namespace">/secondparam>
>  <params name="parse">true
>  <params name="id">${id}
> </result>
>
> [1]
> http://struts.apache.org/2.0.11.2/docs/static-parameters-interceptor.html
> [2] http://struts.apache.org/2.0.11.2/docs/interceptors.html
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188408.ezm (zipped)
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 <Dale@(protected):

>
> yorlick kilroy wrote:
> > thx! you made my day :-) that did the trick!
> > replacing freemarker 2.3.8 with 2.3.13 speeded up my application by
> almost
> > 100%
>
> Could you re-run your OGNL 2.6.11 vs. 2.7.2 tests with freemarker 2.3.13 in
> place, and see if the "upgrade" is still a performance "downgrade" as your
> previous tests indicated? (Did you include javassist?)
>
> -Dale
> --
> View this message in context:
> http://www.nabble.com/Slow-performance-with-Struts2-tp18092204p18206304.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_188409.ezm (zipped)

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).
How I can define that in struts.xml and choose from my action class (method)
?

This is my current action in struts.xml:

<action name="save" class="InputAction" method="save">
       <result>/pages/Finish.jsp</result>
</action>

but I need more results.

--
Thx, Milan
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188411.ezm (zipped)
Use params in result

<action name="save" class="InputAction" method="save">
      <result>/pages/${pageName}</result>
</action>

and in InputAction define getPageName()


Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment: user_188412.ezm (zipped)

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
>
> <action name="save" class="InputAction" method="save">
>        <result>/pages/${pageName}</result>
> </action>
>
> and in InputAction define getPageName()
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188413.ezm (zipped)
> 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/

Attachment: user_188414.ezm (zipped)

Dear Lukasz,

no I need to have someting like this:


<action name="save" class="InputAction" method="save">
  // First result
       <result>/pages/Finish.jsp</result>
 // Second result
       <result type="redirect-action">
         <params name="actionName">second
         <params name="namespace">/secondparam>
         <params name="parse">true
         <params name="id">${id}
       </result>
</action>

And to choose it from my action class. How ?

--
Thx, Milan




Lukasz Lenart wrote:
>
>> 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/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188415.ezm (zipped)
Have you tried:
 
<action name="save" class="InputAction" method="save">
    // First result
            <result name="result1">/pages/Finish.jsp</result>
  // Second result
            <result name="result2" type="redirect-action">
              <params name="actionName">second
              <params name="namespace">/secondparam>
              <params name="parse">true
              <params name="id">${id}
            </result>
</action>



   __________________________________________________________________
Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php


Attachment: user_188418.ezm (zipped)

No, I haven't. But, how do I choose "result1" or "result2" from InputActions'
"save" method ?

--
Thx, Milan



Struts Two wrote:
>
> Have you tried:
>  
> <action name="save" class="InputAction" method="save">
>     // First result
>             <result name="result1">/pages/Finish.jsp</result>
>   // Second result
>             <result name="result2" type="redirect-action">
>               <params name="actionName">second
>               <params name="namespace">/secondparam>
>               <params name="parse">true
>               <params name="id">${id}
>             </result>
> </action>
>
>
>
>     __________________________________________________________________
> Connect with friends from any web browser - no download required. Try the
> new Yahoo! Canada Messenger for the Web BETA at
> http://ca.messenger.yahoo.com/webmessengerpromo.php
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_188417.ezm (zipped)
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
to the ServletOutputStream in my action and then use StreamResult later
on (if that is even necessary). On the other hand, I could do the
zipping within a custom result but this also seems inappropriate. 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 don't know, I'm new to Struts 2 so any feedback on this
matter would be appreciated.



Regards,

Eric Hamacher



******************************

THIS EMAIL IS INTENDED ONLY FOR THE REVIEW OF THE ADDRESSEE(S), AND MAY
CONTAIN CONFIDENTIAL AND LEGALLY PRIVILEGED INFORMATION. INTERCEPTION,
COPYING, DISSEMINATION, OR OTHER USE BY OTHER THAN THE ADDRESSEE(S) IS
PROHIBITED AND MAY BE PENALIZED UNDER APPLICABLE PRIVACY LAWS. IF YOU
RECEIVED THIS EMAIL IN ERROR, PLEASE DELETE IT AND NOTIFY ME BY RETURN
EMAIL TO eric.hamacher@(protected) *******************************



©2008 gg3721.com - Jax Systems, LLC, U.S.A.