Author Login
Post Reply
user Digest 10 Mar 2010 11:15:24 -0000 Issue 9024
Topics (messages 205317 through 205341):
StrutsSpringTestCase - Memory Leak
205317 by: carl ballantyne
205319 by: Martin Gainty
205320 by: Lukasz Lenart
205322 by: carl ballantyne
205323 by: Lukasz Lenart
Re: struts 2 - framework question
205318 by: Cimballi
S2-Spring-Hibernate training class @ Gunadarma University
205321 by: Frans Thamura
Currency Formatting
205324 by: CRANFORD, CHRIS
205325 by: Chris Pratt
205326 by: CRANFORD, CHRIS
205327 by: CRANFORD, CHRIS
Struts + Spring 3
205328 by: Lance Hill
205333 by: Frans Thamura
About the better way to implement a JSP in read/edit mode
205329 by: Frederik Minatchy
205330 by: Pawe³ Wielgus
205331 by: Angelo zerr
205335 by: Frederik Minatchy
205336 by: Frederik Minatchy
205337 by: Angelo zerr
205338 by: Frederik Minatchy
205340 by: Alex Rodriguez Lopez
205341 by: Frederik Minatchy
Validate Dates - Other Locales
205332 by: CRANFORD, CHRIS
basic struts application
205334 by: tesla
How to deploy struts on tomcat
205339 by: abhishek jain
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_205317.ezm (zipped)Hi All,
I ran into an issue with the StrutsSpringTestCase class when doing my
unit tests. Basically the memory kept climbing until it crashed the
machine.
This class is actually loading the applicationContext for every test
case that extends it. And because the applicationContext is static the
instances of the spring beans loaded are not cleaned up by the garbage
collector.
What I ended up doing was overriding the method with the following in
my base test class for Struts 2. The only difference being the check
to see if applicationContext is null. This has the added benefit of
speeding up the tests.
protected void setupBeforeInitDispatcher() throws Exception {
// only load beans from spring once
if (applicationContext == null) {
GenericXmlContextLoader xmlContextLoader = new
GenericXmlContextLoader();
applicationContext =
xmlContextLoader.loadContext(getContextLocations());
}
servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE,
applicationContext);
}
Hope this helps anyone who runs into the same issue.
Cheers,
Carl.
*Advertencia legal: en virtud de lo establecido en la Ley Organica 15/1999 de Proteccion de Datos de Caracter Personal, le informamos de que los datos personales que pueda facilitarnos se incorporaran a un fichero automatizado titularidad de CAST INFO, S.A. con la finalidad de gestionar la relacion negocial que nos vincula. Podra revocar su consentimiento al tratamiento de los datos, asi como ejercer sus derechos de acceso, rectificacion, cancelacion u oposicion dirigiendose por escrito a CAST INFO domiciliada en C/ Tuset 23, 1 -- 08006 Barcelona, o a la direccion de correo electronico lopd@(protected).
Este mensaje y los ficheros anexos que pueda contener son confidenciales, pueden contener informacion sometida a secreto profesional y se dirige exclusivamente a su destinatario. Si ha recibido este mensaje por error o tiene conocimiento del mismo por cualquier motivo, le rogamos que nos lo comunique inmediatamente por este mismo medio y se abstenga de utilizarlo, reproducirlo, alterarlo, archivarlo o comunicarlo a terceros. El emisor no se responsabiliza de posibles perjuicios derivados de la captura, incorporaciones de virus o cualesquiera otras manipulaciones efectuadas por terceros.
Antes de imprimir este e-mail piense bien si es necesario hacerlo.

Attachment:
user_205319.ezm (zipped)
can you update the StrutsSpringTestCase in the repository?
Many Thanks for this important discovery and the solution!
Saludos Cordiales desde EEUU
Martin
______________________________________________
Porfavor no modifica o interrupta esa communicacion/Please do not modify or interrupt this communication
> Date: Tue, 9 Mar 2010 11:46:43 +0100
> From: carl.ballantyne@(protected)
> To: user@(protected)
> Subject: StrutsSpringTestCase - Memory Leak
>
> Hi All,
>
> I ran into an issue with the StrutsSpringTestCase class when doing my
> unit tests. Basically the memory kept climbing until it crashed the
> machine.
>
> This class is actually loading the applicationContext for every test
> case that extends it. And because the applicationContext is static the
> instances of the spring beans loaded are not cleaned up by the garbage
> collector.
>
> What I ended up doing was overriding the method with the following in
> my base test class for Struts 2. The only difference being the check
> to see if applicationContext is null. This has the added benefit of
> speeding up the tests.
>
> protected void setupBeforeInitDispatcher() throws Exception {
> // only load beans from spring once
> if (applicationContext == null) {
> GenericXmlContextLoader xmlContextLoader = new
> GenericXmlContextLoader();
> applicationContext =
> xmlContextLoader.loadContext(getContextLocations());
> }
>
> servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE,
> applicationContext);
> }
>
> Hope this helps anyone who runs into the same issue.
> Cheers,
> Carl.
>
>
> *Advertencia legal: en virtud de lo establecido en la Ley Organica 15/1999 de Proteccion de Datos de Caracter Personal, le informamos de que los datos personales que pueda facilitarnos se incorporaran a un fichero automatizado titularidad de CAST INFO, S.A. con la finalidad de gestionar la relacion negocial que nos vincula. Podra revocar su consentimiento al tratamiento de los datos, asi como ejercer sus derechos de acceso, rectificacion, cancelacion u oposicion dirigiendose por escrito a CAST INFO domiciliada en C/ Tuset 23, 1 -- 08006 Barcelona, o a la direccion de correo electronico lopd@(protected).
>
> Este mensaje y los ficheros anexos que pueda contener son confidenciales, pueden contener informacion sometida a secreto profesional y se dirige exclusivamente a su destinatario. Si ha recibido este mensaje por error o tiene conocimiento del mismo por cualquier motivo, le rogamos que nos lo comunique inmediatamente por este mismo medio y se abstenga de utilizarlo, reproducirlo, alterarlo, archivarlo o comunicarlo a terceros. El emisor no se responsabiliza de posibles perjuicios derivados de la captura, incorporaciones de virus o cualesquiera otras manipulaciones efectuadas por terceros.
>
> Antes de imprimir este e-mail piense bien si es necesario hacerlo.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/201469230/direct/01/

