Author Login
Post Reply
user Digest 24 Jul 2008 02:14:35 -0000 Issue 8156
Topics (messages 189223 through 189251):
Re: [S2] Using ajax to fill selectboxes
189223 by: Jishnu Viswanath
Re: [s2] Formatting input textfields
189224 by: Jishnu Viswanath
189226 by: Milan Milanovic
189230 by: Jishnu Viswanath
Re: Unit testing Struts2 + Spring application?
189225 by: Pawe³ Wielgus
Re: Struts 2 perfromance among the worst???
189227 by: Shannon, Andrew
Re: need some help regarding Display List and Update In Struts2
189228 by: hisameer
Re: namespace headpain
189229 by: Dasgupta, Ranjan
189232 by: Lyallex
Re: [S2] Conversion validation issue
189231 by: Gabriel Belingueres
Problem accessing iterated object (<s:iterator)
189233 by: holod
189234 by: Jim Kiley
189235 by: Jishnu Viswanath
189236 by: Lukasz Lenart
Adding <Linstener>" tag in web.xml results in Resource not found error on browser
189237 by: anaeem
189238 by: Lukasz Lenart
189240 by: anaeem
189241 by: Dave Newton
189242 by: anaeem
189244 by: Gabriel Belingueres
189249 by: Jeromy Evans
Re: [S2] <s:text>, resource key and OgnlValueStack
189239 by: Pierre Thibaudeau
Build.xml
189243 by: anaeem
Re: Firefox 3 and <s:head theme=ajax/> render issues
189245 by: secondsun
[S2] i18n messages, Tiles2 l10n, "default" locale, and browser preferences.
189246 by: Pierre Thibaudeau
189247 by: Chris Pratt
What is the best way to handle cancel, Update, Back Buttons in Struts2
189248 by: hisameer
189250 by: Gabriel Belingueres
S2 REST plugin
189251 by: Mike Watson
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_189223.ezm (zipped)Why don't use <s:autocompleter
Regards,
Jishnu Viswanath
Software Engineer
*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
Tavant Technologies Inc.,
www.tavant.com
PEOPLE :: PASSION :: EXCELLENCE
-----Original Message-----
From: Michael Obster [mailto:michael@(protected)]
Sent: Wednesday, July 23, 2008 1:36 PM
To: Struts Users Mailing List
Subject: [S2] Using ajax to fill selectboxes
Hi,
are there any hints or examples how I can fill a selectbox with content
over ajax-technology?
I have some problems to find out, how I can start this.
What I have is a page like:
--------------------------------------
Project: ----Select1----
Milestone: ----Select2----
--------------------------------------
Select1 is filled by the action. What I want is to fill the Select2 with
entries of the selected project in Select1.
A solution for adding select options I've found at
http://www.texotela.co.uk/code/jquery/select/. The JSONResult comes out
of a struts2 action with a JSONResult.
But can I use this with a <s:select>-tag and how I do that?
Regards,
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
Any comments or statements made in this email are not necessarily those of Tavant Technologies.
The information transmitted is intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material. If you have received this in error, please contact the
sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies
may be subject to our monitoring procedures.

Attachment:
user_189224.ezm (zipped)AJAX validation is done through js, before that we can have our own
client side validation.
Since your's is an easy client side validation we can do something like
this.
If its not something you wanted mail back.
<s:textarea name="dummy.value" id="someId" onblur="roundOf('someId')"
cssStyle="width:100%;"/>
<script type="text/javascript">
function roundOf(/*id Of the widget*/someId) {
var inputValue = document.getElementById(someId).value;
//TODO: I am putting basic validation only the rest is
upto you
var result = Math.round((inputValue.replace(',', ".")) *
100) / 100;
document.getElementById(someId).value=
(result+"").replace('.', ",");
}
</script>
Regards,
Jishnu Viswanath
Software Engineer
*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
Tavant Technologies Inc.,
www.tavant.com
PEOPLE :: PASSION :: EXCELLENCE
-----Original Message-----
From: Milan Milanovic [mailto:milanmilanovich@(protected)]
Sent: Wednesday, July 23, 2008 3:34 PM
To: user@(protected)
Subject: RE: [s2] Formatting input textfields
Hi Jishnu,
well, I'm not sure what to do with ajax validation on jsp page, because
my
BigDecimal field in my action class wouldn't accept it ?
I need one another thing, that my number be rounded on exactly two
decimals,
like: 198,19833 to 198,20 ?
--
Thx, Milan
Jishnu Viswanath wrote:
>
> http://cwiki.apache.org/WW/ajax-validation.html
> On the validate part, do put Regular expression to make to accept the
> pattern you want.
>
> Regards,
>
> Jishnu Viswanath
>
> Software Engineer
>
> *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
>
> Tavant Technologies Inc.,
>
> www.tavant.com
>
> PEOPLE :: PASSION :: EXCELLENCE
>
>
> -----Original Message-----
> From: Milan Milanovic [mailto:milanmilanovich@(protected)]
> Sent: Tuesday, July 22, 2008 10:32 PM
> To: user@(protected)
> Subject: [s2] Formatting input textfields
>
>
> Hi,
>
> I need to format input in textfields that user can enter value like
> this:
> 204,05, but now it is like this 204.05.
> I have defined this formatting for output already. How can I change
this
> ?
>
> --
> Thx, Milan
> --
> View this message in context:
>
http://www.nabble.com/-s2--Formatting-input-textfields-tp18593985p185939
> 85.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)
>
> Any comments or statements made in this email are not necessarily
those of
> Tavant Technologies.
> The information transmitted is intended only for the person or entity
to
> which it is addressed and may
> contain confidential and/or privileged material. If you have received
this
> in error, please contact the
> sender and delete the material from any computer. All e-mails sent
from or
> to Tavant Technologies
> may be subject to our monitoring procedures.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
http://www.nabble.com/-s2--Formatting-input-textfields-tp18593985p186074
97.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)
Any comments or statements made in this email are not necessarily those of Tavant Technologies.
The information transmitted is intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material. If you have received this in error, please contact the
sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies
may be subject to our monitoring procedures.

