Problem with huge session memory and ActionForm

2004-01-28 Thread Jose Ramon Diaz

Hi all,

We have detected a problem with the amount of memory we use in the session
when we use classes extending org.apache.struts.action.ActionForm and
DynaActionForm too.
We are using 9iAS 9.0.3.
We take a look to the memory using JPRobe profiler, and we see that the
forms stored in session (we define the scope to session in struts-config.xml
for an action) are using more than 20Mb(!!)
Those actionForms have a reference to ActionServlet in servlet attribute.

Of course, this is a lot of memory to have several hundreds of users. I
imagine this is not a Struts bug, and please help us to detect what´s
happening or which is the error in our code.

Thanks a lot.

Jose R.

E-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
Editorial Aranzadi: www.aranzadi.es http://www.aranzadi.es
Camino de Galar, 15
31190- Cizur Menor - SPAIN
Tlfno.: +34 948 297297  Fax: +34 948 297200
__
Este e-mail y cualquier documento anexo contienen información privada y
confidencial única y exclusivamente para el destinatario. Si usted no es el
destinatario, no tiene autorización para leer, copiar, usar o distribuir el
e-mail y el/los documento anexos. En caso de haber recibido esta
comunicación por error, le rogamos que lo remita al emisor y lo destruya
posteriormente.
This e-mail and any attachment contain information, which is private and
confidential and is intended for the addressee only. If you are not an
addressee, you are not authorized to read, copy, use or distribute this
communication. If you have received this e-mail in error, please notify the
sender by return e-mail.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problem with huge session memory and ActionForm

2004-01-28 Thread Jose Ramon Diaz

Thanks Shirish.
That´s the solution we are trying now, but  I still don´t understand why an
ActionForm has a reference to the ActionServlet.
Does anybody know, please? Or am I missing something?

