Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 23 Jul 2008 12:23:30 -0000 Issue 8155

user-digest-help

2008-07-23


Author LoginPost Reply

user Digest 23 Jul 2008 12:23:30 -0000 Issue 8155

Topics (messages 189193 through 189222):

Struts and EAR Files - questions about how it deals with the classloader
 189193 by: ipsi
 189199 by: Piero Sartini

Re: Dojo javascript errors with ajax theme. please help
 189194 by: Dave Newton
 189197 by: Jishnu Viswanath

Struts 2 perfromance among the worst???
 189195 by: neerashish
 189196 by: Don Brown
 189198 by: Musachy Barroso
 189200 by: neerashish
 189204 by: Al Sutton

Re: need some help regarding Display List and Update In Struts2
 189201 by: Lukasz Lenart
 189202 by: Lukasz Lenart

Struts Custom Validation Question
 189203 by: Chandramouli P

[S2] <s:text>, resource key and OgnlValueStack
 189205 by: Pierre Thibaudeau
 189210 by: Jeromy Evans

configuring the error handling of Struts
 189206 by: Helge Wiemann
 189207 by: Antonio Petrelli
 189208 by: Helge Wiemann
 189211 by: Antonio Petrelli
 189212 by: Helge Wiemann
 189214 by: Antonio Petrelli

[S2] Using ajax to fill selectboxes
 189209 by: Michael Obster
 189217 by: Lukasz Lenart

namespace headpain
 189213 by: Lyallex
 189215 by: mujoko mujoko
 189216 by: Lukasz Lenart

Re: [s2] Formatting input textfields
 189218 by: Milan Milanovic
 189219 by: Milan Milanovic

[S2] Using SSL, HTTP, HTTPS and invoking Action classes
 189220 by: Anastasios Patrikis
 189222 by: Nuwan Chandrasoma

Unit testing Struts2 + Spring application?
 189221 by: Joachim Ansorg

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_189193.ezm (zipped)

Forgive my ignorance, but I'm trying to understand J2EE, and my understanding
of an EAR file is as follows:

Top level contains libraries, a WAR, and JARs for your EJBs, correct? And
there's a separate classloader for the EAR, the WAR, and for each JAR, with
the JAR and WAR classloaders being children of of the EAR classloader,
right? I understand this means that the WAR can see stuff in the EAR (like
the libraries), but it can't see stuff in the JARs (different classloaders),
and the libraries can't see anything (or only classes?) in the WAR, again
because they use different class loaders?

Assuming the above is correct, how is it that that Struts, if placed with
the rest of the libraries in the top level of the EAR, is able to see the
JSP files and whatnot inside the WAR? I know that other classes in the
libraries can't (ClassDefNotFound errors), so yeah. Not sure I understand
what's happening there. I'm using Geronimo 2.1.1 if it makes a difference. I
think I'm using Struts 1.2.4, and Java 5.

e.g.

EAR
|-----/libs/struts.jar
|-----WAR
      |-----/index.jsp
|-----EJB.jar

How does struts know where to look for index.jsp?
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_189199.ezm (zipped)
> |-----/libs/struts.jar
> |-----WAR
> |
>        |-----/index.jsp
> |
> |-----EJB.jar

/libs/ is for general libraries used by your application (logging comes to
mind, StringUtils or just about anything that is used among your modules).

The struts.jar has to go into the WAR. Under /WEB-INF/lib/.
You do not change anything within your WAR just because you package it into an
Enterprise Archive (EAR).

 Piero

Attachment: user_189194.ezm (zipped)
S2.0.11 uses Dojo 0.4.3.

Dave

--- On Tue, 7/22/08, Pranav <mehta_pranav@(protected):