Attachment:
user_205320.ezm (zipped)2010/3/9 carl ballantyne <carl.ballantyne@(protected)>:
> Hi All,
>
> I ran into an issue with the StrutsSpringTestCase class when doing my unit
> tests. Basically the memory kept climbing until it crashed the machine.
>
> This class is actually loading the applicationContext for every test case
> that extends it. And because the applicationContext is static the instances
> of the spring beans loaded are not cleaned up by the garbage collector.
>
> What I ended up doing was overriding the method with the following in my
> base test class for Struts 2. The only difference being the check to see if
> applicationContext is null. This has the added benefit of speeding up the
> tests.
>
> protected void setupBeforeInitDispatcher() throws Exception {
> // only load beans from spring once
> if (applicationContext == null) {
> GenericXmlContextLoader xmlContextLoader = new
> GenericXmlContextLoader();
> applicationContext =
> xmlContextLoader.loadContext(getContextLocations());
> }
>
> servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE,
> applicationContext);
> }
>
> Hope this helps anyone who runs into the same issue.
> Cheers,
> Carl.
Could you register a new issue with patch attached?
https://issues.apache.org/jira/browse/WW
Thanks in advance
--
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

Attachment:
user_205322.ezm (zipped)Done - https://issues.apache.org/jira/browse/WW-3402.
Quoting Lukasz Lenart <lukasz.lenart@(protected)>:
>
> Could you register a new issue with patch attached?
> https://issues.apache.org/jira/browse/WW
>
>
*Advertencia legal: en virtud de lo establecido en la Ley Organica 15/1999 de Proteccion de Datos de Caracter Personal, le informamos de que los datos personales que pueda facilitarnos se incorporaran a un fichero automatizado titularidad de CAST INFO, S.A. con la finalidad de gestionar la relacion negocial que nos vincula. Podra revocar su consentimiento al tratamiento de los datos, asi como ejercer sus derechos de acceso, rectificacion, cancelacion u oposicion dirigiendose por escrito a CAST INFO domiciliada en C/ Tuset 23, 1 -- 08006 Barcelona, o a la direccion de correo electronico lopd@(protected).
Este mensaje y los ficheros anexos que pueda contener son confidenciales, pueden contener informacion sometida a secreto profesional y se dirige exclusivamente a su destinatario. Si ha recibido este mensaje por error o tiene conocimiento del mismo por cualquier motivo, le rogamos que nos lo comunique inmediatamente por este mismo medio y se abstenga de utilizarlo, reproducirlo, alterarlo, archivarlo o comunicarlo a terceros. El emisor no se responsabiliza de posibles perjuicios derivados de la captura, incorporaciones de virus o cualesquiera otras manipulaciones efectuadas por terceros.
Antes de imprimir este e-mail piense bien si es necesario hacerlo.

Attachment:
user_205323.ezm (zipped)2010/3/9 carl ballantyne <carl.ballantyne@(protected)>:
> Done - https://issues.apache.org/jira/browse/WW-3402.
And done from my side ;-)
Best regards
--
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

