Author Login
Post Reply
user Digest 22 Jun 2008 14:57:01 -0000 Issue 8102
Topics (messages 187887 through 187916):
Re: building from source
187887 by: Dave Newton
187888 by: Roberto Nunnari
187890 by: Dave Newton
187891 by: Roberto Nunnari
187894 by: Dave Newton
187901 by: Roberto Nunnari
Re: validation and action names with slashes
187889 by: Jeromy Evans
187892 by: Roberto Nunnari
187893 by: Jeromy Evans
187903 by: Roberto Nunnari
187904 by: Roberto Nunnari
187905 by: Martin
187909 by: Roberto Nunnari
187910 by: Jeromy Evans
Re: [OT] What slows you down?
187895 by: Giovanni Azua
187907 by: Greg Lindholm
187908 by: Jeromy Evans
187912 by: Dave Newton
187913 by: Antonio Petrelli
Struts Validator Framework: client-side validation problem with submitting buttons
187896 by: cacodemon79
Re: Error replicating sessions with Struts 2 framework java application
187897 by: Ildefonso Montero
187898 by: Dave Newton
187899 by: Al Sutton
Re: render JSP from action class
187900 by: Esteve Camps Chust
187906 by: Martin
Re: Struts 2 Page & Ctrl+R
187902 by: Lukasz Lenart
Using Struts2 Template
187911 by: Doug Pham
187914 by: Dave Newton
Struts Themes Problem - help
187915 by: Narayana S
187916 by: Dave Newton
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_187887.ezm (zipped)--- On Fri, 6/20/08, Roberto Nunnari <roberto.nunnari@(protected):
> I've been trying to build struts2 2.1.3-SNAPSHOT,
> svn'ed today but without success. The error seams
> to be related to xwork.. which I just built from
> source (just svn'ed), too.
Are you using a local checkout of XWork as described in...?
http://struts.apache.org/2.x/docs/building-with-maven.html
I'm not sure if the latest XWork is in the repos yet (but Maven is still somewhat of a mystery to me at times :)
Dave

Attachment:
user_187888.ezm (zipped)Hi Dave.
Dave Newton wrote:
> --- On Fri, 6/20/08, Roberto Nunnari <roberto.nunnari@(protected):
>> I've been trying to build struts2 2.1.3-SNAPSHOT,
>> svn'ed today but without success. The error seams
>> to be related to xwork.. which I just built from
>> source (just svn'ed), too.
>
> Are you using a local checkout of XWork as described in...?
>
> http://struts.apache.org/2.x/docs/building-with-maven.html
no.. I followed http://wiki.opensymphony.com/display/XW/Building+XWork
following your link made maven run further.. but it failed again.
I'm going to wipe out the maven repo, and start all over again.
I'll report back to you..
I'd like to try out the convention plugin.. should I take it
from the sandbox? just cd sandbox && mvn package ?
Robi

Attachment:
user_187890.ezm (zipped)I can't get it to work now either :p
--- On Fri, 6/20/08, Roberto Nunnari <roberto.nunnari@(protected):
> I'll report back to you..
That'd be great; Maven gives me fits.
> I'd like to try out the convention plugin.. should I
> take it from the sandbox? just cd sandbox && mvn package?
I've not built the sandbox components, so I'm useless there, too!
Dave

Attachment:
user_187891.ezm (zipped)hehe.. I'm in good company then! :D
I rarely use maven.. just when I need to build softwares
that require it, like struts and tiles.. so.. I'm quite
lost with maven!
ok.. wiping out the maven repo didn't help. I still get
lots of stack trace from running test in xwork.. but after
that it says:
Results :
Tests run: 617, Failures: 0, Errors: 0, Skipped: 0
after that a lot of warning about duplicate aspectj, like:
[WARNING] We have a duplicate org/aspectj/lang/Aspects14 in
E:\mavenRepo\org\aspectj\aspectjweaver\1.5.4\aspectjweaver-1.5.4.jar
what I did:
empty e:\mavenRepo\
> cd E:\devel\ApacheASF
> svn co https://svn.apache.org/repos/asf/struts/current/ struts
> cd struts
> svn co https://svn.opensymphony.com/svn/xwork/trunk xwork
> cd struts2
> mvn -Pxwork clean package
here's the last lines of output from the last command above:
[INFO] Replacing original artifact with shaded artifact.
[INFO] Replacing
E:\devel\ApacheASF\struts\xwork\target\xwork-2.1.2-SNAPSHOT.jar with
E:\devel\ApacheASF\struts\xwork\target\xwork-2.1.2-SNA
PSHOT-shaded.jar
[INFO]
------------------------------------------------------------------------
[INFO] Building Struts 2
[INFO] task-segment: [clean, package]
[INFO]
------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [bundle:manifest {execution: bundle-manifest}]
[WARNING] Ignoring project type pom - supportedProjectTypes = [jar, bundle]
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/maven-settings/2.0/maven-settings-2.0.pom
1K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-site-renderer/1.0-alpha-8/doxia-site-renderer-1.0-alpha-8.pom
1K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia/1.0-alpha-8/doxia-1.0-alpha-8.pom
2K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-core/1.0-alpha-8/doxia-core-1.0-alpha-8.pom
1K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-8/doxia-sink-api-1.0-alpha-8.pom
424b downloaded
Downloading:
http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-velocity/1.1.3/plexus-velocity-1.1.3.pom
976b downloaded
Downloading:
http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-components/1.1.5/plexus-components-1.1.5.pom
2K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-decoration-model/1.0-alpha-8/doxia-decoration-model-1.0-alpha-8.pom
1K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/reporting/maven-reporting-api/2.0.2/maven-reporting-api-2.0.2.pom
902b downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/reporting/maven-reporting/2.0.2/maven-reporting-2.0.2.pom
738b downloaded
Downloading:
http://repo1.maven.org/maven2/org/mortbay/jetty/jetty/6.0.0beta12/jetty-6.0.0beta12.pom
2K downloaded
Downloading:
http://repo1.maven.org/maven2/org/mortbay/jetty/project/6.0.0beta12/project-6.0.0beta12.pom
7K downloaded
Downloading:
http://repo1.maven.org/maven2/org/mortbay/jetty/servlet-api-2.5/6.0.0beta12/servlet-api-2.5-6.0.0beta12.pom
1K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-site-renderer/1.0-alpha-8/doxia-site-renderer-1.0-alpha-8.jar
33K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-core/1.0-alpha-8/doxia-core-1.0-alpha-8.jar
199K downloaded
Downloading:
http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-velocity/1.1.3/plexus-velocity-1.1.3.jar
7K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-decoration-model/1.0-alpha-8/doxia-decoration-model-1.0-alpha-8.jar
39K downloaded
Downloading:
http://repo1.maven.org/maven2/org/mortbay/jetty/jetty/6.0.0beta12/jetty-6.0.0beta12.jar
463K downloaded
Downloading:
http://dist.codehaus.org/org.mortbay.jetty/jars/servlet-api-2.5-6.0.0beta12.jar
Downloading:
http://repo1.maven.org/maven2/org/mortbay/jetty/servlet-api-2.5/6.0.0beta12/servlet-api-2.5-6.0.0beta12.jar
157K downloaded
[INFO] [site:attach-descriptor]
[WARNING] Unable to load parent project from repository: Could not find
the model file 'E:\devel\ApacheASF\struts\struts2\..\pom.xml'. for p
roject unknown
[INFO]
------------------------------------------------------------------------
[INFO] Building Struts 2 Core
[INFO] task-segment: [clean, package]
[INFO]
------------------------------------------------------------------------
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.0-alpha-4/maven-dependency-plugin-2.0-alpha-4.
pom
5K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.0-alpha-4/maven-dependency-plugin-2.0-alpha-4.
jar
81K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/myfaces/tobago/maven-apt-plugin/1.0.15/maven-apt-plugin-1.0.15.pom
3K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/myfaces/tobago/tobago-tool/1.0.15/tobago-tool-1.0.15.pom
1K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/myfaces/tobago/tobago/1.0.15/tobago-1.0.15.pom
34K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/myfaces/myfaces/3/myfaces-3.pom
23K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/myfaces/tobago/maven-apt-plugin/1.0.15/maven-apt-plugin-1.0.15.jar
20K downloaded
[INFO] [clean:clean]
[INFO] Deleting directory E:\devel\ApacheASF\struts\struts2\core\target
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/maven-artifact/2.0.5/maven-artifact-2.0.5.pom
727b downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/maven/2.0.5/maven-2.0.5.pom
5K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-api/2.0.5/maven-plugin-api-2.0.5.pom
605b downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/maven-project/2.0.5/maven-project-2.0.5.pom
1K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/maven-settings/2.0.5/maven-settings-2.0.5.pom
1K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/maven-model/2.0.5/maven-model-2.0.5.pom
2K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/maven-profile/2.0.5/maven-profile-2.0.5.pom
1K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/maven-artifact-manager/2.0.5/maven-artifact-manager-2.0.5.pom
1K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/maven-repository-metadata/2.0.5/maven-repository-metadata-2.0.5.pom
1K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/shared/file-management/1.1/file-management-1.1.pom
2K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/shared/maven-shared-components/4/maven-shared-components-4.pom
2K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/shared/maven-shared-io/1.0/maven-shared-io-1.0.pom
2K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/shared/maven-dependency-analyzer/1.0-alpha-2/maven-dependency-analyzer-1.0-alpha
-2.pom
3K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/shared/maven-shared-components/7/maven-shared-components-7.pom
2K downloaded
Downloading: http://repo1.maven.org/maven2/asm/asm/3.0/asm-3.0.pom
360b downloaded
Downloading:
http://repo1.maven.org/maven2/asm/asm-parent/3.0/asm-parent-3.0.pom
2K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/shared/file-management/1.1/file-management-1.1.jar
30K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/shared/maven-shared-io/1.0/maven-shared-io-1.0.jar
32K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/shared/maven-dependency-analyzer/1.0-alpha-2/maven-dependency-analyzer-1.0-alpha
-2.jar
24K downloaded
Downloading: http://repo1.maven.org/maven2/asm/asm/3.0/asm-3.0.jar
41K downloaded
[INFO] [dependency:unpack {execution: unpack-xwork}]
[INFO] Configured Artifact:
com.opensymphony:xwork:sources:2.1.2-SNAPSHOT:jar
[INFO] snapshot com.opensymphony:xwork:2.1.2-SNAPSHOT: checking for
updates from apache.snapshots
Downloading:
http://people.apache.org/maven-snapshot-repository/com/opensymphony/xwork/2.1.2-SNAPSHOT/xwork-2.1.2-SNAPSHOT-sources.jar
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
GroupId: com.opensymphony
ArtifactId: xwork
Version: 2.1.2-SNAPSHOT
Reason: Unable to download the artifact from any repository
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.opensymphony
-DartifactId=xwork -Dversion=2.1.2-SNAPSHOT -Dclassifier=sources
-Dpackaging=jar -Df
ile=/path/to/file
Alternatively, if you host your own repository you can deploy the file
there:
mvn deploy:deploy-file -DgroupId=com.opensymphony
-DartifactId=xwork -Dversion=2.1.2-SNAPSHOT -Dclassifier=sources
-Dpackaging=jar -Dfil
e=/path/to/file -Durl=[url] -DrepositoryId=[id]
com.opensymphony:xwork:jar:2.1.2-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
apache.snapshots (http://people.apache.org/maven-snapshot-repository)
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 11 minutes 36 seconds
[INFO] Finished at: Sat Jun 21 03:49:05 CEST 2008
[INFO] Final Memory: 23M/45M
[INFO]
------------------------------------------------------------------------
--
Robi
Dave Newton wrote:
> I can't get it to work now either :p
>
> --- On Fri, 6/20/08, Roberto Nunnari <roberto.nunnari@(protected):
>> I'll report back to you..
>
> That'd be great; Maven gives me fits.
>
>> I'd like to try out the convention plugin.. should I
>> take it from the sandbox? just cd sandbox && mvn package?
>
> I've not built the sandbox components, so I'm useless there, too!
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment:
user_187894.ezm (zipped)--- On Fri, 6/20/08, Roberto Nunnari <roberto.nunnari@(protected):
> ok.. wiping out the maven repo didn't help. I still get
> lots of stack trace from running test in xwork..
That part is normal; some tests expect to create exceptions.
So, here's what I've managed so far...
I "installed" my local xwork build jar, almost like the directions say to, but *additionally* installed it removing the "-Dclassifier=sources".
This worked (whether or not it's right) but now I get a build error when compiling the struts-annotations from 1.0.4-SNAPSHOT.jar.
It was all working quite recently, too.
Dave

Attachment:
user_187901.ezm (zipped)Today, after updating sources (both struts2 and xwork) it builds.
Thank you guys!
--
Robi
Dave Newton wrote:
> --- On Fri, 6/20/08, Roberto Nunnari <roberto.nunnari@(protected):
>> ok.. wiping out the maven repo didn't help. I still get
>> lots of stack trace from running test in xwork..
>
> That part is normal; some tests expect to create exceptions.
>
> So, here's what I've managed so far...
>
> I "installed" my local xwork build jar, almost like the directions say to, but *additionally* installed it removing the "-Dclassifier=sources".
>
> This worked (whether or not it's right) but now I get a build error when compiling the struts-annotations from 1.0.4-SNAPSHOT.jar.
>
> It was all working quite recently, too.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment:
user_187889.ezm (zipped)Roberto Nunnari wrote:
> Hi Jeromy!
>
> The Convention plugin looks very interesting! Does it work
> with 2.1.3-SNAPSHOT ? I'd like to give it a try this weekend.
>
> What about mixing it with tiles?
> Would it require specifying tiles results thus breaking
> the convenience of conventions?
>
It works with 2.1.3-SNAPSHOT but isn't distributed with it as it's still
in the sandbox.
It works with Tiles, but you have to explicitly declare each
@Result(type=TilesResult.class,value="xxx") which I find really annoying
(as you say, it breaks the convenience of the convention). I've been
intending to raise that over at struts-dev, which I'll do now.

Attachment:
user_187892.ezm (zipped)Jeromy Evans wrote:
> Roberto Nunnari wrote:
>> Hi Jeromy!
>>
>> The Convention plugin looks very interesting! Does it work
>> with 2.1.3-SNAPSHOT ? I'd like to give it a try this weekend.
>>
>> What about mixing it with tiles?
>> Would it require specifying tiles results thus breaking
>> the convenience of conventions?
>>
> It works with 2.1.3-SNAPSHOT but isn't distributed with it as it's still
> in the sandbox.
should I take it from the sandbox then? just cd sandbox && mvn package?
> It works with Tiles, but you have to explicitly declare each
> @Result(type=TilesResult.class,value="xxx") which I find really annoying
> (as you say, it breaks the convenience of the convention). I've been
> intending to raise that over at struts-dev, which I'll do now.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment:
user_187893.ezm (zipped)Roberto Nunnari wrote:
> Jeromy Evans wrote:
>> Roberto Nunnari wrote:
>>> Hi Jeromy!
>>>
>>> The Convention plugin looks very interesting! Does it work
>>> with 2.1.3-SNAPSHOT ? I'd like to give it a try this weekend.
>>>
>>> What about mixing it with tiles?
>>> Would it require specifying tiles results thus breaking
>>> the convenience of conventions?
>>>
>> It works with 2.1.3-SNAPSHOT but isn't distributed with it as it's
>> still in the sandbox.
>
> should I take it from the sandbox then? just cd sandbox && mvn package?
Yes.
cd sandbox/struts-convention-plugin && mvn clean install
You'll then be able to use struts-convention-plugin-2.1.3-SNAPSHOT in
your test application.
You may need to ensure the sandbox, struts2, xwork and
struts-annotations are up-to-date though (but the build is broken at
this moment)

Attachment:
user_187903.ezm (zipped)built! going to experiment a bit.
Thank you and best regards.
--
Robi
Jeromy Evans wrote:
> Roberto Nunnari wrote:
>> Jeromy Evans wrote:
>>> Roberto Nunnari wrote:
>>>> Hi Jeromy!
>>>>
>>>> The Convention plugin looks very interesting! Does it work
>>>> with 2.1.3-SNAPSHOT ? I'd like to give it a try this weekend.
>>>>
>>>> What about mixing it with tiles?
>>>> Would it require specifying tiles results thus breaking
>>>> the convenience of conventions?
>>>>
>>> It works with 2.1.3-SNAPSHOT but isn't distributed with it as it's
>>> still in the sandbox.
>>
>> should I take it from the sandbox then? just cd sandbox && mvn package?
>
> Yes.
>
> cd sandbox/struts-convention-plugin && mvn clean install
>
> You'll then be able to use struts-convention-plugin-2.1.3-SNAPSHOT in
> your test application.
>
> You may need to ensure the sandbox, struts2, xwork and
> struts-annotations are up-to-date though (but the build is broken at
> this moment)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment:
user_187904.ezm (zipped)Jeromy Evans wrote:
> Roberto Nunnari wrote:
>> Hi Jeromy!
>>
>> The Convention plugin looks very interesting! Does it work
>> with 2.1.3-SNAPSHOT ? I'd like to give it a try this weekend.
>>
>> What about mixing it with tiles?
>> Would it require specifying tiles results thus breaking
>> the convenience of conventions?
>>
> It works with 2.1.3-SNAPSHOT but isn't distributed with it as it's still
> in the sandbox.
WOW.. The convention plugin rocks! I like it!
I'm writing action classes and related jsps and struts finds the
right Action class and jsp without having to touch the struts.xml
I don't even have the struts.xml file!
This is a very confortable way of writing web applications.
> It works with Tiles, but you have to explicitly declare each
> @Result(type=TilesResult.class,value="xxx") which I find really annoying
> (as you say, it breaks the convenience of the convention). I've been
> intending to raise that over at struts-dev, which I'll do now.
Yes.. Please do. If it would support tiles, I'd start using
it right away, but like this, no way.
I don't like the idea of having to define result mappings in java
source code.. and to say it all.. I don't like annotations,
although I admit that at times annotations are very useful. :-)
Best regards.
Robi

Attachment:
user_187905.ezm (zipped)Roberto-
Just to clarify..how should the Results mapping annotations configuration be
introduced?
Thanks
Martin--
----- Original Message -----
From: "Roberto Nunnari" <roberto.nunnari@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Saturday, June 21, 2008 7:25 PM
Subject: Re: validation and action names with slashes
> Jeromy Evans wrote:
>> Roberto Nunnari wrote:
>>> Hi Jeromy!
>>>
>>> The Convention plugin looks very interesting! Does it work
>>> with 2.1.3-SNAPSHOT ? I'd like to give it a try this weekend.
>>>
>>> What about mixing it with tiles?
>>> Would it require specifying tiles results thus breaking
>>> the convenience of conventions?
>>>
>> It works with 2.1.3-SNAPSHOT but isn't distributed with it as it's still
>> in the sandbox.
>
> WOW.. The convention plugin rocks! I like it!
> I'm writing action classes and related jsps and struts finds the
> right Action class and jsp without having to touch the struts.xml
> I don't even have the struts.xml file!
>
> This is a very confortable way of writing web applications.
>
>
>> It works with Tiles, but you have to explicitly declare each
>> @Result(type=TilesResult.class,value="xxx") which I find really annoying
>> (as you say, it breaks the convenience of the convention). I've been
>> intending to raise that over at struts-dev, which I'll do now.
>
> Yes.. Please do. If it would support tiles, I'd start using
> it right away, but like this, no way.
>
> I don't like the idea of having to define result mappings in java
> source code.. and to say it all.. I don't like annotations,
> although I admit that at times annotations are very useful. :-)
>
>
> Best regards.
> Robi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_187909.ezm (zipped)Hi Martin.
I must admit that I have not thought about it at all, but
I'll try here to come up with something, and to tell you
how I use tiles.
I usually end up with a moderate long struts.xml a *very long*
tiles.xml (maybe that's not the best way to use tiles, but
it's the way I use it. Antonio, please add here if you wish..).
I use tiles in a way that I have all tiles predefined in
tiles.xml and all final page composition in a couple of
files (the template files). The template files have *all* the
<tiles:insertAttribute .../> tags, as this:
<tiles:insertAttribute name="header"/>
and all the other tiles never use insertAttribute again.
So, how could the convention plugin help with tiles?
I'd rather not use annotations at all for results mapping.
I don't know if it is already that way, but I believe that
instead of having to add annotations to override behaviour
the convention plugin should consider struts.xml and tiles.xml
If the above files have not a definition for the current request,
then use the convention, otherwise use that definition to
ovverride the behaviour.
Maybe the convention plugin should look into the tiles.xml
file, or check to see if the tiles plugin or tiles listener
are in the game..
Most probably, the definition names in tiles.xml should
follow the conventions, so that
<definition name="auctionView"..
becomes
<definition name="auction"
and
<definition name="auctionInput"..
becomes
<definition name="auction-input"
etc..
so that:
URL: /auction
translates to:
Action class: rootpkg.Auction
tile definition: auction (or auction-input if the result is input)
in order to optimise for applications that don't use tiles,
you could have a property in struts.properties that tells
the convention plugin to consider tiles or not, while
trying to determine the view for the request
so that if tiles should be considered,
in the order try: tiles, jsp, velocity, etc..
I hope this helps.
Best regards.
Robi
here's a little part of my tiles.xml
<definition name="mainLayout"
template="/WEB-INF/tiles/layouts/classicLayout.jsp">
<put-attribute name="title" value="myecommerce homepage" />
<put-attribute name="header" value="/WEB-INF/tiles/header.jsp" />
<put-attribute name="other" value="/WEB-INF/tiles/other.jsp" />
<put-attribute name="categories" value="/WEB-INF/tiles/categories.jsp" />
<put-attribute name="userMenu" value="/WEB-INF/tiles/userMenu.jsp" />
<put-attribute name="messages" value="/WEB-INF/tiles/messages.jsp" />
<put-attribute name="body" value="/WEB-INF/tiles/default_body.jsp" />
<put-attribute name="siteOwner" value="/WEB-INF/tiles/siteOwner.jsp" />
<put-attribute name="banners" value="/WEB-INF/tiles/banners.jsp" />
<put-attribute name="footer" value="/WEB-INF/tiles/footer.jsp" />
</definition>
<definition name="home" extends="mainLayout"
template="/WEB-INF/tiles/layouts/classicLayoutHome.jsp">
<put-attribute name="title" value="myecommerce home page" />
<put-attribute name="body" value="/WEB-INF/tiles/content/home.jsp" />
</definition>
<definition name="help" extends="home">
<put-attribute name="title" value="myecommerce help page" />
<put-attribute name="body" value="/WEB-INF/tiles/content/help.jsp" />
</definition>
<definition name="about" extends="home">
<put-attribute name="title" value="myecommerce about page" />
<put-attribute name="body" value="/WEB-INF/tiles/content/about.jsp" />
</definition>
<definition name="auctionView" extends="mainLayout">
<put-attribute name="title" value="View Auction" />
<put-attribute name="body"
value="/WEB-INF/tiles/content/auctionView.jsp" />
</definition>
Martin wrote:
> Roberto-
>
> Just to clarify..how should the Results mapping annotations
> configuration be introduced?
>
> Thanks
> Martin--
> ----- Original Message ----- From: "Roberto Nunnari"
> <roberto.nunnari@(protected)>
> To: "Struts Users Mailing List" <user@(protected)>
> Sent: Saturday, June 21, 2008 7:25 PM
> Subject: Re: validation and action names with slashes
>
>
>> Jeromy Evans wrote:
>>> Roberto Nunnari wrote:
>>>> Hi Jeromy!
>>>>
>>>> The Convention plugin looks very interesting! Does it work
>>>> with 2.1.3-SNAPSHOT ? I'd like to give it a try this weekend.
>>>>
>>>> What about mixing it with tiles?
>>>> Would it require specifying tiles results thus breaking
>>>> the convenience of conventions?
>>>>
>>> It works with 2.1.3-SNAPSHOT but isn't distributed with it as it's
>>> still in the sandbox.
>>
>> WOW.. The convention plugin rocks! I like it!
>> I'm writing action classes and related jsps and struts finds the
>> right Action class and jsp without having to touch the struts.xml
>> I don't even have the struts.xml file!
>>
>> This is a very confortable way of writing web applications.
>>
>>
>>> It works with Tiles, but you have to explicitly declare each
>>> @Result(type=TilesResult.class,value="xxx") which I find really
>>> annoying (as you say, it breaks the convenience of the convention).
>>> I've been intending to raise that over at struts-dev, which I'll do now.
>>
>> Yes.. Please do. If it would support tiles, I'd start using
>> it right away, but like this, no way.
>>
>> I don't like the idea of having to define result mappings in java
>> source code.. and to say it all.. I don't like annotations,
>> although I admit that at times annotations are very useful. :-)
>>
>>
>> Best regards.
>> Robi
>>
>> ---------------------------------------------------------------------
>> 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_187910.ezm (zipped)Roberto Nunnari wrote:
>
>
> Maybe the convention plugin should look into the tiles.xml
> file, or check to see if the tiles plugin or tiles listener
> are in the game..
> Most probably, the definition names in tiles.xml should
> follow the conventions, so that
> <definition name="auctionView"..
> becomes
> <definition name="auction"
> and
> <definition name="auctionInput"..
> becomes
> <definition name="auction-input"
> etc..
This is what I intend to do. At the moment the CodeBehind/Convention
plugin estimates the name of view candidates (eg. package-action-result.jsp)
This change would just need to extend that to check if a tile exists
with that name.
This change will mean that @Result's are only required for the
exceptional cases (those results that need to break the Tiles naming
convention).

Attachment:
user_187895.ezm (zipped)> -----Original Message-----
> From: Jim Kiley [mailto:jhkiley@(protected)]
> Sent: Friday, June 20, 2008 3:37 PM
> To: Struts Users Mailing List
> Subject: Re: [OT] What slows you down?
>
> Gah, I have been using MyEclipse for two years and never noticed the JSP
> debugger. How embarrassing.
>
> jk
lol! the same here, more than two years using MyEclipse and did never
realized I could debug JSP, indeed a very good thing that we haven't had any
strong need for it when using (correctly) Struts 2 :)

Attachment:
user_187907.ezm (zipped)
When I read this I was being slowed down by constant stopping
and starting of Tomcat from within Eclipse...
- make a change in an action class
- start tomcat
- test it... not working
- stop tomcat
- make a java change
- repeat....
In this case I was working on validation logic with annotations.
How else do you test validation logic? Can you unit test validation
logic? Is there a better way? [1]
Part of this problem was I wasn't sure if my OGNL expression was correct.
How do you test/debug OGNL expressions when they will depend on
the ValueStack? [2]
Another part of the problem is the doc for FieldExpressionValidator doesn't
bother to tell you which direction (true or false) the expression should
return to pass or fail the validation. [3]
BTW: I really really like Struts 2. Over the years I've went from Struts 1,
to JSF, and now Struts 2, and S2 is by far the best and easiest and
most enjoyable.
The thing that slowed me down the most was the learning curve. I started
with
the online tutorials, and the "Starting Struts 2" pdf book, then I had to
start
working on my application. It was very rough going at first, I spent a lot
of time
in the debugger trying to figure out what the hell was going on. Then I
read
"Struts 2 Design and Programming" and felt better, went back and fixed some
of the bad designs I started with but still was lacking much knowledge.
Finally
"Struts 2 in Action" was released and I got time to read it **.
I finally feel comfortable, and figure I understand how Struts 2 really
works.
Now I'm going back again and fixing more early bad designs. [4]
One more, un-versioned online documentation.
Under the URL http://struts.apache.org/2.0.11.1/docs (which anyone would
reasonably believe is documentation for Struts 2.0.11) is documentation that
only applies to release 2.1.x. More then a couple of times I've had a
problem
searched for a solution found it in the 2.0.11.1 docs started implementing
it
only to discover it was only for 2.1.x. (very frustrating.) [5]
[1] Unit testing validation logic
[2] Debugging OGNL expressions
[3] Poor or incomplete documentation, lack or real-world examples and use
cases
[4] Learning curve
[5] Un-versioned docs.
** Struts 2 in Action is a really good book, highly recommend it. However, I
don't think I would have got nearly as much out of it if I hadn't already
gone
through the other books and hand's on struggles before I read it.
Ted Husted wrote:
>
> Since it's friday, let me pose a question to the group ...
>
> Even with rock-solid frameworks like Apache Struts, it still seems
> like web application development takes longer than it should. Some
> frameworks, like Ruby on Rails, speak directly to "time to market"
> concerns and have been gathering many followers.
>
> But why does web application still seem so difficult or so
> time-consuming? Are there time bandits that still suck days or weeks
> out of your development schedule? Are there time gremlins that
> "nickel-and-dime" you every hour of every day? Is there anything more
> that frameworks like Apache Struts can do to help? Or are just there
> intractable problems with web development itself?
>
> Thoughts? :)
>
> -Ted.
>
> ---------------------------------------------------------------------
> 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_187908.ezm (zipped)Internet Explorer

