Author Login
Post Reply
user Digest 18 Jul 2008 07:14:23 -0000 Issue 8149
Topics (messages 189056 through 189068):
Re: [SPAM] Re: Help please TOMCAT 5 + Struts
189056 by: Jim Kiley
189057 by: STRUTS SL. Mailing List
189068 by: Pawe³ Wielgus
Re: display int in JSP
189058 by: Phan, Hienthuc T
189059 by: Jishnu Viswanath
189060 by: Phan, Hienthuc T
189061 by: Jishnu Viswanath
Re: ExecAndWait (navigating back to the progress page)
189062 by: Chase
189063 by: Jishnu Viswanath
189064 by: Chase
Re: [OT] What slows you down?
189065 by: ravi_eze
Re: [S2-ActionComponent] Action not on the stack while evaluating body
189066 by: beaumkr
Re: Action form in session scope
189067 by: Pawe³ Wielgus
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_189056.ezm (zipped)I haven't used this, but thirty seconds' search on "tomcat memory leak
tools" led me to this: http://java-source.net/open-source/profilers/jmemprof
jk
On Thu, Jul 17, 2008 at 4:34 PM, STRUTS SL. Mailing List <
struts@(protected):
> I know of tools that help test my application, for which I have looked and
> looked again the code. Or some techniques to help me refine ...
>
> thanks
>
> ________________________________
>
> De: Jianshuo Niu [mailto:jjmniu@(protected)]
> Enviado el: jue 17/07/2008 22:22
> Para: Struts Users Mailing List
> Asunto: [SPAM] Re: Help please TOMCAT 5 + Struts
>
>
>
> I would take a look at the code first to see if there is any unclosed
> connection, loops, etc. Then, check the jdk version and tomcat config
> files.
>
>
> On Thu, Jul 17, 2008 at 4:10 PM, STRUTS SL. Mailing List <
> struts@(protected):
>
> > The application is started well and after a few hours or minutes that
> stays
> > frozen. without accepting more users.
> >
> > thanks to all are very helpful
> >
> > ________________________________
> >
> > De: Jianshuo Niu [mailto:jjmniu@(protected)]
> > Enviado el: jue 17/07/2008 19:41
> > Para: Struts Users Mailing List
> > Asunto: [SPAM] Re: Help please TOMCAT 5 + Struts
> >
> >
> >
> > It looks like that something wrong in your code/archtechture. Was it slow
> > right after you deployed the app, or gettting slower during the
> operation?
> >
> > On Thu, Jul 17, 2008 at 12:45 PM, Paolo Niccolò Giubelli <
> > paoloniccolo.giubelli@(protected):
> >
> > > Maybe you got some memory leak in your code. Use a memory-inspecting
> tool
> > > and check for static objects.
> > > If you check your memory usage, maybe you'll find that you eat all the
> > > memory available, so you should tune your tomcat server changing the
> > memory
> > > parameters.
> > > Regards,
> > > Paolo Niccolò Giubelli
> > >
> > > STRUTS SL. Mailing List ha scritto:
> > >
> > > Hello for everybody;
> > >>
> > >>
> > >> We have a big trouble with our Web Application. Our Tomcat 5.5 Server
> is
> > >> working properly, as we can see. The problem is concerning to the Web
> > >> Project. It's frizzing randomly. It doesn't matter how many time was
> > >> reloaded. From this moment never user can get in the Web Site. At the
> > >> browser address bar we can see the session id that was assigned to the
> > new
> > >> session, but never the home page is presented, and we must be going to
> > >> reload it. This reloading is making on the Tomcat Server.
> > >>
> > >>
> > >> Web application historical summary:
> > >>
> > >>
> > >> The Trapsatur Project was hosting on a Tomcat 4 Web Server, it was
> > >> installed in our offices. It was working almost properly, but slowly.
> > Cause
> > >> that, we decided to get out this Server to be housing at office's ISP,
> > front
> > >> to Internet. At this moment we passed to Tomcat 5.5.26. It was begin
> of
> > >> troubles.
> > >>
> > >>
> > >> We are adjusting the Web Application and the Tomcat Server
> continuously.
> > >> We resolved problems with DB connection, someone errors with SMTP
> > server. In
> > >> addition we adjusted several Tomcat's and JVM's parameters. Now we are
> > doing
> > >> some tests. We have assumed that the problem is the difference between
> > >> servlet.jar used by our Web Project, and the servlet.jar used by
> Tomcat
> > >> Server.
> > >>
> > >>
> > >> We want to thank in advance any help from any body.
> > >>
> > >> Best regard;
> > >>
> > >>
> > >> /* Some mistakes catalina.out */
> > >>
> > >>
> > >> Exception in thread "DefaultQuartzScheduler_Worker-0"
> > >>
java.lang.OutOfMemoryError: PermGen space
> > >>
> > >> Exception in thread "DefaultQuartzScheduler_QuartzSchedulerThread"
> > >>
java.lang.OutOfMemoryError: PermGen space
> > >>
> > >> Exception in thread "http-80-Processor31"
java.lang.OutOfMemoryError:
> > >> PermGen space
> > >>
> > >> Exception in thread "http-80-Processor32"
java.lang.OutOfMemoryError:
> > >> PermGen space
> > >>
> > >> Exception in thread
> > >> "ContainerBackgroundProcessor[StandardEngine[Catalina]]"
> > >>
java.lang.OutOfMemoryError: PermGen space
> > >>
> > >> 17-jul-2008 16:37:56
org.apache.coyote.http11.Http11BaseProtocol pause
> > >>
> > >> INFO: Pausing Coyote HTTP/1.1 on http-80
> > >>
> > >>
java.lang.reflect.InvocationTargetException> > >>
> > >> Exception in thread "main"
java.lang.OutOfMemoryError: PermGen space
> > >>
> > >> 17-jul-2008 16:38:59
org.apache.catalina.core.AprLifecycleListener> > >> lifecycleEvent
> > >>
> > >> INFO: The Apache Tomcat Native library which allows optimal
> performance
> > in
> > >> production environments was not found on the java.library.path:
> > >>
> >
> /opt/jdk1.5.0_15/jre/lib/i386/server:/opt/jdk1.5.0_15/jre/lib/i386:/opt/jdk1.5.0_15/jre/../lib/i386
> > >>
> > >> 17-jul-2008 16:38:59
org.apache.coyote.http11.Http11BaseProtocol init
> > >>
> > >>
> > >>
> > >> ********************************
> > >>
> > >> Christian A. Villamizar Lamus.
> > >>
> > >> Dpto. Informática - Trapsatur.
> > >>
> > >> Tel: 91.542.6666 - Fax: 91.548.0044
> > >>
> > >> ?-mail: c.villamizar@(protected)
> >
> > >> www.trapsatur.com <http://www.trapsatur.com/>
> > >> www.excursionesenmadrid.com <http://www.excursionesenmadrid.com/>
> > >> www.excursionesenmadrid.es <http://www.excursionesenmadrid.es/>
> > >> C/ San Bernardo 5 - 7.
> > >> 28013 - Madrid. España.
> > >>
> > >>
> > >>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
> >
> > --
> > Jianshuo Niu
> >
> >
> >
>
>
> --
> Jianshuo Niu
>
>
>
--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Attachment:
user_189057.ezm (zipped)thousand thanks attempts with what I spend. if you miss one you the idea agradecere.
________________________________
De: Jim Kiley [mailto:jhkiley@(protected)]
Enviado el: jue 17/07/2008 22:41
Para: Struts Users Mailing List
Asunto: Re: [SPAM] Re: Help please TOMCAT 5 + Struts
I haven't used this, but thirty seconds' search on "tomcat memory leak
tools" led me to this: http://java-source.net/open-source/profilers/jmemprof
jk
On Thu, Jul 17, 2008 at 4:34 PM, STRUTS SL. Mailing List <
struts@(protected):
> I know of tools that help test my application, for which I have looked and
> looked again the code. Or some techniques to help me refine ...
>
> thanks
>
> ________________________________
>
> De: Jianshuo Niu [mailto:jjmniu@(protected)]
> Enviado el: jue 17/07/2008 22:22
> Para: Struts Users Mailing List
> Asunto: [SPAM] Re: Help please TOMCAT 5 + Struts
>
>
>
> I would take a look at the code first to see if there is any unclosed
> connection, loops, etc. Then, check the jdk version and tomcat config
> files.
>
>
> On Thu, Jul 17, 2008 at 4:10 PM, STRUTS SL. Mailing List <
> struts@(protected):
>
> > The application is started well and after a few hours or minutes that
> stays
> > frozen. without accepting more users.
> >
> > thanks to all are very helpful
> >
> > ________________________________
> >
> > De: Jianshuo Niu [mailto:jjmniu@(protected)]
> > Enviado el: jue 17/07/2008 19:41
> > Para: Struts Users Mailing List
> > Asunto: [SPAM] Re: Help please TOMCAT 5 + Struts
> >
> >
> >
> > It looks like that something wrong in your code/archtechture. Was it slow
> > right after you deployed the app, or gettting slower during the
> operation?
> >
> > On Thu, Jul 17, 2008 at 12:45 PM, Paolo Niccolò Giubelli <
> > paoloniccolo.giubelli@(protected):
> >
> > > Maybe you got some memory leak in your code. Use a memory-inspecting
> tool
> > > and check for static objects.
> > > If you check your memory usage, maybe you'll find that you eat all the
> > > memory available, so you should tune your tomcat server changing the
> > memory
> > > parameters.
> > > Regards,
> > > Paolo Niccolò Giubelli
> > >
> > > STRUTS SL. Mailing List ha scritto:
> > >
> > > Hello for everybody;
> > >>
> > >>
> > >> We have a big trouble with our Web Application. Our Tomcat 5.5 Server
> is
> > >> working properly, as we can see. The problem is concerning to the Web
> > >> Project. It's frizzing randomly. It doesn't matter how many time was
> > >> reloaded. From this moment never user can get in the Web Site. At the
> > >> browser address bar we can see the session id that was assigned to the
> > new
> > >> session, but never the home page is presented, and we must be going to
> > >> reload it. This reloading is making on the Tomcat Server.
> > >>
> > >>
> > >> Web application historical summary:
> > >>
> > >>
> > >> The Trapsatur Project was hosting on a Tomcat 4 Web Server, it was
> > >> installed in our offices. It was working almost properly, but slowly.
> > Cause
> > >> that, we decided to get out this Server to be housing at office's ISP,
> > front
> > >> to Internet. At this moment we passed to Tomcat 5.5.26. It was begin
> of
> > >> troubles.
> > >>
> > >>
> > >> We are adjusting the Web Application and the Tomcat Server
> continuously.
> > >> We resolved problems with DB connection, someone errors with SMTP
> > server. In
> > >> addition we adjusted several Tomcat's and JVM's parameters. Now we are
> > doing
> > >> some tests. We have assumed that the problem is the difference between
> > >> servlet.jar used by our Web Project, and the servlet.jar used by
> Tomcat
> > >> Server.
> > >>
> > >>
> > >> We want to thank in advance any help from any body.
> > >>
> > >> Best regard;
> > >>
> > >>
> > >> /* Some mistakes catalina.out */
> > >>
> > >>
> > >> Exception in thread "DefaultQuartzScheduler_Worker-0"
> > >>
java.lang.OutOfMemoryError: PermGen space
> > >>
> > >> Exception in thread "DefaultQuartzScheduler_QuartzSchedulerThread"
> > >>
java.lang.OutOfMemoryError: PermGen space
> > >>
> > >> Exception in thread "http-80-Processor31"
java.lang.OutOfMemoryError:
> > >> PermGen space
> > >>
> > >> Exception in thread "http-80-Processor32"
java.lang.OutOfMemoryError:
> > >> PermGen space
> > >>
> > >> Exception in thread
> > >> "ContainerBackgroundProcessor[StandardEngine[Catalina]]"
> > >>
java.lang.OutOfMemoryError: PermGen space
> > >>
> > >> 17-jul-2008 16:37:56
org.apache.coyote.http11.Http11BaseProtocol pause
> > >>
> > >> INFO: Pausing Coyote HTTP/1.1 on http-80
> > >>
> > >>
java.lang.reflect.InvocationTargetException> > >>
> > >> Exception in thread "main"
java.lang.OutOfMemoryError: PermGen space
> > >>
> > >> 17-jul-2008 16:38:59
org.apache.catalina.core.AprLifecycleListener> > >> lifecycleEvent
> > >>
> > >> INFO: The Apache Tomcat Native library which allows optimal
> performance
> > in
> > >> production environments was not found on the java.library.path:
> > >>
> >
> /opt/jdk1.5.0_15/jre/lib/i386/server:/opt/jdk1.5.0_15/jre/lib/i386:/opt/jdk1.5.0_15/jre/../lib/i386
> > >>
> > >> 17-jul-2008 16:38:59
org.apache.coyote.http11.Http11BaseProtocol init
> > >>
> > >>
> > >>
> > >> ********************************
> > >>
> > >> Christian A. Villamizar Lamus.
> > >>
> > >> Dpto. Informática - Trapsatur.
> > >>
> > >> Tel: 91.542.6666 - Fax: 91.548.0044
> > >>
> > >> ?-mail: c.villamizar@(protected)
> >
> > >> www.trapsatur.com <http://www.trapsatur.com/>
> > >> www.excursionesenmadrid.com <http://www.excursionesenmadrid.com/>
> > >> www.excursionesenmadrid.es <http://www.excursionesenmadrid.es/>
> > >> C/ San Bernardo 5 - 7.
> > >> 28013 - Madrid. España.
> > >>
> > >>
> > >>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
> >
> > --
> > Jianshuo Niu
> >
> >
> >
>
>
> --
> Jianshuo Niu
>
>
>
--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com <http://www.summa-tech.com/>

