Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 17 Jan 2010 18:32:09 -0000 Issue 8982

user-digest-help

2010-01-17


Author LoginPost Reply

user Digest 17 Jan 2010 18:32:09 -0000 Issue 8982

Topics (messages 204667 through 204685):

Re: Struts 2 Tags / Freemarker performance
 204667 by: Dale Newfield
 204668 by: Musachy Barroso
 204670 by: Dale Newfield
 204672 by: Néstor Boscán
 204674 by: Musachy Barroso

Re: Upgrade 2.1.6 to 2.1.8.1 - Action Results in 404
 204669 by: CRANFORD, CHRIS

Re: How to do programatic validation?
 204671 by: Greg Lindholm
 204673 by: Wes Wannemacher

Is there a way to create or get a ValueStack outside of Struts 2?
 204675 by: Néstor Boscán
 204676 by: Rafał Krupiński
 204677 by: Néstor Boscán
 204678 by: Wes Wannemacher
 204679 by: Néstor Boscán

jquery plugins
 204680 by: Frans Thamura

Struts2 Tiles: specify the part of template that is to be rendered
 204681 by: Stephan R. Mueller
 204682 by: Antonio Petrelli

Re: Struts2 Tiles: specify the part of template that is to be rendered [SOLVED]
 204683 by: Stephan R. Mueller

Re : jquery plugins
 204684 by: François Rouxel

Re: where to set 'struts.multipart.parser' property in struts2?
 204685 by: Stephen Ince

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_204667.ezm (zipped)
On Thu, Jan 14, 2010 at 8:00 PM, Musachy Barroso <musachy@(protected):
> I would expect that, FreeMarker templates(+ struts code) will always
> be slower than java code. If you are using the simple tags, give a try
> to the Java Tags:
>
> http://cwiki.apache.org/S2PLUGINS/java-templates-plugin.html

I assume this is an all-or-nothing change, right? If I *mostly* use
the simple theme, but have a handful of places I do not, I cannot
benefit from this speedup?

What about more complex tags like s:optiontransferselect? With this
plugin you cannot use these tags?

-Dale


Attachment: user_204668.ezm (zipped)
Not really, you can mix the tags using the "theme" attribute, not very
pretty, but that should work.

musachy

On Fri, Jan 15, 2010 at 10:27 AM, Dale Newfield <dale@(protected):
> On Thu, Jan 14, 2010 at 8:00 PM, Musachy Barroso <musachy@(protected):
>> I would expect that, FreeMarker templates(+ struts code) will always
>> be slower than java code. If you are using the simple tags, give a try
>> to the Java Tags:
>>
>> http://cwiki.apache.org/S2PLUGINS/java-templates-plugin.html
>
> I assume this is an all-or-nothing change, right?  If I *mostly* use
> the simple theme, but have a handful of places I do not, I cannot
> benefit from this speedup?
>
> What about more complex tags like s:optiontransferselect?  With this
> plugin you cannot use these tags?
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_204670.ezm (zipped)
Musachy Barroso wrote:
> Not really, you can mix the tags using the "theme" attribute, not very
> pretty, but that should work.

Just to make sure I understand: If I set
<constant name="struts.ui.templateSuffix" value="java" />, then any time
a tag is being processed with the simple theme it'll use the java
implementation, but for any tags not using that theme or not supported
by that implementation will revert to the freemarker version?

If so, that should be mentioned on
http://struts.apache.org/2.x/docs/javatemplates-plugin.html and I think
you'll get many more people adopting it :-)

-Dale



Attachment: user_204672.ezm (zipped)
I've tried this approach and the page simply doesn't work. I don't know if
you are aware but in 2.0.* there were this configuration options that cached
the freemaker processing.

Regards,

Néstor Boscán

On Fri, Jan 15, 2010 at 2:10 PM, Dale Newfield <dale@(protected):