Attachment:
user_205318.ezm (zipped)Something like that :
Declare the interceptor unless you use default Struts stacks
<interceptor name="staticParams"
class="
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor"
/>
Declare the static param :
<action name="action" class="aClass">
<param name="foo">value</param>
And in the action you need a setFoo(String)
Cimballi
On Mon, Mar 8, 2010 at 10:40 PM, john lee <sh_thorn_bird@(protected):
> Cimballi,
>
> tks for your help, but i do not quite understand about '...set the parameter statically in the action definitions...', would you demonstrate me couple line of psudo code to explain this?
>
> tks in advance
>
> john
>
>
>
> /7/10, Cimballi <cimballi@(protected):
>
>
> From: Cimballi <cimballi@(protected)>
> Subject: Re: struts 2 - framework question
> To: "john lee" <sh_thorn_bird@(protected)>
> Cc: "Struts Users Mailing List" <user@(protected)>
> Date: Sunday, March 7, 2010, 8:33 PM
>
>
> John, I don't have immediate code that I can copy paste, but I can
> explain a bit more the package solution.
>
> You will have to declare 2 packages, one with namespace "store1" and
> one with namespace "store2".
> Then you can write a single action, which take a storeId paramter, and
> you set the parameter statically in the action definitions.
>
> You will need 2 action definitions, one in each package, calling the
> same java action and setting the storeId parameter like said before.
>
> Then, in each JSP for each store, you call the correct struts action.
>
> Is it clear for you ?
>
> Cimballi
>
>
> On Sun, Mar 7, 2010 at 11:36 AM, john lee <sh_thorn_bird@(protected):
>>
>>
>>
>> possible for you to show some psedo code for how to do it?
>>
>> tks in advance
>>
>> john
>> --- On Sun, 3/7/10, Paweł Wielgus <poulwiel@(protected):
>>
>> From: Paweł Wielgus <poulwiel@(protected)>
>> Subject: Re: struts 2 - framework question
>> To: "Struts Users Mailing List" <user@(protected)
>> Date: Sunday, March 7, 2010, 1:59 AM
>>
>> Hi All,
>> You can also have N applications representing stores under names store1..storeN,
>> where one application just knows about itself and all applications are
>> identical in code but different in data and css maybe.
>>
>> Best greetings,
>> Paweł Wielgus.
>>
>>
>> 2010/3/7 Cimballi <cimballi.cimballi@(protected)>:
>> > John, you can use namespaces at the package level to distinguish your stores.
>> > You can also do that in a rest way, like http://www.xyz.com/store/1.
>> >
>> > Cimballi
>> >
>> >
>> > On Sat, Mar 6, 2010 at 11:18 PM, john lee <sh_thorn_bird@(protected):
>> >>
>> >> my company is distributor, we plan to provide platform for our customer(different store) to sell their product to indivual customers.
>> >>
>> >> http://www.xyz.om/store1
>> >> http://www.xyz.com/store2
>> >> http://www.xyz.com/store3
>> >> ...
>> >> http://www.xyz.com/storeN
>> >>
>> >> (store1...storeN) list our(distributor)'s product to their customer, when customer see the display price, the display price=our price(base price)+storeX's margin
>> >>
>> >> my question is the following
>> >>
>> >> a. in the struts.xml, different store should have different package defination ?
>> >>
>> >> b. in the application, what is the struts2's method to detect which store? in other words, how can i detect which link(http://www.xyz.om/store1 or store2 or store3) is pass in ? without knowing which store is called, i can not call special routine(could be price cal, ...) associated with that store.
>> >>
>> >> any good idea to approach this?
>> >>
>> >> tks in advance
>> >>
>> >> john
>> >>
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > 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_205321.ezm (zipped)hi all
this is our program here, in Indonesia, we teach assitant lab of computer
science, system information to learn S2, Spring, hibernate
http://www.facebook.com/album.php?aid=54050&id=1390157296&page=2
and this
http://www.facebook.com/album.php?aid=192190&id=675689084&l=04ff7af601
the good think, u can see the kids with long hand white , they are 2year in
highschool, :) i teach them Struts2, Spring, Hibernate long before do
training in that university
the rest are mostly undergraduate computer science student, and mostly also
asstant lab for computer science
--
Frans Thamura
Meruvian.
Experiential Tempation of Java and Enterprise OpenSource
Meruvian jTechnopreneur Program (S1) telah hadir, Dapatkan benefit bagi SMK
yang melakukan mapping SKKD, dg program beasiswa dari Gunadarma
Mobile: +6287885901958
Blog & Profile: http://frans.thamura.info
We provide services to migrate your apps to Java (web), in amazing fast and
reliable.

Attachment:
user_205324.ezm (zipped)
I had defined in my applicationMessages.properties a currency string
format as follows:
format.currency={0,number,currency}
When I view things in our default locale (English), this displays our
currency values like "53.68"; however when I view them in German I see
"53,68 ?". Why does it show the question mark and how can I resolve
this problem?
Chris