thanks!


 -Mensaje original-
 De: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 Enviado el: miércoles, 28 de enero de 2004 14:35
 Para: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Asunto: RE: Problem with huge session memory and ActionForm
 
 
 Why not change those forms to request scope instead?Where 
 ever feasible I mean.If any data is not shared across pages 
 in a wizard like flow, just put that form in request.This 
 should be applicable to 90% of the cases.
 
 But It may not be as simple as that.You may have to retest 
 entire application because of that.
 
 HTH.
 regards,
 Shirish
 
 -Original Message-
 From: Jose Ramon Diaz [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, January 28, 2004 1:48 PM
 To: 'Struts Users Mailing List'
 Subject: Problem with huge session memory and ActionForm
 
 
 
 Hi all,
 
   We have detected a problem with the amount of memory we 
 use in the session
 when we use classes extending org.apache.struts.action.ActionForm and
 DynaActionForm too.
   We are using 9iAS 9.0.3.
   We take a look to the memory using JPRobe profiler, and 
 we see that the
 forms stored in session (we define the scope to session in 
 struts-config.xml
 for an action) are using more than 20Mb(!!)
   Those actionForms have a reference to ActionServlet in 
 servlet attribute.
 
   Of course, this is a lot of memory to have several 
 hundreds of users. I
 imagine this is not a Struts bug, and please help us to detect what´s
 happening or which is the error in our code.
 
   Thanks a lot.
 
   Jose R.
 
 E-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
 Editorial Aranzadi: www.aranzadi.es http://www.aranzadi.es
 Camino de Galar, 15
 31190- Cizur Menor - SPAIN
 Tlfno.: +34 948 297297Fax: +34 948 297200
 __
 Este e-mail y cualquier documento anexo contienen información 
 privada y
 confidencial única y exclusivamente para el destinatario. Si 
 usted no es el
 destinatario, no tiene autorización para leer, copiar, usar o 
 distribuir el
 e-mail y el/los documento anexos. En caso de haber recibido esta
 comunicación por error, le rogamos que lo remita al emisor y 
 lo destruya
 posteriormente.
 This e-mail and any attachment contain information, which is 
 private and
 confidential and is intended for the addressee only. If you are not an
 addressee, you are not authorized to read, copy, use or 
 distribute this
 communication. If you have received this e-mail in error, 
 please notify the
 sender by return e-mail.
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Problem with huge session memory and ActionForm

2004-01-28 Thread Jose Ramon Diaz
Thanks Nico,

  But i´m surprised because the other transient objects we have in
ActionForm (for example, a Category of log4j) aren´t showed by JProbe, but
attribute servlet is showed and computed for memory. however our own
transient attributes aren´t showed.

  May this be somethnig related to 9iAS more than related to Struts?

Thanks!


 -Mensaje original-
 De: Nicolas De Loof [mailto:[EMAIL PROTECTED]
 Enviado el: miércoles, 28 de enero de 2004 15:13
 Para: Struts Users Mailing List
 Asunto: Re: Problem with huge session memory and ActionForm


 ActionForm has this attribute :
 protected transient ActionServlet servlet

 All ActionForms share the same ActionServlet instance. As
 this attribute is transient, it will not be serialized if form
 is put in session (and session itself is serialized).

 So I think the session size is not well computed by JPRobe
 profiler, as every referenced objet are included in size
 computation, even if they're shared between objects or
 declared transient.

 A better way sould be to run the app without any session
 created, get JVM memory usage (mem1), then open N user
 sessions, and get JVM memory usage (mem2). (mem2 - mem1) / N
 is *real* session size.

 Nico.



 Why not change those forms to request scope instead?Where
 ever feasible I mean.If any data is not shared across pages in
 a wizard like flow, just put that form in request.This should
 be applicable to 90% of the cases.

 But It may not be as simple as that.You may have to retest
 entire application because of that.

 HTH.
 regards,
 Shirish

 -Original Message-
 From: Jose Ramon Diaz [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, January 28, 2004 1:48 PM
 To: 'Struts Users Mailing List'
 Subject: Problem with huge session memory and ActionForm



 Hi all,

 We have detected a problem with the amount of memory we use
 in the session
 when we use classes extending org.apache.struts.action.ActionForm and
 DynaActionForm too.
 We are using 9iAS 9.0.3.
 We take a look to the memory using JPRobe profiler, and we
 see that the
 forms stored in session (we define the scope to session in
 struts-config.xml
 for an action) are using more than 20Mb(!!)
 Those actionForms have a reference to ActionServlet in
 servlet attribute.

 Of course, this is a lot of memory to have several hundreds
 of users. I
 imagine this is not a Struts bug, and please help us to detect what´s
 happening or which is the error in our code.

 Thanks a lot.

 Jose R.
 
 E-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
 Editorial Aranzadi: www.aranzadi.es http://www.aranzadi.es
 Camino de Galar, 15
 31190- Cizur Menor - SPAIN
 Tlfno.: +34 948 297297 Fax: +34 948 297200
 __
 Este e-mail y cualquier documento anexo contienen información
 privada y
 confidencial única y exclusivamente para el destinatario. Si
 usted no es el
 destinatario, no tiene autorización para leer, copiar, usar o
 distribuir el
 e-mail y el/los documento anexos. En caso de haber recibido esta
 comunicación por error, le rogamos que lo remita al emisor y
 lo destruya
 posteriormente.
 This e-mail and any attachment contain information, which is
 private and
 confidential and is intended for the addressee only. If you are not an
 addressee, you are not authorized to read, copy, use or
 distribute this
 communication. If you have received this e-mail in error,
 please notify the
 sender by return e-mail.




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Cahin actions and GZIP filter

2003-12-15 Thread Jose Ramon Diaz

 Thanks Mike, but I´m using Oracle 9iAS.
Anyway, I know it uses Apache as webserver, so I´m goint to look for this
mod, if it hasn´t been deleted in Oracle version oh http server.



 -Mensaje original-
 De: Mainguy, Mike [mailto:[EMAIL PROTECTED]
 Enviado el: viernes, 12 de diciembre de 2003 18:37
 Para: 'Struts Users Mailing List'
 Asunto: RE: Cahin actions and GZIP filter


 Just as a side note, if you are using apache as a web server,
 you could also
 just turn on the mod_deflate or mod_gzip in apache and not
 have to screw
 around the the filter in your servlet engine.

 Kmart Tech News
 news://uskihsvtfinsys

 The essence of knowledge is, having it, to apply it; not having it, to
 confess your ignorance.

 -Original Message-
 From: Jose Ramon Diaz [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 12, 2003 2:26 AM
 To: 'Struts Users Mailing List'
 Subject: Cahin actions and GZIP filter



 Hello,

   I´m trying to use a filter to compress my application using
 GZIP. I have
 read:

 http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters-p3.html

   and it seems to work except when I chain actions. It uses a
 RequestWrapper
 for not writing the stream to the response. If I call one action which
 executes a forward to another action, I get te exception:

 java.io.IOException: Cannot flush a closed output stream
   at
 es.aranzadi.base.controller.CompressionResponseStream.flush(Co
 mpressionRespo
 nseStream.java:84)
   at
 es.aranzadi.base.controller.CompressionResponseWrapper.flushBu
 ffer(Compressi
 onResponseWrapper.java:38)
   at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
 J2EE].server.http.ServletRequestDispatcher.forward(ServletRequ
 estDispatcher.
 java:244)
   at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
 J2EE].server.http.GetParametersRequestDispatcher.forward(GetPa
 rametersReques
 tDispatcher.java:189)
   at
 org.apache.struts.action.RequestProcessor.doForward(RequestPro
 cessor.java:10
 69)
   at
 org.apache.struts.action.RequestProcessor.processForwardConfig
 (RequestProces
 sor.java:455)
   at
 org.apache.struts.action.RequestProcessor.process(RequestProce
 ssor.java:279)
   at
 org.apache.struts.action.ActionServlet.process(ActionServlet.j
 ava:1482)
   at
 org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
 J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterC
 hain.java:65)
   at
 es.aranzadi.base.controller.CompressionFilter.doFilter(Compres
 sionFilter..jav
 a:67)
   at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
 J2EE].server.http.ServletRequestDispatcher.invoke(ServletReque
 stDispatcher.j
 ava:560)
   at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
 J2EE].server.http.ServletRequestDispatcher.forwardInternal(Ser
 vletRequestDis
 patcher.java:306)
   at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
 J2EE].server.http.HttpRequestHandler.processRequest(HttpReques
 tHandler.java:
 767)
   at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
 J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
   at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
 J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
   at
 EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Poo
 ledExecutor.ja
 va:803)
   at java.lang.Thread.run(Thread.java:484)


   Why the stream is closed? My application never colses
 the response
 stream. Can anybody help me?

 Jose R.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 -
 This message and its contents (to include attachments) are
 the property of Kmart Corporation (Kmart) and may contain
 confidential and proprietary information. You are hereby
 notified that any disclosure, copying, or distribution of
 this message, or the taking of any action based on
 information contained herein is strictly prohibited.
 Unauthorized use of information contained herein may subject
 you to civil and criminal prosecution and penalties. If you
 are not the intended recipient, you should delete this
 message immediately.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Cahin actions and GZIP filter