Attachment:
user_189068.ezm (zipped)Hi all,
as the log says tomcat is out of perm gen space, if You want to know
what or where it is going just add parameters like Jorge said:
export JAVA_OPTS='-Xmx756m -server -XX:MaxPermSize=256m'
but also add -XX:+PrintGCDetails
export JAVA_OPTS='-Xmx756m -server -XX:MaxPermSize=256m -XX:+PrintGCDetails'
and simply watch the output.
In the mean time read about the java memory management.
Best greetings,
Paweł Wielgus.
On 17/07/2008, STRUTS SL. Mailing List <struts@(protected):
> thousand thanks attempts with what I spend. if you miss one you the idea agradecere.
>
> ________________________________
>
> De: Jim Kiley [mailto:jhkiley@(protected)]
> Enviado el: jue 17/07/2008 22:41
>
> Para: Struts Users Mailing List
>
> Asunto: Re: [SPAM] Re: Help please TOMCAT 5 + Struts
>
>
>
>
> I haven't used this, but thirty seconds' search on "tomcat memory leak
> tools" led me to this: http://java-source.net/open-source/profilers/jmemprof
>
> jk
>
> On Thu, Jul 17, 2008 at 4:34 PM, STRUTS SL. Mailing List <
> struts@(protected):
>
> > I know of tools that help test my application, for which I have looked and
> > looked again the code. Or some techniques to help me refine ...
> >
> > thanks
> >
> > ________________________________
> >
> > De: Jianshuo Niu [mailto:jjmniu@(protected)]
> > Enviado el: jue 17/07/2008 22:22
> > Para: Struts Users Mailing List
> > Asunto: [SPAM] Re: Help please TOMCAT 5 + Struts
> >
> >
> >
> > I would take a look at the code first to see if there is any unclosed
> > connection, loops, etc. Then, check the jdk version and tomcat config
> > files.
> >
> >
> > On Thu, Jul 17, 2008 at 4:10 PM, STRUTS SL. Mailing List <
> > struts@(protected):
> >
> > > The application is started well and after a few hours or minutes that
> > stays
> > > frozen. without accepting more users.
> > >
> > > thanks to all are very helpful
> > >
> > > ________________________________
> > >
> > > De: Jianshuo Niu [mailto:jjmniu@(protected)]
> > > Enviado el: jue 17/07/2008 19:41
> > > Para: Struts Users Mailing List
> > > Asunto: [SPAM] Re: Help please TOMCAT 5 + Struts
> > >
> > >
> > >
> > > It looks like that something wrong in your code/archtechture. Was it slow
> > > right after you deployed the app, or gettting slower during the
> > operation?
> > >
> > > On Thu, Jul 17, 2008 at 12:45 PM, Paolo Niccolò Giubelli <
> > > paoloniccolo.giubelli@(protected):
> > >
> > > > Maybe you got some memory leak in your code. Use a memory-inspecting
> > tool
> > > > and check for static objects.
> > > > If you check your memory usage, maybe you'll find that you eat all the
> > > > memory available, so you should tune your tomcat server changing the
> > > memory
> > > > parameters.
> > > > Regards,
> > > > Paolo Niccolò Giubelli
> > > >
> > > > STRUTS SL. Mailing List ha scritto:
> > > >
> > > > Hello for everybody;
> > > >>
> > > >>
> > > >> We have a big trouble with our Web Application. Our Tomcat 5.5 Server
> > is
> > > >> working properly, as we can see. The problem is concerning to the Web
> > > >> Project. It's frizzing randomly. It doesn't matter how many time was
> > > >> reloaded. From this moment never user can get in the Web Site. At the
> > > >> browser address bar we can see the session id that was assigned to the
> > > new
> > > >> session, but never the home page is presented, and we must be going to
> > > >> reload it. This reloading is making on the Tomcat Server.
> > > >>
> > > >>
> > > >> Web application historical summary:
> > > >>
> > > >>
> > > >> The Trapsatur Project was hosting on a Tomcat 4 Web Server, it was
> > > >> installed in our offices. It was working almost properly, but slowly.
> > > Cause
> > > >> that, we decided to get out this Server to be housing at office's ISP,
> > > front
> > > >> to Internet. At this moment we passed to Tomcat 5.5.26. It was begin
> > of
> > > >> troubles.
> > > >>
> > > >>
> > > >> We are adjusting the Web Application and the Tomcat Server
> > continuously.
> > > >> We resolved problems with DB connection, someone errors with SMTP
> > > server. In
> > > >> addition we adjusted several Tomcat's and JVM's parameters. Now we are
> > > doing
> > > >> some tests. We have assumed that the problem is the difference between
> > > >> servlet.jar used by our Web Project, and the servlet.jar used by
> > Tomcat
> > > >> Server.
> > > >>
> > > >>
> > > >> We want to thank in advance any help from any body.
> > > >>
> > > >> Best regard;
> > > >>
> > > >>
> > > >> /* Some mistakes catalina.out */
> > > >>
> > > >>
> > > >> Exception in thread "DefaultQuartzScheduler_Worker-0"
> > > >>
java.lang.OutOfMemoryError: PermGen space
> > > >>
> > > >> Exception in thread "DefaultQuartzScheduler_QuartzSchedulerThread"
> > > >>
java.lang.OutOfMemoryError: PermGen space
> > > >>
> > > >> Exception in thread "http-80-Processor31"
java.lang.OutOfMemoryError:
> > > >> PermGen space
> > > >>
> > > >> Exception in thread "http-80-Processor32"
java.lang.OutOfMemoryError:
> > > >> PermGen space
> > > >>
> > > >> Exception in thread
> > > >> "ContainerBackgroundProcessor[StandardEngine[Catalina]]"
> > > >>
java.lang.OutOfMemoryError: PermGen space
> > > >>
> > > >> 17-jul-2008 16:37:56
org.apache.coyote.http11.Http11BaseProtocol pause
> > > >>
> > > >> INFO: Pausing Coyote HTTP/1.1 on http-80
> > > >>
> > > >>
java.lang.reflect.InvocationTargetException> > > >>
> > > >> Exception in thread "main"
java.lang.OutOfMemoryError: PermGen space
> > > >>
> > > >> 17-jul-2008 16:38:59
org.apache.catalina.core.AprLifecycleListener> > > >> lifecycleEvent
> > > >>
> > > >> INFO: The Apache Tomcat Native library which allows optimal
> > performance
> > > in
> > > >> production environments was not found on the java.library.path:
> > > >>
> > >
> > /opt/jdk1.5.0_15/jre/lib/i386/server:/opt/jdk1.5.0_15/jre/lib/i386:/opt/jdk1.5.0_15/jre/../lib/i386
> > > >>
> > > >> 17-jul-2008 16:38:59
org.apache.coyote.http11.Http11BaseProtocol init
> > > >>
> > > >>
> > > >>
> > > >> ********************************
> > > >>
> > > >> Christian A. Villamizar Lamus.
> > > >>
> > > >> Dpto. Informática - Trapsatur.
> > > >>
> > > >> Tel: 91.542.6666 - Fax: 91.548.0044
> > > >>
> > > >> ?-mail: c.villamizar@(protected)
> > >
> > > >> www.trapsatur.com <http://www.trapsatur.com/>
> > > >> www.excursionesenmadrid.com <http://www.excursionesenmadrid.com/>
> > > >> www.excursionesenmadrid.es <http://www.excursionesenmadrid.es/>
> > > >> C/ San Bernardo 5 - 7.
> > > >> 28013 - Madrid. España.
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > For additional commands, e-mail: user-help@(protected)
> > > >
> > > >
> > >
> > >
> > > --
> > > Jianshuo Niu
> > >
> > >
> > >
> >
> >
> > --
> > Jianshuo Niu
> >
> >
> >
>
>
> --
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
>
> http://www.summa-tech.com <http://www.summa-tech.com/>
>
>
>