> Musachy Barroso wrote:
>
>> Not really, you can mix the tags using the "theme" attribute, not very
>> pretty, but that should work.
>>
>
> Just to make sure I understand: If I set
> <constant name="struts.ui.templateSuffix" value="java" />, then any time a
> tag is being processed with the simple theme it'll use the java
> implementation, but for any tags not using that theme or not supported by
> that implementation will revert to the freemarker version?
>
> If so, that should be mentioned on
> http://struts.apache.org/2.x/docs/javatemplates-plugin.html and I think
> you'll get many more people adopting it :-)
>
>
> -Dale
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_204674.ezm (zipped)
hum, I take it back, I shouldnt be making suggestions before trying
things out :). What I meant was that you could set the theme to
something else in individual tags, and that should work for that
specific tag, but I forgot about the 'struts.ui.templateSuffix'
setting. What you mentioned would be a very nice feature.

On Fri, Jan 15, 2010 at 10:40 AM, Dale Newfield <dale@(protected):
> Musachy Barroso wrote:
>>
>> Not really, you can mix the tags using the "theme" attribute, not very
>> pretty, but that should work.
>
> Just to make sure I understand:  If I set
> <constant name="struts.ui.templateSuffix" value="java" />, then any time a
> tag is being processed with the simple theme it'll use the java
> implementation, but for any tags not using that theme or not supported by
> that implementation will revert to the freemarker version?
>
> If so, that should be mentioned on
> http://struts.apache.org/2.x/docs/javatemplates-plugin.html and I think
> you'll get many more people adopting it :-)
>
> -Dale
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_204669.ezm (zipped)
Wes -

Yes I changed the struts configuration to permit .do as that was our standard from the Struts 1.x days and to keep consistency, we used it again in the Struts2 implementation.

The 404 was the one from the web server itself with the colored blue pages that Tomcat tosses from time to time when you hit a jsp that isn't exist. For some reason it seems the struts listener isn't starting.

Is there any compatibility issues with Tiles & Struts? I was using Tiles 2.1.4 prior but it seems in the Struts2 2.1.8.1 they are using an older tiles version. Are there some issues because of this maybe?

-----Original Message-----
From: Wes Wannemacher [mailto:wesw@(protected)]
Sent: Friday, January 15, 2010 12:13 PM
To: Struts Users Mailing List
Subject: Re: Upgrade 2.1.6 to 2.1.8.1 - Action Results in 404

You mention that you get a 404, a few questions...

First, does this 404 come from the struts filter or the application
server? When I am working, I can usually tell the difference because
404s coming from the struts filter generally indicate "Action" or
"Action Mapping" not found. In the even that the Application Server
throws up the 404, it will indicate that the "Resource" is not found.

Also, you said that the form is trying to hit login.do, do you have
".do" mapped as an extension in your struts.xml? I don't think it's
one of the defaults, the struts filter defaults to processing
.action,, which is .action extension and no extension.

-Wes

On Fri, Jan 15, 2010 at 12:51 PM, CRANFORD, CHRIS
<Chris.Cranford@(protected):
>
> I was using Struts 2.1.6 along with XWork2 2.1.2.  After finding a bug
> with XWork2, it was recommended that this package be upgraded.  As a
> result, XWork2's later release depends on 2.1.8.1 of Struts2 and thus I
> had to upgrade all my jars.  Now web application no longer works.
>
> When I navigate to my http://localhost:8080/myapp/ URL it sends me to
> the welcome page like it always has.  But when I submit the login form
> that was presented, it goes to http://localhost:8080/myapp/login.do and
> I get a 404 error saying the resource is not available.
>
> I have double checked both STRUTS.XML and WEB.XML against the blank and
> show case web apps from 2.1.8.1 and nothing out of the ordinary jumps
> out that explains why all of a sudden I have problems.
>
> Can anyone shed any light?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>



--
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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





Attachment: user_204671.ezm (zipped)
Hibernate Validator 4.0 [1] is the RI for JSR 303 but Oval [2] does
look very cool.

[1] https://www.hibernate.org/459.html
[2] http://oval.sourceforge.net/