2003-12-12 Thread Jose Ramon Diaz

Hello,

  I´m trying to use a filter to compress my application using GZIP. I have
read:
http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters-p3.html

  and it seems to work except when I chain actions. It uses a RequestWrapper
for not writing the stream to the response. If I call one action which
executes a forward to another action, I get te exception:

java.io.IOException: Cannot flush a closed output stream
at
es.aranzadi.base.controller.CompressionResponseStream.flush(CompressionRespo
nseStream.java:84)
at
es.aranzadi.base.controller.CompressionResponseWrapper.flushBuffer(Compressi
onResponseWrapper.java:38)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.
java:244)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.GetParametersRequestDispatcher.forward(GetParametersReques
tDispatcher.java:189)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
69)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
sor.java:455)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at
es.aranzadi.base.controller.CompressionFilter.doFilter(CompressionFilter.jav
a:67)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.j
ava:560)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDis
patcher.java:306)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:
767)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.ja
va:803)
at java.lang.Thread.run(Thread.java:484)


Why the stream is closed? My application never colses the response stream.
Can anybody help me?

Jose R.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Stress Test

2003-11-25 Thread Jose Ramon Diaz
Hi,

  Is there any way to get the URLs automatically? I mean, how can we obtain
the URL navigating through the application? If we need to do a string test,
we will nedd dozens of URLs, with a lot of parameters, and even we use
frames, so the number of URLs grows...

Thanks a lot...