Attachment:
user_189058.ezm (zipped)
Hi,
In my action, I have several variables of type int. When the variable
is not initialized, it's displayed as 0 in the JSP. I would like
un-initialized variable of type int to be display as blank/empty. What
is the best way to accomplish this? Thanks.
Public class XXAction extends ActionSupport
{
private int age;
private String name = new String("xyz");
private String email;
//getters & setters
}
JSP page would display:
Name: xyz
Email:
Age: 0
Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.

Attachment:
user_189059.ezm (zipped)Use Integer instead of int
Regards,
Jishnu Viswanath
Software Engineer
*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
Tavant Technologies Inc.,
www.tavant.com
PEOPLE :: PASSION :: EXCELLENCE
-----Original Message-----
From: Phan, Hienthuc T [mailto:hienthuc_phan@(protected)]
Sent: Friday, July 18, 2008 2:35 AM
To: Struts Users Mailing List
Subject: Struts2: display int in JSP
Hi,
In my action, I have several variables of type int. When the variable
is not initialized, it's displayed as 0 in the JSP. I would like
un-initialized variable of type int to be display as blank/empty. What
is the best way to accomplish this? Thanks.
Public class XXAction extends ActionSupport
{
private int age;
private String name = new String("xyz");
private String email;
//getters & setters
}
JSP page would display:
Name: xyz
Email:
Age: 0
Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates
is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.
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_189060.ezm (zipped)
That works. Thanks. I'm migrating from Struts 1 & was hoping not have
to change the data type.
-----Original Message-----
From: Jishnu Viswanath [mailto:jishnu.viswanath@(protected)]
Sent: Thursday, July 17, 2008 2:24 PM
To: Struts Users Mailing List
Subject: RE: Struts2: display int in JSP
Use Integer instead of int
Regards,
Jishnu Viswanath
Software Engineer
*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
Tavant Technologies Inc.,
www.tavant.com
PEOPLE :: PASSION :: EXCELLENCE
-----Original Message-----
From: Phan, Hienthuc T [mailto:hienthuc_phan@(protected)]
Sent: Friday, July 18, 2008 2:35 AM
To: Struts Users Mailing List
Subject: Struts2: display int in JSP
Hi,
In my action, I have several variables of type int. When the variable
is not initialized, it's displayed as 0 in the JSP. I would like
un-initialized variable of type int to be display as blank/empty. What
is the best way to accomplish this? Thanks.
Public class XXAction extends ActionSupport
{
private int age;
private String name = new String("xyz");
private String email;
//getters & setters
}
JSP page would display:
Name: xyz
Email:
Age: 0
Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates
is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.
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)
Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.