Attachment:
user_189226.ezm (zipped)
Thank you Jishnu.
This looks like complicated solution to me, could I just change locale for
that jsp or textfield ?
--
Thx, Milan
Jishnu Viswanath wrote:
>
> AJAX validation is done through js, before that we can have our own
> client side validation.
> Since your's is an easy client side validation we can do something like
> this.
>
> If its not something you wanted mail back.
>
> <s:textarea name="dummy.value" id="someId" onblur="roundOf('someId')"
> cssStyle="width:100%;"/>
>
> <script type="text/javascript">
> function roundOf(/*id Of the widget*/someId) {
> var inputValue = document.getElementById(someId).value;
> //TODO: I am putting basic validation only the rest is
> upto you
> var result = Math.round((inputValue.replace(',', ".")) *
> 100) / 100;
> document.getElementById(someId).value=
> (result+"").replace('.', ",");
>
>
> }
> </script>
>
> Regards,
>
> Jishnu Viswanath
>
> Software Engineer
>
> *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
>
> Tavant Technologies Inc.,
>
> www.tavant.com
>
> PEOPLE :: PASSION :: EXCELLENCE
>
>
> -----Original Message-----
> From: Milan Milanovic [mailto:milanmilanovich@(protected)]
> Sent: Wednesday, July 23, 2008 3:34 PM
> To: user@(protected)
> Subject: RE: [s2] Formatting input textfields
>
>
> Hi Jishnu,
>
> well, I'm not sure what to do with ajax validation on jsp page, because
> my
> BigDecimal field in my action class wouldn't accept it ?
>
> I need one another thing, that my number be rounded on exactly two
> decimals,
> like: 198,19833 to 198,20 ?
>
>
> --
> Thx, Milan
>
>
> Jishnu Viswanath wrote:
>>
>> http://cwiki.apache.org/WW/ajax-validation.html
>> On the validate part, do put Regular expression to make to accept the
>> pattern you want.
>>
>> Regards,
>>
>> Jishnu Viswanath
>>
>> Software Engineer
>>
>> *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
>>
>> Tavant Technologies Inc.,
>>
>> www.tavant.com
>>
>> PEOPLE :: PASSION :: EXCELLENCE
>>
>>
>> -----Original Message-----
>> From: Milan Milanovic [mailto:milanmilanovich@(protected)]
>> Sent: Tuesday, July 22, 2008 10:32 PM
>> To: user@(protected)
>> Subject: [s2] Formatting input textfields
>>
>>
>> Hi,
>>
>> I need to format input in textfields that user can enter value like
>> this:
>> 204,05, but now it is like this 204.05.
>> I have defined this formatting for output already. How can I change
> this
>> ?
>>
>> --
>> Thx, Milan
>> --
>> View this message in context:
>>
> http://www.nabble.com/-s2--Formatting-input-textfields-tp18593985p185939
>> 85.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)
>>
>> Any comments or statements made in this email are not necessarily
> those of
>> Tavant Technologies.
>> The information transmitted is intended only for the person or entity
> to
>> which it is addressed and may
>> contain confidential and/or privileged material. If you have received
> this
>> in error, please contact the
>> sender and delete the material from any computer. All e-mails sent
> from or
>> to Tavant Technologies
>> may be subject to our monitoring procedures.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/-s2--Formatting-input-textfields-tp18593985p186074
> 97.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)
>
> Any comments or statements made in this email are not necessarily those of
> Tavant Technologies.
> The information transmitted is intended only for the person or entity to
> which it is addressed and may
> contain confidential and/or privileged material. If you have received this
> in error, please contact the
> sender and delete the material from any computer. All e-mails sent from or
> to Tavant Technologies
> may be subject to our monitoring procedures.
>
>
> ---------------------------------------------------------------------
> 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_189230.ezm (zipped)I don't know about that, I don't know about any input field that can
change based on locale, it just pure text field, it does not know that
it has to takes an internationalized number.
If this thing looks complicated, I don't know, may be you can try
writing your own custom tag.
Regards,
Jishnu Viswanath
Software Engineer
*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
Tavant Technologies Inc.,
www.tavant.com
PEOPLE :: PASSION :: EXCELLENCE
-----Original Message-----
From: Milan Milanovic [mailto:milanmilanovich@(protected)]
Sent: Wednesday, July 23, 2008 7:14 PM
To: user@(protected)
Subject: RE: [s2] Formatting input textfields
Thank you Jishnu.
This looks like complicated solution to me, could I just change locale
for
that jsp or textfield ?
--
Thx, Milan
Jishnu Viswanath wrote:
>
> AJAX validation is done through js, before that we can have our own
> client side validation.
> Since your's is an easy client side validation we can do something
like
> this.
>
> If its not something you wanted mail back.
>
> <s:textarea name="dummy.value" id="someId" onblur="roundOf('someId')"
> cssStyle="width:100%;"/>
>
> <script type="text/javascript">
> function roundOf(/*id Of the widget*/someId) {
> var inputValue =
document.getElementById(someId).value;
> //TODO: I am putting basic validation only the rest is
> upto you
> var result = Math.round((inputValue.replace(',', "."))
*
> 100) / 100;
> document.getElementById(someId).value=
> (result+"").replace('.', ",");
>
>
> }
> </script>
>
> Regards,
>
> Jishnu Viswanath
>
> Software Engineer
>
> *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
>
> Tavant Technologies Inc.,
>
> www.tavant.com
>
> PEOPLE :: PASSION :: EXCELLENCE
>
>
> -----Original Message-----
> From: Milan Milanovic [mailto:milanmilanovich@(protected)]
> Sent: Wednesday, July 23, 2008 3:34 PM
> To: user@(protected)
> Subject: RE: [s2] Formatting input textfields
>
>
> Hi Jishnu,
>
> well, I'm not sure what to do with ajax validation on jsp page,
because
> my
> BigDecimal field in my action class wouldn't accept it ?
>
> I need one another thing, that my number be rounded on exactly two
> decimals,
> like: 198,19833 to 198,20 ?
>
>
> --
> Thx, Milan
>
>
> Jishnu Viswanath wrote:
>>
>> http://cwiki.apache.org/WW/ajax-validation.html
>> On the validate part, do put Regular expression to make to accept the
>> pattern you want.
>>
>> Regards,
>>
>> Jishnu Viswanath
>>
>> Software Engineer
>>
>> *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
>>
>> Tavant Technologies Inc.,
>>
>> www.tavant.com
>>
>> PEOPLE :: PASSION :: EXCELLENCE
>>
>>
>> -----Original Message-----
>> From: Milan Milanovic [mailto:milanmilanovich@(protected)]
>> Sent: Tuesday, July 22, 2008 10:32 PM
>> To: user@(protected)
>> Subject: [s2] Formatting input textfields
>>
>>
>> Hi,
>>
>> I need to format input in textfields that user can enter value like
>> this:
>> 204,05, but now it is like this 204.05.
>> I have defined this formatting for output already. How can I change
> this
>> ?
>>
>> --
>> Thx, Milan
>> --
>> View this message in context:
>>
>
http://www.nabble.com/-s2--Formatting-input-textfields-tp18593985p185939
>> 85.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)
>>
>> Any comments or statements made in this email are not necessarily
> those of
>> Tavant Technologies.
>> The information transmitted is intended only for the person or entity
> to
>> which it is addressed and may
>> contain confidential and/or privileged material. If you have received
> this
>> in error, please contact the
>> sender and delete the material from any computer. All e-mails sent
> from or
>> to Tavant Technologies
>> may be subject to our monitoring procedures.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
> --
> View this message in context:
>
http://www.nabble.com/-s2--Formatting-input-textfields-tp18593985p186074
> 97.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)
>
> Any comments or statements made in this email are not necessarily
those of
> Tavant Technologies.
> The information transmitted is intended only for the person or entity
to
> which it is addressed and may
> contain confidential and/or privileged material. If you have received
this
> in error, please contact the
> sender and delete the material from any computer. All e-mails sent
from or
> to Tavant Technologies
> may be subject to our monitoring procedures.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
http://www.nabble.com/-s2--Formatting-input-textfields-tp18593985p186110
55.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)
Any comments or statements made in this email are not necessarily those of Tavant Technologies.
The information transmitted is intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material. If you have received this in error, please contact the
sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies
may be subject to our monitoring procedures.