Attachment:
user_205325.ezm (zipped)If I had to make a guess, I'd say the font you're using doesn't
support the Euro symbol. But, that's just a guess.
(*Chris*)
On Tuesday, March 9, 2010, CRANFORD, CHRIS <Chris.Cranford@(protected):
>
> I had defined in my applicationMessages.properties a currency string
> format as follows:
>
> format.currency={0,number,currency}
>
> When I view things in our default locale (English), this displays our
> currency values like "53.68"; however when I view them in German I see
> "53,68 ?". Why does it show the question mark and how can I resolve
> this problem?
>
> Chris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_205326.ezm (zipped)
My CSS was using:
font-family: Verdana, Arial, Helvetica, sans-serif;
I updated this to the following and rechecked it, same result:
font-family: Arial, sans-serif;
So I'm really confused at this point. Someone mentioned encoding before, but the pages are UTF-8, fonts appear not to be the issue yet my cost fields are being printed as
" 3,90 ?"
Any other thoughts?
> -----Original Message-----
> From: Chris Pratt [mailto:thechrispratt@(protected)]
> Sent: Tuesday, March 09, 2010 10:23 AM
> To: Struts Users Mailing List
> Subject: Re: Currency Formatting
>
> If I had to make a guess, I'd say the font you're using doesn't
> support the Euro symbol. But, that's just a guess.
> (*Chris*)
>
> On Tuesday, March 9, 2010, CRANFORD, CHRIS <Chris.Cranford@(protected)>
> wrote:
> >
> > I had defined in my applicationMessages.properties a currency string
> > format as follows:
> >
> > format.currency={0,number,currency}
> >
> > When I view things in our default locale (English), this displays our
> > currency values like "53.68"; however when I view them in German I see
> > "53,68 ?". Why does it show the question mark and how can I resolve
> > this problem?
> >
> > Chris
> >
> >
> > ---------------------------------------------------------------------
> > 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_205327.ezm (zipped)I needed to specify my encoding in a filter inside web.xml. Once I did that, it resolved the issue.
Thanks
Chris
> -----Original Message-----
> From: Chris Pratt [mailto:thechrispratt@(protected)]
> Sent: Tuesday, March 09, 2010 10:23 AM
> To: Struts Users Mailing List
> Subject: Re: Currency Formatting
>
> If I had to make a guess, I'd say the font you're using doesn't
> support the Euro symbol. But, that's just a guess.
> (*Chris*)
>
> On Tuesday, March 9, 2010, CRANFORD, CHRIS <Chris.Cranford@(protected)>
> wrote:
> >
> > I had defined in my applicationMessages.properties a currency string
> > format as follows:
> >
> > format.currency={0,number,currency}
> >
> > When I view things in our default locale (English), this displays our
> > currency values like "53.68"; however when I view them in German I see
> > "53,68 ?". Why does it show the question mark and how can I resolve
> > this problem?
> >
> > Chris
> >
> >
> > ---------------------------------------------------------------------
> > 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_205328.ezm (zipped)I am currently working on a project that uses maven, struts 2, spring, and
spring security and ran into a big headache when trying to use spring
security 3.
Does anyone have an example of a working application that uses Spring 3
together with Struts 2? The reason I ask is that I was using the
struts-spring-plugin 2.1.8 and when I started to implement spring security,
I used version 3 which requires spring version 3, but the plugin relies on
spring 2.5.6.
Thank you,
Lance Hill

Attachment:
user_205333.ezm (zipped)you can use david's perfect example
github.com/dlwhitehurst/appfuse-rest
--
Frans Thamura
Meruvian.
Experiential Tempation of Java and Enterprise OpenSource
Meruvian jTechnopreneur Program (S1) telah hadir, Dapatkan benefit bagi SMK
yang melakukan mapping SKKD, dg program beasiswa dari Gunadarma
Mobile: +6287885901958
Blog & Profile: http://frans.thamura.info
We provide services to migrate your apps to Java (web), in amazing fast and
reliable.
On Wed, Mar 10, 2010 at 1:57 AM, Lance Hill <lance@(protected):
> I am currently working on a project that uses maven, struts 2, spring, and
> spring security and ran into a big headache when trying to use spring
> security 3.
>
>
>
> Does anyone have an example of a working application that uses Spring 3
> together with Struts 2? The reason I ask is that I was using the
> struts-spring-plugin 2.1.8 and when I started to implement spring security,
> I used version 3 which requires spring version 3, but the plugin relies on
> spring 2.5.6.
>
>
>
> Thank you,
>
> Lance Hill
>
>

Attachment:
user_205329.ezm (zipped)Hello everybody...
I wonder about the better way to implement a JSP which shows the same informations in readonly mode and in creation/modification mode.
So I have just designed the JSP' fields with s:textfield who can be dynamically shown in readonly mode with special css (background:transparent; border:none;...) specified in the action class.
So the action class sets some attributes with certains values and than the html stream is generated in read mode or in edit mode.
Is this the good way or should I developpe two JSP : one in read mode and an other one in edit mode?