Jose R. Díaz

 -Mensaje original-
 De: Jerry Jalenak [mailto:[EMAIL PROTECTED]
 Enviado el: lunes, 24 de noviembre de 2003 16:56
 Para: 'Struts Users Mailing List'
 Asunto: RE: [OT] Stress Test


 David,

 Nothing. Nada. Zip. ZIlch.  The logs show basically no
 response; from the
 client perspective the web app simply stops responding.  I
 suspect I've
 either got a memory leak, or a database connectivity issue.
 Hopefully I can
 stress test this thing enough today to identify where in the
 code it fails.
 Once I know where it fails I should be able to fix it.

 Jerry Jalenak
 Development Manager, Web Publishing
 LabOne, Inc.
 10101 Renner Blvd.
 Lenexa, KS  66219
 (913) 577-1496

 [EMAIL PROTECTED]


  -Original Message-
  From: David Friedman [mailto:[EMAIL PROTECTED]
  Sent: Monday, November 24, 2003 9:52 AM
  To: Struts Users Mailing List
  Subject: RE: [OT] Stress Test
 
 
  So after 6 hours, what do your log files (web server and java
  application
  server) show?  Do they show struts actions being performed?
  Does it show out
  of memory errors?  Anything like that?
 
  Regards,
  David
 
  -Original Message-
  From: Jerry Jalenak [mailto:[EMAIL PROTECTED]
  Sent: Monday, November 24, 2003 10:05 AM
  To: '[EMAIL PROTECTED]'
  Subject: [OT] Stress Test
 
 
  Hi All,
 
  I've got a problem with my current web app where it stops
  responding after
  about 6 hours.  I need to set up a test environment and
  simulate multiple
  logon's so I can trap my way through the code and figure out
  where it is
  failing.  I think there is a tool available that can be used
  to do this -
  HTTPerf (I think), but I'm not sure if this will do what I
 want.  Does
  anyone have any experience with this?
 
  Thanks.
 
  Jerry Jalenak
  Development Manager, Web Publishing
  LabOne, Inc.
  10101 Renner Blvd.
  Lenexa, KS  66219
  (913) 577-1496
 
  [EMAIL PROTECTED]
 
 
  This transmission (and any information attached to it) may be
  confidential
  and
  is intended solely for the use of the individual or entity to
  which it is
  addressed. If you are not the intended recipient or the
  person responsible
  for
  delivering the transmission to the intended recipient, be
  advised that you
  have received this transmission in error and that any use,
  dissemination,
  forwarding, printing, or copying of this information is
  strictly prohibited.
  If you have received this transmission in error, please
  immediately notify
  LabOne at the following email address:
  [EMAIL PROTECTED]
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 This transmission (and any information attached to it) may be
 confidential and
 is intended solely for the use of the individual or entity to
 which it is
 addressed. If you are not the intended recipient or the
 person responsible for
 delivering the transmission to the intended recipient, be
 advised that you
 have received this transmission in error and that any use,
 dissemination,
 forwarding, printing, or copying of this information is
 strictly prohibited.
 If you have received this transmission in error, please
 immediately notify
 LabOne at the following email address:
 [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Help with framesets

2003-11-04 Thread Jose Ramon Diaz

 I think the framesStruts question is a bit more complicated. I write here
what I told in another message several days ago. (nobody tells me what they
think... so I continue posting it... :) if you use frames, please tell me
what you think)
 Imagine if one action may load the same frame set but you have to  load
hundred of different pages inside each frame.

 We use Frames in our application. We have had this problem a we use
different approach.
 We suppose the form data is ONLY needed for the action, so the action
executes and change the model as needed. The action decides which is the
next page, and if it can have frames it sets a variable next in session,
which indicates what the frames that must be loades in this way:

 Every frame in frameset is redirected to an special action frames.do with
two parameters: the place where the frame is loaded and the next variable.
For example:

frameset ID=vis cols=261,* border=0 framespacing=1
frame name=bottomLeft
src=frames.do?position=frameBottomaction=session:attribute
name=next/
frame name=bottomRight
src=frames.do?position=frameTopaction=session:attribute name=next/
/frameset

  And we have implemented the frames.do action to know which JSP must be
loaded, with parameters position and next. In fact, the page that must be
loaded is written in struts-config.xml in this way:

   action path=/frames type=package.FramesAction name=framesForm
scope=request
  forward name=frameTop-next1 contextRelative=true
path=/WEB-INF/jsp/jsp1.jsp/
  forward name=frameTop-next2 contextRelative=true
path=/WEB-INF/jsp/jsp2.jsp/c



So the frames.do makes a forward to the String created with position+next
(the two parameter of frames.do) and we can establish the JSP in the xml
file...

   Regards

 Jose R. Diaz


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Session Times Out

2003-11-03 Thread Jose Ramon Diaz

 Hi,
But be carefull because the actions will be executed before redirecting to
JSP, so I think it?s better to check the session in all the actions, isn?t
it?



 Make a custom tag like so :



 Create a tld file with this in  it :

 ?xml version=1.0 encoding=ISO-8859-1 ?
 !DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.//DTD JSP
 Tag Library
 1.1//EN http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd;
 taglib
   tlibversion1.0/tlibversion
   jspversion1.1/jspversion
   shortnameTag Libs/shortname
   infoustom Tags/info
   tag
 namecheckLogin/name

 tagclasscom.cpaglobal.cpadirect.tag.CheckLogin/tagclass
 bodycontentempty/bodycontent
 infoChecks the login status of a user and
 forward them to the
 login page if not logged in./info
 attribute
   nameloginPage/name
   requiredfalse/required
   rtexprvaluefalse/rtexprvalue
 /attribute
 attribute
   namedefault/name
   requiredfalse/required
   rtexprvaluefalse/rtexprvalue
 /attribute
   /tag
 /taglib



 Code for the custom tag :

 package com.cpaglobal.cpadirect.tag;

 import java.io.IOException;

 import javax.servlet.ServletException;
 import javax.servlet.http.HttpSession;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.TagSupport;

 import com.cpaglobal.cpadirect.applicationlogic.SessionVariables;
 import com.cpaglobal.cpadirect.applicationlogic.User;


 public class CheckLogin extends TagSupport {


   private String loginPage = /JSP/Timeout.jsp;


   public void setLoginPage(String loginPage) {
 this.loginPage = loginPage;
   }

   public int doStartTag() throws JspException {
  return (SKIP_BODY);
   }

   public int doEndTag() {
 try {
   HttpSession session = pageContext.getSession();
   if (session != null) {
 User user = (User)
 session.getAttribute(SessionVariables.SESSION_LOGGED_ON_USER);
 if (user == null) {
   pageContext.forward(loginPage);
   return (SKIP_PAGE);
 }
   } else {
 pageContext.forward(loginPage);
 return (SKIP_PAGE);
   }
 } catch(ServletException e) {
   new JspException(e.toString());
 } catch(IOException e) {
   new JspException(e.toString());
 }
 return (EVAL_PAGE);
   }

 }

 How to use it :

 %@ taglib uri=/WEB-INF/cpa.tld prefix=cpa%
 cpa:checkLogin/

 Mike




 |-+
 | |   Caroline Jen |
 | |   [EMAIL PROTECTED]|
 | |   .com|
 | ||
 | |   03/11/2003 06:23 |
 | |   AM   |
 | |   Please respond to|
 | |   Struts Users|
 | |   Mailing List|
 |-+

 -
 -|
   |
|
   |   To:   [EMAIL PROTECTED]
|
   |   cc:
|
   |   Subject:  Session Times Out
|

 -
 -|




 I check if session expires for each action in the
 application.  If the session times out, I forward the
 user to index.jsp so that the user can log on again.

 How do I inform the user with a message that he/she is
 at the welcome page because the session has expired?

 __
 Do you Yahoo!?
 Exclusive Video Premiere - Britney Spears
 http://launch.yahoo.com/promos/britneyspears/

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]







 **
 **
 The information in this message is confidential and may be legally
 privileged. It is intended solely for the addressee; access to this
 email by anyone else is unauthorised.

 If you are not the intended recipient: (1) you are kindly requested
 to return a copy of this message to the sender indicating that you
 have received it in error, and to destroy the received copy; and (2)
 any disclosure or distribution of this 

RE: Struts1.1 Oracle 9iAS

2003-11-03 Thread Jose Ramon Diaz
Hi,

 We do NOT have any problem using Struts 1.1 with Oracle 9iAS 9.0.3. 
 What kind of problems do you have?

 We have problems with 9iAS,  but not related with Struts, else with the
cluster,...

 -Mensaje original-
 De: Karr, David [mailto:[EMAIL PROTECTED]
 Enviado el: lunes, 03 de noviembre de 2003 17:32
 Para: Struts Users Mailing List
 Asunto: RE: Struts1.1  Oracle 9iAS
 
 
  -Original Message-
  From: Tim Clotworthy [mailto:[EMAIL PROTECTED] 
  
  I am saddled with having to re-implement a struts-based architecture
  designed to run on a Tomcat web container, to an Oracle 
 9iAS Release2
  (Tomcat is out, end-of-discussion). Unfortunately, 9iAS 
  support Struts1.0
  framework, but does not seem to support the various Struts1.1 
  capabilities
  that our system already leverages, which include:
  
  1) the RequestProcessor (specifically using ProcessRoles extension)
  2) Tiles
  3) LookupDispatchAction class
  4) some other things..
  
  If anyone else may be in a similarly unfortunate position, 
  and can share any
  insights on how they either:
  
  1) figured out how to get 9iAS Release2 to work with Struts1.1,
  
  Or else:
  
  2) can share any insights on how they got around similar 
  problems, it would
  be greatly appreciated. Thanks.
 
 First of all, what release of 9iAS are you using (9.0.2, 9.0.3, etc.)?
 
 When you say it doesn't support those features, what exactly do you
 mean?  Are you getting particular error messages?
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Statistic of user actions