Attachment:
user_189225.ezm (zipped)Hi Joachim,
isn't StrutsTestCase for Struts 1.x ?
Best regards,
Paweł Wielgus.
On 23/07/2008, Joachim Ansorg <jansorg@(protected):
> Hi,
> I'm working on a Struts2 application which uses Spring as factory.
> I'm using Struts 2.1 and Spring 2.5.
>
> The problem is for me that
> - I don't know how to use StrutsTestCase so the created action are
> spring-wired
> - How to make the tests use my /WEB-INF/struts.xml file as Struts
> configuration
>
> Does anybody have this kind of setup working? If yes, are there any tricks
> to do that?
>
> Thanks a lot,
> Joachim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189227.ezm (zipped)Performance testing is part art and part science. While this study
appears to have some had some credible effort put into it, I have seen
how this kind of a study can get people really worked up. Yet for me
there is still some vital information lacking from it that tells me the
study is incomplete and thus for me not conclusive.
We went through an extensive performance evaluation at my last company
when using Tapestry, EJBs and JDX (a commercial ORM framework akin to
Hibernate). People unequivocally challenged the frameworks involved,
especially since load was a real issue.
In the end we found that the frameworks themselves were not the problem,
but rather how people were using them. Inevitably it came down to how
developers were accessing the database and the lifecycle of how pages
were developed around database driven stuff.
We successfully used Grinder to generate load numbers that showed us
enough information on latency to make us take additional steps. This
study seems to have only taken the first step and generate response time
numbers and present this as conclusive evidence. It in my opinion is
not sufficient for final conclusions.
The study has not provided any information on which tiers or components
of the applications caused the latency. The only way to do this is to
perform additional profiling into the database (although they're using
in-memory data this could still be a factor) and the application. Who's
to say that the applications used for this study were "well written"? So
we cannot assume that they're well written or not, and that in and of
itself presents a problem for accepting the results as is.
Its very difficult to write "similar" applications using different
frameworks and expect to be able to compare them with any accuracy.
This is an important point to remember because even their "common
extensible design" should be suspected as an x-factor in the overall
results when they first acknowledge that apples to apples is difficult,
but then use this common application to mitigate this difficulty. The
study's benchmark disclaimers make some of these points so the author is
aware of these things, but a manager, for example, who gets his hands on
this study may not understand such things when looking at the bottom
line.
I also didn't see anything with regards to priming the application
before launching the load test. As you know there are several things a
freshly started application needs to do before it runs without the
overhead of such things as jsp compilation, loading memory caches, etc.
This factor in and of itself can greatly skew results.
Nevertheless, there is value to be had from this study, although I would
be more satisfied if the study had taken the next step to do some
application profiling to further demonstrate they why of their findings.
Just as an example of what we had to do to take the next step beyond a
study like this based on our Grinder results, we used the free version
of the Mercury J2EE Profiler to do application profiling. It was used on
a developer's workstation to profile up to 5 virtual users and slice up
the various tiers of the application via cut points. This strategy was
right on the money. We immediately saw that 90+ percent of the latency
was occuring at our data layer because the app was crushing the
database. Database profiling supported this evidence. Even though we
had poorly written some of the web tier the framework still rocked.
The bosses concluded before we achieved these results that more hardware
was the solution. In the end we were able to prove that writing more
efficient code, adding some database indexes, and streamlining our use
of the database made the polished product run better on a single server
than throwing more hardware at it in a clustered environment.
These frameworks are written by people far smarter than myself and I'd
like to think that they've done diligence to account for performance of
the framework, and my experience shows me that these frameworks are
typically performant to the point where a framework is never my first
suspicion when load becomes an issue.
Overall I actually liked some of what I saw about the Struts 2 numbers
in this study. It doesn't appear as bad as the study ranks it so I'm
not concerned based on these results alone. There's still more the
author should include in Future Work session, like for example do work
to try and tune the application code. I think they would learn a great
deal about the framework's performance by working through these
exercises and looking at Amdial's Law.
We're just ramping up to load test a struts2-spring-hibernate
application. I'm very curious to see how it goes.
Thanks,
Andrew
-----Original Message-----
From: Musachy Barroso [mailto:musachy@(protected)]
Sent: Tuesday, July 22, 2008 11:39 PM
To: Struts Users Mailing List
Subject: Re: Struts 2 perfromance among the worst???
I am sorry, but I will have to quote a movie on this one:
Kevin Lomax: In the Bible you lose. We're destined to lose dad.
John Milton: Well consider the source son.
The Devil's Advocate ;)
musachy
On Tue, Jul 22, 2008 at 9:36 PM, neerashish <neerashish@(protected)>
wrote:
>
> http://sujoebose.com/resources/javaone08.ppt
>
> any response from struts2 people?
> --
> View this message in context:
http://www.nabble.com/Struts-2-perfromance-among-the-worst----tp18602242
p18602242.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)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_189228.ezm (zipped)
Thanks Man ! You are great:clap:
As soon I changed ID it worked. I really appreciate it.
Lukasz Lenart wrote:
>
>> using Strust 2.0 you have to use var instead.
>
> should be "id instead" ;-)
>
>
> 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_189229.ezm (zipped)try setting:
<constant name="struts.mapper.alwaysSelectFullNamespace" value="true" />
in your struts.xml
-----Original Message-----
From: mujoko mujoko [mailto:mujoko.mujoko@(protected)]
Sent: Wednesday, July 23, 2008 4:30 AM
To: Struts Users Mailing List
Subject: Re: namespace headpain
It was happen to me also, then I just used annotation to replace struts
configuration and I used config-browser/index.action to list available
action and the detail.
if my app is http://localhost:8080/kopkar then i will check to
http://localhost:8080/kopkar/config-browser/index.action
but you need to add lib struts2-config-browser-plugin in your webb appp
lib
(WEB-INF/lib)
http://struts.apache.org/2.x/struts2-plugins/struts2-config-browser-plug
in/
Mujoko
On 7/23/08, Lyallex <lyallex@(protected):
>
> Hi
>
> I'm having a problem getting my head around namespaces
>
> I have the folowing link
>
> <a href="<s:url action="passThroughToNewEstablishment"/>">Create New
> Establishment</a>
>
> in the main struts.xml I have the following
>
> <struts>
>
> <package name="dafault" extends="struts-default">
>
> <action name="passThroughToNewEstablishment">
> <result
> name="success">/establishment/getEstablishmentDetails.jsp</result>
> </action>
>
> ...
>
> </struts>
>
> This works fine
>
> Now I want to move the establishment stuff out of the main struts.xml
> file
>
> So I create a new struts.xml file called estab.xml and place it in the
> relevant class directory on the server
>
> <struts>
>
> <package name="estab" extends="struts-default">
>
> <action name="passThroughToNewEstablishment">
> <result
> name="success">/establishment/getEstablishmentDetails.jsp</result>
> </action>
>
>
> </struts>
>
> the main struts.xml file now looks like this
>
> <struts>
>
>
> <!-- include the estab namespace -->
> <include file="foo/bar/estab/estab.xml"/>
>
> ...
>
> </struts>
>
> The following still works works
>
> <a href="<s:url action="passThroughToNewEstablishment"/>">Create New
> Establishment</a>
>
> so does this
>
> <a href="<s:url
> action="some/random/path/passThroughToNewEstablishment"/>">Create New
> Establishment</a> (absolutely no idea why this works)
>
> so now I want to restrict access to anything in the 'estab' namespace
> so I think the new url should look like this
>
> <a href="<s:url action="estab/passThroughToNewEstablishment"/>">Create
> New Establishment</a>
>
> This works of course (see above, no idea at all).
>
> Now I want to restrict access so in estab.xml I do this
>
> <struts>
>
> <package name="estab" namespace="/estab" extends="struts-default">
>
> <action name="passThroughToNewEstablishment">
> <result
> name="success">/establishment/getEstablishmentDetails.jsp</result>
> </action>
>
>
> </struts>
>
> all I ever get is the message
> 'There is no Action mapped for action name
passThroughToNewEstablishment.'
>
> If I take the namespace bit out it all works, if I put it back in it
fails.
> I've tried all sorts of things to try and get it to work , I think it
> may have something to do with the way the <s:url tag does it's thing
> (the original path is still appended to the url for example)
>
> Any pointers much appreciated.
>
> TIA
>
> lyallex
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Mujoko