Attachment:
user_205330.ezm (zipped)Hi Frederick,
You can also add readonly or disabled property to textfields.
But i don't think that there is a simple answear to your question
about if it is good or bad.
Best greetings,
Paweł Wielgus.
2010/3/9 Frederik Minatchy <frederik78@(protected)>:
> Hello everybody...
>
>
> I wonder about the better way to implement a JSP which shows the same informations in readonly mode and in creation/modification mode.
>
> So I have just designed the JSP' fields with s:textfield who can be dynamically shown in readonly mode with special css (background:transparent; border:none;...) specified in the action class.
>
> So the action class sets some attributes with certains values and than the html stream is generated in read mode or in edit mode.
>
> Is this the good way or should I developpe two JSP : one in read mode and an other one in edit mode?
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_205331.ezm (zipped)Hi Frederick,
I had created a project about this problem with
http://formview.sourceforge.net/
With FormView, you develop ONE Jsp to manage CRUD form. It's old project but
it works well (I have not time today to improve it).
Regards Angelo
2010/3/9 Paweł Wielgus <poulwiel@(protected)>
> Hi Frederick,
> You can also add readonly or disabled property to textfields.
> But i don't think that there is a simple answear to your question
> about if it is good or bad.
>
> Best greetings,
> Paweł Wielgus.
>
>
> 2010/3/9 Frederik Minatchy <frederik78@(protected)>:
> > Hello everybody...
> >
> >
> > I wonder about the better way to implement a JSP which shows the same
> informations in readonly mode and in creation/modification mode.
> >
> > So I have just designed the JSP' fields with s:textfield who can be
> dynamically shown in readonly mode with special css (background:transparent;
> border:none;...) specified in the action class.
> >
> > So the action class sets some attributes with certains values and than
> the html stream is generated in read mode or in edit mode.
> >
> > Is this the good way or should I developpe two JSP : one in read mode and
> an other one in edit mode?
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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_205335.ezm (zipped)Yes I know.. And this is what I made...
The readonly parameter is set dynamically by the Action class
--- En date de : Mar 9.3.10, Paweł Wielgus <poulwiel@(protected) :
> De: Paweł Wielgus <poulwiel@(protected)>
> Objet: Re: About the better way to implement a JSP in read/edit mode
> À: "Struts Users Mailing List" <user@(protected)>
> Date: Mardi 9 mars 2010, 20h40
> Hi Frederick,
> You can also add readonly or disabled property to
> textfields.
> But i don't think that there is a simple answear to your
> question
> about if it is good or bad.
>
> Best greetings,
> Paweł Wielgus.
>
>
> 2010/3/9 Frederik Minatchy <frederik78@(protected)>:
> > Hello everybody...
> >
> >
> > I wonder about the better way to implement a JSP which
> shows the same informations in readonly mode and in
> creation/modification mode.
> >
> > So I have just designed the JSP' fields with
> s:textfield who can be dynamically shown in readonly mode
> with special css (background:transparent; border:none;...)
> specified in the action class.
> >
> > So the action class sets some attributes with certains
> values and than the html stream is generated in read mode or
> in edit mode.
> >
> > Is this the good way or should I developpe two JSP :
> one in read mode and an other one in edit mode?
> >
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > 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_205336.ezm (zipped)Hello...
Thank you for your answer...
Your tag seems usefull.. but it seems to have been developped for Struts 1.x
--- En date de : Mar 9.3.10, Angelo zerr <angelo.zerr@(protected) :
> De: Angelo zerr <angelo.zerr@(protected)>
> Objet: Re: About the better way to implement a JSP in read/edit mode
> À: "Struts Users Mailing List" <user@(protected)>
> Date: Mardi 9 mars 2010, 21h04
> Hi Frederick,
>
> I had created a project about this problem with
> http://formview.sourceforge.net/
>
> With FormView, you develop ONE Jsp to manage CRUD form.
> It's old project but
> it works well (I have not time today to improve it).
>
> Regards Angelo
>
> 2010/3/9 Paweł Wielgus <poulwiel@(protected)>
>
> > Hi Frederick,
> > You can also add readonly or disabled property to
> textfields.
> > But i don't think that there is a simple answear to
> your question
> > about if it is good or bad.
> >
> > Best greetings,
> > Paweł Wielgus.
> >
> >
> > 2010/3/9 Frederik Minatchy <frederik78@(protected)>:
> > > Hello everybody...
> > >
> > >
> > > I wonder about the better way to implement a JSP
> which shows the same
> > informations in readonly mode and in
> creation/modification mode.
> > >
> > > So I have just designed the JSP' fields with
> s:textfield who can be
> > dynamically shown in readonly mode with special css
> (background:transparent;
> > border:none;...) specified in the action class.
> > >
> > > So the action class sets some attributes with
> certains values and than
> > the html stream is generated in read mode or in edit
> mode.
> > >
> > > Is this the good way or should I developpe two
> JSP : one in read mode and
> > an other one in edit mode?
> > >
> > >
> > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > 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_205337.ezm (zipped)Hi Frederik,
FormView can works with any HTML or JSP Taglib. It update HTML switch
configuration and state of your HTML field. Formview works with Struts 1.x
to use information about validation.xml (like required, date...). I don't
know how works Struts 2.x validation but I think it's possible to develop
that.
Regards Angelo
2010/3/10 Frederik Minatchy <frederik78@(protected)>
> Hello...
>
> Thank you for your answer...
>
> Your tag seems usefull.. but it seems to have been developped for Struts
> 1.x
>
> --- En date de : Mar 9.3.10, Angelo zerr <angelo.zerr@(protected) :
>
> > De: Angelo zerr <angelo.zerr@(protected)>
> > Objet: Re: About the better way to implement a JSP in read/edit mode
> > À: "Struts Users Mailing List" <user@(protected)>
> > Date: Mardi 9 mars 2010, 21h04
> > Hi Frederick,
> >
> > I had created a project about this problem with
> > http://formview.sourceforge.net/
> >
> > With FormView, you develop ONE Jsp to manage CRUD form.
> > It's old project but
> > it works well (I have not time today to improve it).
> >
> > Regards Angelo
> >
> > 2010/3/9 Paweł Wielgus <poulwiel@(protected)>
> >
> > > Hi Frederick,
> > > You can also add readonly or disabled property to
> > textfields.
> > > But i don't think that there is a simple answear to
> > your question
> > > about if it is good or bad.
> > >
> > > Best greetings,
> > > Paweł Wielgus.
> > >
> > >
> > > 2010/3/9 Frederik Minatchy <frederik78@(protected)>:
> > > > Hello everybody...
> > > >
> > > >
> > > > I wonder about the better way to implement a JSP
> > which shows the same
> > > informations in readonly mode and in
> > creation/modification mode.
> > > >
> > > > So I have just designed the JSP' fields with
> > s:textfield who can be
> > > dynamically shown in readonly mode with special css
> > (background:transparent;
> > > border:none;...) specified in the action class.
> > > >
> > > > So the action class sets some attributes with
> > certains values and than
> > > the html stream is generated in read mode or in edit
> > mode.
> > > >
> > > > Is this the good way or should I developpe two
> > JSP : one in read mode and
> > > an other one in edit mode?
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > 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_205338.ezm (zipped)I think I will think about that during my next Struts2 project :)
But about my question "Do I have to develop several interfaces with the same fields in read mode and edit mode?"
Does this mean that I should use the same JSP to do both?
(that's already what I have done... but a colleague thinks that it is not the better way... who's right? :) )
--- En date de : Mer 10.3.10, Angelo zerr <angelo.zerr@(protected) :
> De: Angelo zerr <angelo.zerr@(protected)>
> Objet: Re: About the better way to implement a JSP in read/edit mode
> À: "Struts Users Mailing List" <user@(protected)>
> Date: Mercredi 10 mars 2010, 9h26
> Hi Frederik,
>
> FormView can works with any HTML or JSP Taglib. It update
> HTML switch
> configuration and state of your HTML field. Formview works
> with Struts 1.x
> to use information about validation.xml (like required,
> date...). I don't
> know how works Struts 2.x validation but I think it's
> possible to develop
> that.
>
> Regards Angelo
>
> 2010/3/10 Frederik Minatchy <frederik78@(protected)>
>
> > Hello...
> >
> > Thank you for your answer...
> >
> > Your tag seems usefull.. but it seems to have been
> developped for Struts
> > 1.x
> >
> > --- En date de : Mar 9.3.10, Angelo zerr <angelo.zerr@(protected)>
> a écrit :
> >
> > > De: Angelo zerr <angelo.zerr@(protected)>
> > > Objet: Re: About the better way to implement a
> JSP in read/edit mode
> > > À: "Struts Users Mailing List" <user@(protected)>
> > > Date: Mardi 9 mars 2010, 21h04
> > > Hi Frederick,
> > >
> > > I had created a project about this problem with
> > > http://formview.sourceforge.net/
> > >
> > > With FormView, you develop ONE Jsp to manage CRUD
> form.
> > > It's old project but
> > > it works well (I have not time today to improve
> it).
> > >
> > > Regards Angelo
> > >
> > > 2010/3/9 Paweł Wielgus <poulwiel@(protected)>
> > >
> > > > Hi Frederick,
> > > > You can also add readonly or disabled
> property to
> > > textfields.
> > > > But i don't think that there is a simple
> answear to
> > > your question
> > > > about if it is good or bad.
> > > >
> > > > Best greetings,
> > > > Paweł Wielgus.
> > > >
> > > >
> > > > 2010/3/9 Frederik Minatchy <frederik78@(protected)>:
> > > > > Hello everybody...
> > > > >
> > > > >
> > > > > I wonder about the better way to
> implement a JSP
> > > which shows the same
> > > > informations in readonly mode and in
> > > creation/modification mode.
> > > > >
> > > > > So I have just designed the JSP' fields
> with
> > > s:textfield who can be
> > > > dynamically shown in readonly mode with
> special css
> > > (background:transparent;
> > > > border:none;...) specified in the action
> class.
> > > > >
> > > > > So the action class sets some
> attributes with
> > > certains values and than
> > > > the html stream is generated in read mode or
> in edit
> > > mode.
> > > > >
> > > > > Is this the good way or should I
> developpe two
> > > JSP : one in read mode and
> > > > an other one in edit mode?
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > 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_205340.ezm (zipped)I do tend to think that the less files the better. Here it's the same
with the number of files for actions/jsp, one can use more actions, ore
less actions but more methods inside. Same with jsp, I do think it's
better with less files, but a colleague here also thinks the opposite,
sometimes with less files you have to provide aditional checks or cases
so one file fits all possible use cases.
I think it's more elegant for me with same file for read and edit, but
others might dissagree, not sure if a way is better than the other :)
Alex
Em 10-03-2010 09:43, Frederik Minatchy escreveu:
> I think I will think about that during my next Struts2 project :)
>
> But about my question "Do I have to develop several interfaces with the same fields in read mode and edit mode?"
>
> Does this mean that I should use the same JSP to do both?
>
> (that's already what I have done... but a colleague thinks that it is not the better way... who's right? :) )
>
>
>
>
> --- En date de : Mer 10.3.10, Angelo zerr<angelo.zerr@(protected) :
>
>> De: Angelo zerr<angelo.zerr@(protected)>
>> Objet: Re: About the better way to implement a JSP in read/edit mode
>> À: "Struts Users Mailing List"<user@(protected)>
>> Date: Mercredi 10 mars 2010, 9h26
>> Hi Frederik,
>>
>> FormView can works with any HTML or JSP Taglib. It update
>> HTML switch
>> configuration and state of your HTML field. Formview works
>> with Struts 1.x
>> to use information about validation.xml (like required,
>> date...). I don't
>> know how works Struts 2.x validation but I think it's
>> possible to develop
>> that.
>>
>> Regards Angelo
>>
>> 2010/3/10 Frederik Minatchy<frederik78@(protected)>
>>
>>> Hello...
>>>
>>> Thank you for your answer...
>>>
>>> Your tag seems usefull.. but it seems to have been
>> developped for Struts
>>> 1.x
>>>
>>> --- En date de : Mar 9.3.10, Angelo zerr<angelo.zerr@(protected)>
>> a écrit :
>>>
>>>> De: Angelo zerr<angelo.zerr@(protected)>
>>>> Objet: Re: About the better way to implement a
>> JSP in read/edit mode
>>>> À: "Struts Users Mailing List"<user@(protected)>
>>>> Date: Mardi 9 mars 2010, 21h04
>>>> Hi Frederick,
>>>>
>>>> I had created a project about this problem with
>>>> http://formview.sourceforge.net/
>>>>
>>>> With FormView, you develop ONE Jsp to manage CRUD
>> form.
>>>> It's old project but
>>>> it works well (I have not time today to improve
>> it).
>>>>
>>>> Regards Angelo
>>>>
>>>> 2010/3/9 Paweł Wielgus<poulwiel@(protected)>
>>>>
>>>>> Hi Frederick,
>>>>> You can also add readonly or disabled
>> property to
>>>> textfields.
>>>>> But i don't think that there is a simple
>> answear to
>>>> your question
>>>>> about if it is good or bad.
>>>>>
>>>>> Best greetings,
>>>>> Paweł Wielgus.
>>>>>
>>>>>
>>>>> 2010/3/9 Frederik Minatchy<frederik78@(protected)>:
>>>>>> Hello everybody...
>>>>>>
>>>>>>
>>>>>> I wonder about the better way to
>> implement a JSP
>>>> which shows the same
>>>>> informations in readonly mode and in
>>>> creation/modification mode.
>>>>>>
>>>>>> So I have just designed the JSP' fields
>> with
>>>> s:textfield who can be
>>>>> dynamically shown in readonly mode with
>> special css
>>>> (background:transparent;
>>>>> border:none;...) specified in the action
>> class.
>>>>>>
>>>>>> So the action class sets some
>> attributes with
>>>> certains values and than
>>>>> the html stream is generated in read mode or
>> in edit
>>>> mode.
>>>>>>
>>>>>> Is this the good way or should I
>> developpe two
>>>> JSP : one in read mode and
>>>>> an other one in edit mode?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>> ---------------------------------------------------------------------
>>>>>> 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)
>>>
>>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment:
user_205341.ezm (zipped)many thanks :)
I appreciate your response
--- En date de : Mer 10.3.10, Alex Rodriguez Lopez <alopez@(protected) :
> De: Alex Rodriguez Lopez <alopez@(protected)>
> Objet: Re: About the better way to implement a JSP in read/edit mode
> À: user@(protected)
> Date: Mercredi 10 mars 2010, 10h24
> I do tend to think that the less
> files the better. Here it's the same
> with the number of files for actions/jsp, one can use more
> actions, ore
> less actions but more methods inside. Same with jsp, I do
> think it's
> better with less files, but a colleague here also thinks
> the opposite,
> sometimes with less files you have to provide aditional
> checks or cases
> so one file fits all possible use cases.
>
> I think it's more elegant for me with same file for read
> and edit, but
> others might dissagree, not sure if a way is better than
> the other :)
>
> Alex
>
> Em 10-03-2010 09:43, Frederik Minatchy escreveu:
> > I think I will think about that during my next Struts2
> project :)
> >
> > But about my question "Do I have to develop several
> interfaces with the same fields in read mode and edit
> mode?"
> >
> > Does this mean that I should use the same JSP to do
> both?
> >
> > (that's already what I have done... but a colleague
> thinks that it is not the better way... who's right? :) )
> >
> >
> >
> >
> > --- En date de : Mer 10.3.10, Angelo zerr<angelo.zerr@(protected)>
> a écrit :
> >
> >> De: Angelo zerr<angelo.zerr@(protected)>
> >> Objet: Re: About the better way to implement a JSP
> in read/edit mode
> >> À: "Struts Users Mailing List"<user@(protected)>
> >> Date: Mercredi 10 mars 2010, 9h26
> >> Hi Frederik,
> >>
> >> FormView can works with any HTML or JSP Taglib. It
> update
> >> HTML switch
> >> configuration and state of your HTML field.
> Formview works
> >> with Struts 1.x
> >> to use information about validation.xml (like
> required,
> >> date...). I don't
> >> know how works Struts 2.x validation but I think
> it's
> >> possible to develop
> >> that.
> >>
> >> Regards Angelo
> >>
> >> 2010/3/10 Frederik Minatchy<frederik78@(protected)>
> >>
> >>> Hello...
> >>>
> >>> Thank you for your answer...
> >>>
> >>> Your tag seems usefull.. but it seems to have
> been
> >> developped for Struts
> >>> 1.x
> >>>
> >>> --- En date de : Mar 9.3.10, Angelo zerr<angelo.zerr@(protected)>
> >> a écrit :
> >>>
> >>>> De: Angelo zerr<angelo.zerr@(protected)>
> >>>> Objet: Re: About the better way to
> implement a
> >> JSP in read/edit mode
> >>>> À: "Struts Users Mailing List"<user@(protected)>
> >>>> Date: Mardi 9 mars 2010, 21h04
> >>>> Hi Frederick,
> >>>>
> >>>> I had created a project about this problem
> with
> >>>> http://formview.sourceforge.net/
> >>>>
> >>>> With FormView, you develop ONE Jsp to
> manage CRUD
> >> form.
> >>>> It's old project but
> >>>> it works well (I have not time today to
> improve
> >> it).
> >>>>
> >>>> Regards Angelo
> >>>>
> >>>> 2010/3/9 Paweł Wielgus<poulwiel@(protected)>
> >>>>
> >>>>> Hi Frederick,
> >>>>> You can also add readonly or disabled
> >> property to
> >>>> textfields.
> >>>>> But i don't think that there is a
> simple
> >> answear to
> >>>> your question
> >>>>> about if it is good or bad.
> >>>>>
> >>>>> Best greetings,
> >>>>> Paweł Wielgus.
> >>>>>
> >>>>>
> >>>>> 2010/3/9 Frederik Minatchy<frederik78@(protected)>:
> >>>>>> Hello everybody...
> >>>>>>
> >>>>>>
> >>>>>> I wonder about the better way to
> >> implement a JSP
> >>>> which shows the same
> >>>>> informations in readonly mode and in
> >>>> creation/modification mode.
> >>>>>>
> >>>>>> So I have just designed the JSP'
> fields
> >> with
> >>>> s:textfield who can be
> >>>>> dynamically shown in readonly mode
> with
> >> special css
> >>>> (background:transparent;
> >>>>> border:none;...) specified in the
> action
> >> class.
> >>>>>>
> >>>>>> So the action class sets some
> >> attributes with
> >>>> certains values and than
> >>>>> the html stream is generated in read
> mode or
> >> in edit
> >>>> mode.
> >>>>>>
> >>>>>> Is this the good way or should I
> >> developpe two
> >>>> JSP : one in read mode and
> >>>>> an other one in edit mode?
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>
> >>
> ---------------------------------------------------------------------
> >>>>>> 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)
> >>>
> >>>
> >>
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > 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_205332.ezm (zipped)When I am logged in as a European user with de_DE as my locale, dates
should be submitted in forms as dd.MM.yyyy however, my Struts2 action
returns me to the INPUT jsp page and does not perform the "search"
action that it is suppose to.
From what I have read, does Struts2 standard date validation expect the
format to me MM/dd/yyyy and not locale specific?
If so, am I required to set the form field as a String type and convert
it in the action to a Date when my method is executed?
Chris