Attachment:
user_189061.ezm (zipped)Its not because of struts, int can not contain null, so nearest possible
brother is 0 so they put 0.
Ok, if you still want to use int, then put getter setter as String and
parse the input and output to integer and string.
int age = -1;
public String getAge(){
if(age<0)
return null;
else
return ""+age;
}
public String setAge(String age){
if(age == null)
this.age = 0
else
this.age = Integer.parseInt(age);
}
I think this solves your change of data type solves,
By the way one lesson I learned from experience was never use int,
float, boolean etc instead use Integer Float and Boolean etc.
Regards,
Jishnu Viswanath
Software Engineer
*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
Tavant Technologies Inc.,
www.tavant.com
PEOPLE :: PASSION :: EXCELLENCE
-----Original Message-----
From: Phan, Hienthuc T [mailto:hienthuc_phan@(protected)]
Sent: Friday, July 18, 2008 4:28 AM
To: Struts Users Mailing List
Subject: RE: Struts2: display int in JSP
That works. Thanks. I'm migrating from Struts 1 & was hoping not have
to change the data type.
-----Original Message-----
From: Jishnu Viswanath [mailto:jishnu.viswanath@(protected)]
Sent: Thursday, July 17, 2008 2:24 PM
To: Struts Users Mailing List
Subject: RE: Struts2: display int in JSP
Use Integer instead of int
Regards,
Jishnu Viswanath
Software Engineer
*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
Tavant Technologies Inc.,
www.tavant.com
PEOPLE :: PASSION :: EXCELLENCE
-----Original Message-----
From: Phan, Hienthuc T [mailto:hienthuc_phan@(protected)]
Sent: Friday, July 18, 2008 2:35 AM
To: Struts Users Mailing List
Subject: Struts2: display int in JSP
Hi,
In my action, I have several variables of type int. When the variable
is not initialized, it's displayed as 0 in the JSP. I would like
un-initialized variable of type int to be display as blank/empty. What
is the best way to accomplish this? Thanks.
Public class XXAction extends ActionSupport
{
private int age;
private String name = new String("xyz");
private String email;
//getters & setters
}
JSP page would display:
Name: xyz
Email:
Age: 0
Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates
is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.
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)
Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates
is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.
---------------------------------------------------------------------
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_189062.ezm (zipped)In my case it is a very long running action but even in the case of
short running actions I would think users would want to be able to
navigate away from the progress page and return. I thought maybe I
just didn't know how to configure the actions correctly....
EDIT: So while writing the above reply a solution occurred to me. With
a little trickery it's possible to do everything I was talking about
with no AJAX. Documenting this pattern below in case anyone else ever
comes across this problem.
Have a single Action that directs the users to the form view and also
handles the form submission. This solution will make it impossible for
a user to view the form again until their task is complete. The key is
to always use a delay for the execAndWait interceptor.
<interceptor-ref name="execAndWait">
<param name="delay">500</param>
</interceptor-ref>
The Action class looks something like:
public class LongAction extends ActionSupport {
private String formField;
public String getFormField() {
return formField;
}
public void setFormField(String ff) {
formField = ff;
}
public String execute() {
if(formField == null || formField.length == 0) {
return INPUT; //the form
} else {
//long task here
return SUCCESS; //result page
}
}
}
The delay on the interceptor is important because we need a chance to
return INPUT before being redirected to the wait page.
If anyone has a more elegant solutions please let me know.
Thanks,
-Chase
On Thu, Jul 17, 2008 at 11:41 AM, Karr, David <david.karr@(protected):
> I'm guessing the operation you're waiting for can take quite a while to
> complete. Otherwise modifying the architecture of this probably
> wouldn't be worth it.
>
> You might consider the flow of the original action to simply report a
> simple "submitted and processing" result, and then implement an
> Ajax-based timeout to quickly check the status of the long-running
> process.
>
>> -----Original Message-----
>> From: Chase [mailto:chase@(protected)]
>> Sent: Wednesday, July 16, 2008 4:23 PM
>> To: user@(protected)
>> Subject: ExecAndWait (navigating back to the progress page)
>>
>> I want my users to be able to leave the wait page and return.
>> Can this be done, what is the best way?
>>
>> I've got two actions. ActionA displays a form and the form
>> submits to ActionB. ActionB is using the ExecAndWait
>> interceptor. Right now users have to resubmit the form to get
>> back to their status page (possibly resubmitting the form if
>> ActionB has finished). How can I have ActionA display the
>> wait page of ActionB instead of the form?
>>
>> Also, is there anyway to make the ExecAndWait interceptor
>> function per context instead per session? This is a low
>> volume internal app.
>>
>> Thanks,
>> Chase
>>
>> ---------------------------------------------------------------------
>> 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_189063.ezm (zipped)Hey in your case for the input field not null any such silly thing you
can actually write validation xml.
That will actually take care of returning back to the page with input
error.
Regarding the long time to take thingy, I don't know how the return
SUCCESS is going to help the client, the client browser will wait for
the server to respond, if its too long it will actually get timed out.
The best solution is ajax.
Even ajax won't work fine if your
//long task
takes more than request time out.
Regards,
Jishnu Viswanath
Software Engineer
*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
Tavant Technologies Inc.,
www.tavant.com
PEOPLE :: PASSION :: EXCELLENCE
-----Original Message-----
From: Chase [mailto:chase@(protected)]
Sent: Friday, July 18, 2008 6:01 AM
To: Struts Users Mailing List
Subject: Re: ExecAndWait (navigating back to the progress page)
In my case it is a very long running action but even in the case of
short running actions I would think users would want to be able to
navigate away from the progress page and return. I thought maybe I
just didn't know how to configure the actions correctly....
EDIT: So while writing the above reply a solution occurred to me. With
a little trickery it's possible to do everything I was talking about
with no AJAX. Documenting this pattern below in case anyone else ever
comes across this problem.
Have a single Action that directs the users to the form view and also
handles the form submission. This solution will make it impossible for
a user to view the form again until their task is complete. The key is
to always use a delay for the execAndWait interceptor.
<interceptor-ref name="execAndWait">
<param name="delay">500</param>
</interceptor-ref>
The Action class looks something like:
public class LongAction extends ActionSupport {
private String formField;
public String getFormField() {
return formField;
}
public void setFormField(String ff) {
formField = ff;
}
public String execute() {
if(formField == null || formField.length == 0) {
return INPUT; //the form
} else {
//long task here
return SUCCESS; //result page
}
}
}
The delay on the interceptor is important because we need a chance to
return INPUT before being redirected to the wait page.
If anyone has a more elegant solutions please let me know.
Thanks,
-Chase
On Thu, Jul 17, 2008 at 11:41 AM, Karr, David <david.karr@(protected)>
wrote:
> I'm guessing the operation you're waiting for can take quite a while
to
> complete. Otherwise modifying the architecture of this probably
> wouldn't be worth it.
>
> You might consider the flow of the original action to simply report a
> simple "submitted and processing" result, and then implement an
> Ajax-based timeout to quickly check the status of the long-running
> process.
>
>> -----Original Message-----
>> From: Chase [mailto:chase@(protected)]
>> Sent: Wednesday, July 16, 2008 4:23 PM
>> To: user@(protected)
>> Subject: ExecAndWait (navigating back to the progress page)
>>
>> I want my users to be able to leave the wait page and return.
>> Can this be done, what is the best way?
>>
>> I've got two actions. ActionA displays a form and the form
>> submits to ActionB. ActionB is using the ExecAndWait
>> interceptor. Right now users have to resubmit the form to get
>> back to their status page (possibly resubmitting the form if
>> ActionB has finished). How can I have ActionA display the
>> wait page of ActionB instead of the form?
>>
>> Also, is there anyway to make the ExecAndWait interceptor
>> function per context instead per session? This is a low
>> volume internal app.
>>
>> Thanks,
>> Chase
>>
>> ---------------------------------------------------------------------
>> 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_189064.ezm (zipped)On Thu, Jul 17, 2008 at 7:58 PM, Jishnu Viswanath
<jishnu.viswanath@(protected):
> Hey in your case for the input field not null any such silly thing you
> can actually write validation xml.
>
> That will actually take care of returning back to the page with input
> error.
Actually I can't. In my real code I need to execute the action in
order to populate it with some data so that the form page can use
<s:iterator> to build some input elements from data on the stack. And
I don't want any action/field errors when this field is missing.
> Regarding the long time to take thingy, I don't know how the return
> SUCCESS is going to help the client, the client browser will wait for
> the server to respond, if its too long it will actually get timed out.
> The best solution is ajax.
No, the execAndWait interceptor is made just for this. It takes a
really long time to get the return of SUCCESS. The user actually gets
back the "wait" result even though it's not in the code. The "wait"
result includes a meta-refresh to keep hitting the action. The action
(stored in the session automatically) will continue to return "wait"
until the first refresh after the return of SUCCESS. See
http://struts.apache.org/2.x/docs/execute-and-wait-interceptor.html
The trick to my example is that usually the execAndWait interceptor
automatically forwards someone to "wait". By adding the delay param
I'm giving the action half a second to return a result ("input")
before sending them to the "wait" page. I just think that maybe no one
has bother to document how to apply this interceptor when you want the
form replaced with the progress page. That way you don't have to
resubmit the form to get back to the progress page if you navigate
away.