Attachment:
user_189232.ezm (zipped)Wow, something has started to work, I think .. it's a bit difficult to
tell really but this is the first time I have ever managed to give an
imported struts file a namespace and actually managed to get access to
the actions
Now I just gotta understand the ramifications
Thanks for taking the time to reply
lyallex
On Wed, Jul 23, 2008 at 4:14 PM, Dasgupta, Ranjan
<Ranjan.Dasgupta@(protected):
> try setting:
>
> <constant name="struts.mapper.alwaysSelectFullNamespace" value="true" />
>
> in your struts.xml
>
> -----Original Message-----
> From: mujoko mujoko [mailto:mujoko.mujoko@(protected)]
> Sent: Wednesday, July 23, 2008 4:30 AM
> To: Struts Users Mailing List
> Subject: Re: namespace headpain
>
> It was happen to me also, then I just used annotation to replace struts
> configuration and I used config-browser/index.action to list available
> action and the detail.
>
> if my app is http://localhost:8080/kopkar then i will check to
> http://localhost:8080/kopkar/config-browser/index.action
>
>
> but you need to add lib struts2-config-browser-plugin in your webb appp
> lib
> (WEB-INF/lib)
> http://struts.apache.org/2.x/struts2-plugins/struts2-config-browser-plug
> in/
>
>
> Mujoko
>
>
> On 7/23/08, Lyallex <lyallex@(protected):
>>
>> Hi
>>
>> I'm having a problem getting my head around namespaces
>>
>> I have the folowing link
>>
>> <a href="<s:url action="passThroughToNewEstablishment"/>">Create New
>> Establishment</a>
>>
>> in the main struts.xml I have the following
>>
>> <struts>
>>
>> <package name="dafault" extends="struts-default">
>>
>> <action name="passThroughToNewEstablishment">
>> <result
>> name="success">/establishment/getEstablishmentDetails.jsp</result>
>> </action>
>>
>> ...
>>
>> </struts>
>>
>> This works fine
>>
>> Now I want to move the establishment stuff out of the main struts.xml
>> file
>>
>> So I create a new struts.xml file called estab.xml and place it in the
>
>> relevant class directory on the server
>>
>> <struts>
>>
>> <package name="estab" extends="struts-default">
>>
>> <action name="passThroughToNewEstablishment">
>> <result
>> name="success">/establishment/getEstablishmentDetails.jsp</result>
>> </action>
>>
>>
>> </struts>
>>
>> the main struts.xml file now looks like this
>>
>> <struts>
>>
>>
>> <!-- include the estab namespace -->
>> <include file="foo/bar/estab/estab.xml"/>
>>
>> ...
>>
>> </struts>
>>
>> The following still works works
>>
>> <a href="<s:url action="passThroughToNewEstablishment"/>">Create New
>> Establishment</a>
>>
>> so does this
>>
>> <a href="<s:url
>> action="some/random/path/passThroughToNewEstablishment"/>">Create New
>> Establishment</a> (absolutely no idea why this works)
>>
>> so now I want to restrict access to anything in the 'estab' namespace
>> so I think the new url should look like this
>>
>> <a href="<s:url action="estab/passThroughToNewEstablishment"/>">Create
>> New Establishment</a>
>>
>> This works of course (see above, no idea at all).
>>
>> Now I want to restrict access so in estab.xml I do this
>>
>> <struts>
>>
>> <package name="estab" namespace="/estab" extends="struts-default">
>>
>> <action name="passThroughToNewEstablishment">
>> <result
>> name="success">/establishment/getEstablishmentDetails.jsp</result>
>> </action>
>>
>>
>> </struts>
>>
>> all I ever get is the message
>> 'There is no Action mapped for action name
> passThroughToNewEstablishment.'
>>
>> If I take the namespace bit out it all works, if I put it back in it
> fails.
>> I've tried all sorts of things to try and get it to work , I think it
>> may have something to do with the way the <s:url tag does it's thing
>> (the original path is still appended to the url for example)
>>
>> Any pointers much appreciated.
>>
>> TIA
>>
>> lyallex
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> --
> Mujoko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189231.ezm (zipped)That's my experience too. That's why I wanted to avoid validation
after conversion error on a field.
Is there any interest in adding this functionality? I think that would
be fairly easy to add. If I understood the code correctly, it would be
a matter of extending the DefaultActionValidatorManager.validate()
method to check first if the field is in the conversionError map (in
that case it should skip validation of that field).
2008/7/22 Dave Newton <newton.dave@(protected)>:
> --- On Tue, 7/22/08, Gabriel Belingueres <belingueres@(protected):
>> But then again, eliminating the "conversionError"
>> interceptor from the stack would prevent conversion
>> errors to appear as fieldErrors in the input form,
>> but this would force to use the conversion validator
>> everywhere a non String object is setted by the
>> ParametersInterceptor to show the error?
>
> In my experience most conversion errors also result in validation errors, at least for simple cases.
>
>> Is there any way to configure S2 so that when a conversion
>> error happens on a field, it does NOT try to validate later
>> that specific field in the Validator interceptor?
>
> Not at the moment, AFAIK.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189233.ezm (zipped)
Plsease, see my code:
<table>
<s:iterator value="%{lawDraft.docs}" status="document">
<tr>
<td>
<s:url id="downloadLink" value="downloadLawDraftDocument.action"
namespace="/admin" >
<s:param name="lawDraftId" value="#document.lawDraft.id" />
<s:param name="documentTitle" value="#document.title" />
</s:url>
<a_ href="#downloadLink" ><s:property value="#document.title"/>
</td>
<td>
delete document <img_ align="left" src="<s:url
value="/images/admin/delete.gif"/>" onclick=""/>
</td>
</tr>
</s:iterator>
</table>
previous action has method getLawdraft();
LawDraft has method getDocs();
getDocs() returns a List
List consists of Document objects, the have methods getLawDraft().getId()
and others.
Iterator repeat 5 times (correct), but output doesn't have values (they are!
previous action prints them using logger)
Please, see the output:
<tr>
<td>
<a_ href="#downloadLink" >
</td>
<td>
delete document <img_ align="left"
src="/CLIAccess/images/admin/delete.gif" onclick=""/>
</td>
</tr>
*Sorry for <a_ and <img_, Nabble doesn't escape html (
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189234.ezm (zipped)The 'status' variable does not hold the individual instance. It holds an
IteratorStatus object, which does things like tell you whether this row is
odd or even. You want to do var="document" instead.
On Wed, Jul 23, 2008 at 11:53 AM, holod <serega.sheypak@(protected):
>
> Plsease, see my code:
> <table>
> <s:iterator value="%{lawDraft.docs}" status="document">
> <tr>
> <td>
> <s:url id="downloadLink"
> value="downloadLawDraftDocument.action"
> namespace="/admin" >
> <s:param name="lawDraftId" value="#
> document.lawDraft.id" />
> <s:param name="documentTitle"
> value="#document.title" />
> </s:url>
> <a_ href="#downloadLink" ><s:property
> value="#document.title"/>
> </td>
> <td>
> delete document <img_ align="left" src="<s:url
> value="/images/admin/delete.gif"/>" onclick=""/>
> </td>
> </tr>
> </s:iterator>
> </table>
>
> previous action has method getLawdraft();
> LawDraft has method getDocs();
> getDocs() returns a List
> List consists of Document objects, the have methods getLawDraft().getId()
> and others.
> Iterator repeat 5 times (correct), but output doesn't have values (they
> are!
> previous action prints them using logger)
>
> Please, see the output:
>
> <tr>
> <td>
> <a_ href="#downloadLink" >
> </td>
> <td>
> delete document <img_ align="left"
> src="/CLIAccess/images/admin/delete.gif" onclick=""/>
> </td>
> </tr>
>
> *Sorry for <a_ and <img_, Nabble doesn't escape html (
> --
> View this message in context:
> http://www.nabble.com/Problem-accessing-iterated-object-%28%3Cs%3Aiterator%29-tp18614028p18614028.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_189235.ezm (zipped)I don't think the var will work always, ie I am using struts 2.0.6
The webworl.tld does not contain the var.
I expect lawDraft.docs contains a title then
<s:iterator value=" lawDraft.docs">
<s:property value="title"/>
</s:iterator>
Regards,
Jishnu Viswanath
Software Engineer
*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
Tavant Technologies Inc.,
www.tavant.com
PEOPLE :: PASSION :: EXCELLENCE
-----Original Message-----
From: Jim Kiley [mailto:jhkiley@(protected)]
Sent: Wednesday, July 23, 2008 9:26 PM
To: Struts Users Mailing List
Subject: Re: Problem accessing iterated object (<s:iterator)
The 'status' variable does not hold the individual instance. It holds
an
IteratorStatus object, which does things like tell you whether this row
is
odd or even. You want to do var="document" instead.
On Wed, Jul 23, 2008 at 11:53 AM, holod <serega.sheypak@(protected)>
wrote:
>
> Plsease, see my code:
> <table>
> <s:iterator value="%{lawDraft.docs}" status="document">
> <tr>
> <td>
> <s:url id="downloadLink"
> value="downloadLawDraftDocument.action"
> namespace="/admin" >
> <s:param name="lawDraftId"
value="#
> document.lawDraft.id" />
> <s:param name="documentTitle"
> value="#document.title" />
> </s:url>
> <a_ href="#downloadLink" ><s:property
> value="#document.title"/>
> </td>
> <td>
> delete document <img_ align="left" src="<s:url
> value="/images/admin/delete.gif"/>" onclick=""/>
> </td>
> </tr>
> </s:iterator>
> </table>
>
> previous action has method getLawdraft();
> LawDraft has method getDocs();
> getDocs() returns a List
> List consists of Document objects, the have methods
getLawDraft().getId()
> and others.
> Iterator repeat 5 times (correct), but output doesn't have values
(they
> are!
> previous action prints them using logger)
>
> Please, see the output:
>
> <tr>
> <td>
> <a_ href="#downloadLink" >
> </td>
> <td>
> delete document <img_ align="left"
> src="/CLIAccess/images/admin/delete.gif" onclick=""/>
> </td>
> </tr>
>
> *Sorry for <a_ and <img_, Nabble doesn't escape html (
> --
> View this message in context:
>
http://www.nabble.com/Problem-accessing-iterated-object-%28%3Cs%3Aiterat
or%29-tp18614028p18614028.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
Any comments or statements made in this email are not necessarily those of Tavant Technologies.
The information transmitted is intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material. If you have received this in error, please contact the
sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies
may be subject to our monitoring procedures.