Attachment:
user_205334.ezm (zipped)from a few days i'm working on struts and i'm trying to develop an simple web
application.
i cant see the elements of my array(bookList) on jsp page when i run my
program it returns me an empty page where am i wrong please help me i'm
losing my mind for two days.
Book class
public class Book {
private String name;
private String description;
private int price;
private int id;
public Book()
{
}
public Book(String name)
{
this.name=name;
}
public ArrayList<Book> loadData()
{
ArrayList<Book> kitapListesi = new ArrayList<Book>();
kitapListesi.add(new Book("calculus1"));
kitapListesi.add(new Book("calculus2"));
return kitapListesi;
}
BookForm Class
public class BookForm extends
org.apache.struts.action.ActionForm {
private ArrayList<Book> bookList;
private String name;
private int number;
public ArrayList<Book> getBookList() {
return bookList;
}
public void setBookList(ArrayList<Book> bookList) {
this.bookList = bookList;
}
BookAction Class
public class BookAction extends
org.apache.struts.action.Action {
private final static String SUCCESS = "success";
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
BookForm bookForm = (BookForm) form;
Book book = new Book();
bookForm.setBookList(book.loadData());
return mapping.findForward(SUCCESS);
}
}
struts_config.xml
<form-beans>
<form-bean name="BookForm" type="paket.BookForm"/>
</form-beans>
<action-mappings>
<action input="/data" name="BookForm" path="/data" scope="request"
type="paket.BookAction"/>
</action-mappings>
data.jsp
<logic:present name="BookForm">
<logic:iterate name="BookForm" property="bookList" id="book">
<tr>
<td><bean:write name="book" property="name" /></td>
</tr>
</logic:iterate>
</logic:present>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205339.ezm (zipped)Hi friends,
I have developed a struts 1 application, i need to know what are the ways
and means to deploy a struts application, if i just copy and paste the war
application, will it be the correct way?
Also if i have myeclipse can it directly deploy on the remote server via
FTP(on linux), and is it ok to use ant,i am new to ant.
Please advise,
Thanks a lot.
--
Thanks and kind Regards,
Abhishek jain