Attachment:
user_187912.ezm (zipped)--- On Sat, 6/21/08, Jeromy Evans wrote:
> Internet Explorer
+1
What a pile.
Dave

Attachment:
user_187913.ezm (zipped)2008/6/22 Jeromy Evans <jeromy.evans@(protected)>:
> Internet Explorer
Ok let's start a flame war: Windows, Websphere, RAD :-D
Antonio

Attachment:
user_187896.ezm (zipped)
Hi, I'm using Struts Validator Framework (Struts 1.3).
Server-side validation works well.
The problem is in client-side validation.
The form name I have to validate is: RegistrazioneUtenteForm.
In my jsp page I have 2 buttons:
1) <html:link
href="javascript:submitRegistrazioneUtenteForm('registrazioneUtenteForm')"><bean:message
key='form.submit'/></html:link>
2) <html:submit />
and the following form declaration:
<html:form action="/registrazioneUtente" method="post" focus="username"
onsubmit="return validateRegistrazioneUtenteForm(this)">
Moreover I have enabled javascript validation:
<html:javascript formName="registrazioneUtenteForm" cdata="false" />
The javascript function submitRegistrazioneUtenteForm is the following:
function submitRegistrazioneUtenteForm(nomeForm){
eval("document."+nomeForm+".submit()");
}
If I click on the second button (html:submit), all works well (I get
javascript alerts).
If I click on the first button (html:link), the form is submitted but I
can't see any javascript alerts.
I can't understand where is the problem.
Can you help me?
Thanks in advance.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_187897.ezm (zipped)Dear Laurie,
thanks for your quick response, maybe I would rename this thread as: Does
Struts 2 support clustering? (see
link<http://mail-archives.apache.org/mod_mbox/struts-user/200804.mbox/%3C16628146.post@(protected)>
)
I have doubts about the replicacion of a SessionMap object on the quoted
architecture, What do you think?
Regards
2008/6/20 Laurie Harper <laurie@(protected)>:
> Problems with Tomcat session replication are really a Tomcat issue, not a
> Struts issue. You will likely have more luck asking on the Tomcat user's
> list. You should include more details about how you configured Tomcat for
> session replication, too, since that seems likely to be where the problem
> lies.
>
> L.
>
>
> Ildefonso Montero wrote:
>
>> Hi,
>>
>> we are having a problem when balancing Tomcat session among to clusters.
>> Architecture is the following: Apache (A) balancing 50-50 over Tomcat (1)
>> and
>> Tomcat (2).
>>
>> We are working on a big application and we saw that the session is not
>> replicated properly because we are doing one request for each Tomcat
>> sequentially (see 50-50 balancing) and we have checked that a simple
>> counter
>>
>> that we created inside the session object (our own object) accesing using
>> session.getAttribute("name") the resulted pattern is:
>>
>> Request 1 in T1, counter = 1
>> Request 2 in T2, counter = 2
>> Request 3 in T1, counter = 2
>>
>> Request 4 in T2, counter = 3
>> Request 5 in T1, counter = 3
>> Request 6 in T2, counter = 4
>> Request 7 in T1, counter = 4
>> Request 8 in T2, counter = 5
>> ....
>>
>> so, the value of the counter is not replicated properly or we are accesing
>> it
>>
>> in a wrong way. Is interesting for us that the Session ID
>> (session.getID())
>> shows the same ID in both Tomcats so, we guess the is the same but
>> replication
>> of attributes values seems to be not replicated.
>>
>> Could you please help us?
>>
>> Than you in advance.
>>
>> some details: Apache 2.2.3, used mod_proxy_ajp instead of mod_jk, so we
>> did
>> not
>>
>> configured workers.properties file, we customized httpd.conf file.
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
-----------------------------------------------------------------
Ildefonso Montero Pérez
ildefonso.montero{arroba}gmail.com
monteroperez{arroba}.us.es
-----------------------------------------------------------------