Attachment:
user_189236.ezm (zipped)> I don't think the var will work always, ie I am using struts 2.0.6
> The webworl.tld does not contain the var.
var was introduced with Struts 2.1 and id was depreacted
Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment:
user_189237.ezm (zipped)
When I insert "<Listener>" tag to my web descriptor file, application gives
404 error
"Resource not Found". When I remove listener tag it works fine. Please
advice some solution.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189238.ezm (zipped)Hi,
Maybe some more details?
Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment:
user_189240.ezm (zipped)Here are some more details: -
I like to use context listener class to save datasource information. I have
implemented a ServletContextListener named AppListener.
Following is the code for Web.xml: -
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<context-param>
<param-name>dataSourceJndiName</param-name>
<param-value>java:/comp/env/jdbc/myDataSource</param-value>
</context-param>
<context-param>
<param-name>dbType</param-name>
<param-value>mysql</param-value>
</context-param>
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
QDSweb.AppListener
</listener-class>
</listener>
<!-- Restrict direct access to JSPs.
For the security constraint to work, the auth-constraint
and login-config elements must be present -->
<security-constraint>
<web-resource-collection>
<web-resource-name>JSPs</web-resource-name>
<url-pattern>/jsp/*</url-pattern>
</web-resource-collection>
<auth-constraint/>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app>
Application compiles successfully, but gives runtime error that "Resource
not found". When I remove <listener> tag from my web.xml, it runs smootly.
But I would like to use ServletContextListener Class.
I have seen same problem reported in some other forums but didn't find the
solution. In one forum I found out that this problem has to do with some
mapping files and fix it with build.xml.
Any help would be appreciated.
anaeem wrote:
>
> When I insert "<Listener>" tag to my web descriptor file, application
> gives 404 error
> "Resource not Found". When I remove listener tag it works fine. Please
> advice some solution.
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189241.ezm (zipped)--- On Wed, 7/23/08, anaeem <anaeem@(protected):
> When I insert "<Listener>" tag to my web descriptor file,
> application gives 404 error "Resource not Found". When I
> remove listener tag it works fine. Please advice some solution.
...
Leave the listener element out?
But seriously--that's like saying "I put this tag in my JSP and now my JSP won't render. Why not?"
See the issue?
Dave

Attachment:
user_189242.ezm (zipped)
Can any one who has used ServletContextListener class, share their build.xml.
Thanks much
newton.dave wrote:
>
> --- On Wed, 7/23/08, anaeem <anaeem@(protected):
>> When I insert "<Listener>" tag to my web descriptor file,
>> application gives 404 error "Resource not Found". When I
>> remove listener tag it works fine. Please advice some solution.
>
> ...
>
> Leave the listener element out?
>
> But seriously--that's like saying "I put this tag in my JSP and now my JSP
> won't render. Why not?"
>
> See the issue?
>
> Dave
>
>
> ---------------------------------------------------------------------
> 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_189244.ezm (zipped)that could be a sign that your context listener is not initializing
correctly. Take a look at your server log.
2008/7/23 anaeem <anaeem@(protected)>:
>
> Can any one who has used ServletContextListener class, share their build.xml.
>
> Thanks much
>
>
> newton.dave wrote:
>>
>> --- On Wed, 7/23/08, anaeem <anaeem@(protected):
>>> When I insert "<Listener>" tag to my web descriptor file,
>>> application gives 404 error "Resource not Found". When I
>>> remove listener tag it works fine. Please advice some solution.
>>
>> ...
>>
>> Leave the listener element out?
>>
>> But seriously--that's like saying "I put this tag in my JSP and now my JSP
>> won't render. Why not?"
>>
>> See the issue?
>>
>> Dave
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Adding-%3CLinstener%3E%22-tag-in-web.xml-results-in-Resource-not-found-error-on-browser-tp18614799p18615682.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_189249.ezm (zipped)anaeem wrote:
> Can any one who has used ServletContextListener class, share their build.xml.
>
> Thanks much
>
It's not a build.xml issue.
The Resource Not Found error implies your Container failed to start.
The log for the Container will contain an error message. In Tomcat this
may look like:
SEVERE: filterStart
or
SEVERE: listenerStart
The former means it failed to start a filter, the latter that it failed
to start a listener.
There's many things that can go wrong. You can find more information by
increasing the logging by your container.
I think it's reasonable to assume it's a classpath error (you're missing
libraries) or a configuration error (you haven't setup your datasource,
you haven an error in a configuration file).
*If your listener is throwing an exception you'll see this error too.
Whatever the case, you need to learn how to isolate the problem
further. If it's struts 2 related you'll be able to receive more help
here, but I don't think it is.

Attachment:
user_189239.ezm (zipped)2008/7/23 Jeromy Evans <jeromy.evans@(protected)>:
> Can you please raise this in JIRA?
Here ya go, Jeromy:
https://issues.apache.org/struts/browse/WW-2732
(I hesitated on the "Type" to give to this issue...)

Attachment:
user_189243.ezm (zipped)
Can any one who has used ServletContextListener class in a project, share
their Build.xml file?
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189245.ezm (zipped)
I am not sure what the exact problem is, but it has to do with the way that
browser_debug.js gets processed. One would think that this file would only
get pulled in when the head tag attribute debug=true, but one would be wrong
in that situation.
The "correct" way to fix this bug is to supply your own template for the
head tag which will make the dojo attribute debugAtAllCosts respect the head
debug flag.
To do this,
1. create a file named head.ftl in your simple templates directory. ( ie
$classpath/template/simple/head.ftl)
2. Paste this text into it:
<script language="JavaScript" type="text/javascript">
// Dojo configuration
djConfig = {
baseRelativePath: "<@(protected)'
includeParams="none" encode='false'/>",
isDebug: ${parameters.debug?default(false)},
bindEncoding: "${parameters.encoding}",
debugAtAllCosts: ${parameters.debug?default(false)}, // not needed,
but allows the Venkman debugger to work with the includes
};
</script>
<script language="JavaScript" type="text/javascript"
src="<@(protected)'
includeParams="none" encode='false'/>"></script>
<script language="JavaScript" type="text/javascript"
src="<@(protected)'
value='/struts/simple/dojoRequire.js' includeParams="none"
encode='false'/>"></script>
3. Refresh your page, the bug should be gone as long as the struts head tag
does not have debug set to true.
Of course, you will have to turn debugging on to get firebug happy, but I
believe that that is an acceptable compromise.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189246.ezm (zipped)Using Struts 2.1.2
My browser (Firefox 3) has a prefered locale (and only one): fr_CA
Struts2 constant: struts.locale=en_US
I use i18n throughout the software.
There is a "default" resource (whose content happens to be in
English): ApplicationResource.properties.
There are also resource bundles in 4 languages:
ApplicationResources_fr.properties,
ApplicationResources_it.properties,
ApplicationResources_de.properties,
ApplicationResources_es.properties.
Until last week, there was no English resource file (since the default
one was taking care of it).
That strategy worked perfectly in Struts1, but it seems that in
Struts2, the system has a mind of its own:
given my browser's preference, the default bundle (on my system) seems
to be ApplicationResources_fr.properties insteand of
ApplicationResources.properties...
I solved that by creating an empty ApplicationResources_en.properties,
and everything fell back into place: English pages display in
English, while German pages display in German (when German is
available) and in English (when not available). Great. (I don't
understand why creating an empty ApplicationResources_en.properties
would ensure missing German resources to be displayed in English
rather than in French, but what matters is that it now works.)
A new problem arises when I wish to localize an entire page using
Tiles2. For the pages containing paragraphs and paragraphs of static
text, it is easier to maintain localized tiles, than localized
resource messages. Therefore:
I have one general Tile definition file: tiles.xml
and four localized ones: tiles_fr.xml, tiles_it.xml, tiles_de.xml, tiles_es.xml
And this is where a new version of the earlier problem surfaces...
Since I have not yet had time to translate every single static page in
every single available language, I would like to revert to some
default English when the localized version is unavailable. That's
what tiles.xml is for, yet I presently get served the French version
by default. I understand the logic: if my browser gives French as
the preferred language, it's reasonable to assume that I would be
happy to cope with that language. Indeed I would. But looking at the
Italian version of my site may now give me a Neapolitan-combo with
three languages:
* Italian for the bits that have been translated,
* English for the _messages_ that have not been translated in Italian,
* and French for the _static tiles_ (according to tiles_fr.xml).
That's a little Byzantine.
A Russian salad, as we'd say in French.
A smörgåsbord, if you will.
Have I, as the developer, got control over what "default" version the
user is going to see?

Attachment:
user_189247.ezm (zipped)I don't know why that's happening, but I've seen it as well. Have you
tried using an essentially empty tiles_en.xml? It might have the same
effect as the ApplicationResources_en.properties. I would assume it
would need to be a well formed, but empty xml document.
(*Chris*)
On Wed, Jul 23, 2008 at 1:07 PM, Pierre Thibaudeau
<pierre.thibaudeau@(protected):
> Using Struts 2.1.2
> My browser (Firefox 3) has a prefered locale (and only one): fr_CA
> Struts2 constant: struts.locale=en_US
>
> I use i18n throughout the software.
> There is a "default" resource (whose content happens to be in
> English): ApplicationResource.properties.
> There are also resource bundles in 4 languages:
> ApplicationResources_fr.properties,
> ApplicationResources_it.properties,
> ApplicationResources_de.properties,
> ApplicationResources_es.properties.
>
> Until last week, there was no English resource file (since the default
> one was taking care of it).
> That strategy worked perfectly in Struts1, but it seems that in
> Struts2, the system has a mind of its own:
> given my browser's preference, the default bundle (on my system) seems
> to be ApplicationResources_fr.properties insteand of
> ApplicationResources.properties...
>
> I solved that by creating an empty ApplicationResources_en.properties,
> and everything fell back into place: English pages display in
> English, while German pages display in German (when German is
> available) and in English (when not available). Great. (I don't
> understand why creating an empty ApplicationResources_en.properties
> would ensure missing German resources to be displayed in English
> rather than in French, but what matters is that it now works.)
>
> A new problem arises when I wish to localize an entire page using
> Tiles2. For the pages containing paragraphs and paragraphs of static
> text, it is easier to maintain localized tiles, than localized
> resource messages. Therefore:
> I have one general Tile definition file: tiles.xml
> and four localized ones: tiles_fr.xml, tiles_it.xml, tiles_de.xml, tiles_es.xml
>
> And this is where a new version of the earlier problem surfaces...
>
> Since I have not yet had time to translate every single static page in
> every single available language, I would like to revert to some
> default English when the localized version is unavailable. That's
> what tiles.xml is for, yet I presently get served the French version
> by default. I understand the logic: if my browser gives French as
> the preferred language, it's reasonable to assume that I would be
> happy to cope with that language. Indeed I would. But looking at the
> Italian version of my site may now give me a Neapolitan-combo with
> three languages:
> * Italian for the bits that have been translated,
> * English for the _messages_ that have not been translated in Italian,
> * and French for the _static tiles_ (according to tiles_fr.xml).
>
> That's a little Byzantine.
> A Russian salad, as we'd say in French.
> A smörgåsbord, if you will.
>
> Have I, as the developer, got control over what "default" version the
> user is going to see?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189248.ezm (zipped)
Hello Everyone
I know this might be very easy for you guys but it is being difficult for
me.:working:
I am developing an updateUser.jsp page and it has three buttons those are:
Update, Cancel, Back
Now if I press update it should invoke the updateUser action mapping also I
need to do the validation first before I do something else. If Cancel is
pressed the previous values which was already there in the field should be
displayed and when I press Back button it should not do anything just go to
my userList page.
So I am not able to understand how should I handle the struts.xml and the
jsp code. I know I can use built in validator framework and by defining the
validation.xml file for those fields but whenever I cancel or go Back the
error message appears in the page so I don't know how should I handle this
thing.
Please tell me the best way from your experience how should I handle this
kind of situation.
Thanks for the help in advance!
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189250.ezm (zipped)The defaultStack interceptor stack provides you with convenient method
name defaults which will not run validations. When you call an action
executing any of these method names: "input", "back", "cancel" or
"browse", the validations will not execute.
2008/7/23 hisameer <cool_sameer_for_u@(protected)>:
>
> Hello Everyone
>
> I know this might be very easy for you guys but it is being difficult for
> me.:working:
>
> I am developing an updateUser.jsp page and it has three buttons those are:
> Update, Cancel, Back
> Now if I press update it should invoke the updateUser action mapping also I
> need to do the validation first before I do something else. If Cancel is
> pressed the previous values which was already there in the field should be
> displayed and when I press Back button it should not do anything just go to
> my userList page.
>
> So I am not able to understand how should I handle the struts.xml and the
> jsp code. I know I can use built in validator framework and by defining the
> validation.xml file for those fields but whenever I cancel or go Back the
> error message appears in the page so I don't know how should I handle this
> thing.
>
> Please tell me the best way from your experience how should I handle this
> kind of situation.
>
> Thanks for the help in advance!
> --
> View this message in context: http://www.nabble.com/What-is-the-best-way-to-handle-cancel%2C-Update%2C-Back-Buttons-in-Struts2-tp18621308p18621308.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_189251.ezm (zipped)