On Fri, Jan 15, 2010 at 12:37 PM, Wes Wannemacher <wesw@(protected):
> Before you tie yourself to commons-validator, take a look at Oval. I
> could be wrong, but I think there is a bean validation JSR and Oval is
> the reference implementation (or at least it is JSR compatible).
>
> -Wes
>
> On Fri, Jan 15, 2010 at 11:21 AM, doahh <gavin@(protected):
>>
>> Don't worry about this. It looks like the commons-validator will be fine and
>> I think thats what the struts2 framework uses underneath anyway.
>>
>>
>>
>>
>> doahh wrote:
>>>
>>> I have a Flex app that is sending data to the server and I would like to
>>> validate the Objects being passed on the server side. The Flex app passes
>>> the information over an AMF channel and so it does not go through the
>>> Struts2 framework.
>>>
>>> So far, I have found classes such as:
>>>
>>> com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator
>>>
>>> but I get lost on what happens when I should call:
>>>
>>> stringLengthFieldValidator.validate(myObject);
>>>
>>> as it doesn't return anything and needs a non-null ValidatorContext -
>>> which I don't know how to setup correctly.
>>>
>>> Can anyone provide a link or advice on how to do this please?
>>>
>>>
>>
>> --
>> View this message in context: http://old.nabble.com/How-to-do-programatic-validation--tp27179164p27179568.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)
>>
>>
>
>
>
> --
> Wes Wannemacher
>
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_204673.ezm (zipped)
D'oh! I should have checked first :)

-Wes

On Fri, Jan 15, 2010 at 1:46 PM, Greg Lindholm <greg.lindholm@(protected):
> Hibernate Validator 4.0 [1] is the RI for JSR 303 but Oval [2] does
> look very cool.
>
> [1] https://www.hibernate.org/459.html
> [2] http://oval.sourceforge.net/
>
> On Fri, Jan 15, 2010 at 12:37 PM, Wes Wannemacher <wesw@(protected):
>> Before you tie yourself to commons-validator, take a look at Oval. I
>> could be wrong, but I think there is a bean validation JSR and Oval is
>> the reference implementation (or at least it is JSR compatible).
>>
>> -Wes
>>
>> On Fri, Jan 15, 2010 at 11:21 AM, doahh <gavin@(protected):
>>>
>>> Don't worry about this. It looks like the commons-validator will be fine and
>>> I think thats what the struts2 framework uses underneath anyway.
>>>
>>>
>>>
>>>
>>> doahh wrote:
>>>>
>>>> I have a Flex app that is sending data to the server and I would like to
>>>> validate the Objects being passed on the server side. The Flex app passes
>>>> the information over an AMF channel and so it does not go through the
>>>> Struts2 framework.
>>>>
>>>> So far, I have found classes such as:
>>>>
>>>> com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator
>>>>
>>>> but I get lost on what happens when I should call:
>>>>
>>>> stringLengthFieldValidator.validate(myObject);
>>>>
>>>> as it doesn't return anything and needs a non-null ValidatorContext -
>>>> which I don't know how to setup correctly.
>>>>
>>>> Can anyone provide a link or advice on how to do this please?
>>>>
>>>>
>>>
>>> --
>>> View this message in context: http://old.nabble.com/How-to-do-programatic-validation--tp27179164p27179568.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)
>>>
>>>
>>
>>
>>
>> --
>> Wes Wannemacher
>>
>> Head Engineer, WanTii, Inc.
>> Need Training? Struts, Spring, Maven, Tomcat...
>> Ask me for a quote!
>>
>> ---------------------------------------------------------------------
>> 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)
>
>



--
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!


Attachment: user_204675.ezm (zipped)
Hi

I wish to access or create the ValueStack from outside Struts 2 so I can
apply the expression language and conversion properties of OGNL to create
some reportes. Is this possible?

Regards,

Néstor Boscán

Attachment: user_204676.ezm (zipped)
On 15.01.2010 21:25, Néstor Boscán wrote:
> Hi
>
> I wish to access or create the ValueStack from outside Struts 2 so I can
> apply the expression language and conversion properties of OGNL to create
> some reportes. Is this possible?

ValueStack is part of XWork, so it's possible.


Attachment: user_204677.ezm (zipped)
Thanks for the Reply

I know that ValueStack is part of XWork. I checked the code there is an
OgnlValueStack and a OgnlValueStackFactory. But when I try to use
OgnlValueStackFactory I get:

java.lang.IllegalArgumentException: Wrapped type converter cannot be null