2003-10-30 Thread Jose Ramon Diaz
Hi all,

We need to log some actions that the user can do in our application. Only
some of them, and if it has worked or not.
Which can be the best way to create statistics? We are thibkg in servlet
filters, so it´s not Struts scope. Or we have found Struts Action Invocation
Framework (SAIF) (http://struts.sourceforge.net/saif/) which is integrated
with Struts as a plugin. As we should need some session information to log
who is the user, it may be more interesting, but I´m afraid it´s still in
beta. (We are evaluating it now, I´ll tell you more...)

   Do you have an interesting thought abut this? Please, tell me is somebody
has implemented something like this.

   Regards

Jose R.



E-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
Editorial Aranzadi: www.aranzadi.es http://www.aranzadi.es
Camino de Galar, 15
31190- Cizur Menor - SPAIN
Tlfno.: +34 948 297297  Fax: +34 948 297200
__
Este e-mail y cualquier documento anexo contienen información privada y
confidencial única y exclusivamente para el destinatario. Si usted no es el
destinatario, no tiene autorización para leer, copiar, usar o distribuir el
e-mail y el/los documento anexos. En caso de haber recibido esta
comunicación por error, le rogamos que lo remita al emisor y lo destruya
posteriormente.
This e-mail and any attachment contain information, which is private and
confidential and is intended for the addressee only. If you are not an
addressee, you are not authorized to read, copy, use or distribute this
communication. If you have received this e-mail in error, please notify the
sender by return e-mail.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Struts and frames: what about the request scope?

2003-10-30 Thread Jose Ramon Diaz
hi all,

 We use Frames in our application. We have had this problem a we use
different approach.
 We suppose the form data is ONLY needed for the action, so the action
executes and change the model as needed. The action decides which is the
next page, and if it can have frames it sets a variable next in session,
which indicates what the frames that must be loades in this way:

 Every frame in frameset is redirected to an special action frames.do with
two parameters: the place where the frame is loaded and the next variable.
For example:

frameset ID=vis cols=261,* border=0 framespacing=1
frame name=bottomLeft
src=frames.do?position=frameBottomaction=session:attribute
name=next/
frame name=bottomRight
src=frames.do?position=frameTopaction=session:attribute name=next/
/frameset

  And we have implemented the frames.do action to know which JSP must be
loaded, with parameters position and next. In fact, the page that must be
loaded is written in struts-config.xml in this way:

   action path=/frames type=package.FramesAction name=framesForm
scope=request
  forward name=frameTop-next1 contextRelative=true
path=/WEB-INF/jsp/jsp1.jsp/
  forward name=frameTop-next2 contextRelative=true
path=/WEB-INF/jsp/jsp2.jsp/ç



So the frames.do makes a forward to the String created with position+next
(the two parameter of frames.do) and we can establish the JSP in the xml
file...

Is this a complicated way of doing this? Sure,... above all because of my
poor english :-)


 Regards

Jose R. Díaz


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: DispatchAction forward issue

2003-09-12 Thread Jose Ramon Diaz
Hi,

so I must understand that it?s not possible to pass parameters in the
request beetwen chained actions, is it?
Is not there a way to change a parameter value of the request if both
actions use the same ActionForm? I want to modify one of the parameters in
the firs action, so second action (chained action) can see the change.