Attachment:
user_187898.ezm (zipped)Clustering is generally framework-neutral--it's straight JEE as far as I know. As long as the session is serializable (hey, thanks a lot, subList :( it should work no matter what the framework is.
We're running S2 clustered with no issues.
Dave
--- On Sat, 6/21/08, Ildefonso Montero <ildefonso.montero@(protected):
> From: Ildefonso Montero <ildefonso.montero@(protected)>
> Subject: Re: Error replicating sessions with Struts 2 framework java application
> To: "Struts Users Mailing List" <user@(protected)>
> Date: Saturday, June 21, 2008, 6:31 AM
> Dear Laurie,
>
> thanks for your quick response, maybe I would rename this
> thread as: Does
> Struts 2 support clustering? (see
> link<http://mail-archives.apache.org/mod_mbox/struts-user/200804.mbox/%3C16628146.post@(protected)>
> )
>
> I have doubts about the replicacion of a SessionMap object
> on the quoted
> architecture, What do you think?
>
> Regards
>
> 2008/6/20 Laurie Harper <laurie@(protected)>:
>
> > Problems with Tomcat session replication are really a
> Tomcat issue, not a
> > Struts issue. You will likely have more luck asking on
> the Tomcat user's
> > list. You should include more details about how you
> configured Tomcat for
> > session replication, too, since that seems likely to
> be where the problem
> > lies.
> >
> > L.
> >
> >
> > Ildefonso Montero wrote:
> >
> >> Hi,
> >>
> >> we are having a problem when balancing Tomcat
> session among to clusters.
> >> Architecture is the following: Apache (A)
> balancing 50-50 over Tomcat (1)
> >> and
> >> Tomcat (2).
> >>
> >> We are working on a big application and we saw
> that the session is not
> >> replicated properly because we are doing one
> request for each Tomcat
> >> sequentially (see 50-50 balancing) and we have
> checked that a simple
> >> counter
> >>
> >> that we created inside the session object (our own
> object) accesing using
> >> session.getAttribute("name") the
> resulted pattern is:
> >>
> >> Request 1 in T1, counter = 1
> >> Request 2 in T2, counter = 2
> >> Request 3 in T1, counter = 2
> >>
> >> Request 4 in T2, counter = 3
> >> Request 5 in T1, counter = 3
> >> Request 6 in T2, counter = 4
> >> Request 7 in T1, counter = 4
> >> Request 8 in T2, counter = 5
> >> ....
> >>
> >> so, the value of the counter is not replicated
> properly or we are accesing
> >> it
> >>
> >> in a wrong way. Is interesting for us that the
> Session ID
> >> (session.getID())
> >> shows the same ID in both Tomcats so, we guess the
> is the same but
> >> replication
> >> of attributes values seems to be not replicated.
> >>
> >> Could you please help us?
> >>
> >> Than you in advance.
> >>
> >> some details: Apache 2.2.3, used mod_proxy_ajp
> instead of mod_jk, so we
> >> did
> >> not
> >>
> >> configured workers.properties file, we customized
> httpd.conf file.
> >>
> >>
> >>
> >>
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> > For additional commands, e-mail:
> user-help@(protected)
> >
> >
>
>
> --
> -----------------------------------------------------------------
> Ildefonso Montero Pérez
> ildefonso.montero{arroba}gmail.com
> monteroperez{arroba}.us.es
> -----------------------------------------------------------------

