How to detect that session has expired ?

2003-12-07 Thread Baljinder Singh
Hi All,

How can I detect that session has expired and so throw the user out of
system after showing him a message that Your session has expired. Please
login again.

Thanks,
BS


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



Re: How to detect that session has expired ?

2003-12-07 Thread Thomas Cornet


  When a session restarts, its context is empty, so all objects stored in 
the session context have disappeared. To detect if a session has restarted, 
you need first to store an object in the session context, then each time 
you need to know if the session has restarted, you test its presence in the 
context. If it is not there anymore, then the session has restarted.

At 08:09 07/12/2003, you wrote:
Hi All,

How can I detect that session has expired and so throw the user out of
system after showing him a message that Your session has expired. Please
login again.
Thanks,
BS
-
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: Link-to-action?

2003-12-07 Thread Dennis Hunziker
Hi

In our current project we are using an adapted version of the LinkXTag
class provided with the struts example application. Check out this class
and I hope it is what you need.

Kind regards
Dennis Hunziker



-Original Message-
From: Theodosios Paschalidis [mailto:[EMAIL PROTECTED] 
Sent: Sonntag, 7. Dezember 2003 00:10
To: [EMAIL PROTECTED]
Subject: Link-to-action?

Hi all,

I am a new struts user utilizing it for my uni project. I have reached a
point that I do not know how to handle the struts way and am really
stuck! I spent a lot time on this and I would be grateful for any
further info!

 I am dynamically producing some search results. I will be turning them
into links and I want to pass a parameter.

Is it possible that a user clicking on a link can trigger an action? eg
having something like a href=DisplayItem.do?ItemId=223

Using JSPs would be easy to do invoking the appropriate method directly
the above way.

Using servlets I could just do String
itemId=request.getParameter(Itemid).
Since an ActionClass is a servlet could I achieve the same using the
Form as a transfer object for the ID property?

If this cannot be done using the struts sequence (Form-Action) then
maybe it will be easier forwarding to a JSP? Doing that though will
require me using a scriptlet to retrieve the object of interest :( Any
better way? (because my Items are nested I am trying to do it through an
Action)

In a nutshell: 1) I display a collection
   2) I want to somehow select the item that the user
clicked, for detailed description

Any help will be really appreciated!
Thank you for your time,
Theo





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



Have to close and re open the browser each time

2003-12-07 Thread Amjad Shahrour
 

 

I am facing this problem that I couldn't figure out the cause.

 

 

We have an web based application  (built using struts 1.0).

After login to the application for the first time, if you relogin again
OR the session times out and you try to re login again

I have the following exception thrown to the client:

 

java.lang.ClassCastException
at
org.apache.struts.action.ActionServlet.processActionForm(ActionServlet.j
ava:1674)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
5)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
590)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:530)
at java.lang.Thread.run(Thread.java:536)

 

 

 

So the user is forced to close and re open the browser inorder to login
again to the system successfully.

 

Any ideas??

 

 

 

 

Amjad Shahrour

Application Developer

Tel: +966.2.653.3334 ext 213

[EMAIL PROTECTED]

www.labbaik.com

 

 

 

 



How to refer/declare to ImageButtonBean within a JSP

2003-12-07 Thread Shantanu Deo
Hi,
  I have a need to define multiple Image Input Button within an Iterate tag and I am 
experimenting with the use 
of ImageButtonBean. I would like to know that having defined the ImageButtonBean, how 
does one declare it
within the html:img tag. An example would be great.
 Secondly, how does one resolve which particular button from those generated by the 
enclosing Iterate tag
was actually clicked.

I would highly appreciate your input in this regard

TIA
Shantanu

RE: How to detect that session has expired ?

2003-12-07 Thread Baljinder Singh
Thomas,

You mean to say that I should put this logic in ActionClass. But then I
would need to put it in all my Action Classes. Can't I do something similar
in JSP because then I would do it in a common JSP which is included in all
other JSPs of mine. Or is there a common solution which can take care all
Action Classes.

Thanks,
BS

-Original Message-
From: Thomas Cornet [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 07, 2003 2:17 PM
To: Struts Users Mailing List
Subject: Re: How to detect that session has expired ?




   When a session restarts, its context is empty, so all objects stored in
the session context have disappeared. To detect if a session has restarted,
you need first to store an object in the session context, then each time
you need to know if the session has restarted, you test its presence in the
context. If it is not there anymore, then the session has restarted.

At 08:09 07/12/2003, you wrote:
Hi All,

How can I detect that session has expired and so throw the user out of
system after showing him a message that Your session has expired. Please
login again.

Thanks,
BS


-
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: How to detect that session has expired ?

2003-12-07 Thread Mick
On Sun, 07 Dec 2003 12:39:46 +0530, Baljinder Singh wrote:
 How can I detect that session has expired and so throw the user out of
 system after showing him a message that Your session has expired. Please
 login again.


javax.servlet.http.HttpSessionListener

http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSessionListener.html
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Servlets4.html

You can listen to when the session is about to be destroyed.


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



RE: How to detect that session has expired ?

2003-12-07 Thread Mohan Radhakrishnan
Seems this is not supported by many containers yet(J2EE 1.4). You could use
a filter to check for session expiry but what if it expires after it passes
the filter. Then each JSP should have a check in the beginning.

Mohan

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Mick
Sent: Sunday, December 07, 2003 5:12 PM
To: [EMAIL PROTECTED]
Subject: Re: How to detect that session has expired ?


On Sun, 07 Dec 2003 12:39:46 +0530, Baljinder Singh wrote:
 How can I detect that session has expired and so throw the user out of
 system after showing him a message that Your session has expired. Please
 login again.


javax.servlet.http.HttpSessionListener

http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSessionListener
.html
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Servlets4.html

You can listen to when the session is about to be destroyed.


-
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: from Action to Facade: simple attributes or Business Objects

2003-12-07 Thread Tim Lucia
The philosphy is that the Actions (controller) move bean properties
from form bean(s) into business beans, and pass the business bean into a
business object to perform an operation.  I.e., the action should
contain all of (and only) the web-specific portion of the application.
I.e., the latter case in your example.  Think about what happens if you
add a property?  How many places do you need to change it?  One less (at
least) in the patter case.  You can (typically) use BeanUtils.populate()
do move all properties in one fell swoop.

Tim Lucia


 -Original Message-
 From: Felipe Nascimento [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, December 06, 2003 10:15 PM
 To: [EMAIL PROTECTED]
 Subject: from Action to Facade: simple attributes or Business Objects
 
 
 Hi,
 
 I was wondering what do experts recommend:
 
 inside Action´s execute method we should pass the attributes 
 to the Facade or create the business objects in the Action 
 and pass them on?
 
 1)
 execute(){
  Facade.addUser(name, surname, login, birth, );
 }
 
 or
 
 2)
 execute(){
  User u = new User();
  u.setName(name);
  u.setSurname(surname);
  ..others setters.
  Facade.addUser(u);
 }
 
 Tks
 Felipe
 
 
 
 -
 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: How to detect that session has expired ?