So I try to set the XWorkTypeConverter but I don't know how to instante it.

Regards,

Néstor Boscán

2010/1/15 Rafał Krupiński <r.krupinski@(protected)>

> On 15.01.2010 21:25, Néstor Boscán wrote:
>
>> Hi
>>
>> I wish to access or create the ValueStack from outside Struts 2 so I can
>> apply the expression language and conversion properties of OGNL to create
>> some reportes. Is this possible?
>>
>
> ValueStack is part of XWork, so it's possible.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_204678.ezm (zipped)
One thing I've done in the past to figure things out is to just check
the unit tests. I'd imagine there are some tests for the
ValueStackFactory somewhere and they might give you some clues on how
to bootstrap an instance.

-Wes

2010/1/15 Néstor Boscán <nestorjb@(protected)>:
> Thanks for the Reply
>
> I know that ValueStack is part of XWork. I checked the code there is an
> OgnlValueStack and a OgnlValueStackFactory. But when I try to use
> OgnlValueStackFactory I get:
>
> java.lang.IllegalArgumentException: Wrapped type converter cannot be null
>
> So I try to set the XWorkTypeConverter but I don't know how to instante it.
>
> Regards,
>
> Néstor Boscán
>
> 2010/1/15 Rafał Krupiński <r.krupinski@(protected)>
>
>> On 15.01.2010 21:25, Néstor Boscán wrote:
>>
>>> Hi
>>>
>>> I wish to access or create the ValueStack from outside Struts 2 so I can
>>> apply the expression language and conversion properties of OGNL to create
>>> some reportes. Is this possible?
>>>
>>
>> ValueStack is part of XWork, so it's possible.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>



--
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!


Attachment: user_204679.ezm (zipped)
Great tip Wes!

Found the solution:

    ConfigurationManager configurationManager = new
ConfigurationManager();
    OgnlValueStackFactory factory = new OgnlValueStackFactory();
    configurationManager.addContainerProvider(new
XWorkConfigurationProvider());

configurationManager.getConfiguration().getContainer().inject(factory);
    ValueStack stack = factory.createValueStack();

Regards,

Néstor Boscán

On Fri, Jan 15, 2010 at 4:39 PM, Wes Wannemacher <wesw@(protected):

> One thing I've done in the past to figure things out is to just check
> the unit tests. I'd imagine there are some tests for the
> ValueStackFactory somewhere and they might give you some clues on how
> to bootstrap an instance.
>
> -Wes
>
> 2010/1/15 Néstor Boscán <nestorjb@(protected)>:
> > Thanks for the Reply
> >
> > I know that ValueStack is part of XWork. I checked the code there is an
> > OgnlValueStack and a OgnlValueStackFactory. But when I try to use
> > OgnlValueStackFactory I get:
> >
> > java.lang.IllegalArgumentException: Wrapped type converter cannot be null
> >
> > So I try to set the XWorkTypeConverter but I don't know how to instante
> it.
> >
> > Regards,
> >
> > Néstor Boscán
> >
> > 2010/1/15 Rafał Krupiński <r.krupinski@(protected)>
> >
> >> On 15.01.2010 21:25, Néstor Boscán wrote:
> >>
> >>> Hi
> >>>
> >>> I wish to access or create the ValueStack from outside Struts 2 so I
> can
> >>> apply the expression language and conversion properties of OGNL to
> create
> >>> some reportes. Is this possible?
> >>>
> >>
> >> ValueStack is part of XWork, so it's possible.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
> >
>
>
>
> --
> Wes Wannemacher
>
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_204680.ezm (zipped)
hi all

any idea about 2 of this projects

http://code.google.com/p/struts2-jquery-plugin/

and

http://code.google.com/p/struts2-jquery/

which one shourld we use


--
Frans Thamura
Meruvian.
Experiential Tempation of Java and Enterprise OpenSource

Meruvian jTechnopreneur Program (S1) telah hadir, Dapatkan benefit bagi SMK
yang melakukan mapping SKKD, dg program beasiswa dari Gunadarma

Mobile: +6287885901958
Blog & Profile: http://frans.thamura.info

We provide services to migrate your apps to Java (web), in amazing fast and
reliable.