Attachment:
user_187899.ezm (zipped)Just to add to this, S2 is compliant with J2EE specs, therefore if the
container has problems clusting a S2 application, it's not S2 that's at
fault, it's the clustering capability of the appserver.
My guess is that youy need to look at the information replication
strategy employed by your chosen app server, you may find the app server
vendor has some notes about the reliability and replication latency for
the available strategies.
Al.
P.S. About the mail in the link; I'm not sure what comment is
neccessary, check the code mentioned and see for yourself how it's
implemented.
Dave Newton wrote:
> Clustering is generally framework-neutral--it's straight JEE as far as I know. As long as the session is serializable (hey, thanks a lot, subList :( it should work no matter what the framework is.
>
> We're running S2 clustered with no issues.
>
> Dave
>
> --- On Sat, 6/21/08, Ildefonso Montero <ildefonso.montero@(protected):
>
>
>> From: Ildefonso Montero <ildefonso.montero@(protected)>
>> Subject: Re: Error replicating sessions with Struts 2 framework java application
>> To: "Struts Users Mailing List" <user@(protected)>
>> Date: Saturday, June 21, 2008, 6:31 AM
>> Dear Laurie,
>>
>> thanks for your quick response, maybe I would rename this
>> thread as: Does
>> Struts 2 support clustering? (see
>> link<http://mail-archives.apache.org/mod_mbox/struts-user/200804.mbox/%3C16628146.post@(protected)>
>> )
>>
>> I have doubts about the replicacion of a SessionMap object
>> on the quoted
>> architecture, What do you think?
>>
>> Regards
>>
>> 2008/6/20 Laurie Harper <laurie@(protected)>:
>>
>>
>>> Problems with Tomcat session replication are really a
>>>
>> Tomcat issue, not a
>>
>>> Struts issue. You will likely have more luck asking on
>>>
>> the Tomcat user's
>>
>>> list. You should include more details about how you
>>>
>> configured Tomcat for
>>
>>> session replication, too, since that seems likely to
>>>
>> be where the problem
>>
>>> lies.
>>>
>>> L.
>>>
>>>
>>> Ildefonso Montero wrote:
>>>
>>>
>>>> Hi,
>>>>
>>>> we are having a problem when balancing Tomcat
>>>>
>> session among to clusters.
>>
>>>> Architecture is the following: Apache (A)
>>>>
>> balancing 50-50 over Tomcat (1)
>>
>>>> and
>>>> Tomcat (2).
>>>>
>>>> We are working on a big application and we saw
>>>>
>> that the session is not
>>
>>>> replicated properly because we are doing one
>>>>
>> request for each Tomcat
>>
>>>> sequentially (see 50-50 balancing) and we have
>>>>
>> checked that a simple
>>
>>>> counter
>>>>
>>>> that we created inside the session object (our own
>>>>
>> object) accesing using
>>
>>>> session.getAttribute("name") the
>>>>
>> resulted pattern is:
>>
>>>> Request 1 in T1, counter = 1
>>>> Request 2 in T2, counter = 2
>>>> Request 3 in T1, counter = 2
>>>>
>>>> Request 4 in T2, counter = 3
>>>> Request 5 in T1, counter = 3
>>>> Request 6 in T2, counter = 4
>>>> Request 7 in T1, counter = 4
>>>> Request 8 in T2, counter = 5
>>>> ....
>>>>
>>>> so, the value of the counter is not replicated
>>>>
>> properly or we are accesing
>>
>>>> it
>>>>
>>>> in a wrong way. Is interesting for us that the
>>>>
>> Session ID
>>
>>>> (session.getID())
>>>> shows the same ID in both Tomcats so, we guess the
>>>>
>> is the same but
>>
>>>> replication
>>>> of attributes values seems to be not replicated.
>>>>
>>>> Could you please help us?
>>>>
>>>> Than you in advance.
>>>>
>>>> some details: Apache 2.2.3, used mod_proxy_ajp
>>>>
>> instead of mod_jk, so we
>>
>>>> did
>>>> not
>>>>
>>>> configured workers.properties file, we customized
>>>>
>> httpd.conf file.
>>
>>>>
>>>>
>>>>
>>>
>> ---------------------------------------------------------------------
>>
>>> To unsubscribe, e-mail:
>>>
>> user-unsubscribe@(protected)
>>
>>> For additional commands, e-mail:
>>>
>> user-help@(protected)
>>
>>>
>> --
>> -----------------------------------------------------------------
>> Ildefonso Montero Pérez
>> ildefonso.montero{arroba}gmail.com
>> monteroperez{arroba}.us.es
>> -----------------------------------------------------------------
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_187900.ezm (zipped)hi all,
this is my first email at struts list. I am a new user to struts2. I'm
trying to get working the next scenario: having a mailer class, I want the
message text be a rendered JSP. The action class calls a mailer class; this
composes the mail from the rendering result of a jsp element (it would be
fantastic that this rendering process uses some action class
attributes/values). Finally, the action class informs the user about the
mailing result.
Is there any way to get this working? I think I did it once on struts 1.3 :(
Thanks in advance.
Sincerely,
Esteve

Attachment:
user_187906.ezm (zipped)have you had a chance to look at and deploy struts2-mailreader sample?
http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/struts/struts2-mailreader/2.0.11/
FWIW
Martin
----- Original Message -----
From: "Esteve Camps Chust" <ecamps@(protected)>
To: <user@(protected)>
Sent: Saturday, June 21, 2008 10:29 AM
Subject: struts2: render JSP from action class
> hi all,
>
> this is my first email at struts list. I am a new user to struts2. I'm
> trying to get working the next scenario: having a mailer class, I want the
> message text be a rendered JSP. The action class calls a mailer class;
> this
> composes the mail from the rendering result of a jsp element (it would be
> fantastic that this rendering process uses some action class
> attributes/values). Finally, the action class informs the user about the
> mailing result.
>
> Is there any way to get this working? I think I did it once on struts 1.3
> :(
>
> Thanks in advance.
>
> Sincerely,
>
> Esteve
>

Attachment:
user_187902.ezm (zipped)> This worked fine before using Struts 1 and my guess is that it was because
> the form was present in session.
>
> Is there any way to make this work in Struts 2 ?
You can check Scope Plugin
http://cwiki.apache.org/S2PLUGINS/scope-plugin.html maybe it will be
helpful
Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment:
user_187911.ezm (zipped)Hi All,
Do I have to include anything special to use the Freemarker templates?
Thanks,
Doug

Attachment:
user_187914.ezm (zipped)--- On Sun, 6/22/08, Doug Pham <dougtpham@(protected):
> Do I have to include anything special to use the Freemarker templates?
"The" FreeMarker templates? Do you mean FreeMarker results? If so, no. If not, not sure what you mean.
Dave

Attachment:
user_187915.ezm (zipped)Hi,
i am new to struts 2, developed sample application that is using
resource bundle, i could configure application and labels are perfectly
displayed with the values retrived from the resource bundle. The problem is
here struts 2 is applying it's own styles to my page, i want to give my own
styles instead of using struts default styles, for that i am using
theme="simple" in the s:form tag, but it couldn't get the values from
resource bundle.
can any body help me to solve this issue?
thanks in advance
~narayana.

Attachment:
user_187916.ezm (zipped)--- On Sun, 6/22/08, Narayana S <narayanasgs1@(protected):
> The problem is here struts 2 is applying it's own styles to
> my page, i want to give my own styles instead of using struts
> default styles,
The easiest answer is to just supply your own CSS styles. You can also extend an existing, or create your own, theme.
Dave