2003-12-07 Thread Ed Dowgiallo
Inheritance is your friend.  If you need processing common to all your
Action classes, extend the Struts Action class.

Ed
- Original Message -
From: Baljinder Singh [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Sunday, December 07, 2003 5:41 AM
Subject: RE: How to detect that session has expired ?


 Thomas,

 You mean to say that I should put this logic in ActionClass. But then I
 would need to put it in all my Action Classes. Can't I do something
similar
 in JSP because then I would do it in a common JSP which is included in all
 other JSPs of mine. Or is there a common solution which can take care all
 Action Classes.

 Thanks,
 BS

 -Original Message-
 From: Thomas Cornet [mailto:[EMAIL PROTECTED]
 Sent: Sunday, December 07, 2003 2:17 PM
 To: Struts Users Mailing List
 Subject: Re: How to detect that session has expired ?




When a session restarts, its context is empty, so all objects stored in
 the session context have disappeared. To detect if a session has
restarted,
 you need first to store an object in the session context, then each time
 you need to know if the session has restarted, you test its presence in
the
 context. If it is not there anymore, then the session has restarted.

 At 08:09 07/12/2003, you wrote:
 Hi All,
 
 How can I detect that session has expired and so throw the user out of
 system after showing him a message that Your session has expired. Please
 login again.
 
 Thanks,
 BS
 
 
 -
 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: How to detect that session has expired ?

2003-12-07 Thread Ashish Kulkarni
HI
if u are using servelt 2.3 , then u can use servelt
filter, in this filter u can have logic to check
session before each request so u dont need to add any
code in jsp or action class

Ashish
--- Ed Dowgiallo [EMAIL PROTECTED] wrote:
 Inheritance is your friend.  If you need processing
 common to all your
 Action classes, extend the Struts Action class.
 
 Ed
 - Original Message -
 From: Baljinder Singh
 [EMAIL PROTECTED]
 To: Struts Users Mailing List
 [EMAIL PROTECTED]
 Sent: Sunday, December 07, 2003 5:41 AM
 Subject: RE: How to detect that session has expired
 ?
 
 
  Thomas,
 
  You mean to say that I should put this logic in
 ActionClass. But then I
  would need to put it in all my Action Classes.
 Can't I do something
 similar
  in JSP because then I would do it in a common JSP
 which is included in all
  other JSPs of mine. Or is there a common solution
 which can take care all
  Action Classes.
 
  Thanks,
  BS
 
  -Original Message-
  From: Thomas Cornet [mailto:[EMAIL PROTECTED]
  Sent: Sunday, December 07, 2003 2:17 PM
  To: Struts Users Mailing List
  Subject: Re: How to detect that session has
 expired ?
 
 
 
 
 When a session restarts, its context is empty,
 so all objects stored in
  the session context have disappeared. To detect if
 a session has
 restarted,
  you need first to store an object in the session
 context, then each time
  you need to know if the session has restarted, you
 test its presence in
 the
  context. If it is not there anymore, then the
 session has restarted.
 
  At 08:09 07/12/2003, you wrote:
  Hi All,
  
  How can I detect that session has expired and so
 throw the user out of
  system after showing him a message that Your
 session has expired. Please
  login again.
  
  Thanks,
  BS
  
  
 

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


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



RE: How to detect that session has expired ?

2003-12-07 Thread Baljinder Singh
Ashish,

Can you provide me with more details about how to use Servlet Filter ?

Thanks,
BS

-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 07, 2003 9:15 PM
To: Struts Users Mailing List
Subject: Re: How to detect that session has expired ?


HI
if u are using servelt 2.3 , then u can use servelt
filter, in this filter u can have logic to check
session before each request so u dont need to add any
code in jsp or action class

Ashish
--- Ed Dowgiallo [EMAIL PROTECTED] wrote:
 Inheritance is your friend.  If you need processing
 common to all your
 Action classes, extend the Struts Action class.
 
 Ed
 - Original Message -
 From: Baljinder Singh
 [EMAIL PROTECTED]
 To: Struts Users Mailing List
 [EMAIL PROTECTED]
 Sent: Sunday, December 07, 2003 5:41 AM
 Subject: RE: How to detect that session has expired
 ?
 
 
  Thomas,
 
  You mean to say that I should put this logic in
 ActionClass. But then I
  would need to put it in all my Action Classes.
 Can't I do something
 similar
  in JSP because then I would do it in a common JSP
 which is included in all
  other JSPs of mine. Or is there a common solution
 which can take care all
  Action Classes.
 
  Thanks,
  BS
 
  -Original Message-
  From: Thomas Cornet [mailto:[EMAIL PROTECTED]
  Sent: Sunday, December 07, 2003 2:17 PM
  To: Struts Users Mailing List
  Subject: Re: How to detect that session has
 expired ?
 
 
 
 
 When a session restarts, its context is empty,
 so all objects stored in
  the session context have disappeared. To detect if
 a session has
 restarted,
  you need first to store an object in the session
 context, then each time
  you need to know if the session has restarted, you
 test its presence in
 the
  context. If it is not there anymore, then the
 session has restarted.
 
  At 08:09 07/12/2003, you wrote:
  Hi All,
  
  How can I detect that session has expired and so
 throw the user out of
  system after showing him a message that Your
 session has expired. Please
  login again.
  
  Thanks,
  BS
  
  
 

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


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

-
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: How to detect that session has expired ?

2003-12-07 Thread Tim Lucia
You ought not to refer directly to any jsp pages anyway.  Always refer
to an action which forwards to your jsp.  Then you can put your JSPs
inside WEB-INF if you want (insures they can never be directly accessed)
and you never have to add any tag(s) to check for valid user.

As Ed points out, Inheritance is your friend.  Get to know him, and his
cousin, Poly.  Poly Morphism.

Tim Lucia

 -Original Message-
 From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, December 07, 2003 10:45 AM
 To: Struts Users Mailing List
 Subject: Re: How to detect that session has expired ?
 
 
 HI
 if u are using servelt 2.3 , then u can use servelt
 filter, in this filter u can have logic to check
 session before each request so u dont need to add any
 code in jsp or action class
 
 Ashish
 --- Ed Dowgiallo [EMAIL PROTECTED] wrote:
  Inheritance is your friend.  If you need processing
  common to all your
  Action classes, extend the Struts Action class.
  
  Ed
  - Original Message -
  From: Baljinder Singh [EMAIL PROTECTED]
  To: Struts Users Mailing List
  [EMAIL PROTECTED]
  Sent: Sunday, December 07, 2003 5:41 AM
  Subject: RE: How to detect that session has expired
  ?
  
  
   Thomas,
  
   You mean to say that I should put this logic in
  ActionClass. But then I
   would need to put it in all my Action Classes.
  Can't I do something
  similar
   in JSP because then I would do it in a common JSP
  which is included in all
   other JSPs of mine. Or is there a common solution
  which can take care all
   Action Classes.
  
   Thanks,
   BS
  
   -Original Message-
   From: Thomas Cornet [mailto:[EMAIL PROTECTED]
   Sent: Sunday, December 07, 2003 2:17 PM
   To: Struts Users Mailing List
   Subject: Re: How to detect that session has
  expired ?
  
  
  
  
  When a session restarts, its context is empty,
  so all objects stored in
   the session context have disappeared. To detect if
  a session has
  restarted,
   you need first to store an object in the session
  context, then each time
   you need to know if the session has restarted, you
  test its presence in
  the
   context. If it is not there anymore, then the
  session has restarted.
  
   At 08:09 07/12/2003, you wrote:
   Hi All,
   
   How can I detect that session has expired and so
  throw the user out of
   system after showing him a message that Your
  session has expired. Please
   login again.
   
   Thanks,
   BS
   
   
  
 
 -
   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]
  
 
 
 __
 Do you Yahoo!?
 New Yahoo! Photos - easier uploading and sharing. 
http://photos.yahoo.com/

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



RES: from Action to Facade: simple attributes or Business Objects

2003-12-07 Thread Felipe Nascimento
Tks for the reply Tim.

I now see the advantages of my latter case.
But being my form bean a DynaActionForm, can I still use
BeanUtils.populate()??
If not, what would be the alternative?

Tks
Felipe

-Mensagem original-
De: Tim Lucia [mailto:[EMAIL PROTECTED] 
Enviada em: domingo, 7 de dezembro de 2003 10:54
Para: 'Struts Users Mailing List'
Assunto: RE: from Action to Facade: simple attributes or Business
Objects


The philosphy is that the Actions (controller) move bean properties
from form bean(s) into business beans, and pass the business bean into a
business object to perform an operation.  I.e., the action should
contain all of (and only) the web-specific portion of the application.
I.e., the latter case in your example.  Think about what happens if you
add a property?  How many places do you need to change it?  One less (at
least) in the patter case.  You can (typically) use BeanUtils.populate()
do move all properties in one fell swoop.

Tim Lucia


 -Original Message-
 From: Felipe Nascimento [mailto:[EMAIL PROTECTED]
 Sent: Saturday, December 06, 2003 10:15 PM
 To: [EMAIL PROTECTED]
 Subject: from Action to Facade: simple attributes or Business Objects
 
 
 Hi,
 
 I was wondering what do experts recommend:
 
 inside Action´s execute method we should pass the attributes
 to the Facade or create the business objects in the Action 
 and pass them on?
 
 1)
 execute(){
  Facade.addUser(name, surname, login, birth, );
 }
 
 or
 
 2)
 execute(){
  User u = new User();
  u.setName(name);
  u.setSurname(surname);
  ..others setters.
  Facade.addUser(u);
 }
 
 Tks
 Felipe
 
 
 
 -
 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]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 2/12/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 2/12/2003
 


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



Sun Java Studio Creator (was Project Rave)

2003-12-07 Thread Christian Bollmeyer
Hi,

there's the preview release available from

http://wwws.sun.com/software/products/jscreator/

now. Anybody here who had a closer look at it?

-- Chris.


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



RES: How to detect that session has expired ?

2003-12-07 Thread Felipe Nascimento
http://java.sun.com/products/servlet/Filters.html
http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters-p2.html
http://securityfilter.sourceforge.net/ 


-Mensagem original-
De: Baljinder Singh [mailto:[EMAIL PROTECTED] 
Enviada em: domingo, 7 de dezembro de 2003 13:16
Para: Struts Users Mailing List
Assunto: RE: How to detect that session has expired ?


Ashish,

Can you provide me with more details about how to use Servlet Filter ?

Thanks,
BS

-Original Message-
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 07, 2003 9:15 PM
To: Struts Users Mailing List
Subject: Re: How to detect that session has expired ?


HI
if u are using servelt 2.3 , then u can use servelt
filter, in this filter u can have logic to check
session before each request so u dont need to add any
code in jsp or action class

Ashish
--- Ed Dowgiallo [EMAIL PROTECTED] wrote:
 Inheritance is your friend.  If you need processing
 common to all your
 Action classes, extend the Struts Action class.
 
 Ed
 - Original Message -
 From: Baljinder Singh [EMAIL PROTECTED]
 To: Struts Users Mailing List
 [EMAIL PROTECTED]
 Sent: Sunday, December 07, 2003 5:41 AM
 Subject: RE: How to detect that session has expired
 ?
 
 
  Thomas,
 
  You mean to say that I should put this logic in
 ActionClass. But then I
  would need to put it in all my Action Classes.
 Can't I do something
 similar
  in JSP because then I would do it in a common JSP
 which is included in all
  other JSPs of mine. Or is there a common solution
 which can take care all
  Action Classes.
 
  Thanks,
  BS
 
  -Original Message-
  From: Thomas Cornet [mailto:[EMAIL PROTECTED]
  Sent: Sunday, December 07, 2003 2:17 PM
  To: Struts Users Mailing List
  Subject: Re: How to detect that session has
 expired ?
 
 
 
 
 When a session restarts, its context is empty,
 so all objects stored in
  the session context have disappeared. To detect if
 a session has
 restarted,
  you need first to store an object in the session
 context, then each time
  you need to know if the session has restarted, you
 test its presence in
 the
  context. If it is not there anymore, then the
 session has restarted.
 
  At 08:09 07/12/2003, you wrote:
  Hi All,
  
  How can I detect that session has expired and so
 throw the user out of
  system after showing him a message that Your
 session has expired. Please
  login again.
  
  Thanks,
  BS
  
  
 

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


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 2/12/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 2/12/2003
 


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



Re: Config help

2003-12-07 Thread jeichels
After 2 days of trying to figure it out, it decided to start working.



- Original Message -
From: [EMAIL PROTECTED]
Date: Sunday, December 7, 2003 1:05 am
Subject: Config help

 
 I am using MappingDispatchAction and am attempting to pre-populate 
 a DynaValidatorForm in a setup action. Without validation, the 
 form does show it prepopulated, but upon enterring data, it gets 
 into my submit action.  With Validation it does validate in my 
 submit action and returns errors which I print out.   The data 
 again reaches my submit and past my validate, but fails to show 
 back in the redisplayed form in error.
 
 I have looked through the forums and docs and know it has been 
 covered.  I am seeking an extra eye because I can't seem to figure 
 out what is going wrong.   If you don't mind can you take a quick 
 look.  I have tried many variations and think it is something 
 simple I am doing wrong.
 
 Thank you for any help.  Below are my details.
 
 John
 
 
 
 
 Tools:  Post Struts 1.1, Velocity FormTool (updated to work with 
 post struts 1.1).
 
 
 
 Inside my setup action:
 
// @Test place a piece of data into the form and see if it 
 comes out other side.
DynaValidatorForm form = (DynaValidatorForm)baseForm;
form.set(CtlConstants.FORM_TITLE, Test Title Data);
request.setAttribute(mapping.getName(), form);
return mapping.findForward(editpage);



 Inside my submit action:
 
   DynaValidatorForm form = (DynaValidatorForm)baseForm;
   ActionMessages errors = new ActionMessages();
   errors = form.validate(mapping, request);
   // form values show up here, but not in returned form.
   if (! errors.isEmpty())
{
this.saveErrors(request, errors);
request.setAttribute(mapping.getName(), form);
return new ActionForward(mapping.getInput());
}
 

 Inside my struts-config.xml:
 
action path=/exec/post/wizard/page1/setup

 type=com.jb.controller.services.jobpost.wizard.Step1Action   
 parameter=setupPage
name=/exec/post/wizard/page1/submit/form
validate=false
scope=request
forwardname=editpage
redirect=false
path=/WEB-
 INF/templates/exec/post/wizard/wizardstep1.vm/
 forwardname=failure
redirect=false
path=/action/pub/systemError /



action path=/exec/post/wizard/page1/submit

 type=com.jb.controller.services.post.wizard.Step1Action  
  parameter=submitPage
name=/exec/jobpost/wizard/page1/submit/form
input=/WEB-
 INF/templates/exec/post/wizard/wizardstep1.vm
 validate=falsescope=request
forwardname=thispage
redirect=false
path=/WEB-
 INF/templates/exec/post/wizard/wizardstep1.vm/
 forwardname=nextpage
redirect=false
path=/action/exec/post/wizard/page2/setup/
forwardname=failure
redirect=false
path=/action/pub/systemError /

 
 
 ---
 --
 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: Is it required to restart weblogic everytime after compiling ?? ? Need help Desperately .. :-(

2003-12-07 Thread Nick Faiz
Shakti,

I suggest you visit http://support.bea.com
http://support.bea.com/  and do a search, use google.com, or buy the BEA
WebLogic Server Bible. Perhaps javaranch.com could be helpful here. 

You have all the information you need to get it working, at the
moment, with the links I sent you. This isn't really a Struts orientated
topic so I won't reply to anymore of these posts.


Best of luck,

Nick

 

-Original Message-
From: Shakti [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 6 December 2003 3:51 AM
To: Nick Faiz; Struts Users Mailing List
Subject: Re: Is it required to restart weblogic everytime after compiling ??
? Need help Desperately .. :-(

 

Hi Nick,

Sorry buddy i was busy with other stuff so cudn't reply to ur
mails ... boss i am still facing the same problem .. i checked the logs even
its showing that my new application is being activated .. but stil i can't
see the changes getting reflected .. ?? but once i retstart i can see the
changes .. :-(

My Questions are :

1 ) Is there any sort of cache that Weblogic maintains .. .. becuz of which
new changed are not reflected .. 

2) if u can just mail me ur startweblogic.cmd file .. 

 

thanks buddy ..
Shakti

 

- Original Message - 

From: Nick Faiz mailto:[EMAIL PROTECTED]  

To: 'Shakti' mailto:[EMAIL PROTECTED]  ; Struts Users Mailing
List mailto:[EMAIL PROTECTED]  ; [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  

Sent: Wednesday, December 03, 2003 1:12 PM

Subject: RE: Is it required to restart weblogic everytime after compiling ??
? Need help Desperately .. :-(

 

Shakti,

Ok. Find, in attachment, a log of my starting WebLogic 7.2 up with a
cepts.war file present within my applications directory. A servlet called
ProjectStartUp runs and queries a database, following the directions of my
web.xml:

servlet

servlet-nameprojectStartUp/servlet-name

 
servlet-classau.com.ce.cepts.project.ProjectStartUp/servlet-class

load-on-startup3/load-on-startup

/servlet

Glance at the log, look for bold, and see the statement:

au.com.ce.cepts.project.ProjectStartUp:57: done...: 9 

Then, I go to my source, find the log statement at line 57 of the
ProjectStartUp servlet and change it from:

logger.debug(done...:  + ProjectFacade.getCache().size() +  \n\n\n\n);



to:

logger.debug(it's possible Shakti: :  + ProjectFacade.getCache().size() +
 \n);

Then I recompile and drop my new cepts.war into the applications
directory. WebLogic, which is checking the app. dir each 3 seconds for a new
deployment, notices this and takes the new binary and redeploys it instead
of the old:

03/12/2003 18:35:456 DEBUG ExecuteThread: '11' for queue: 'default'
au.com.ce.cepts.project.P

rojectStartUp:57: it's possible Shakti: : 9



3/12/2003 18:35:37 Info Deployer 149033 activated application
_appsdir_cepts_war on devServ

er

3/12/2003 18:35:37 Info Deployer 149074 Successfully completed
deployment task: Activate ap

plication _appsdir_cepts_war on devServer

3/12/2003 18:35:38 Notice Application Poller 149404 Activate
application _appsdir_cepts_war

 on devServer - Completed

The above can is because I set the server in dev. mode.

What problems are you having? Are you not seeing a new activation
take place when you drop the new .war in?

Nick

P.S. Ignore the error relating to the Action servlet. It doesn't like being
included in a war, under my test configuration, and I've not had time to
work out why yet. shakti_log.doc 

 

-Original Message-
From: Shakti [mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ]
Sent: Wednesday, 3 December 2003 4:39 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: Is it required to restart weblogic everytime after compiling ??
? Need help Desperately .. :-(

Hey Nick,

I read thru all the docs and all the links that u gave me .

i cudn't find anything more that changing the boolean param , while i start

the weblogic i am getting

-Dweblogic.ProductionModeEnabled=false it means it is in development mode

. wht are the other changes that i will have to make so that my java file

changes are reflelected in the application after recompiling , without

restarting the weblogic server .

waiting for ur reply boss ...

Thanks in advance .

shakti

- Original Message -

From: Nick Faiz [EMAIL PROTECTED]

To: 'Struts Users Mailing List' [EMAIL PROTECTED]

Sent: Wednesday, December 03, 2003 4:02 AM

Subject: RE: Is it required to restart weblogic everytime after compiling ??

? Need help Desperately .. :-(

 

 Sure, but that isn't the same as redeploying a war or ear without

 restarting.



 Nick



 -Original Message-

 From: Kalra, Ashwani [mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ]

 Sent: Tuesday, 2 December 2003 6:14 PM

 To: Struts Users Mailing List

 Subject: RE: Is it required to restart weblogic everytime after compiling


how to Remove the cached JSP's?

2003-12-07 Thread Julia Weaver
Hi,

I am using Tile, and getting the error
javax.servlet.ServletException:
org/apache/jsp/Registration_jsp (wrong name:
org/apache/jsp/registration_jsp) 

I found one solution in one web site, said:
Remove the cached JSP's and restart. 

But how to Remove the cached JSP's? please help, thank
you very much.



__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



Re: how to Remove the cached JSP's?

2003-12-07 Thread Martin Gainty
stop tomcat
start tomcat
-Martin
- Original Message - 
From: Julia Weaver [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Sunday, December 07, 2003 4:49 PM
Subject: how to Remove the cached JSP's?


 Hi,
 
 I am using Tile, and getting the error
 javax.servlet.ServletException:
 org/apache/jsp/Registration_jsp (wrong name:
 org/apache/jsp/registration_jsp) 
 
 I found one solution in one web site, said:
 Remove the cached JSP's and restart. 
 
 But how to Remove the cached JSP's? please help, thank
 you very much.
 
 
 
 __
 Do you Yahoo!?
 New Yahoo! Photos - easier uploading and sharing.
 http://photos.yahoo.com/
 
 -
 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]



Calling RequestUtils.message() without pageContext

2003-12-07 Thread Lukas Bradley
Is there any single utility method that returns a message resource just like
the RequestUtils.message() method, without having to use a PageContext
object?  Assume all other Servlet-related objects are available
(HttpServletRequest, Response, etc).

Lukas




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



RE: Stupid Bean tricks

2003-12-07 Thread Joe Hertz
Martin-

Can you point me to the correct docs for how this works? I don't find
anything regarding using maps within beans this way.

Tx

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Martin Cooper
 Sent: Friday, December 05, 2003 3:58 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Stupid Bean tricks
 
 
 Assuming your User object is stored in the request under the 
 key user, the language you want is en (English), and the 
 UserData property you want is message, you would do:
 
   bean:message name=user property=en.message/
 
 --
 Martin Cooper
 
 
 Joe Hertz [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
 oss.local...
  I considered that, but (and I'm an utter newbie so I apologize here)
 
  How would I refer to an element of UserData in a bean:message tag?
 
   -Original Message-
   From: news [mailto:[EMAIL PROTECTED] On Behalf Of Martin Cooper
   Sent: Friday, December 05, 2003 12:32 PM
   To: [EMAIL PROTECTED]
   Subject: Re: Stupid Bean tricks
  
  
   Why not convert your Set into a Map keyed by language / 
 locale? Then
   get(locale) is effectively provided for you.
  
   --
   Martin Cooper
  
  
   Joe Hertz [EMAIL PROTECTED] wrote in message 
   news:[EMAIL PROTECTED]
  oss.local...
   Probably a very basic question, and infinitely dealableI hope.
  
   I have a User object, which itself contains a Set of UserData 
   objects (the UserData is stuff that needs to be 
 multilingual. Each 
   instance has the part of the user's data that would vary when 
   presented in each
 
   language).
  
   So, in my JSP, how do I get to a specific instance of UserData? I 
   can write a getter than could take a locale or even just 
 a language 
   code, but since it's not a numeric, the taglib chokes on 
 it, or at 
   least it appears to
 
 
 
 
  
 -
  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: Stupid Bean tricks

2003-12-07 Thread Martin Gainty
a complete example on how to use this concept is located at
http://www.orionserver.com/tutorials/taglibs/8.html
viel Glueck,
Martin
- Original Message - 
From: Joe Hertz [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Sunday, December 07, 2003 5:58 PM
Subject: RE: Stupid Bean tricks


 Martin-
 
 Can you point me to the correct docs for how this works? I don't find
 anything regarding using maps within beans this way.
 
 Tx
 
  -Original Message-
  From: news [mailto:[EMAIL PROTECTED] On Behalf Of Martin Cooper
  Sent: Friday, December 05, 2003 3:58 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Stupid Bean tricks
  
  
  Assuming your User object is stored in the request under the 
  key user, the language you want is en (English), and the 
  UserData property you want is message, you would do:
  
bean:message name=user property=en.message/
  
  --
  Martin Cooper
  
  
  Joe Hertz [EMAIL PROTECTED] wrote in message 
  news:[EMAIL PROTECTED]
  oss.local...
   I considered that, but (and I'm an utter newbie so I apologize here)
  
   How would I refer to an element of UserData in a bean:message tag?
  
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Martin Cooper
Sent: Friday, December 05, 2003 12:32 PM
To: [EMAIL PROTECTED]
Subject: Re: Stupid Bean tricks
   
   
Why not convert your Set into a Map keyed by language / 
  locale? Then
get(locale) is effectively provided for you.
   
--
Martin Cooper
   
   
Joe Hertz [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
   oss.local...
Probably a very basic question, and infinitely dealableI hope.
   
I have a User object, which itself contains a Set of UserData 
objects (the UserData is stuff that needs to be 
  multilingual. Each 
instance has the part of the user's data that would vary when 
presented in each
  
language).
   
So, in my JSP, how do I get to a specific instance of UserData? I 
can write a getter than could take a locale or even just 
  a language 
code, but since it's not a numeric, the taglib chokes on 
  it, or at 
least it appears to
  
  
  
  
   
  -
   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: how to Remove the cached JSP's?

2003-12-07 Thread shivanjali
What is cached JSP's? Please let me know.
thanks

-Original Message-
From: Julia Weaver [mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 07, 2003 1:49 PM
To: Struts Users Mailing List
Subject: how to Remove the cached JSP's?

Hi,

I am using Tile, and getting the error
javax.servlet.ServletException:
org/apache/jsp/Registration_jsp (wrong name:
org/apache/jsp/registration_jsp) 

I found one solution in one web site, said:
Remove the cached JSP's and restart. 

But how to Remove the cached JSP's? please help, thank
you very much.



__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



Maps within Beans (was Stupid Bean Tricks)

2003-12-07 Thread Joe Hertz
This example relates how to _implement_ things in your own taglibs. It
doesn't mention Maps at all (the part I'm being befuddled by). It's not
even specific to struts.

Actually, all I need is a reference on usage of the struts taglibs
beyond the foo.bar.baz example. I want to see how one can refer to Maps
contained in beans like Martin explained:

bean:message name=user property=en.message/

I have to admit, I found this confusing also because in my User object
(session key as user) there would be a map of UserData objects. The
above example doesn't mention userdata at all, so I'm guessing Martin
meant this:

bean:message name=user property=en.UserData.message/

But in the interest of saving bandwidth, just the reference on how to
get to maps within beans.

 -Original Message-
 From: Martin Gainty [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, December 07, 2003 10:59 PM
 To: Struts Users Mailing List; [EMAIL PROTECTED]
 Subject: Re: Stupid Bean tricks
 
 
 a complete example on how to use this concept is located at 
 http://www.orionserver.com/tutorials/taglibs/8.html
 viel Glueck,
 Martin
 - Original Message - 
 From: Joe Hertz [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Sunday, December 07, 2003 5:58 PM
 Subject: RE: Stupid Bean tricks
 
 
  Martin-
  
  Can you point me to the correct docs for how this works? I 
 don't find 
  anything regarding using maps within beans this way.
  
  Tx
  
   -Original Message-
   From: news [mailto:[EMAIL PROTECTED] On Behalf Of Martin Cooper
   Sent: Friday, December 05, 2003 3:58 PM
   To: [EMAIL PROTECTED]
   Subject: Re: Stupid Bean tricks
   
   
   Assuming your User object is stored in the request under the
   key user, the language you want is en (English), and the 
   UserData property you want is message, you would do:
   
 bean:message name=user property=en.message/
   
   --
   Martin Cooper
   
   
   Joe Hertz [EMAIL PROTECTED] wrote in message
   news:[EMAIL PROTECTED]
   oss.local...
I considered that, but (and I'm an utter newbie so I apologize 
here)
   
How would I refer to an element of UserData in a bean:message 
tag?
   
 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Martin 
 Cooper
 Sent: Friday, December 05, 2003 12:32 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Stupid Bean tricks


 Why not convert your Set into a Map keyed by language /
   locale? Then
 get(locale) is effectively provided for you.

 --
 Martin Cooper


 Joe Hertz [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
oss.local...
 Probably a very basic question, and infinitely dealableI 
 hope.

 I have a User object, which itself contains a Set of UserData
 objects (the UserData is stuff that needs to be 
   multilingual. Each
 instance has the part of the user's data that would vary when
 presented in each
   
 language).

 So, in my JSP, how do I get to a specific instance of 
 UserData? 
 I
 can write a getter than could take a locale or even just 
   a language
 code, but since it's not a numeric, the taglib chokes on
   it, or at
 least it appears to
   
   
   
   

   
 
   -
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]
For additional commands, e-mail: [EMAIL PROTECTED]



Pass A String From Servlet And Write Out Its Value in JSP

2003-12-07 Thread Caroline Jen
My servlet has a String called 'category'.  I want to
pass the String to a JSP.  Therefore, I have the code
shown below in the servlet:

session.setAttribute( c, category );
OR
request.setAttribute( c, category );

And, I do the following in my JSP:

% String keyValue = (String)session.getAttribute( c
); %
OR
% String keyValue = (String)request.getAttribute( c
); %

How do I write out keyValue in my JSP in Struts?


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



RE: how to Remove the cached JSP's?

2003-12-07 Thread Agashivala, Vishal
Remove the .java and .class file for that JSP from
%Tomcat_home%\work\Standalone\localhost\%virtualdirectory%
Although path depends upon the version of tomcat..you wont find exact path
as shown above but try to remove java n class from 'WORK' directory under
your tomcat installation.

Regards,
Vishal Agashivala
Atos Origin India
O: +91-22-5691 3870


-Original Message-
From: shivanjali [mailto:[EMAIL PROTECTED]
Sent: Monday, December 08, 2003 4:45 AM
To: 'Struts Users Mailing List'
Subject: RE: how to Remove the cached JSP's?


What is cached JSP's? Please let me know.
thanks

-Original Message-
From: Julia Weaver [mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 07, 2003 1:49 PM
To: Struts Users Mailing List
Subject: how to Remove the cached JSP's?

Hi,

I am using Tile, and getting the error
javax.servlet.ServletException:
org/apache/jsp/Registration_jsp (wrong name:
org/apache/jsp/registration_jsp) 

I found one solution in one web site, said:
Remove the cached JSP's and restart. 

But how to Remove the cached JSP's? please help, thank
you very much.



__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



Please Help! Unable to Pass A Hidden Field To scaffold.ProcessAction

2003-12-07 Thread Caroline Jen
I want to pass two hidden fields; username and keyName
from a JSP via a SUBMIT button:

req:isUserInRole role=editor
html:form action=/find/Category
% String username = request.getRemoteUser();%
html:hidden property=keyName
value=journal_category/
html:hidden property=username
value=%=username%/
html:submitView Articles/html:submit
/html:form
/req:isUserInRole

and an action mapping:

action
roles=editor
path=/find/Category
   
type=org.apache.struts.scaffold.ProcessAction
   
parameter=org.apache.artimus.article.FindEditorData
name=articleForm
scope=request
validate=false
   forward
name=success
path=.article.Result/
/action

How come the username is not passed to the
FindEditorData.java while the keyName is successfully
passed.  In the browser, I got:

name=null; kn=journal_category; kv=null 

The code of my FindEditorData is shown below:

public final class FindEditorData extends Bean
{
   public Object execute() throws Exception
   {

   // Obtain username 
   String username = getUsername();
  
   EditorService service = new EditorService();
   String value = service.findEditorData( username );

   String property = getKeyName();

if (( null==property ) || ( null==value )) 
{
StringBuffer sb = new StringBuffer();
sb.append( name= );
sb.append( username );
sb.append( ; kn= );
sb.append( property );
sb.append( ; kv= );
sb.append( value );
throw new ParameterException(
sb.toString() );
}

ResultList list = new ResultListBase
(

Access.findByProperty( this,property,value
)

);
list.setLegend( property,value );

return new ProcessResultBase( list );

   } // end execute

} // End FindEditorData



__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



Re: Please Help! Unable to Pass A Hidden Field To scaffold.ProcessAction

2003-12-07 Thread Richard Yee
Are you using the input type=hidden  or html:hidden attributes? I 
didn't see it in your email.
If you do, the values will be available in the request.

Regards,

Richard

At 08:20 PM 12/7/2003, you wrote:
I want to pass two hidden fields; username and keyName
from a JSP via a SUBMIT button:
req:isUserInRole role=editor
% String username = request.getRemoteUser();% value=journal_category/ 
value=%=username%/ View Articles and an action mapping: How come the 
username is not passed to the FindEditorData.java while the keyName is 
successfully passed. In the browser, I got: name=null; 
kn=journal_category; kv=null The code of my FindEditorData is shown below: 
public final class FindEditorData extends Bean { public Object execute() 
throws Exception { // Obtain username String username = getUsername(); 
EditorService service = new EditorService(); String value = 
service.findEditorData( username ); String property = getKeyName(); if (( 
null==property ) || ( null==value )) { StringBuffer sb = new 
StringBuffer(); sb.append( name= ); sb.append( username ); sb.append( ; 
kn= ); sb.append( property ); sb.append( ; kv= ); sb.append( value ); 
throw new ParameterException( sb.toString() ); } ResultList list = new 
ResultListBase ( Access.findByProperty( this,property,value ) ); 
list.setLegend( property,value ); return new ProcessResultBase( list ); } 
// end execute } // End FindEditorData __ 
Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. 
http://photos.yahoo.com/ 
- 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: Please Help! Unable to Pass A Hidden Field To scaffold.ProcessAction

2003-12-07 Thread Caroline Jen
My code was shown in my original message.  I used two 
html:hidden ...  tags to pass two hidden fields, one
is successfully passed while the other shows null.  By
the way, I do not use 'request' to retrieve the value
of the hidden field because my Java class is a
scaffold.ProcessAction type.  I simply use getXxx.

Let me show my code again:
req:isUserInRole role=editor
html:form action=/find/Category
% String username = request.getRemoteUser();%
html:hidden property=keyName
value=journal_category/
html:hidden property=username
value=%=username%/
html:submitView Articles/html:submit
/html:form
/req:isUserInRole

--- Richard Yee [EMAIL PROTECTED] wrote:
 Are you using the input type=hidden  or
 html:hidden attributes? I 
 didn't see it in your email.
 If you do, the values will be available in the
 request.
 
 Regards,
 
 Richard
 
 At 08:20 PM 12/7/2003, you wrote:
 I want to pass two hidden fields; username and
 keyName
 from a JSP via a SUBMIT button:
 
 req:isUserInRole role=editor
 % String username = request.getRemoteUser();%
 value=journal_category/ 
 value=%=username%/ View Articles and an action
 mapping: How come the 
 username is not passed to the FindEditorData.java
 while the keyName is 
 successfully passed. In the browser, I got:
 name=null; 
 kn=journal_category; kv=null The code of my
 FindEditorData is shown below: 
 public final class FindEditorData extends Bean {
 public Object execute() 
 throws Exception { // Obtain username String
 username = getUsername(); 
 EditorService service = new EditorService(); String
 value = 
 service.findEditorData( username ); String property
 = getKeyName(); if (( 
 null==property ) || ( null==value )) { StringBuffer
 sb = new 
 StringBuffer(); sb.append( name= ); sb.append(
 username ); sb.append( ; 
 kn= ); sb.append( property ); sb.append( ; kv=
 ); sb.append( value ); 
 throw new ParameterException( sb.toString() ); }
 ResultList list = new 
 ResultListBase ( Access.findByProperty(
 this,property,value ) ); 
 list.setLegend( property,value ); return new
 ProcessResultBase( list ); } 
 // end execute } // End FindEditorData
 __ 
 Do you Yahoo!? New Yahoo! Photos - easier uploading
 and sharing. 
 http://photos.yahoo.com/ 

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


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



[OT] Exception handling in a J2EE project.

2003-12-07 Thread Prasenjit Narwade
Hi All,
  What is the best Hierarcy (framework) for handling exceptions in a
J2EE project.

  I am thinking of some roughly the following Hierarcy consisting
broadly of three categories :   



  +  MyApplicationException extends Exception  ( For handling bussiness
exceptions.)
 - InsufficientBalanceException
 - InvalidPasswordException
 - etc.

  +  MySystemException extends RuntimeException (Non bussiness
exception, exception due to System problems)


  +  MyEJBException extends EJBException  (Not too sure if this is
required)



My question is :

1.  Is this approach correct ?

2.  My application flow consists of  
ActionClass calls BussinessDelegate calls SessionBean calls
DAO  and
ActionClass calls BussinessDelegate calls SessionBean calls
EntityBeans 

How should the exception for take place. Should it be something
like this:

DAO throws some ApplicationException ... 
caught by SessionBean thrown as some EJBException .. 
caught by BussinessDelegate and do some handling



Regards,
Prasenjit.

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



linefeeds in a resource properties file

2003-12-07 Thread Harod Ruthgar
Hello,

How to add linefeeds to a property file within struts?

This thread
(http://forum.java.sun.com/thread.jsp?forum=31thread=400653)
says that we can add \n to a String.

However, if I put \n to a resource property line
e.g.
my.key = my value 1 \n my value 2

and then I use html:textarea tag to display the
value
e.g.
c:set var=emailBodyValue
  bean:message bundle=ParticipantMsgKey
key=participant.create.step3.defaultEmailBody/
/c:sethtml-el:textarea
property=parameterBuffer.emailBody cols=60
rows=10 value=${emailBodyValue}/

It will display \n instead of line feed.

I notice that html:textarea converts a single
quotation mark ' into #39;
Now, the codes for line feed or new line are #10; and
#13;, but if I put #10; into the properties file, it
will be converted into amp;#10;.

I have tried this by
- having #10; in the properties file
- passing #10; as an argument to bean:message
Both still convert #10; into amp;#10;

I have also tried using empty line with backslash
character in the properties file
e.g.
my.key = my value 1\
 \
 my value 2
It doesn't work as well.


Any solution to this?


Regards,
Harod Ruthgar

http://personals.yahoo.com.au - Yahoo! Personals
New people, new possibilities. FREE for a limited time.

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



RE: [OT] Exception handling in a J2EE project.

2003-12-07 Thread Nick Faiz
Good question, I'm thinking about the same sort of thing myself.

I usually find it easier to give each server side component its own
exception, and to throw all exceptions up to the client side with an
appropriate message or error code. Obviously, exceptions fatal to the system
have to be sent to an administrator - usually through an appropriate log
comment or email.

If you try to put in too many layers between your exceptions and client view
it can be murder, down the line, when bug tracking and extending the
application.

Perhaps having a common exception class, from which all component exceptions
extend, is a nice idea, but I think it invites needless complexity.

Nick Faiz

-Original Message-
From: Prasenjit Narwade [mailto:[EMAIL PROTECTED] 
Sent: Monday, 8 December 2003 4:31 PM
To: Struts Users Mailing List (E-mail)
Subject: [OT] Exception handling in a J2EE project.

Hi All,
  What is the best Hierarcy (framework) for handling exceptions in a
J2EE project.

  I am thinking of some roughly the following Hierarcy consisting
broadly of three categories :   



  +  MyApplicationException extends Exception  ( For handling bussiness
exceptions.)
 - InsufficientBalanceException
 - InvalidPasswordException
 - etc.

  +  MySystemException extends RuntimeException (Non bussiness
exception, exception due to System problems)


  +  MyEJBException extends EJBException  (Not too sure if this is
required)



My question is :

1.  Is this approach correct ?

2.  My application flow consists of  
ActionClass calls BussinessDelegate calls SessionBean calls
DAO  and
ActionClass calls BussinessDelegate calls SessionBean calls
EntityBeans 

How should the exception for take place. Should it be something
like this:

DAO throws some ApplicationException ... 
caught by SessionBean thrown as some EJBException .. 
caught by BussinessDelegate and do some handling



Regards,
Prasenjit.

-
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: [OT] Exception handling in a J2EE project.

2003-12-07 Thread Andrew Hill
Make use of nested exceptions.
Higher layers 'wrap' exceptions caught from lower layers if they cant handle
them.

ummm... Ted explains it better than I do:
http://husted.com/struts/tips/015.html




-Original Message-
From: Nick Faiz [mailto:[EMAIL PROTECTED]
Sent: Monday, 8 December 2003 14:01
To: 'Struts Users Mailing List'
Subject: RE: [OT] Exception handling in a J2EE project.


Good question, I'm thinking about the same sort of thing myself.

I usually find it easier to give each server side component its own
exception, and to throw all exceptions up to the client side with an
appropriate message or error code. Obviously, exceptions fatal to the system
have to be sent to an administrator - usually through an appropriate log
comment or email.

If you try to put in too many layers between your exceptions and client view
it can be murder, down the line, when bug tracking and extending the
application.

Perhaps having a common exception class, from which all component exceptions
extend, is a nice idea, but I think it invites needless complexity.

Nick Faiz

-Original Message-
From: Prasenjit Narwade [mailto:[EMAIL PROTECTED]
Sent: Monday, 8 December 2003 4:31 PM
To: Struts Users Mailing List (E-mail)
Subject: [OT] Exception handling in a J2EE project.

Hi All,
  What is the best Hierarcy (framework) for handling exceptions in a
J2EE project.

  I am thinking of some roughly the following Hierarcy consisting
broadly of three categories :



  +  MyApplicationException extends Exception  ( For handling bussiness
exceptions.)
 - InsufficientBalanceException
 - InvalidPasswordException
 - etc.

  +  MySystemException extends RuntimeException (Non bussiness
exception, exception due to System problems)


  +  MyEJBException extends EJBException  (Not too sure if this is
required)



My question is :

1.  Is this approach correct ?

2.  My application flow consists of
ActionClass calls BussinessDelegate calls SessionBean calls
DAO  and
ActionClass calls BussinessDelegate calls SessionBean calls
EntityBeans

How should the exception for take place. Should it be something
like this:

DAO throws some ApplicationException ...
caught by SessionBean thrown as some EJBException ..
caught by BussinessDelegate and do some handling



Regards,
Prasenjit.

-
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: Having trouble with html:form tag - Using 1.1

2003-12-07 Thread Oliver Wulff




Hi Jim

Remove your second servlet mapping in your web.xml. I had the same problem.
I've defined two mappings:
servlet-mapping
  servlet-nameaction/servlet-name
  url-pattern*.do/url-pattern
/servlet-mapping

servlet-mapping
  servlet-nameaction/servlet-name
  url-pattern/home/url-pattern
/servlet-mapping

As soon as I have removed the second mapping the form action is correct and
not the webapp context anymore.

Very strange!!!

Cheers
Oliver






*** BITTE BEACHTEN ***
Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet
möglicherweise vertrauliche oder gesetzlich geschützte Daten oder
Informationen. Zum Empfang derselben ist (sind) ausschliesslich die
genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht
irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter
Ausschluss jeder Reproduktion zu zerstören und die absendende Person
umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe.


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



about using DynaActionForm in SQL Maps framework with Struts...

2003-12-07 Thread Ricky
hi, there, 
has anybody tried to use SQL Maps framework with struts? i am now using
the struts with SQL Maps framework, all is convenient. i have tried to use
ActionForm instead of create a new javaBean passed to SQL Map parameter.
just like this:

AuthorForm authorForm = (AuthorForm) form;

try {
  baseDAO.insertAuthor(authorForm);
} catch(Exception ex) {
  ex.printStackTrace();
}

now, i have a query about using DynaActionForm in it...
assume that i am using DynaActionForm and config in struts-config.xml,
What should i do to pass the dynaformBean to SQL Map parameter?
some code like these, but it threw some exception...

DynaActionForm authorForm = (DynaActionForm) form;
try {
  baseDAO.insertAuthor(authorForm);
} catch(Exception ex) {
  ex.printStackTrace();
}

and in my BaseDAO.java :

  public void insertAuthor(DynaActionForm author) throws DaoException {
try {
  javaDIYDaoManager.startTransaction();

  authorDao.insertAuthor(author);

  javaDIYDaoManager.commitTransaction();
}
catch (DaoException e) {
  try {
javaDIYDaoManager.rollbackTransaction();
  }
  catch (Exception e2) { /* ignore */}
  throw ( (DaoException) e.fillInStackTrace());
}
  }

it threw some exception:

Error executing 'insertAuthor' in 'com/dao/sql/Author.xml'.
 
Check the Parameter Map (or inline parameters).  Check the 'author_name' property. 

Cause: com.ibatis.common.beans.BeansException: There is no READABLE property named

'author_name' in class 'org.apache.struts.action.DynaActionForm'

com.ibatis.common.beans.BeansException: There is no READABLE property named 
'author_name'

in class 'org.apache.struts.action.DynaActionForm'






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



Re: about using DynaActionForm in SQL Maps framework with Struts...

2003-12-07 Thread Richard Yee
Ricky,
You might have a problem using ibatis SQL Maps with Struts DynaForms. I 
think that Ibatis is going to try and look for a method called 
getAuthor_name() when it would need to use 
DynaForm.get(author_name).  You might try emailing 
[EMAIL PROTECTED] to get a definitive answer.

-Richard

At 10:44 PM 12/7/2003, you wrote:
hi, there,
has anybody tried to use SQL Maps framework with struts? i am now 
using
the struts with SQL Maps framework, all is convenient. i have tried to use
ActionForm instead of create a new javaBean passed to SQL Map parameter.
just like this:

AuthorForm authorForm = (AuthorForm) form;

try {
  baseDAO.insertAuthor(authorForm);
} catch(Exception ex) {
  ex.printStackTrace();
}
now, i have a query about using DynaActionForm in it...
assume that i am using DynaActionForm and config in struts-config.xml,
What should i do to pass the dynaformBean to SQL Map parameter?
some code like these, but it threw some exception...
DynaActionForm authorForm = (DynaActionForm) form;
try {
  baseDAO.insertAuthor(authorForm);
} catch(Exception ex) {
  ex.printStackTrace();
}
and in my BaseDAO.java :

  public void insertAuthor(DynaActionForm author) throws DaoException {
try {
  javaDIYDaoManager.startTransaction();
  authorDao.insertAuthor(author);

  javaDIYDaoManager.commitTransaction();
}
catch (DaoException e) {
  try {
javaDIYDaoManager.rollbackTransaction();
  }
  catch (Exception e2) { /* ignore */}
  throw ( (DaoException) e.fillInStackTrace());
}
  }
it threw some exception:

Error executing 'insertAuthor' in 'com/dao/sql/Author.xml'.

Check the Parameter Map (or inline parameters).  Check the 'author_name' 
property.

Cause: com.ibatis.common.beans.BeansException: There is no READABLE 
property named

'author_name' in class 'org.apache.struts.action.DynaActionForm'

com.ibatis.common.beans.BeansException: There is no READABLE property 
named 'author_name'

in class 'org.apache.struts.action.DynaActionForm'





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