Attachment: user_204681.ezm (zipped)
Hi list.

I'm playing with tiles and currently, I'm only able
insert the full code of a template. Is there a way
to define what part of a template is about to be
inserted? like:
<html>
<title>template</title>
<body>
random stuff
 <insert_the_following>
  only this section will be inserted
 </insert_the_following>
other random stuff
</body>
</html>

I'm missing this, since I've played with wicket before
and now I'm wondering, if tiles2 allows this too.

I'm using tiles-2.0.6.

Regards,
Stephan


Attachment: user_204682.ezm (zipped)
2010/1/17 Stephan R. Mueller <stephanr.mueller@(protected)>:
> Hi list.
>
> I'm playing with tiles and currently, I'm only able
> insert the full code of a template. Is there a way
> to define what part of a template is about to be
> inserted? like:
> <html>
>  <title>template</title>
>  <body>
>  random stuff
>   <insert_the_following>
>    only this section will be inserted
>   </insert_the_following>
>  other random stuff
>  </body>
> </html>
>
> I'm missing this, since I've played with wicket before
> and now I'm wondering, if tiles2 allows this too.

Short answer: no.
For the long answer please ask the Tiles Users mailing list:
http://tiles.apache.org/mail.html

Antonio


Attachment: user_204683.ezm (zipped)

Am 17.01.2010 um 09:08 schrieb Antonio Petrelli:

> 2010/1/17 Stephan R. Mueller <stephanr.mueller@(protected)>:
>> Hi list.
>>
>> I'm playing with tiles and currently, I'm only able
>> insert the full code of a template. Is there a way
>> to define what part of a template is about to be
>> inserted? like:
>> <html>
>> <title>template</title>
>> <body>
>> random stuff
>>  <insert_the_following>
>>   only this section will be inserted
>>  </insert_the_following>
>> other random stuff
>> </body>
>> </html>
>>
>> I'm missing this, since I've played with wicket before
>> and now I'm wondering, if tiles2 allows this too.
>
> Short answer: no.
> For the long answer please ask the Tiles Users mailing list:
> http://tiles.apache.org/mail.html
>
> Antonio

Thank you. Will head for the tiles-list.

Stephan


Attachment: user_204684.ezm (zipped)
I am using the second one because there are many updates (very good).
the first one does not seem to change.

I have heard that the 2 are going to merge...don't know if it's a urban legend

fr/

ps: in any case, it's better than dojo plugin :-)
____________________________________________ ____________________________________________



----- Message d'origine ----
De : Frans Thamura <frans@(protected)>
À : Struts Users Mailing List <user@(protected)>
Envoyé le : Sam 16 Janvier 2010, 15 h 22 min 28 s
Objet : jquery plugins

hi all

any idea about 2 of this projects

http://code.google.com/p/struts2-jquery-plugin/

and

http://code.google.com/p/struts2-jquery/

which one shourld we use


--
Frans Thamura
Meruvian.
Experiential Tempation of Java and Enterprise OpenSource

Meruvian jTechnopreneur Program (S1) telah hadir, Dapatkan benefit bagi SMK
yang melakukan mapping SKKD, dg program beasiswa dari Gunadarma

Mobile: +6287885901958
Blog & Profile: http://frans.thamura.info

We provide services to migrate your apps to Java (web), in amazing fast and
reliable.






Attachment: user_204685.ezm (zipped)
Lukasz,
Sorry for getting back to this late. I was out of town. Yes it
exists. I am basically using a JakartaMultiPartRequest class that
someone modified and added an UploadProgressListener listener hooks.
I instantiated the class to verify.

Steve


On Thu, Jan 14, 2010 at 2:01 AM, Lukasz Lenart
<lukasz.lenart@(protected):
> 2010/1/13 Stephen Ince <stephenpince@(protected)>:
>>    <bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest"
>> name="jakartax"
>> class="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequestx"
>> scope="default"/>
>>    <constant name="struts.multipart.parser" value="jakartax" />
>
> Is that class exists
> org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequestx ?
>
>
> Regards
> --
> Lukasz
> Kapituła Javarsovia 2010
> http://javarsovia.pl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

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