Attachment:
user_189065.ezm (zipped)
S2 is awesome by the way it modularises the things.
But to me writing a valid ognl in jsp,validation layer, using value stack
and debugging it is extremely difficult. The only way i do it is re-jaring,
redeploying and restarting the tomcat. Moreover most of the times i do'nt
understand why things are failing?
Tiles is one more thing, i am not clear when i should use getAsString and
when the others. Some times some way works out.
Even today in some expressions scriplets are allowed while in some thing
else they are not allowed (like Map[<%= %>]) doesnt work. I dont see any
exception saying why and what went wrong.
In conversions: for example i can put data into a HashMap<String> but i cant
do it into Dto.someObject.HashMap object... why??? When ever i get such
issus i turn to struts showcase trying to hackit and get my work.. but in
this case it doesnt work.
Writing Freemarker: to be frank i didnt invest good amount of time for it
but AFAIK theres only a freemarker site which can help you.
MOreover it would be nice if we can have an visual IDE using which i will
drag drop things, jsps, actions, interceptors etc (agreed that this doesnt
fall into struts domain.. but its nice to have feature which can
exponentially decrease the dev time :)
Thats my view on this application.
cheers,
ravi
Ted Husted wrote:
>
> Since it's friday, let me pose a question to the group ...
>
> Even with rock-solid frameworks like Apache Struts, it still seems
> like web application development takes longer than it should. Some
> frameworks, like Ruby on Rails, speak directly to "time to market"
> concerns and have been gathering many followers.
>
> But why does web application still seem so difficult or so
> time-consuming? Are there time bandits that still suck days or weeks
> out of your development schedule? Are there time gremlins that
> "nickel-and-dime" you every hour of every day? Is there anything more
> that frameworks like Apache Struts can do to help? Or are just there
> intractable problems with web development itself?
>
> Thoughts? :)
>
> -Ted.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189066.ezm (zipped)
thanks for the reply,
I created https://issues.apache.org/struts/browse/WW-2724
and started changing my code to using AJAX for the form...but I'd prefer
this solution...
best regards,
Kris
Jeromy Evans - Blue Sky Minds wrote:
>
>
> Thorough analysis! I cringe thinking of how much time it's cost you as
> I've been there myself. Unfortunately the s:action tag contains several
> major bugs like this (browse JIRA); another major one is that
> ThreadLocal context is replaced by the nested action's context and is
> never restored afterwards, potentially causing problems for tags AFTER
> the closing action tag.
>
> I recommended you raise the issue in JIRA and not to use the s:action
> tag as a component like this. It's only useful in the simplest cases.
>
> regards,
> Jeromy Evans
>
> PS. it's usually best to describe the problem the top of the email,
> otherwise we trail off before reaching the end (speaking for myself
> anyway, although I got there eventually).
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189067.ezm (zipped)Hi Larry,
i'm assuming You are talking about s1,
there is no clear answer for your question as for me, because using
session forms is extremely comfortable for developer, no need to worry
about remembering any object acros your app, they just are in session
forms.
But on the other side your session object might get bigger and bigger
with time - not my case so i wont tell You much about it. But there is
more bad news, when user is using back and forward browser buttons and
also forms on your pages rely on session data accuracy You are in deep
... troubles.
When i'm developing in s1 i'm using session forms, but i prefer s2
even without session forms.
Best greetings,
Pawel Wielgus.
On 17/07/2008, Zhang, Larry (L.) <lzhang20@(protected):
> Hello, which is a prefered way to add actionform into session scope or
> in the request scope? Is that true that putting actionForm into the
> session is a bad idea? Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>