> From: Pranav <mehta_pranav@(protected)>
> Subject: Re: Dojo javascript errors with ajax theme. please help
> To: "Struts Users Mailing List" <user@(protected)>
> Date: Tuesday, July 22, 2008, 6:58 PM
> Hi Jerome,
>
> I tried this but unfortunately their dojo's svn does
> not have the release 0.4.0 anymore. I could only get the
> source code for release 0.4.3 from their download section.
> Do you think that will work? If not, can you tell me the
> exact svn location from where I can get the release 0.4.0
> of dojo?
>
> Thanks
> Pranav
>
>
>
> ----- Original Message ----
> From: Pranav <mehta_pranav@(protected)>
> To: Struts Users Mailing List
> <user@(protected)>
> Sent: Tuesday, July 22, 2008 8:57:15 AM
> Subject: Re: Dojo javascript errors with ajax theme. please
> help
>
> Hi Jerome,
>
> You're a lifesaver. Thanks for your tips. I will try
> them out today. I fixed my issue temporarily yesterday by
> extracting the jar file, and manually creating copies of
> gregorian.js and gregorianExtras.js etc to appropriate
> locations and the problem did go away but I will surely put
> in this permanent fix to improve performance.
>
> Thanks
>
>
>
> ----- Original Message ----
> From: Jeromy Evans <jeromy.evans@(protected)>
> To: Struts Users Mailing List
> <user@(protected)>
> Sent: Tuesday, July 22, 2008 5:38:55 AM
> Subject: Re: Dojo javascript errors with ajax theme. please
> help
>
> Pranav wrote:
> > Hi,
> >
> > I am using <s:head theme="ajax"/> in
> my jsp files. I have included everything as per struts2
> docs. But when I launch the page in FireFox, they show me
> 404 errors for several javascript files.
> > Example are:
> >
> ../struts/dojo/src/i18n/calendar/nls/en-us/gregorian.js
> >
> ../struts/dojo/src/i18n/calendar/nls/en/gregorianExtras.js
> >
> ../struts/dojo/src/i18n/calendar/nls/en-us/gregorianExtras.js
> > ../struts/dojo/src/widget/nls/en/TimePicker.js
> > ../struts/dojo/src/widget/nls/en-us/TimePicker.js
> >
> ../mcpages/struts/dojo/src/widget/nls/en/DropdownTimePicker.js
> >
> ../struts/dojo/src/widget/nls/en-us/DropdownTimePicker.js
> >
> > When I opened the struts2-core-2.0.11.jar file that my
> project is using, I did not find these files at all. I am
> not using any of these components like date-time picker or
> calendar objects but for some reason dojo plugin tries to
> GET these files. This gives a lot of problem in our
> pre-prod system where firewalls and proxies are installed.
> Can someone please help me get rid of these errors? What
> will I have to do? I will really appreciate help from
> experts.
> >
> > Thanks
> > Pranav
> >
> >
> >
>
> In Struts 2.0.x, the files are bundled in the jar under
> org/apache/struts/static or somewhere nearby.
>
> The are served by the struts filter only if the filter path
> enables it
> (eg. /*) and if the property struts.serve.static=true
> (default true).
>
> In a production system, it's a very good idea to
> extract the files and
> serve them directly from Apache or your container as
> there'll be a
> significant performance improvement (very significant if
> apache serves
> them).
>
> I'm not sure why it would be loading the timepicker and
> date picker if
> you're not using them - check the html to see why
> there's a Requires
> statement.
>
> In a production system, a good idea to create a custom dojo
> profile (in
> this case, for example, to remove locale files). It makes
> a massive
> performance improvement by reducing the large number of
> GETs.
>
> http://cwiki.apache.org/S2WIKI/creating-a-custom-dojo-profile-for-struts-20x.html
>
> Hope that helps.
> Jeromy Evans
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)
>
>
>    
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)
>
>
>    
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)

Attachment: user_189197.ezm (zipped)
http://download.dojotoolkit.org/release-0.4.0/

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-----Original Message-----
From: Pranav [mailto:mehta_pranav@(protected)]
Sent: Wednesday, July 23, 2008 4:28 AM
To: Struts Users Mailing List
Subject: Re: Dojo javascript errors with ajax theme. please help

Hi Jerome,

I tried this but unfortunately their dojo's svn does not have the
release 0.4.0 anymore. I could only get the source code for release
0.4.3 from their download section. Do you think that will work? If not,
can you tell me the exact svn location from where I can get the release
0.4.0 of dojo?

Thanks
Pranav



----- Original Message ----
From: Pranav <mehta_pranav@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Tuesday, July 22, 2008 8:57:15 AM
Subject: Re: Dojo javascript errors with ajax theme. please help

Hi Jerome,

You're a lifesaver. Thanks for your tips. I will try them out today. I
fixed my issue temporarily yesterday by extracting the jar file, and
manually creating copies of gregorian.js and gregorianExtras.js etc to
appropriate locations and the problem did go away but I will surely put
in this permanent fix to improve performance.

Thanks



----- Original Message ----
From: Jeromy Evans <jeromy.evans@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Tuesday, July 22, 2008 5:38:55 AM
Subject: Re: Dojo javascript errors with ajax theme. please help

Pranav wrote:
> Hi,
>
> I am using <s:head theme="ajax"/> in my jsp files. I have included
everything as per struts2 docs. But when I launch the page in FireFox,
they show me 404 errors for several javascript files.
> Example are:
> ../struts/dojo/src/i18n/calendar/nls/en-us/gregorian.js
> ../struts/dojo/src/i18n/calendar/nls/en/gregorianExtras.js
> ../struts/dojo/src/i18n/calendar/nls/en-us/gregorianExtras.js
> ../struts/dojo/src/widget/nls/en/TimePicker.js
> ../struts/dojo/src/widget/nls/en-us/TimePicker.js
> ../mcpages/struts/dojo/src/widget/nls/en/DropdownTimePicker.js
> ../struts/dojo/src/widget/nls/en-us/DropdownTimePicker.js
>
> When I opened the struts2-core-2.0.11.jar file that my project is
using, I did not find these files at all. I am not using any of these
components like date-time picker or calendar objects but for some reason
dojo plugin tries to GET these files. This gives a lot of problem in our
pre-prod system where firewalls and proxies are installed. Can someone
please help me get rid of these errors? What will I have to do? I will
really appreciate help from experts.
>
> Thanks
> Pranav
>
>
>

In Struts 2.0.x, the files are bundled in the jar under
org/apache/struts/static or somewhere nearby.

The are served by the struts filter only if the filter path enables it
(eg. /*) and if the property struts.serve.static=true (default true).

In a production system, it's a very good idea to extract the files and
serve them directly from Apache or your container as there'll be a
significant performance improvement (very significant if apache serves
them).

I'm not sure why it would be loading the timepicker and date picker if
you're not using them - check the html to see why there's a Requires
statement.

In a production system, a good idea to create a custom dojo profile (in
this case, for example, to remove locale files). It makes a massive
performance improvement by reducing the large number of GETs.

http://cwiki.apache.org/S2WIKI/creating-a-custom-dojo-profile-for-struts
-20x.html

Hope that helps.
Jeromy Evans

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


   

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


   

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

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_189195.ezm (zipped)

http://sujoebose.com/resources/javaone08.ppt

any response from struts2 people?
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_189196.ezm (zipped)
Kinda hard to comment without being able to see the application used
for the benchmark. As I think it has been frequently noted, you can
build a very fast Struts 2 app or a really slow one - our challenge is
to make it easier to build the faster variety.

Don

On Wed, Jul 23, 2008 at 11:36 AM, neerashish <neerashish@(protected):
>
> 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----tp18602242p18602242.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_189198.ezm (zipped)
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):
>
> 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----tp18602242p18602242.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_189200.ezm (zipped)

We are evaluating and prototyping and evaluating struts 2. We really like it.
It is easy to use and powerful. It is just good. Performance is our only
concern. Are you aware of any very high traffic web apps or sites using
Struts 2 ( not struts 1)

also found this, any updates on this,

  OGNL performance detrimental to Struts 2 - Is this still an issue or has
it been resolved?
http://forums.opensymphony.com/message.jspa?messageID=135489


Don Brown wrote:
>
> Kinda hard to comment without being able to see the application used
> for the benchmark. As I think it has been frequently noted, you can
> build a very fast Struts 2 app or a really slow one - our challenge is
> to make it easier to build the faster variety.
>
> Don
>
> On Wed, Jul 23, 2008 at 11:36 AM, neerashish <neerashish@(protected):
>>
>> 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----tp18602242p18602242.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)
>>
>>
>
> ---------------------------------------------------------------------
> 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_189204.ezm (zipped)
I think page 24 says it all when it has "The results may not be
reflective of real world implementations"?

Beyond that;

- There is no comparison of functionality provided by the frameworks.

- Did the benchmarked follow the performance tuning guidelines?

- Did they upgrade to freemarker 2.3.13 which has shown itself to give
speed improvements in multi-threaded scenarios?

All in all it's you're standard benchmark, it's only really relevant to
the conditions which they impose and if your conditions are different
(e.g. not running on XP and using as Server OS instead) you may see
vastly different results.

Al.


Musachy Barroso wrote:
> 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):
>  
>> 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----tp18602242p18602242.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_189201.ezm (zipped)
As Dave mentioned, var should be used with Struts 2.1, and if you are
using Strust 2.0 you have to use var instead.
Regarding your struts.xml, I don't know exactly what your updateUser
do, but you should follow below sequence:

list.action -> success:list.jsp -> edit.action -> success:edit.jsp ->
update.action -> input:edit.jsp || success:redirect to list.action


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

Attachment: user_189202.ezm (zipped)
> using Strust 2.0 you have to use var instead.

should be "id instead" ;-)


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

Attachment: user_189203.ezm (zipped)

Hi,

I have the below scenario in our application.

Consider we have two radio buttons for two types of bank accounts, say Savings and Current, and based on the selection of each radio button we are enabling/disabling some fields for user input, which in turn, the properties of an ActionForm.

What my question is, when we select the first radio button and fills/clears the values and submitting the form only a set of validations to be performed and in the case of second radio button also we are doing the same thing. How can I implement a custom validation for this scenario? And also please note that the radio button is also a property of the ActionForm.

Thanks in Advance,
Chandra.
_________________________________________________________________
Wish to Marry Now? Click Here to Register FREE
http://www.shaadi.com/registration/user/index.php?ptnr=mhottag

Attachment: user_189205.ezm (zipped)
(I use Struts 2.1.2)

I am not sure if the following behaviour of <s:text> is documented.
(I have not read any comment about it.)

<s:text name="resource.bundle.key"/> will yield the message from the
resource bundle whose key is "resource.bundle.key", provided that key
exists. Otherwise, normally, you would get the name of the key
printed as is (at least in debug mode): "resource.bundle.key". So far
so good.

But what if:
a) the key does not exist AND
b) "resource.bundle.key" is a valid OGNL expression referring to an
object in the value stack?
According to the guides, the "name" parameter of <s:text> is not evaluated...

Yet that's not my experience... I find that, in the last scenario,
<s:text name="resource.bundle.key"/> has the same effect as
<s:property value="resource.bundle.key"/>. In other words, <s:text/>
ends up printing the String value of the object designated by the OGNL
expression %{resource.bundle.key}. A little disturbing...

Moreover, if I reduce the logging threshold of
com.opensymphony.xwork2.* (so as to see more messages), I will get
myriads of statements like the following one:

WARN OgnlValueStack:46 - Could not find property [resource]

... even when the message <s:text name="resource.bundle.key"/> ends up
printed exactly as it should be.

It seems as if the "name" parameter of the <s:text> is in fact
evaluated (unless I don't understand the meaning of that word...). Is
that behaviour desirable?

Attachment: user_189210.ezm (zipped)
Can you please raise this in JIRA?

I think the key has always been evaluated but I'd have to check. I did
make some significant changes to this tag for 2.1.2 and may have
accidentally changed the behaviour.

I'd be very happy to turn off evaluation of the key as it wastes cycles
but would have to check the existing test cases to see if there was a
justification for it.

Pierre Thibaudeau wrote:
> (I use Struts 2.1.2)
>
> I am not sure if the following behaviour of <s:text> is documented.
> (I have not read any comment about it.)
>
> <s:text name="resource.bundle.key"/> will yield the message from the
> resource bundle whose key is "resource.bundle.key", provided that key
> exists. Otherwise, normally, you would get the name of the key
> printed as is (at least in debug mode): "resource.bundle.key". So far
> so good.
>
> But what if:
> a) the key does not exist AND
> b) "resource.bundle.key" is a valid OGNL expression referring to an
> object in the value stack?
> According to the guides, the "name" parameter of <s:text> is not evaluated...
>
> Yet that's not my experience... I find that, in the last scenario,
> <s:text name="resource.bundle.key"/> has the same effect as
> <s:property value="resource.bundle.key"/>. In other words, <s:text/>
> ends up printing the String value of the object designated by the OGNL
> expression %{resource.bundle.key}. A little disturbing...
>
> Moreover, if I reduce the logging threshold of
> com.opensymphony.xwork2.* (so as to see more messages), I will get
> myriads of statements like the following one:
>
> WARN OgnlValueStack:46 - Could not find property [resource]
>
> ... even when the message <s:text name="resource.bundle.key"/> ends up
> printed exactly as it should be.
>
> It seems as if the "name" parameter of the <s:text> is in fact
> evaluated (unless I don't understand the meaning of that word...). Is
> that behaviour desirable?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.138 / Virus Database: 270.5.4/1567 - Release Date: 22/07/2008 4:05 PM
>
>
>
>  


Attachment: user_189206.ezm (zipped)
Hello !!!

My question is the following one:

Is it possible to configure Struts in a way that Struts do not send a response by a forward (error handling) in the case of specific error but therefore declares the operation as successful ?

Thanks for some help.

Regards,

Helge
_________________________________________________________________
WEB.DE schenkt Ihnen jeden Monat einen hochkarätigen Blockbuster
von maxdome! Jetzt anmelden unter http://www.blockbuster.web.de


Attachment: user_189207.ezm (zipped)
2008/7/23 Helge Wiemann <helge-w@(protected)>:
> Is it possible to configure Struts in a way that Struts do not send a response by a forward (error handling) in the case of specific error but therefore declares the operation as successful ?

try-catch?

Antonio

Attachment: user_189208.ezm (zipped)
I just thought about a solution which might be integrated perhaps in a validation.xml

Example: A user types a "1" in a form field. This value is not ok but it is not so important. Thus the operation is marked as successful although there is this error.


> -----Ursprüngliche Nachricht-----
> Von: "Antonio Petrelli" <antonio.petrelli@(protected)>
> Gesendet: 23.07.08 09:52:04
> An: "Struts Users Mailing List" <user@(protected)>
> Betreff: Re: configuring the error handling of Struts


> 2008/7/23 Helge Wiemann <helge-w@(protected)>:
> > Is it possible to configure Struts in a way that Struts do not send a response by a forward (error handling) in the case of specific error but therefore declares the operation as successful ?
>
> try-catch?
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066


Attachment: user_189211.ezm (zipped)
2008/7/23 Helge Wiemann <helge-w@(protected)>:
> I just thought about a solution which might be integrated perhaps in a validation.xml
>
> Example: A user types a "1" in a form field. This value is not ok but it is not so important. Thus the operation is marked as successful although there is this error.

Just a fast question, what version of Struts are you using?

Antonio

Attachment: user_189212.ezm (zipped)
Unfortunately still version 1.1


> -----Ursprüngliche Nachricht-----
> Von: "Antonio Petrelli" <antonio.petrelli@(protected)>
> Gesendet: 23.07.08 10:11:17
> An: "Struts Users Mailing List" <user@(protected)>
> Betreff: Re: configuring the error handling of Struts


> 2008/7/23 Helge Wiemann <helge-w@(protected)>:
> > I just thought about a solution which might be integrated perhaps in a validation.xml
> >
> > Example: A user types a "1" in a form field. This value is not ok but it is not so important. Thus the operation is marked as successful although there is this error.
>
> Just a fast question, what version of Struts are you using?
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


_______________________________________________________________________
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220


Attachment: user_189214.ezm (zipped)
2008/7/23 Helge Wiemann <helge-w@(protected)>:
> I just thought about a solution which might be integrated perhaps in a validation.xml
>
> Example: A user types a "1" in a form field. This value is not ok but it is not so important. Thus the operation is marked as successful although there is this error.

So, instead of going to the "input", you want to go to another
"successful" forward?
It's a bit tricky, because you probably need to manage this kind of
"validation" inside the execute method, not in validation.

Antonio

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

Attachment: user_189217.ezm (zipped)
Hi,

Add id to your tag <s:select id="myid"/>

and then use it like this $("#myid").addOption("value", "Label");



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

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

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


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_189216.ezm (zipped)
Hi,

Don't treat namespace as directory, they are not relevant. Namespace
is logic name for given set of actions, jsp, whatever.
If Struts2 can't find action in given namespace, it's jumping to
default namespace / and try to search it there.

I didn't understand what problem do you have, but you can use Spring
Security or something to restrict access to given url.


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

Attachment: user_189218.ezm (zipped)

Hi,

could you give here your source code for that converter ?

--
Thx, Milan


aretobios wrote:
>
> I had the same problem. I solved it by creating a custom type conversion
> for bigdecimal fields.
>
> Take a look
> http://struts.apache.org/2.0.11.2/docs/type-conversion.html#TypeConversion-ApplyingaTypeConverterforanapplication
> here
>
> By creating your own converter you can have fields were the user write
> number with the #.###,## format and the bigdecimals are displayed with the
> same format
>
>>
>> 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-tp18593985p18593985.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)
>>
>>
>
>
> John Koutros
> Technology
>
> PROTONBANK
> 20 Amaliados & Eslin Str., 115 23 Athens, Greece
> Tel.: +30 210 6970677, +30 211 1081677
> Mob.: +30 693 6104677 FAX: +30 210 90025299
> eMail: j.koutros@(protected)
>
> --------------------------------------------------------
>
>
> This message may contain confidential information and is intended only for
> the individual named. If you are not the named addressee you should not
> disseminate, distribute, alter or copy this e-mail. Please notify the
> sender immediately by e-mail if you have received this e-mail by mistake
> and then delete this e-mail from your system. E-mail transmissions cannot
> be guaranteed to be secure, or error-free or virus-free. Any liability for
> all the above is excluded to the fullest extent permitted by law.
>
> Αυτό το μήνυμα πιθανόν να περιέχει εμπιστευτικές πληροφορίες και
> προορίζεται μόνο για το άτομο που κατονομάζεται. Εάν δεν είστε ο
> κατονομαζόμενος παραλήπτης, δεν πρέπει να διαδώσετε, να διανείμετε, να
> αλλάξετε ή να αντιγράψετε αυτό το ηλεκτρονικό μήνυμα. Παρακαλώ ειδοποιήστε
> τον αποστολέα αμέσως με ηλεκτρονικό ταχυδρομείο εάν έχετε λάβει αυτό το
> ηλεκτρονικό μήνυμα από λάθος και εν συνεχεία διαγράψτε το από το σύστημά
> σας. Η μετάδοση μέσω ηλεκτρονικού ταχυδρομείου δεν παρέχει εγγυήσεις ως
> προς την ασφάλεια, την έλλειψη λαθών ή τη μετάδοση ιών. Οποιαδήποτε ευθύνη
> σχετικά με τα ανωτέρω αποκλείεται κατά το μέγιστο δυνατό μέτρο που
> επιτρέπει ο νόμος.
>
>

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


Attachment: user_189219.ezm (zipped)

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)
>
>
>

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


Attachment: user_189220.ezm (zipped)
Hi,

I have problem in switching my application context from http to https an
back again.
Because I am new to Struts I am not sure if I use the framework the
right way, so any help or hint is greatly appreciated

Here is the task: I have some pages in my application which are
available via http. There is a step in which the user is requested to
enter some personal data, and the user can create a account. This page
should be secured using SSL on a https site. Later on, the user should
be redirected back to http.


First problem: I do not know if the setup for using SSL is "the Struts
way" because it is quiet hard to find information in how to use SSL and
Struts.
However, this is how I configured the application.

- in web.xml I added the action which causes the switch from http to
https:
<security-constraint>
 <web-resource-collection>
   <!-- login -->
   <url-pattern>/Login.action</url-pattern>
 </web-resource-collection>
 <user-data-constraint>
   <transport-guarantee>CONFIDENTIAL</transport-guarantee>
 </user-data-constraint>
</security-constraint>

- in struts.xml I have a definition for the action:
<action name="Login" class="com.action.CustomerLoginAction"
method="userLogin">
   <result name="error">/ErrorPage.jsp</result>
   <result>/LoginPage.jsp</result>
</action>

- as all following request are made in the secured context I wrote a
simple action class for redirecting back to http.

First question is if this is the right way. It seems to be a quiet
complicated solution for a common task.


Second problem: without changing into a secure context (no
"security-constraint" in web.xml) I can call my action class and some
properties are set by the framework calling the appropriate "set"
methods. After applying the "security-constraint" in the web.xml file
the "set" methods are not invoked any more.

Second question: is this the behavior by design? How should I set the
necessary properties, by using session variables? I found an article
which describes a problem by using a session variable in combination
with SSL: http://forums.opensymphony.com/thread.jspa?messageID=130588.
Once again I think my solution is to complicated and this task is
supported by the framework without me knowing how to do it a better way.

Best regards,

Anastasios.


Attachment: user_189222.ezm (zipped)
Hi,

Have a look at this plug-in, it may help you

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

Thanks,

Nuwan



Anastasios Patrikis wrote:
> Hi,
>
> I have problem in switching my application context from http to https an
> back again.
> Because I am new to Struts I am not sure if I use the framework the
> right way, so any help or hint is greatly appreciated
>
> Here is the task: I have some pages in my application which are
> available via http. There is a step in which the user is requested to
> enter some personal data, and the user can create a account. This page
> should be secured using SSL on a https site. Later on, the user should
> be redirected back to http.
>
>
> First problem: I do not know if the setup for using SSL is "the Struts
> way" because it is quiet hard to find information in how to use SSL and
> Struts.
> However, this is how I configured the application.
>
> - in web.xml I added the action which causes the switch from http to
> https:
> <security-constraint>
>  <web-resource-collection>
>    <!-- login -->
>    <url-pattern>/Login.action</url-pattern>
>  </web-resource-collection>
>  <user-data-constraint>
>    <transport-guarantee>CONFIDENTIAL</transport-guarantee>
>  </user-data-constraint>
> </security-constraint>
>
> - in struts.xml I have a definition for the action:
> <action name="Login" class="com.action.CustomerLoginAction"
> method="userLogin">
>     <result name="error">/ErrorPage.jsp</result>
>     <result>/LoginPage.jsp</result>
> </action>
>
> - as all following request are made in the secured context I wrote a
> simple action class for redirecting back to http.
>
> First question is if this is the right way. It seems to be a quiet
> complicated solution for a common task.
>
>
> Second problem: without changing into a secure context (no
> "security-constraint" in web.xml) I can call my action class and some
> properties are set by the framework calling the appropriate "set"
> methods. After applying the "security-constraint" in the web.xml file
> the "set" methods are not invoked any more.
>
> Second question: is this the behavior by design? How should I set the
> necessary properties, by using session variables? I found an article
> which describes a problem by using a session variable in combination
> with SSL: http://forums.opensymphony.com/thread.jspa?messageID=130588.
> Once again I think my solution is to complicated and this task is
> supported by the framework without me knowing how to do it a better way.
>
> Best regards,
>
> Anastasios.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>  


Attachment: user_189221.ezm (zipped)
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
©2008 gg3721.com - Jax Systems, LLC, U.S.A.