Although I know it may be a bad idea, I don?t have any other now!!  :-(

Thks




 -Mensaje original-
 De: Andrew Hill [mailto:[EMAIL PROTECTED]
 Enviado el: viernes, 12 de septiembre de 2003 13:39
 Para: Struts Users Mailing List
 Asunto: RE: DispatchAction forward issue


 snip
 For that, I put in my request the method parameter
 /snip

 No you didnt. You put in a method ATTRIBUTE. I saw you!
 See:
 snip
 request.setAttribute(method, list);
 /snip

 What you want to do is something like the following:
 ActionForward forward = actionMapping.findForward(do_edition);
 String path = addParam(path,method,list);
 return new ActionForward(path, forward.getRedirect() );

 (btw: that should be a redirecting forward (unless you have a
 very good
 excuse for chaining actions - something that is considered a
 bad idea in
 general))

 You addParam method might look something like:

 public String addParam(String url, String parameter, String value)
 {
   return url + ( (url.indexOf(?)==-1) ? ? :  ) +
 parameter + = +
 value;
 }


 -Original Message-
 From: Nicolas Delsaux [mailto:[EMAIL PROTECTED]
 Sent: Friday, 12 September 2003 19:28
 To: [EMAIL PROTECTED]
 Subject: DispatchAction forward issue


 Hi, I'm using a dispatchaction for displaying/editing
 objects, on which I
 would like to do a forward, through an ActionForward, from an
 other action.
 For that, I put in my request the method parameter, that should be
 interpreted (for what I know) by Struts, in ordeer to
 determine the method
 to call.
 And, as you may guess, Struts does not see this mparameter
 and send me the
 following error message :

 message Request[/list] does not contain handler parameter named method

 How can I make Struts understand what I want ?
 For your information, here are the involved code fragments :

 struts-config.xml

  action  path=/list
 type=com.ListAllFieldsAction
name=listAllAttributes
scope=request
 validate=true
 parameter=method/

 action path=/edit_tree_object
 type=com.EditTreeObjectAction
  name=edit_tree_object
  scope=request
  validate=false
  forward name=do_edition path=/list.do/
 /action

 And, in my EditTreeObjectAction, the execute method contains
 the following
 code :

 request.setAttribute(method, list);
 return actionMapping.findForward(do_edition);

 Thanks in advance

 --
 Nicolas Delsaux


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: DispatchAction forward issue

2003-09-12 Thread Jose Ramon Diaz
Hi,

 i have trid two ways, and both at the same time:

1) I have modified the form, and now the method reset() only executes or
not depending a boolean flag that the first action clears.
2) I set the attribute in the request with the same name that it comes from
the URL, I supposed that if the data is requested again of the URL it would
be settled right, but it doesn?t work.

   I imagine only can be one object in the request with the same name. Is
the same request object in the first action and the second? or is it
recreated?

  Thks

 -Mensaje original-
 De: Andrew Hill [mailto:[EMAIL PROTECTED]
 Enviado el: viernes, 12 de septiembre de 2003 14:46
 Para: Struts Users Mailing List
 Asunto: RE: DispatchAction forward issue


 Hmm.. You can try it with a non-redirecting action. Im not
 sure how well it
 will work though as there may still be the original method
 parameter in the
 request as well as the one you tack onto the url. Give it a
 shot and see
 how.

 btw: you know that if you chain actions the form will get reset and
 repopulated right?

 -Original Message-
 From: Jose Ramon Diaz [mailto:[EMAIL PROTECTED]
 Sent: Friday, 12 September 2003 20:37
 To: 'Struts Users Mailing List'
 Subject: RE: DispatchAction forward issue


 Hi,

   so I must understand that it?s not possible to pass
 parameters in the
 request beetwen chained actions, is it?
   Is not there a way to change a parameter value of the
 request if both
 actions use the same ActionForm? I want to modify one of the
 parameters in
 the firs action, so second action (chained action) can see the change.

   Although I know it may be a bad idea, I don?t have any
 other now!!  :-(

   Thks




  -Mensaje original-
  De: Andrew Hill [mailto:[EMAIL PROTECTED]
  Enviado el: viernes, 12 de septiembre de 2003 13:39
  Para: Struts Users Mailing List
  Asunto: RE: DispatchAction forward issue
 
 
  snip
  For that, I put in my request the method parameter
  /snip
 
  No you didnt. You put in a method ATTRIBUTE. I saw you!
  See:
  snip
  request.setAttribute(method, list);
  /snip
 
  What you want to do is something like the following:
  ActionForward forward = actionMapping.findForward(do_edition);
  String path = addParam(path,method,list);
  return new ActionForward(path, forward.getRedirect() );
 
  (btw: that should be a redirecting forward (unless you have a
  very good
  excuse for chaining actions - something that is considered a
  bad idea in
  general))
 
  You addParam method might look something like:
 
  public String addParam(String url, String parameter, String value)
  {
return url + ( (url.indexOf(?)==-1) ? ? :  ) +
  parameter + = +
  value;
  }
 
 
  -Original Message-
  From: Nicolas Delsaux [mailto:[EMAIL PROTECTED]
  Sent: Friday, 12 September 2003 19:28
  To: [EMAIL PROTECTED]
  Subject: DispatchAction forward issue
 
 
  Hi, I'm using a dispatchaction for displaying/editing
  objects, on which I
  would like to do a forward, through an ActionForward, from an
  other action.
  For that, I put in my request the method parameter, that should be
  interpreted (for what I know) by Struts, in ordeer to
  determine the method
  to call.
  And, as you may guess, Struts does not see this mparameter
  and send me the
  following error message :
 
  message Request[/list] does not contain handler parameter
 named method
 
  How can I make Struts understand what I want ?
  For your information, here are the involved code fragments :
 
  struts-config.xml
 
   action  path=/list
  type=com.ListAllFieldsAction
 name=listAllAttributes
 scope=request
  validate=true
  parameter=method/
 
  action path=/edit_tree_object
  type=com.EditTreeObjectAction
   name=edit_tree_object
   scope=request
   validate=false
   forward name=do_edition path=/list.do/
  /action
 
  And, in my EditTreeObjectAction, the execute method contains
  the following
  code :
 
  request.setAttribute(method, list);
  return actionMapping.findForward(do_edition);
 
  Thanks in advance
 
  --
  Nicolas Delsaux
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED

RE: Bad URL transformation with Opera Browser and frames

2003-09-08 Thread Jose Ramon Diaz
Hi Adam,

  Thanks, but it doesn´t work. Now I´m writing

html:base/
 in my jsp with the frames, but this is translated in this waay:

base href=http://localhost:8988/application/WEB-INF/jsp/fsPage.jsp;

  So, the base tag is translated with directory information, And of course
it doesn´t work.
Why?

  Thanks in advance.


 -Mensaje original-
 De: Adam Hardy [mailto:[EMAIL PROTECTED]
 Enviado el: miércoles, 03 de septiembre de 2003 10:44
 Para: Struts Users Mailing List
 Asunto: Re: Bad URL transformation with Opera Browser and frames


 Are you using the html:base/ tag in your page? It sounds like the
 browser is misinterpreting relative paths.


 Adam

 On 09/03/2003 08:19 AM Jose Ramon Diaz wrote:
  Hi all,
 
   I have an action frames.fo, which load a frame according
 to some arameters.
  It works rigth in explorer and Netscape, but when I load
 the URL in Opera
  browser, the pages URL of each frame is changed and it´s added the
  WEB-INF/jsp directory in the URL.
 
   I mean, for example, if the frameset is loaded in this page:
 
 
 http://loacalhost/application/frames.do?position=frameBottoma
ction=default

 and in the source one frame is defined (and loaded in browser) in this
way:

 frame name=bottomLeft marginwidth=0 marginheight=0
 src=frames.do?posicion=frameBottomLeftaction=default scrolling=AUTO
 bordercolor=#66 frameborder=0

   Opera browser gives the next error:

   Resource /application/WEB-INF/jsp/frames.do not found on this server

   I have all the JSPs inside WEB-INF directory to protect them. But I
can´t
 imagine what´s the HTTP request Opera is doing. Why does it search for the
 JSP as if the URL contains WEB-INF directory?

   Can anybody help, please?
   Thanks

  Jose R.



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Bad URL transformation with Opera Browser and frames

2003-09-03 Thread Jose Ramon Diaz
Hi all,

 I have an action frames.fo, which load a frame according to some arameters.
It works rigth in explorer and Netscape, but when I load the URL in Opera
browser, the pages URL of each frame is changed and it´s added the
WEB-INF/jsp directory in the URL.

 I mean, for example, if the frameset is loaded in this page:

http://loacalhost/application/frames.do?position=frameBottomaction=default

and in the source one frame is defined (and loaded in browser) in this way:

frame name=bottomLeft marginwidth=0 marginheight=0
src=frames.do?posicion=frameBottomLeftaction=default scrolling=AUTO
bordercolor=#66 frameborder=0

  Opera browser gives the next error:

Resource /application/WEB-INF/jsp/frames.do not found on this server

  I have all the JSPs inside WEB-INF directory to protect them. But I can´t
imagine what´s the HTTP request Opera is doing. Why does it search for the
JSP as if the URL contains WEB-INF directory?

  Can anybody help, please?
Thanks

 Jose R.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Support for automatic frames

2003-02-25 Thread Jose Ramon Diaz

Hello Ray,

Well, you have to know somehow, or you could never get the
application running in the first place.  Seems like you
need a method to know which frame to load what action
into.

Yes, that´s the reason why we create the frames.do action configured with
an XML file as we said in our first message.

 How many levels of frames are you planning to use?
We will use 3 level of frames, with 3 or 4 jsps which can be loaded into
every different frame. this give us a quite high number of different
posibilities.

Is there a heirarchy to the frames relative to the
actions that will be performed on them.  Can a subframe
in one frame invoke an action in s sibling subframe?

There are actions whose target goes to the sibling frames, another targets
go to the top frame and another action´s targets go to another frame
(sibling or sublevel).
Do you think the idea of a frames.do action is good way to help us to
minimize the complexity of the frames? Remember our main problem is to
redraw the framesets with the correct pages invoked, not to redirect an
action which return a simple JSP to a specific frame.
We will try to create this action to be generic for any application, and we
won´t have problem to publish it.

Thanks

Jose R.  David


-Original Message-
From: Jose Ramon Diaz [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 11:18 PM
To: 'Struts Users Mailing List'
Subject: RE: Support for automatic frames


Ray,

But, imagine that with several action you must reload the top frameset, and
in the subframes there are framesets again. How do you know which frame to
load of it can be different for every action?
As you say we have no problems when our action is redirected to a TARGET
frame, but when the frameset itself is different under several action. (And
in the framesets under the top frameset we have not the original request!)

Thanks

Jose R.


-Mensaje original-
De: Ray Madigan [mailto:[EMAIL PROTECTED]
Enviado el: 24 de febrero de 03 19:10
Para: Struts Users Mailing List; [EMAIL PROTECTED]
Asunto: RE: Support for automatic frames


Im not sure i understand what you are trying to accomplish.  I have
a struts application that uses frames and i can populate multiple
frames from one frame when the user clicks or even mouseover an area
of the screen.  The action to cause a frame event trigger to fire
carries arguments so the action can be specific to the location on
the frame and what frame generated the action.  Is this what you mean?

Thanks
RayM

-Original Message-
From: Jose Ramon Diaz [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 3:02 AM
To: [EMAIL PROTECTED]
Subject: Support for automatic frames


Hi all,

This is a a bit long question,... :-\
We are going to start a new project with Struts, and we HAVE TO use frames.
So we have different approaches. Tha navigation is quite complex: same
action can go to different frames, and different actions can go to the same
frame, depending the place (the screen) we choose the action or the action
itself.
The main one is the next:

1) We think  about one special action called frames.do which knows all
the stuff with the frames composition. It would need two parameters: the
position where it holds the frame, and the action is being executed. This
action is setted in the original action in the session object.
We are thinking to configure this action from an XML file, which would have
the relacion between the action, the frame holder and the view returned
(which can be another frameset calling frames.do for each frame).
Would it be possible to validate this file with struts-config.xml, with the
indicated forwards in the frames.do action?

For example:
This is the top frame, which can be loaded by several actions, so the
sub-frames can be different on each call.

frameset rows=68,* border=0 framespacing=0 frameborder=NO
  frame
src=/prototipo01/frames.do?position=frameUpaction=session:attribute
name=next/  name=menuPrincipal/
  frame
src=/prototipo01/frames.do?position=frameBottomaction=session:attribute
name=next/ name=bottom/
/frameset

The session attibute next would have been setted by the action with the
name of the action.

Plase, what do you think? Are we making a mess?

Regards



Jose Ramon Diaz, E-mail: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
Editorial Aranzadi: www.aranzadi.es http://www.aranzadi.es/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional

Support for automatic frames

2003-02-24 Thread Jose Ramon Diaz
Hi all,

This is a a bit long question,... :-\
We are going to start a new project with Struts, and we HAVE TO use frames.
So we have different approaches. Tha navigation is quite complex: same
action can go to different frames, and different actions can go to the same
frame, depending the place (the screen) we choose the action or the action
itself.
The main one is the next:

1) We think  about one special action called frames.do which knows all
the stuff with the frames composition. It would need two parameters: the
position where it holds the frame, and the action is being executed. This
action is setted in the original action in the session object.
We are thinking to configure this action from an XML file, which would have
the relacion between the action, the frame holder and the view returned
(which can be another frameset calling frames.do for each frame).
Would it be possible to validate this file with struts-config.xml, with the
indicated forwards in the frames.do action?

For example:
This is the top frame, which can be loaded by several actions, so the
sub-frames can be different on each call.

frameset rows=68,* border=0 framespacing=0 frameborder=NO
  frame
src=/prototipo01/frames.do?position=frameUpaction=session:attribute
name=next/  name=menuPrincipal/
  frame
src=/prototipo01/frames.do?position=frameBottomaction=session:attribute
name=next/ name=bottom/
/frameset

The session attibute next would have been setted by the action with the
name of the action.

Plase, what do you think? Are we making a mess?

Regards



Jose Ramon Diaz, E-mail: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
Editorial Aranzadi: www.aranzadi.es http://www.aranzadi.es/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Support for automatic frames

2003-02-24 Thread Jose Ramon Diaz
Ray,

But, imagine that with several action you must reload the top frameset, and
in the subframes there are framesets again. How do you know which frame to
load of it can be different for every action?
As you say we have no problems when our action is redirected to a TARGET
frame, but when the frameset itself is different under several action. (And
in the framesets under the top frameset we have not the original request!)

Thanks

Jose R.


-Mensaje original-
De: Ray Madigan [mailto:[EMAIL PROTECTED]
Enviado el: 24 de febrero de 03 19:10
Para: Struts Users Mailing List; [EMAIL PROTECTED]
Asunto: RE: Support for automatic frames


Im not sure i understand what you are trying to accomplish.  I have
a struts application that uses frames and i can populate multiple
frames from one frame when the user clicks or even mouseover an area
of the screen.  The action to cause a frame event trigger to fire
carries arguments so the action can be specific to the location on
the frame and what frame generated the action.  Is this what you mean?

Thanks
RayM

-Original Message-
From: Jose Ramon Diaz [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 3:02 AM
To: [EMAIL PROTECTED]
Subject: Support for automatic frames


Hi all,

This is a a bit long question,... :-\
We are going to start a new project with Struts, and we HAVE TO use frames.
So we have different approaches. Tha navigation is quite complex: same
action can go to different frames, and different actions can go to the same
frame, depending the place (the screen) we choose the action or the action
itself.
The main one is the next:

1) We think  about one special action called frames.do which knows all
the stuff with the frames composition. It would need two parameters: the
position where it holds the frame, and the action is being executed. This
action is setted in the original action in the session object.
We are thinking to configure this action from an XML file, which would have
the relacion between the action, the frame holder and the view returned
(which can be another frameset calling frames.do for each frame).
Would it be possible to validate this file with struts-config.xml, with the
indicated forwards in the frames.do action?

For example:
This is the top frame, which can be loaded by several actions, so the
sub-frames can be different on each call.

frameset rows=68,* border=0 framespacing=0 frameborder=NO
  frame
src=/prototipo01/frames.do?position=frameUpaction=session:attribute
name=next/  name=menuPrincipal/
  frame
src=/prototipo01/frames.do?position=frameBottomaction=session:attribute
name=next/ name=bottom/
/frameset

The session attibute next would have been setted by the action with the
name of the action.

Plase, what do you think? Are we making a mess?

Regards



Jose Ramon Diaz, E-mail: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
Editorial Aranzadi: www.aranzadi.es http://www.aranzadi.es/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



javascript alert with the content of html:errors

2003-02-20 Thread Jose Ramon Diaz
Hi all,

  I would like to get a javascript alert with the content of html:errors/,
so I tried this in the JSP:

...
script
alert('html:errors/');
/script
...

But the HTML code generatd is the following,

script
alert('MESSAGE OF HTML ERROR TAG
');
/script

So, it writes a \n at the end of the message, and the javascript fails.
I´ve seen org.apache.struts.taglib.html.ErrorsTag.java, and after every
message it writes \r\n and I don´t see any way to override this behaviour.
Should I change my struts source files? Is there any other way to get a
javascript alert with this content?
Would be interesting for this class to be able to write or not to write the
\n´s?

thanks a lot...

Jose R. Díaz


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: How to let a user click a column header to sort data in a tab le u sing struts?

2003-01-15 Thread Jose Ramon Diaz

It´s fantastic!! Is it free to use?


-Mensaje original-
De: Gemes Tibor [mailto:[EMAIL PROTECTED]]
Enviado el: 15 de enero de 03 15:10
Para: Struts Users Mailing List
Asunto: Re: How to let a user click a column header to sort data in a
tab le u sing struts?


2003. január 15. 14:54 dátummal Thomas CORNET ezt írtad:
 Isn't it ? This is a friend of mine who has coded it, and it's working
 well. Check out the attachement.

WOW! This works like a charm (thou I need some polishing on date handling).

Is this copyrighted under public domain?

Tib

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]