Re: html:button validation problem

2005-07-20 Thread EROL TEZCAN
Definitely true.
 
When I  changed my code to "return 
validateCagriAcmaFormu(window.document.cagriAcmaFormu)" instead of "return 
validateCagriAcmaFormu(this)" it works fine.
 
Thank you Amitava.
 
Erol
 


[EMAIL PROTECTED] wrote:

Erol,

The problem is not with html:button but with 'this'. 'this' refers to the 
object from which the function is called. So in your first case 'this' 
refers to the form object whereas in the second case it refers to the 
button object.


Amitava Basak
ASE(T)
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com



EROL TEZCAN 
07/20/2005 05:19 PM
Please respond to
"Struts Users Mailing List" 


To
sturts_apache_user sturts_apache_user 
cc

Subject
html:button validation problem






Hi all,

In my JSP page, I defined a html:form like this.

onsubmit="return validateCagriAcmaFormu(this)" >

...



It works fine and does client-side validation truly.

But when I used to html:button instead of html:submit, it gives an error.



...
onclick="return validateCagriAcmaFormu(this)" />


Using a html:button tag, how can I do validation with "return validate" or 
whatelse?


Erol

__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
ForwardSourceID:NT618A 


Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information. If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited. If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments. Thank you
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Graphs in Struts

2005-07-20 Thread Manuel Cañón López
Have you think about using svg?
There are a few libraries over there for stadistical graphs

Don't forget to have a look at http://xml.apache.org/batik/

Manuel

El jue, 21-07-2005 a las 11:22 +0530, Rajesh escribió:
> hi i am generating reports in a struts based applicationnow i want 
> to show data graphically also using pie-charts and bars hoe to go for it
> 
> Rajesh
> 
> -
> 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: Need help in declaring resource file

2005-07-20 Thread Swapnil Patil
Hi Amol,

resource file is under the hierachy as shown(I am
using Tomcat server) 
\webapps\register\WEB-INF\classes\resources\MessageResource.properties
register is context. 

Still i am getting an exception

version of struts is struts_1_0_2.

--- Amol Yadwadkar <[EMAIL PROTECTED]> wrote:

> 
> 
> 
> Hi Swapnil,
> Is ur " resources " folder is under classes
> Directory ?
> If not Pls try putting it.
> Also pls let me know which version of Struts are u
> using ? Is it 1.2 ??
> Thankx
> Best regds,
> Amol
> 
> 
>  
> 
> -Original Message-
> From: Swapnil Patil
> [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 21, 2005 11:33 AM
> To: Struts Users Mailing List
> Subject: Need help in declaring resource file
> 
> Hi,
> I am trying a sample struts application. My 
> struts-config.xml is like this-
> 
> 
>type="app.LogonForm"/> 
>   
>path="/pages/logon.jsp"/>
>   
> 
>  type="app.LogonAction"
>   name="logonForm"
>   scope="request"
>   validate="true"
>   input="/pages/logon.jsp">
> 
>path="/pages/welcome.jsp"/>   
>   
>   
> 
>   
>  parameter="resources.MessageResources" />
> 
> 
> 
> 
> I am getting exception on server like
> Parse Error at line 54 column 65: Element type
> "message-resources" must be declared.
> org.xml.sax.SAXParseException: Element type
> "message-resources" must be declared.
> at
>
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Error
> HandlerWrapper.java:232)
> at
>
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.jav
> a:173)
> 
> 
> Parse Error at line 59 column 17: The content of
> element type "struts-config" must match
>
"(data-sources?,form-beans?,global-forwards?,action-mappings?)".
> org.xml.sax.SAXParseException: The content of
> element
> type "struts-config" must match
>
"(data-sources?,form-beans?,global-forwards?,action-mappings?)".
> at
>
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Error
> HandlerWrapper.java:232)
> at
>
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.jav
> a:173)
> at
>
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.jav
> a:371)
> 
> 
> 
> Can anybody help me about it.
> 
> 
>   
> 
> Start your day with Yahoo! - make it your home page 
> http://www.yahoo.com/r/hs 
>  
> 
>
-
> 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]
> 
> 





Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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



RE: Need help in declaring resource file

2005-07-20 Thread Amol Yadwadkar



Hi Swapnil,
Is ur " resources " folder is under classes Directory ?
If not Pls try putting it.
Also pls let me know which version of Struts are u using ? Is it 1.2 ??
Thankx
Best regds,
Amol


 

-Original Message-
From: Swapnil Patil [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 21, 2005 11:33 AM
To: Struts Users Mailing List
Subject: Need help in declaring resource file

Hi,
I am trying a sample struts application. My 
struts-config.xml is like this-


   
  
  
  

  

 
  
  

  





I am getting exception on server like
Parse Error at line 54 column 65: Element type
"message-resources" must be declared.
org.xml.sax.SAXParseException: Element type
"message-resources" must be declared.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Error
HandlerWrapper.java:232)
at
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.jav
a:173)


Parse Error at line 59 column 17: The content of
element type "struts-config" must match
"(data-sources?,form-beans?,global-forwards?,action-mappings?)".
org.xml.sax.SAXParseException: The content of element
type "struts-config" must match
"(data-sources?,form-beans?,global-forwards?,action-mappings?)".
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Error
HandlerWrapper.java:232)
at
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.jav
a:173)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.jav
a:371)



Can anybody help me about it.




Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

-
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: Hi-New to this group

2005-07-20 Thread Craig McClanahan
On 7/20/05, Nitish Kumar <[EMAIL PROTECTED]> wrote:
> 
> 
> Personally, I am not a big follower of EJB and I echo the sentiments that
> EJBs are a performance killers. My own experience with Entity Beans has not
> been pretty good.

That is not an uncommon experience (although I hope you understand
that your experience is not universal :-).

> So until you have some very strong reasons to go for EJB, dont!

That is a *ridiculously* simplistic distillation of your real life experience.

You talked about having problems with entity EJBs, not session EJBs. 
Two different animals.

You (presumably) are talking about entity beans in a EJB 1.x or 2.x
world.  Have you tried entity beans in a 3..x world?  Have you used
session EJBs (of any generation) at all?

Whenever I see absolutist statements like this one, I am reminded of
an aphorism I learned when I was in high school, but has applied
pretty much universally in the decades since then:

"All generalizations are false ... including this one."

:-)

Craig McClanahan

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



Need help in declaring resource file

2005-07-20 Thread Swapnil Patil
Hi,
I am trying a sample struts application. My 
struts-config.xml is like this-


   
  
  
  

  

 
  
  

  





I am getting exception on server like
Parse Error at line 54 column 65: Element type
"message-resources" must be declared.
org.xml.sax.SAXParseException: Element type
"message-resources" must be declared.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:232)
at
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:173)


Parse Error at line 59 column 17: The content of
element type "struts-config" must match
"(data-sources?,form-beans?,global-forwards?,action-mappings?)".
org.xml.sax.SAXParseException: The content of element
type "struts-config" must match
"(data-sources?,form-beans?,global-forwards?,action-mappings?)".
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:232)
at
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:173)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:371)



Can anybody help me about it.




Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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



Graphs in Struts

2005-07-20 Thread Rajesh
hi i am generating reports in a struts based applicationnow i want 
to show data graphically also using pie-charts and bars hoe to go for it


Rajesh

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



c:if and dyna form bean

2005-07-20 Thread Kent Boogaart
Hi people,

I have a simple question for you. I'm trying to use a dynaform bean from
within a 


...


I'm getting an exception telling me "Unable to find a value for
'displayName' in object of class ...". I understand this is to do with how
dynaforms work. There is indeed no method called getDisplayName() on my form
bean but there definitely is a form-property called "displayName". So how
would I go about using this form-property of the dynaform from a c:if?

Thanks,
Kent


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



Re: Hi-New to this group

2005-07-20 Thread Swapnil Patil
Hi Maya,
  I had tried the Hibernate whith web-application.
http://www.hibernate.org/hib_docs/reference/en/html/quickstart.html
This link is very useful to start Hibernate in any
Web-Application. Also the book Hibernate In Action is
good book. Two chapter of this book are freely
available for download.The link is
http://www.manning.com/books/bauer/chapters.
 I have the code for the sample aplication
mentioned in the link(quickstart). If you need I can
send it to u. Or you may get it from internate also.

Regards,
Swapnil 

--- Maya menon <[EMAIL PROTECTED]> wrote:

> If any one has any sample implementations using
> ibatis / hibernate, please send them to me. It would
> be really helpful
> 
> Rick Reumann <[EMAIL PROTECTED]>
> wrote:[EMAIL PROTECTED] wrote the following
> on 7/20/2005 3:44 PM:
> 
> > Another camp would tell you to just use something
> like a business
> > delegate + iBatis or Hibernate. I cannot comment
> as I have not used
> > that approach. Personally, I like to write all my
> own SQL (along with
> > everything else you can write).
> 
> That's the benefit of iBATIS.. you write your own
> SQL. Nice and easy - 
> You write your SQL, it builds your objects and
> collections from your own 
> SQL and hides all the JDBC and code used to build
> objects from result sets.
> 
> -- 
> Rick
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 





Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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



RE: Hi-New to this group

2005-07-20 Thread Nitish Kumar


Personally, I am not a big follower of EJB and I echo the sentiments that
EJBs are a performance killers. My own experience with Entity Beans has not
been pretty good. 

So until you have some very strong reasons to go for EJB, dont! 

In my limited knowledge , Spring with Hibernate or Ibatis, is a good
substitute for EJB, if you want EJB features, without paying for the expense
of remote look up, or you can use EJB with local interfaces (I believe that
using local instead of remote removes a big performance overhead). 



Thanks and Regards, 
Nitish Kumar 




-Original Message-
From: Michael Rasmussen [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 21, 2005 2:50 AM
To: Maya menon; Struts Users Mailing List
Subject: Re: Hi-New to this group


Maya,
  See inline

On 7/20/05, Maya menon <[EMAIL PROTECTED]> wrote:
> Michael, 
>   
> Yes: in our web app, in the jsp, there will be a button/checkbox which the
> users can click to let the system know about the status of their work.
Now,
> when they click it, it can directly update the database. [rather than
that,
> i dont know..] 
>   
> I was not thinking about using entity beans at all. I was thinking about
> using session beans as facade and all database activities being performed
> inside DAOs [select,update etc] 

That is probably wise.  Hibernate (http://hibernate.org) which was
mentioned earlier is a good mix of POJO and persistence framework, but
for 500 users you are probably small enough that DAO/JDBC will be
fine.  Especially if you don't need any transactional support.

>   
> You talked about command pattern. where will a command patterm come when
> used with struts ? sorry, i dont know hence i asked. 
>   

For an explanation of the command pattern see the GOF Command Pattern or
here
http://www.dofactory.com/Patterns/PatternCommand.aspx, (first result in
Google)

Basically your action would delegate to the command and pass it a
context (Populated by your form data).  All the commands implement the
command interface (with the execute(Context) method).  The command
could then delegate to other worker commands that do database work or
send emails or other generic tasks.  Then the action works like all
actions do and takes what is in the context and puts it in the right
scope and forwards on to the JSP.  The commands can be broken up
(similar to session beans) to do small units of work.  If you use a
factory to get your commands the factory can be configured to return
different instances of the command based on user roles and so on.



> Struts action classes -> ? -> ? - DAO. 
>   
Struts action classes -> command -> command - DAO. 

Michael


> Thanks
> 
> Michael Rasmussen <[EMAIL PROTECTED]> wrote: 
> Maya,
> You mentioned that you are providing access to things in the users
> database. Are you giving them write access? If not there is little
> reason to use Entity Beans (read None) in your application. If you
> don't need your application to be distributed, and I didn't see it in
> your requirements, then session beans may be overkill too. I would
> look to what others have said here and evaluate hibernate or naked
> JDBC before choosing entity beans as your backend and session beans as
> your business facade. (though I wouldn't write off session beans
> entirely). Using something like a command pattern could work nicely
> as a business facade. I am working right now with an application that
> uses a command pattern for the business layer and I am quite fond of
> it. You could also have a look at the Commons-Chain project for a
> nice implementation of a pattern that is quickly becoming one of my
> favorites.
> http://jakarta.apache.org/commons/chain And beginning with
> struts 1.3
> it will be a first class citizen of Struts.
> 
> Michael
>

-
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: Polymorphism

2005-07-20 Thread netsql

... ah... Formbeans extend ... and so do actions ...
Then it pick the user implementations and executes.

.V

syed abrar wrote:
  
Hello All

 This question might look some what stupid,but it is important for 
me..How is Polymorphism implemented in struts
 If any of you guys knows the answer please send it to me

Regards 
Syed Abrar
 




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



Re: html:button validation problem

2005-07-20 Thread amitava . basak

Erol,

The problem is not with html:button but with 'this'. 'this' refers to the 
object from which the function is called. So in your first case 'this' 
refers to the form object whereas in the second case it refers to the 
button object.


Amitava Basak
ASE(T)
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com



EROL TEZCAN <[EMAIL PROTECTED]> 
07/20/2005 05:19 PM
Please respond to
"Struts Users Mailing List" 


To
sturts_apache_user sturts_apache_user 
cc

Subject
html:button validation problem






Hi all,
 
In my JSP page, I defined a html:form like this.
 

 
...

 
 
It works fine and does client-side validation truly.
 
But when I used to html:button instead of  html:submit, it gives an error.
 

 
...

 
 
Using a html:button tag, how can I do validation with "return validate" or 
whatelse?
 
 
Erol

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
ForwardSourceID:NT618A 


Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Polymorphism

2005-07-20 Thread syed abrar
  
Hello All
 This question might look some what stupid,but it is important for 
me..How is Polymorphism implemented in struts
 If any of you guys knows the answer please send it to me

Regards 
Syed Abrar
 


Re: Upload problem with apache and SSL

2005-07-20 Thread ichy
sorry, too many zeros to be 100K.

2005/7/21, ichy <[EMAIL PROTECTED]>: 
> 
> Hi, Zsolt.
>  if the error page is of apache, there might be a config setting in 
> httpd.conf
> to limit request size like
>  LimitRequestBody 1024
>  in the case above, request larger than 100KB is prohibited.
>  when you repeat the upload and each time you upload the same file
> and other request parameters, this shouldn't be the case.
>  regards
> ichy
>


Re: Upload problem with apache and SSL

2005-07-20 Thread ichy
Hi, Zsolt.
 if the error page is of apache, there might be a config setting in 
httpd.conf
to limit request size like
 LimitRequestBody 1024
 in the case above, request larger than 100KB is prohibited.
 when you repeat the upload and each time you upload the same file
and other request parameters, this shouldn't be the case.
 regards
ichy


Re: Validation Help

2005-07-20 Thread Glen Mazza

http://www.objectsource.com/Struts_Survival_Guide.pdf, Chapter 5.

Paul Goepfert wrote:
I have created a web app using struts and velocity.  I am going to add 
vaildation on the struts end of the app.  I am still learning struts.  
The only thing I have been able to do is use struts to move between 
pages by way of buttons.Now I want to add validation to my web app.  
I have  no  idea how to do it.


If anyone can help me out that would be great.

-Paul

-
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: Creating a valid web.xml version 2.4

2005-07-20 Thread Wendy Smoak
From: "Frasso, Anthony" <[EMAIL PROTECTED]>

> <% String test = "This is a test String."; %>
> 
> ${test}
> 
> This should print out "This is a test String" twice, correct?  

No.  Scripting variables and tags do not mix.

> Do I have to place the String in the request?

Yes.  (Did you try it?)  Any scope will work...
<% request.setAttribute( "test", "This is a test String"); %>

-- 
Wendy Smoak


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



RE: Creating a valid web.xml version 2.4

2005-07-20 Thread Frasso, Anthony
> Frasso, Anthony wrote:
> 
> >So then I can completely remove the  tag from my 
> web.xml file, making it look like the following?
> >
> >
> >
> >http://java.sun.com/xml/ns/j2ee";;
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";;
> > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> >   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";;
> > version="2.4">
> >
> >  
> >[...]
> >  
> >
> >  
> >[...]
> >  
> >
> >  
> >[...]
> >  
> >
> >
> >  
> >
> Oh, so THAT'S what a web.xml without a taglib block looks like.
> 
> >There's nothing else I have to configure to use JSTL?
> >  
> >
> Like he said, as long as you have a proper taglib directive 
> in the JSP 
> and the libraries available you should be fine.
> 
> (Wouldn't it have been quicker to just take out the taglib 
> directive and 
> see if it worked?!)
> 
> Dave

Unfortunately, I still haven't been able to get cooking on this project, as it 
still seems to be not working.  I had wanted to verify that I understood what I 
had read.  In any case, can anyone tell me what is wrong with the following JSP?

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>




Test Page




<% String test = "This is a test String."; %>


${test}





This should print out "This is a test String" twice, correct?  Do I have to 
place the String in the request?

Regards,
Anthony Frasso

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



RE: TextArea

2005-07-20 Thread Folashade Adeyosoye
Here is a solution, JavaScript by the way...












Shardayyy



-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 20, 2005 10:56 AM
To: Struts Users Mailing List
Subject: Re: TextArea

Yep, not an option in HTML, gotta javascript it, or catch it on the server.

Larry


On 7/20/05, Mark Benussi <[EMAIL PROTECTED]> wrote:
> Sadly, JavaScript I am afraid.
> 
> -Original Message-
> From: Vijay K Anand [mailto:[EMAIL PROTECTED]
> 
> How to control char maxlength in  ?
>

-
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: Hi-New to this group

2005-07-20 Thread Michael Rasmussen
Maya,
  See inline

On 7/20/05, Maya menon <[EMAIL PROTECTED]> wrote:
> Michael, 
>   
> Yes: in our web app, in the jsp, there will be a button/checkbox which the
> users can click to let the system know about the status of their work. Now,
> when they click it, it can directly update the database. [rather than that,
> i dont know..] 
>   
> I was not thinking about using entity beans at all. I was thinking about
> using session beans as facade and all database activities being performed
> inside DAOs [select,update etc] 

That is probably wise.  Hibernate (http://hibernate.org) which was
mentioned earlier is a good mix of POJO and persistence framework, but
for 500 users you are probably small enough that DAO/JDBC will be
fine.  Especially if you don't need any transactional support.

>   
> You talked about command pattern. where will a command patterm come when
> used with struts ? sorry, i dont know hence i asked. 
>   

For an explanation of the command pattern see the GOF Command Pattern or here
http://www.dofactory.com/Patterns/PatternCommand.aspx, (first result in Google)

Basically your action would delegate to the command and pass it a
context (Populated by your form data).  All the commands implement the
command interface (with the execute(Context) method).  The command
could then delegate to other worker commands that do database work or
send emails or other generic tasks.  Then the action works like all
actions do and takes what is in the context and puts it in the right
scope and forwards on to the JSP.  The commands can be broken up
(similar to session beans) to do small units of work.  If you use a
factory to get your commands the factory can be configured to return
different instances of the command based on user roles and so on.



> Struts action classes -> ? -> ? - DAO. 
>   
Struts action classes -> command -> command - DAO. 

Michael


> Thanks
> 
> Michael Rasmussen <[EMAIL PROTECTED]> wrote: 
> Maya,
> You mentioned that you are providing access to things in the users
> database. Are you giving them write access? If not there is little
> reason to use Entity Beans (read None) in your application. If you
> don't need your application to be distributed, and I didn't see it in
> your requirements, then session beans may be overkill too. I would
> look to what others have said here and evaluate hibernate or naked
> JDBC before choosing entity beans as your backend and session beans as
> your business facade. (though I wouldn't write off session beans
> entirely). Using something like a command pattern could work nicely
> as a business facade. I am working right now with an application that
> uses a command pattern for the business layer and I am quite fond of
> it. You could also have a look at the Commons-Chain project for a
> nice implementation of a pattern that is quickly becoming one of my
> favorites.
> http://jakarta.apache.org/commons/chain And beginning with
> struts 1.3
> it will be a first class citizen of Struts.
> 
> Michael
>

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



Re: Hi-New to this group

2005-07-20 Thread netsql

Rick's home page has one.
.V


Maya menon wrote:

If any one has any sample implementations using ibatis / hibernate, please send 
them to me. It would be really helpful




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



Re: Hi-New to this group

2005-07-20 Thread netsql

I think there is a Struts wiki page for this also.
.V


Maya menon wrote:

If any one has any sample implementations using ibatis / hibernate, please send 
them to me. It would be really helpful





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



Re: Hi-New to this group

2005-07-20 Thread Dave Newton

Maya menon wrote:


If any one has any sample implementations using ibatis / hibernate, please send 
them to me. It would be really helpful
 

Check their respective sites; I'm betting both have sample code. 
Hibernate, at least, has several books available.


Dave



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



Re: Hi-New to this group

2005-07-20 Thread Maya menon
If any one has any sample implementations using ibatis / hibernate, please send 
them to me. It would be really helpful

Rick Reumann <[EMAIL PROTECTED]> wrote:[EMAIL PROTECTED] wrote the following on 
7/20/2005 3:44 PM:

> Another camp would tell you to just use something like a business
> delegate + iBatis or Hibernate. I cannot comment as I have not used
> that approach. Personally, I like to write all my own SQL (along with
> everything else you can write).

That's the benefit of iBATIS.. you write your own SQL. Nice and easy - 
You write your SQL, it builds your objects and collections from your own 
SQL and hides all the JDBC and code used to build objects from result sets.

-- 
Rick

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



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Hi-New to this group

2005-07-20 Thread netsql

I used JDBC realms for security.
I tend to avoid EJB, even v 3 (it does not support collection) but EJB 3 
is not bad (unlike 2.1.. it is bad).
You can run 500 concurnet users on an old laptop, I my tests I get over 
$2K per CPU on older servers.


What stress testing tool do you plan to use?

.V


Maya menon wrote:

Hi all,

I am designing a web app/ Its supposed to have 500 concurrent users.

1. Module- Login
The users login using their uid/password and see the stuff in their database

I am planning to use Struts,jsp,action classes in the front end
Now, back end I am thinking about session ejbs which reads database tables. The method for getting values from database tables will be implemented in a DAO. 


Now, what should I use in the middle layer ?
ie, intercation between action classes and session ejb: For a struts based 
appp, whats best here ?
Again 500 concurrent users.
 
Thanks



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



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



Re: Hi-New to this group

2005-07-20 Thread Rick Reumann

[EMAIL PROTECTED] wrote the following on 7/20/2005 3:44 PM:


Another camp would tell you to just use something like a business
delegate + iBatis or Hibernate. I cannot comment as I have not used
that approach. Personally, I like to write all my own SQL (along with
everything else you can write).


That's the benefit of iBATIS.. you write your own SQL. Nice and easy - 
You write your SQL, it builds your objects and collections from your own 
SQL and hides all the JDBC and code used to build objects from result sets.


--
Rick

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



Re: [OT] Secure Email w/ java

2005-07-20 Thread netsql

Glen Mazza wrote:

If you don't get a good answer here I would check \


SUn's mail mail list or jakrta commons (email) jar.

.V



project--ML's, docs, etc.

Glen


Brian McGovern wrote:

Sorry for the off topic, but hopefully someone here has done this 
before.  Im using a tomcat smtp resource and JavaMail to send e-mail 
with my system.  I want to secure it and am getting confused.  Can 
anyone give me some clear docs or help on how to do this.




Thanks
-B




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



Re: Hi-New to this group

2005-07-20 Thread Michael Rasmussen
Maya,
  You mentioned that you are providing access to things in the users
database.  Are you giving them write access?  If not there is little
reason to use Entity Beans (read None) in your application.  If you
don't need your application to be distributed, and I didn't see it in
your requirements, then session beans may be overkill too.  I would
look to what others have said here and evaluate hibernate or naked
JDBC before choosing entity beans as your backend and session beans as
your business facade.  (though I wouldn't write off session beans
entirely).  Using something like a command pattern could work nicely
as a business facade.  I am working right now with an application that
uses a command pattern for the business layer and I am quite fond of
it.  You could also have a look at the Commons-Chain project for a
nice implementation of a pattern that is quickly becoming one of my
favorites.
http://jakarta.apache.org/commons/chain  And beginning with struts 1.3
it will be a first class citizen of Struts.

Michael

On 7/20/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> 
> 
> > -Ursprüngliche Nachricht-
> > Von: Dave Newton [mailto:[EMAIL PROTECTED]
> > Gesendet: Mittwoch, 20. Juli 2005 22:20
> > An: Struts Users Mailing List
> > Betreff: Re: Hi-New to this group
> >
> > [EMAIL PROTECTED] wrote:
> >
> > >I don't understand Dave's concern. Perhaps he would
> > elaborate on why he says to avoid Session beans.
> > >
> > >
> > Anything EJB-related I've run in to (except in a few
> > instances) has been mind-blowing overkill, that's all.
> 
> 
> Session Beans are absolute performance killers, and a huge ressource eater.
> 
> And I think the proper question is not "why to avoid session beans" but
> "why use session beans in this application".
> 
> I think it's the question you should answer, and you should review the usage
> of every piece
> of third party software. If you can't answer the question "why do i use this
> framework/lib/software" you probably shouldn't use it.
> 
> Regards
> Leon
> 
> 
> 
> 
> 
> -
> 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: ApplicationException sample

2005-07-20 Thread Leon Rosenberg
Shalom Rivka, 

> -Ursprüngliche Nachricht-
> Von: Rivka Shisman [mailto:[EMAIL PROTECTED] 
> Gesendet: Mittwoch, 20. Juli 2005 18:50
> An: Struts Users Mailing List; Ed Griebel
> Betreff: RE: ApplicationException sample
> 
> 
> Hi Ed
> 
> I don't have a delegate layer because I see no point in 
> duplicating my EJB interface (actually my business interface) 
> by creating a delegate layer. Another layer is time consuming 
> in development and in maintainance - it seems too much for 
> just wrapping exceptions.

Heh, you are using EJB and complaining about time consuming layers? :-) 
A delegate layer will probably cost 10% of the time you need to EJBize your
business logic (the more effort of writing ejbs instead of POJOs). It will
probably save you enough days in one year, when you refactor your
application to remove ejb dependencies, so you can get a week more off :-)

The ultimate solution would be to use/write a generator, which generates you
an abstraction layer on top of ejb from java interfaces or xml. If you
decide to get rid of the ejbs, simply change the generator to generate
whatever you want, and be fine :-)

Regards
Leon


> 
> You wrote:
> >A quick and dirty fix to your problem would be to declare 
> the execute() 
> >method in your action to also throw a RemoteException
> 
> There no need for that - RemoteException is a subclass of 
> Exception and decleratively adding it to the 
>  section works fine (no need to change the 
> methods signature).
> 
> Thanks
> Rivka
> 
> -Original Message-
> From: Ed Griebel [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 20, 2005 3:19 PM
> To: Struts Users Mailing List
> Subject: Re: ApplicationException sample
> 
> Rivka-
> 
> Since you're developing from scratch, you might want to put a 
> layer in-between your EJBs and Struts. Some will call it 
> business logic, data access object (DAO), or Helper classes. 
> This allows you to separate the struts-related concerns from 
> business-related concerns.
> It also solves the issue you mentioned about where to catch 
> RemoteExceptions. Also, these helper classes can be used in 
> more than one action which could be a benefit.
> 
> A quick and dirty fix to your problem would be to declare the
> execute() method in your action to also throw a 
> RemoteException, and then declaratively handle the exception 
> in your Struts config inside . I'd only 
> use this if there's no way for you to recover the transaction 
> when a remoteException occurs. It's an old article, but take 
> a look at 
> http://www.onjava.com/pub/a/onjava/2002/10/30/jakarta.html. 
> These sites are good for starting out in struts too:
> http://husted.com/struts/ and http://www.reumann.net/struts/main.do
> 
> Good luck,
> -ed
> 
> On 7/20/05, Rivka Shisman <[EMAIL PROTECTED]> wrote:
> > 
> > Erik, Glen, Laurie - Thanks for your help
> > 
> > After doing some more homework about exception handling - I have
> another
> > question:
> > 
> > If my Sturts Action calls directly to EJB methods (with no delegate
> > Layer) - then I have to catch RemoteException for all runtime 
> > exceptions? Or is there a better way to work?
> > 
> > Thanks
> > Rivka
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> **
> 
> The contents of this email and any attachments are confidential.
> They are intended for the named recipient(s) only.
> If you have received this email in error please notify the 
> system manager or  the sender immediately and do not disclose 
> the contents to anyone or make copies.
> 
> ** eSafe scanned this email for viruses, vandals and 
> malicious content. **
> **
> 
> 
> -
> 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: ApplicationException sample

2005-07-20 Thread Leon Rosenberg
Shalom Rivka, 

> -Ursprüngliche Nachricht-
> Von: Rivka Shisman [mailto:[EMAIL PROTECTED] 
> Gesendet: Mittwoch, 20. Juli 2005 18:50
> An: Struts Users Mailing List; Ed Griebel
> Betreff: RE: ApplicationException sample
> 
> 
> Hi Ed
> 
> I don't have a delegate layer because I see no point in 
> duplicating my EJB interface (actually my business interface) 
> by creating a delegate layer. Another layer is time consuming 
> in development and in maintainance - it seems too much for 
> just wrapping exceptions.

Heh, you are using EJB and complaining about time consuming layers? :-) 
A delegate layer will probably cost 10% of the time you need to EJBize your
business logic (the more effort of writing ejbs instead of POJOs). It will
probably save you enough days in one year, when you refactor your
application to remove ejb dependencies, so you can get a week more off :-)

The ultimate solution would be to use/write a generator, which generates you
an abstraction layer on top of ejb from java interfaces or xml. If you
decide to get rid of the ejbs, simply change the generator to generate
whatever you want, and be fine :-)

Regards
Leon


> 
> You wrote:
> >A quick and dirty fix to your problem would be to declare 
> the execute() 
> >method in your action to also throw a RemoteException
> 
> There no need for that - RemoteException is a subclass of 
> Exception and decleratively adding it to the 
>  section works fine (no need to change the 
> methods signature).
> 
> Thanks
> Rivka
> 
> -Original Message-
> From: Ed Griebel [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 20, 2005 3:19 PM
> To: Struts Users Mailing List
> Subject: Re: ApplicationException sample
> 
> Rivka-
> 
> Since you're developing from scratch, you might want to put a 
> layer in-between your EJBs and Struts. Some will call it 
> business logic, data access object (DAO), or Helper classes. 
> This allows you to separate the struts-related concerns from 
> business-related concerns.
> It also solves the issue you mentioned about where to catch 
> RemoteExceptions. Also, these helper classes can be used in 
> more than one action which could be a benefit.
> 
> A quick and dirty fix to your problem would be to declare the
> execute() method in your action to also throw a 
> RemoteException, and then declaratively handle the exception 
> in your Struts config inside . I'd only 
> use this if there's no way for you to recover the transaction 
> when a remoteException occurs. It's an old article, but take 
> a look at 
> http://www.onjava.com/pub/a/onjava/2002/10/30/jakarta.html. 
> These sites are good for starting out in struts too:
> http://husted.com/struts/ and http://www.reumann.net/struts/main.do
> 
> Good luck,
> -ed
> 
> On 7/20/05, Rivka Shisman <[EMAIL PROTECTED]> wrote:
> > 
> > Erik, Glen, Laurie - Thanks for your help
> > 
> > After doing some more homework about exception handling - I have
> another
> > question:
> > 
> > If my Sturts Action calls directly to EJB methods (with no delegate
> > Layer) - then I have to catch RemoteException for all runtime 
> > exceptions? Or is there a better way to work?
> > 
> > Thanks
> > Rivka
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> **
> 
> The contents of this email and any attachments are confidential.
> They are intended for the named recipient(s) only.
> If you have received this email in error please notify the 
> system manager or  the sender immediately and do not disclose 
> the contents to anyone or make copies.
> 
> ** eSafe scanned this email for viruses, vandals and 
> malicious content. **
> **
> 
> 
> -
> 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: Hi-New to this group

2005-07-20 Thread Leon Rosenberg
 

> -Ursprüngliche Nachricht-
> Von: Dave Newton [mailto:[EMAIL PROTECTED] 
> Gesendet: Mittwoch, 20. Juli 2005 22:20
> An: Struts Users Mailing List
> Betreff: Re: Hi-New to this group
> 
> [EMAIL PROTECTED] wrote:
> 
> >I don't understand Dave's concern. Perhaps he would 
> elaborate on why he says to avoid Session beans.
> >  
> >
> Anything EJB-related I've run in to (except in a few 
> instances) has been mind-blowing overkill, that's all.


Session Beans are absolute performance killers, and a huge ressource eater.

And I think the proper question is not "why to avoid session beans" but 
"why use session beans in this application". 

I think it's the question you should answer, and you should review the usage
of every piece 
of third party software. If you can't answer the question "why do i use this
framework/lib/software" you probably shouldn't use it.

Regards
Leon





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



Re: Hi-New to this group

2005-07-20 Thread Leon Rosenberg
 

> -Ursprüngliche Nachricht-
> Von: Dave Newton [mailto:[EMAIL PROTECTED] 
> Gesendet: Mittwoch, 20. Juli 2005 22:20
> An: Struts Users Mailing List
> Betreff: Re: Hi-New to this group
> 
> [EMAIL PROTECTED] wrote:
> 
> >I don't understand Dave's concern. Perhaps he would 
> elaborate on why he says to avoid Session beans.
> >  
> >
> Anything EJB-related I've run in to (except in a few 
> instances) has been mind-blowing overkill, that's all.


Session Beans are absolute performance killers, and a huge ressource eater.

And I think the proper question is not "why to avoid session beans" but 
"why use session beans in this application". 

I think it's the question you should answer, and you should review the usage
of every piece 
of third party software. If you can't answer the question "why do i use this
framework/lib/software" you probably shouldn't use it.

Regards
Leon





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



Re: Hi-New to this group

2005-07-20 Thread Larry Meadors
On 7/20/05, Dave Newton <[EMAIL PROTECTED]> wrote:
> >Another camp would tell you to just use something like a business 
> >delegate + iBatis or Hibernate. I cannot comment as I have not used that 
> >approach.
> >
> This is the approach I've used the most and it seems to work pretty well
> for me--it's very simple and keeps Actions clean and relatively
> maintenance-free.
> 
> Dave

Agreed 100% - take a look at the JPetstore app, no EJB, simple SQL,
clean seperation, and great performance:
http://ibatis.apache.org/downloads.html

Larry

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



Re: Hi-New to this group

2005-07-20 Thread Maya menon
Hi, 
 
I am pretty new to Hibernate, [no idea at all] can anyone send me a sample 
implementation ?
 
Thanks

Dave Newton <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:

>I don't understand Dave's concern. Perhaps he would elaborate on why he says 
>to avoid Session beans.
> 
>
Anything EJB-related I've run in to (except in a few instances) has been 
mind-blowing overkill, that's all.

I'm not saying they're _never_ the right answer, and I might change my 
mind with the latest EJB spec (at least a little), but the footprint 
required for their use seems biggish for the benefits derived. In most 
cases ;)

>However, it may be that he would favor POJOs if the container isn't really 
>giving your app anything (why go through the trouble of EJB in other words). 
>
I would ;)

>Another camp would tell you to just use something like a business delegate + 
>iBatis or Hibernate. I cannot comment as I have not used that approach. 
>
This is the approach I've used the most and it seems to work pretty well 
for me--it's very simple and keeps Actions clean and relatively 
maintenance-free.

Dave



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



-
 Start your day with Yahoo! - make it your home page 

Re: Hi-New to this group

2005-07-20 Thread Dave Newton

[EMAIL PROTECTED] wrote:


I don't understand Dave's concern. Perhaps he would elaborate on why he says to 
avoid Session beans.
 

Anything EJB-related I've run in to (except in a few instances) has been 
mind-blowing overkill, that's all.


I'm not saying they're _never_ the right answer, and I might change my 
mind with the latest EJB spec (at least a little), but the footprint 
required for their use seems biggish for the benefits derived. In most 
cases ;)


However, it may be that he would favor POJOs if the container isn't really giving your app anything (why go through the trouble of EJB in other words). 


I would ;)

Another camp would tell you to just use something like a business delegate + iBatis or Hibernate. I cannot comment as I have not used that approach. 

This is the approach I've used the most and it seems to work pretty well 
for me--it's very simple and keeps Actions clean and relatively 
maintenance-free.


Dave



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



Re: ApplicationException sample

2005-07-20 Thread Glen Mazza
I think a good example of the manager classes are in the sample 
Struts-based application generated by AppFuse: 
https://appfuse.dev.java.net/.


I have yet to see the full benefits of these manager classes, however I 
am currently attributing this to my general newbieness with Java web 
applications.


Glen


[EMAIL PROTECTED] escribió:

Rivka, I'll add to this:

Pick up "Core J2EE Patterns" from Sun. It is worth the money and will help you.

My solution would be similar to what Ed said. I would use a "manager" class (aka "business facade", 
"business delegate", "service manager", etc. although each one of these may mean something slightly 
different) to decouple Struts from your EJB layer. Struts actions talk to the manager only. The manager methods 
(typically logon + C.R.U.D. + search -- general user actions) throw SystemException and ApplicationException only. 
Struts is configured to handle these (or subclasses of these) declaratively (or else try/catch for these two in your 
Action class if you haven't gone declarative yet). Struts then knows nothing about RemoteException and other specific 
Exceptions like that. It only has to worry about two Exception types (but can go finer grained by handling subclasses 
of these when you are ready). Meanwhile your manager class (or some data access object/manager behind the main manager) 
handles try/catch for RemoteException, EJB Exception, etc. If manager cannot do his job

, he either throws SystemException or ApplicationException at the "user" 
(Struts).


Erik



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



Re: [OT] Secure Email w/ java

2005-07-20 Thread Glen Mazza
If you don't get a good answer here I would check the Apache James 
project--ML's, docs, etc.


Glen


Brian McGovern wrote:

Sorry for the off topic, but hopefully someone here has done this before.  Im 
using a tomcat smtp resource and JavaMail to send e-mail with my system.  I 
want to secure it and am getting confused.  Can anyone give me some clear docs 
or help on how to do this.



Thanks
-B




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



Re: Hi-New to this group

2005-07-20 Thread Dave Newton

Maya menon wrote:


Also, As Dave wrote about session ejbs, please suggest some give work arounds 
for a session ejb. Requirement is to read contents from database.
 

There are quite a few decent ways of doing database access; I'd probably 
recommend Hibernate at this point but there are a lot of others--check 
out anything regarding object relational mapping (java objects <-> 
database).


Any object can be put into session scope and remain available throughout 
a user's visit, and it doesn't matter how that object came about 
(database access, created programmatically, etc.)


Dave



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



Re: Hi-New to this group

2005-07-20 Thread Martin Gainty
Using Business Delegate objects to proxy session facade objects I would 
suggest looking at Service To Worker Pattern

http://java.sun.com/blueprints/corej2eepatterns/Patterns/ServiceToWorker.html
Martin-
- Original Message - 
From: "Maya menon" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Wednesday, July 20, 2005 3:35 PM
Subject: Re: Hi-New to this group



Thank you dave and Eric for the quick solution regarding session facade.

Now using a business delegate and a session facade, is it a good idea ?

Also, As Dave wrote about session ejbs, please suggest some give work 
arounds for a session ejb. Requirement is to read contents from database.


Maya

Dave Newton <[EMAIL PROTECTED]> wrote:
Maya menon wrote:

Now, back end I am thinking about session ejbs which reads database 
tables.



Unless there's a requirement or Very Compelling Reason to use EJB I'd
sure try to avoid them.


Now, what should I use in the middle layer ?
ie, intercation between action classes and session ejb: For a struts based 
appp, whats best here ?




I'd think that a fairly basic facade between the session EJB and/or some
helper classes would be sufficient.

Googling for "session facade" should give you more than enough info.

Dave



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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 


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



Re: Hi-New to this group

2005-07-20 Thread Maya menon
In my case, I have had bad experience with using CMPs. But with session ejbs 
acting as facade and other helper classes [like DAO having SQL code] I have 
seen good performances. 
 
Can anyone send me a sample implementation of a business delegate and session 
facade ?
 
Thanks

Mike Darretta <[EMAIL PROTECTED]> wrote:
We use an Axis SOAP interface to communicate to our session beans. I 
don't necessarily recommend it, but it does the trick nonetheless...

Regarding EJBs, we saw significant performance hits when conducting 
heavy CMP crunching. A simple solution was to employ direct JDBC calls 
within the session beans. This increased performance 10-fold, in some cases.

Mike

[EMAIL PROTECTED] wrote:

>I don't understand Dave's concern. Perhaps he would elaborate on why he says 
>to avoid Session beans.
>
>I have developed applications using Session beans wrapping DAOs for search, 
>etc., along with timer-reloading Entity beans and have seen good results. 
>However, it may be that he would favor POJOs if the container isn't really 
>giving your app anything (why go through the trouble of EJB in other words). 
>In my case I found plenty of benefit in the declarative transaction handling 
>alone.
>
>As for business delegate + session facade. Sure, I can see a case for that. 
>You are adding more complexity, but, your Struts actions shouldn't need to 
>interact with EJB in an ideal world, even if it's a facade-level EJB. I like 
>to have actions access a Manager (aka business delegate) only. Everything else 
>is hidden behind the manager (whether that be EJB access, direct DAO access, 
>or some combination).
>
>Another camp would tell you to just use something like a business delegate + 
>iBatis or Hibernate. I cannot comment as I have not used that approach. 
>Personally, I like to write all my own SQL (along with everything else you can 
>write). 
>
>Erik
>
>
>-Original Message-
>From: Maya menon 
>Sent: Jul 20, 2005 3:35 PM
>To: Struts Users Mailing List 
>Subject: Re: Hi-New to this group
>
>Thank you dave and Eric for the quick solution regarding session facade. 
> 
>Now using a business delegate and a session facade, is it a good idea ?
> 
>Also, As Dave wrote about session ejbs, please suggest some give work arounds 
>for a session ejb. Requirement is to read contents from database.
> 
>Maya
>
>Dave Newton wrote:
>Maya menon wrote:
>
> 
>
>>Now, back end I am thinking about session ejbs which reads database tables. 
>>
>> 
>>
>Unless there's a requirement or Very Compelling Reason to use EJB I'd 
>sure try to avoid them.
>
> 
>
>>Now, what should I use in the middle layer ?
>>ie, intercation between action classes and session ejb: For a struts based 
>>appp, whats best here ?
>>
>>
>> 
>>
>I'd think that a fairly basic facade between the session EJB and/or some 
>helper classes would be sufficient.
>
>Googling for "session facade" should give you more than enough info.
>
>Dave
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>__
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around 
>http://mail.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!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Hi-New to this group

2005-07-20 Thread Mike Darretta
We use an Axis SOAP interface to communicate to our session beans. I 
don't necessarily recommend it, but it does the trick nonetheless...


Regarding EJBs, we saw significant performance hits when conducting 
heavy CMP crunching. A simple solution was to employ direct JDBC calls 
within the session beans. This increased performance 10-fold, in some cases.


Mike

[EMAIL PROTECTED] wrote:


I don't understand Dave's concern. Perhaps he would elaborate on why he says to 
avoid Session beans.

I have developed applications using Session beans wrapping DAOs for search, 
etc., along with timer-reloading Entity beans and have seen good results. 
However, it may be that he would favor POJOs if the container isn't really 
giving your app anything (why go through the trouble of EJB in other words). In 
my case I found plenty of benefit in the declarative transaction handling alone.

As for business delegate + session facade. Sure, I can see a case for that. You 
are adding more complexity, but, your Struts actions shouldn't need to interact 
with EJB in an ideal world, even if it's a facade-level EJB. I like to have 
actions access a Manager (aka business delegate) only. Everything else is 
hidden behind the manager (whether that be EJB access, direct DAO access, or 
some combination).

Another camp would tell you to just use something like a business delegate + iBatis or Hibernate. I cannot comment as I have not used that approach. Personally, I like to write all my own SQL (along with everything else you can write). 


Erik


-Original Message-
From: Maya menon <[EMAIL PROTECTED]>
Sent: Jul 20, 2005 3:35 PM
To: Struts Users Mailing List 
Subject: Re: Hi-New to this group

Thank you dave and Eric for the quick solution regarding session facade. 


Now using a business delegate and a session facade, is it a good idea ?

Also, As Dave wrote about session ejbs, please suggest some give work arounds 
for a session ejb. Requirement is to read contents from database.

Maya

Dave Newton <[EMAIL PROTECTED]> wrote:
Maya menon wrote:

 

Now, back end I am thinking about session ejbs which reads database tables. 

   

Unless there's a requirement or Very Compelling Reason to use EJB I'd 
sure try to avoid them.


 


Now, what should I use in the middle layer ?
ie, intercation between action classes and session ejb: For a struts based 
appp, whats best here ?


   

I'd think that a fairly basic facade between the session EJB and/or some 
helper classes would be sufficient.


Googling for "session facade" should give you more than enough info.

Dave



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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.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: Hi-New to this group

2005-07-20 Thread DGraham
http://www.bookpool.com/sm/0764558315

At $25, you're almost stealing it.

-Dennis


Maya menon <[EMAIL PROTECTED]> 
07/20/2005 03:35 PM
Please respond to
"Struts Users Mailing List" 


To
Struts Users Mailing List 
cc

Subject
Re: Hi-New to this group






Thank you dave and Eric for the quick solution regarding session facade. 
 
Now using a business delegate and a session facade, is it a good idea ?
 
Also, As Dave wrote about session ejbs, please suggest some give work 
arounds for a session ejb. Requirement is to read contents from database.
 
Maya

Dave Newton <[EMAIL PROTECTED]> wrote:
Maya menon wrote:

>Now, back end I am thinking about session ejbs which reads database 
tables. 
>
Unless there's a requirement or Very Compelling Reason to use EJB I'd 
sure try to avoid them.

>Now, what should I use in the middle layer ?
>ie, intercation between action classes and session ejb: For a struts 
based appp, whats best here ?
> 
>
I'd think that a fairly basic facade between the session EJB and/or some 
helper classes would be sufficient.

Googling for "session facade" should give you more than enough info.

Dave



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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Hi-New to this group

2005-07-20 Thread erikweber
I don't understand Dave's concern. Perhaps he would elaborate on why he says to 
avoid Session beans.

I have developed applications using Session beans wrapping DAOs for search, 
etc., along with timer-reloading Entity beans and have seen good results. 
However, it may be that he would favor POJOs if the container isn't really 
giving your app anything (why go through the trouble of EJB in other words). In 
my case I found plenty of benefit in the declarative transaction handling alone.

As for business delegate + session facade. Sure, I can see a case for that. You 
are adding more complexity, but, your Struts actions shouldn't need to interact 
with EJB in an ideal world, even if it's a facade-level EJB. I like to have 
actions access a Manager (aka business delegate) only. Everything else is 
hidden behind the manager (whether that be EJB access, direct DAO access, or 
some combination).

Another camp would tell you to just use something like a business delegate + 
iBatis or Hibernate. I cannot comment as I have not used that approach. 
Personally, I like to write all my own SQL (along with everything else you can 
write). 

Erik


-Original Message-
From: Maya menon <[EMAIL PROTECTED]>
Sent: Jul 20, 2005 3:35 PM
To: Struts Users Mailing List 
Subject: Re: Hi-New to this group

Thank you dave and Eric for the quick solution regarding session facade. 
 
Now using a business delegate and a session facade, is it a good idea ?
 
Also, As Dave wrote about session ejbs, please suggest some give work arounds 
for a session ejb. Requirement is to read contents from database.
 
Maya

Dave Newton <[EMAIL PROTECTED]> wrote:
Maya menon wrote:

>Now, back end I am thinking about session ejbs which reads database tables. 
>
Unless there's a requirement or Very Compelling Reason to use EJB I'd 
sure try to avoid them.

>Now, what should I use in the middle layer ?
>ie, intercation between action classes and session ejb: For a struts based 
>appp, whats best here ?
> 
>
I'd think that a fairly basic facade between the session EJB and/or some 
helper classes would be sufficient.

Googling for "session facade" should give you more than enough info.

Dave



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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Hi-New to this group

2005-07-20 Thread Maya menon
Thank you dave and Eric for the quick solution regarding session facade. 
 
Now using a business delegate and a session facade, is it a good idea ?
 
Also, As Dave wrote about session ejbs, please suggest some give work arounds 
for a session ejb. Requirement is to read contents from database.
 
Maya

Dave Newton <[EMAIL PROTECTED]> wrote:
Maya menon wrote:

>Now, back end I am thinking about session ejbs which reads database tables. 
>
Unless there's a requirement or Very Compelling Reason to use EJB I'd 
sure try to avoid them.

>Now, what should I use in the middle layer ?
>ie, intercation between action classes and session ejb: For a struts based 
>appp, whats best here ?
> 
>
I'd think that a fairly basic facade between the session EJB and/or some 
helper classes would be sufficient.

Googling for "session facade" should give you more than enough info.

Dave



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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Hi-New to this group

2005-07-20 Thread erikweber
Also I will add that the last time I developed (part of ) an application like 
yours, the main performance barrier (in my environment at least) was not 
marshalling data across the network. It was by far multiple (often redundant) 
database accesses per user request. I would suggest you look into caching 
strategies somewhere in that middle layer.

Erik
 

-Original Message-
From: [EMAIL PROTECTED]
Sent: Jul 20, 2005 3:25 PM
To: Struts Users Mailing List 
Subject: Re: Hi-New to this group

http://java.sun.com/blueprints/corej2eepatterns/Patterns/SessionFacade.html


Erik



-Original Message-
From: Maya menon <[EMAIL PROTECTED]>
Sent: Jul 20, 2005 3:21 PM
To: user@struts.apache.org
Subject: Hi-New to this group

Hi all,

I am designing a web app/ Its supposed to have 500 concurrent users.

1. Module- Login
The users login using their uid/password and see the stuff in their database

I am planning to use Struts,jsp,action classes in the front end
Now, back end I am thinking about session ejbs which reads database tables. The 
method for getting values from database tables will be implemented in a DAO. 

Now, what should I use in the middle layer ?
ie, intercation between action classes and session ejb: For a struts based 
appp, whats best here ?
Again 500 concurrent users.
 
Thanks


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.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: Hi-New to this group

2005-07-20 Thread Dave Newton

Maya menon wrote:

Now, back end I am thinking about session ejbs which reads database tables. 

Unless there's a requirement or Very Compelling Reason to use EJB I'd 
sure try to avoid them.



Now, what should I use in the middle layer ?
ie, intercation between action classes and session ejb: For a struts based 
appp, whats best here ?
 

I'd think that a fairly basic facade between the session EJB and/or some 
helper classes would be sufficient.


Googling for "session facade" should give you more than enough info.

Dave



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



Re: Hi-New to this group

2005-07-20 Thread erikweber
http://java.sun.com/blueprints/corej2eepatterns/Patterns/SessionFacade.html


Erik



-Original Message-
From: Maya menon <[EMAIL PROTECTED]>
Sent: Jul 20, 2005 3:21 PM
To: user@struts.apache.org
Subject: Hi-New to this group

Hi all,

I am designing a web app/ Its supposed to have 500 concurrent users.

1. Module- Login
The users login using their uid/password and see the stuff in their database

I am planning to use Struts,jsp,action classes in the front end
Now, back end I am thinking about session ejbs which reads database tables. The 
method for getting values from database tables will be implemented in a DAO. 

Now, what should I use in the middle layer ?
ie, intercation between action classes and session ejb: For a struts based 
appp, whats best here ?
Again 500 concurrent users.
 
Thanks


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Hi-New to this group

2005-07-20 Thread Maya menon
Hi all,

I am designing a web app/ Its supposed to have 500 concurrent users.

1. Module- Login
The users login using their uid/password and see the stuff in their database

I am planning to use Struts,jsp,action classes in the front end
Now, back end I am thinking about session ejbs which reads database tables. The 
method for getting values from database tables will be implemented in a DAO. 

Now, what should I use in the middle layer ?
ie, intercation between action classes and session ejb: For a struts based 
appp, whats best here ?
Again 500 concurrent users.
 
Thanks


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Creating a valid web.xml version 2.4

2005-07-20 Thread Dave Newton

Frasso, Anthony wrote:


So then I can completely remove the  tag from my web.xml file, making 
it look like the following?



http://java.sun.com/xml/ns/j2ee";;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";;
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";;
version="2.4">

 
   [...]
 

 
   [...]
 

 
   [...]
 


 


Oh, so THAT'S what a web.xml without a taglib block looks like.


There's nothing else I have to configure to use JSTL?
 

Like he said, as long as you have a proper taglib directive in the JSP 
and the libraries available you should be fine.


(Wouldn't it have been quicker to just take out the taglib directive and 
see if it worked?!)


Dave



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



Re: Creating a valid web.xml version 2.4

2005-07-20 Thread Wendy Smoak
From: "Frasso, Anthony" <[EMAIL PROTECTED]>

> There's nothing else I have to configure to use JSTL?

No, just use the correct uri in the <%@ taglib> in the JSP.

The  tags in web.xml haven't been necessary since Servlet 2.3, but
most examples (including the Struts example apps) still included them in
order to be backward compatible with Servlet 2.2.

-- 
Wendy Smoak


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



RE: TilesRequestProcessor is executed twice

2005-07-20 Thread David G. Friedman
Ronnie,

Here is what I see: you have two traces that both invoke your
Action.execute() with one call (each) from the TilesRequestProcessor.  Since
your trace doesn't show two calls to the Tiles Request Processor, that
suggests your browser is submitting twice.  The question is why is it
different when you have a Tile listed as your success/error ActionForward.
To help debug this, can you show us:

1) Your form's  declaration tag (especially any onclick
declarations).

2) Any submit buttons (both HTML the browser sees and from the JSP page) you
use in that form with any onclick="..." declarations so we can be sure it
isn't performing a submit calls from a submit button resulting in some sort
of double submit such as you saw?

3) Your Action and forward definitions for both the tile use and the direct
JSP use.  For example, are you adding 'redirect="true"' to your forward when
you are using a JSP so the browser redirects externally to the JSP or with
it as false so it performs an internal submit so the browser never knows the
true destination/JSP-page?

Regards,
David

-Original Message-
From: Ronnie Arosa [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 20, 2005 1:51 PM
To: 'Struts Users Mailing List'
Subject: RE: TilesRequestProcessor is executed twice


Well, I'm debugging my source code with Sysdeo's eclipse plugin. I toggled a
breakpoint in one of my action, and founded that it'd been executed twice.

Of course results of my actions are obtained twice (i.e. an insert in a
database is done twice).

I've added the 2 stack traces below this.

This is the first execution's stack trace:
Thread [http-80-Processor22] (Suspended (breakpoint at line 46 in
PartesMedicosAction))
PartesMedicosAction.execute(ActionMapping, ActionForm,
HttpServletRequest, HttpServletResponse) line: 46

TilesRequestProcessor(RequestProcessor).processActionPerform(HttpServletRequ
est, HttpServletResponse, Action, ActionForm, ActionMapping) line: 421
TilesRequestProcessor(RequestProcessor).process(HttpServletRequest,
HttpServletResponse) line: 226
ActionServlet.process(HttpServletRequest, HttpServletResponse) line:
1164
ActionServlet.doPost(HttpServletRequest, HttpServletResponse) line:
415
ActionServlet(HttpServlet).service(HttpServletRequest,
HttpServletResponse) line: 709
ActionServlet(HttpServlet).service(ServletRequest, ServletResponse)
line: 802
ApplicationFilterChain.internalDoFilter(ServletRequest,
ServletResponse) line: 252
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse)
line: 173
StandardWrapperValve.invoke(Request, Response) line: 213
StandardContextValve.invoke(Request, Response) line: 178
StandardHostValve.invoke(Request, Response) line: 126
ErrorReportValve.invoke(Request, Response) line: 105
StandardEngineValve.invoke(Request, Response) line: 107
CoyoteAdapter.service(Request, Response) line: 148
Http11Processor.process(InputStream, OutputStream) line: 856

Http11Protocol$Http11ConnectionHandler.processConnection(TcpConnection,
Object[]) line: 744
PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[]) line:
527
LeaderFollowerWorkerThread.runIt(Object[]) line: 80
ThreadPool$ControlRunnable.run() line: 684
ThreadWithAttributes(Thread).run() line: 595


The second time the Action is executed:

Thread [http-80-Processor25] (Suspended (breakpoint at line 46 in
PartesMedicosAction))
PartesMedicosAction.execute(ActionMapping, ActionForm,
HttpServletRequest, HttpServletResponse) line: 46

TilesRequestProcessor(RequestProcessor).processActionPerform(HttpServletRequ
est, HttpServletResponse, Action, ActionForm, ActionMapping) line: 421
TilesRequestProcessor(RequestProcessor).process(HttpServletRequest,
HttpServletResponse) line: 226
ActionServlet.process(HttpServletRequest, HttpServletResponse) line:
1164
ActionServlet.doGet(HttpServletRequest, HttpServletResponse) line:
397
ActionServlet(HttpServlet).service(HttpServletRequest,
HttpServletResponse) line: 689
ActionServlet(HttpServlet).service(ServletRequest, ServletResponse)
line: 802
ApplicationFilterChain.internalDoFilter(ServletRequest,
ServletResponse) line: 252
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse)
line: 173
StandardWrapperValve.invoke(Request, Response) line: 213
StandardContextValve.invoke(Request, Response) line: 178
StandardHostValve.invoke(Request, Response) line: 126
ErrorReportValve.invoke(Request, Response) line: 105
StandardEngineValve.invoke(Request, Response) line: 107
CoyoteAdapter.service(Request, Response) line: 148
Http11Processor.process(InputStream, OutputStream) line: 856

Http11Protocol$Http11ConnectionHandler.processConnection(TcpConnection,
Object[]) line: 744
PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[])

Re: TilesRequestProcessor is executed twice

2005-07-20 Thread Wendy Smoak
From: "Ronnie Arosa" <[EMAIL PROTECTED]>
> Well, I'm debugging my source code with Sysdeo's eclipse plugin.
>  I toggled a breakpoint in one of my action, and founded that it'd
>  been executed twice.
>
> Of course results of my actions are obtained twice (i.e. an insert in a
> database is done twice).

If you have any Filters, check that you're only calling chain.doFilter(...)
_once_.

-- 
Wendy Smoak


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



RE: Creating a valid web.xml version 2.4

2005-07-20 Thread Frasso, Anthony
> On Jul 19, 2005, at 4:53 PM, Dave Newton wrote:
> 
> >> I'm new to struts, and to web development in general, and after  
> >> tinkering with the struts tag libraries, I've decided to 
> switch to  
> >> using the JSTL tag library.  This requires JSP 2.0 support, which  
> >> I should have, as I am using Tomcat 5.5.
> >
> > No it doesn't.
> 
> True, but using the oh-so-groovy EL syntax without being forced to  
> use  is a thing of beauty, and *does* require JSP 2.0.
> 
> It seems to me that if the taglib JAR was configured properly (even  
> with pre JSP 2.0/Servlet 2.4), you could just drop it into WEB-INF/ 
> lib and use the configured URI in the JSP's taglib directive.   
> Meaning, even pre-JSP 2.0 you could drop jstl.jar into WEB-INF/lib  
> and specify
>  <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
> in the JSP.

So then I can completely remove the  tag from my web.xml file, making 
it look like the following?



http://java.sun.com/xml/ns/j2ee";;
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";;
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";;
 version="2.4">

  
[...]
  

  
[...]
  

  
[...]
  



There's nothing else I have to configure to use JSTL?

Regards,
Anthony Frasso

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



Re: TextArea

2005-07-20 Thread Steve Bosman
On 7/20/05, Larry Meadors <[EMAIL PROTECTED]> wrote:
> Yep, not an option in HTML, gotta javascript it, or catch it on the server.
> 
> On 7/20/05, Mark Benussi <[EMAIL PROTECTED]> wrote:
> > Sadly, JavaScript I am afraid.
> > From: Vijay K Anand [mailto:[EMAIL PROTECTED]
> > How to control char maxlength in  ?

I'd say both, javascript for a nice user experience and server side
for safety. One because as a matter of good practice you should never
trust anything to have been properly validated on the browser and two
because testing the number of characters in textareas can be error
prone. I forget which one but either Mozilla or IE has given me length
counts in javascript which differ from the String length by the time
the value is one the server - basically a CR versus CR/LF issue.

Steve
-- 
"A witty saying proves nothing."  -- Voltaire

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



RE: TilesRequestProcessor is executed twice

2005-07-20 Thread Ronnie Arosa
Well, I'm debugging my source code with Sysdeo's eclipse plugin. I toggled a
breakpoint in one of my action, and founded that it'd been executed twice.

Of course results of my actions are obtained twice (i.e. an insert in a
database is done twice).

I've added the 2 stack traces below this. 

This is the first execution's stack trace:
Thread [http-80-Processor22] (Suspended (breakpoint at line 46 in
PartesMedicosAction))
PartesMedicosAction.execute(ActionMapping, ActionForm,
HttpServletRequest, HttpServletResponse) line: 46

TilesRequestProcessor(RequestProcessor).processActionPerform(HttpServletRequ
est, HttpServletResponse, Action, ActionForm, ActionMapping) line: 421
TilesRequestProcessor(RequestProcessor).process(HttpServletRequest,
HttpServletResponse) line: 226
ActionServlet.process(HttpServletRequest, HttpServletResponse) line:
1164
ActionServlet.doPost(HttpServletRequest, HttpServletResponse) line:
415
ActionServlet(HttpServlet).service(HttpServletRequest,
HttpServletResponse) line: 709
ActionServlet(HttpServlet).service(ServletRequest, ServletResponse)
line: 802
ApplicationFilterChain.internalDoFilter(ServletRequest,
ServletResponse) line: 252
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse)
line: 173
StandardWrapperValve.invoke(Request, Response) line: 213
StandardContextValve.invoke(Request, Response) line: 178
StandardHostValve.invoke(Request, Response) line: 126
ErrorReportValve.invoke(Request, Response) line: 105
StandardEngineValve.invoke(Request, Response) line: 107
CoyoteAdapter.service(Request, Response) line: 148
Http11Processor.process(InputStream, OutputStream) line: 856

Http11Protocol$Http11ConnectionHandler.processConnection(TcpConnection,
Object[]) line: 744
PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[]) line:
527
LeaderFollowerWorkerThread.runIt(Object[]) line: 80
ThreadPool$ControlRunnable.run() line: 684
ThreadWithAttributes(Thread).run() line: 595


The second time the Action is executed:

Thread [http-80-Processor25] (Suspended (breakpoint at line 46 in
PartesMedicosAction))
PartesMedicosAction.execute(ActionMapping, ActionForm,
HttpServletRequest, HttpServletResponse) line: 46

TilesRequestProcessor(RequestProcessor).processActionPerform(HttpServletRequ
est, HttpServletResponse, Action, ActionForm, ActionMapping) line: 421
TilesRequestProcessor(RequestProcessor).process(HttpServletRequest,
HttpServletResponse) line: 226
ActionServlet.process(HttpServletRequest, HttpServletResponse) line:
1164
ActionServlet.doGet(HttpServletRequest, HttpServletResponse) line:
397
ActionServlet(HttpServlet).service(HttpServletRequest,
HttpServletResponse) line: 689
ActionServlet(HttpServlet).service(ServletRequest, ServletResponse)
line: 802
ApplicationFilterChain.internalDoFilter(ServletRequest,
ServletResponse) line: 252
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse)
line: 173
StandardWrapperValve.invoke(Request, Response) line: 213
StandardContextValve.invoke(Request, Response) line: 178
StandardHostValve.invoke(Request, Response) line: 126
ErrorReportValve.invoke(Request, Response) line: 105
StandardEngineValve.invoke(Request, Response) line: 107
CoyoteAdapter.service(Request, Response) line: 148
Http11Processor.process(InputStream, OutputStream) line: 856

Http11Protocol$Http11ConnectionHandler.processConnection(TcpConnection,
Object[]) line: 744
PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[]) line:
527
LeaderFollowerWorkerThread.runIt(Object[]) line: 80
ThreadPool$ControlRunnable.run() line: 684
ThreadWithAttributes(Thread).run() line: 595

Thx. Ronnie.
-Mensaje original-
De: David G. Friedman [mailto:[EMAIL PROTECTED] 
Enviado el: miércoles, 20 de julio de 2005 17:19
Para: Struts Users Mailing List
Asunto: RE: TilesRequestProcessor is executed twice

Ronnie,

What do you see that makes you think the tiles request is bring processed
twice?  Perhaps that indicator can help us determine your problem.

Regards,
David

-Original Message-
From: Ronnie Arosa [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 20, 2005 6:19 AM
To: Struts Users Mailing List
Subject: TilesRequestProcessor is executed twice


Hello everybody,
I'm working in a struts application with tiles and modules. It’s my first
time working with tiles and I felt into a problem: the TilesRequestProcessor
is called twice. This happens when I forward my actions to a tile. If the
same action is forward to a simple page (i.e. a jsp page) everything goes
normally. 
Here is one of my actions’ definition:






And this is my tiles’ definition file:










   

Re: Creating a valid web.xml version 2.4

2005-07-20 Thread Dave Newton

Brian Lalor wrote:


On Jul 19, 2005, at 4:53 PM, Dave Newton wrote:

I'm new to struts, and to web development in general, and after  
tinkering with the struts tag libraries, I've decided to switch to  
using the JSTL tag library.  This requires JSP 2.0 support, which  I 
should have, as I am using Tomcat 5.5.


No it doesn't.


True, but using the oh-so-groovy EL syntax without being forced to  
use  is a thing of beauty, and *does* require JSP 2.0.


Yeah, but nobody said anything about that.

Dave



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



Upload problem with apache and SSL

2005-07-20 Thread Zsolt
Hi,

Sometime we cannot upload documents with struts-1.2.4 and tomcat-5.0.28 if
we do that via apache Apache/2.0.49 and mod_jk (via port 443). We get an
error message the page cannot be shown (or something like that).

If we repeat the upload the error doesn't happen.

It is especially strange that I cannot find any exception. Does somebody
know such problems?

Is it a mod_jk problem?

Zsolt



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



RE: ApplicationException sample

2005-07-20 Thread Rivka Shisman

Hi Ed

I don't have a delegate layer because I see no point in duplicating my
EJB interface (actually my business interface) by creating a delegate
layer. Another layer is time consuming in development and in
maintainance - it seems too much for just wrapping exceptions.

You wrote:
>A quick and dirty fix to your problem would be to declare the execute()
>method in your action to also throw a RemoteException 

There no need for that - RemoteException is a subclass of Exception and
decleratively adding it to the  section works fine
(no need to change the methods signature).

Thanks
Rivka

-Original Message-
From: Ed Griebel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 20, 2005 3:19 PM
To: Struts Users Mailing List
Subject: Re: ApplicationException sample

Rivka-

Since you're developing from scratch, you might want to put a layer
in-between your EJBs and Struts. Some will call it business logic,
data access object (DAO), or Helper classes. This allows you to
separate the struts-related concerns from business-related concerns.
It also solves the issue you mentioned about where to catch
RemoteExceptions. Also, these helper classes can be used in more than
one action which could be a benefit.

A quick and dirty fix to your problem would be to declare the
execute() method in your action to also throw a RemoteException, and
then declaratively handle the exception in your Struts config inside
. I'd only use this if there's no way for you to
recover the transaction when a remoteException occurs. It's an old
article, but take a look at
http://www.onjava.com/pub/a/onjava/2002/10/30/jakarta.html. These
sites are good for starting out in struts too:
http://husted.com/struts/ and http://www.reumann.net/struts/main.do

Good luck,
-ed

On 7/20/05, Rivka Shisman <[EMAIL PROTECTED]> wrote:
> 
> Erik, Glen, Laurie - Thanks for your help
> 
> After doing some more homework about exception handling - I have
another
> question:
> 
> If my Sturts Action calls directly to EJB methods (with no delegate
> Layer) - then I have to catch RemoteException for all runtime
> exceptions? Or is there a better way to work?
> 
> Thanks
> Rivka
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
**
The contents of this email and any attachments are confidential.
They are intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or  
the 
sender immediately and do not disclose the contents to anyone or make copies.

** eSafe scanned this email for viruses, vandals and malicious content. **
**

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



RE: TextArea

2005-07-20 Thread Adrian_Rios
Here is the code to do it.

I have used it a number of times.

http://javascript.internet.com/forms/limit-textarea.html

Adrian

__

Senior Programmer Analyst, Tax Distributed Systems Development

Tax & Compliance Development, ADP IT

Phone: (909) 592-6411 Ext. 3863

e-mail: [EMAIL PROTECTED]



-Original Message-
From: Vijay K Anand [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 20, 2005 7:39 AM
To: Struts Users Mailing List
Subject: TextArea


Hi Guys

How to control char maxlength in  ?

Regards
Vijay



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

-
This message and any attachments are intended only for the use of the
addressee and may contain information that is privileged and confidential.
If the reader of the message is not the intended recipient or an authorized
representative of the intended recipient, you are hereby notified that any
dissemination of this communication is strictly prohibited. If you have
received this communication in error, notify the sender immediately by
return email and delete the message and any attachments from your system.



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



Re: instantiation of actionforms in session scope

2005-07-20 Thread Michael Jouravlev
On 7/20/05, Martin Morawetz <[EMAIL PROTECTED]> wrote:
> I thought, the supposed behavior is that a bean declared to be within
> session-scope lives within the session as long as the session lives.
> And if it doesn't exist, it gets created by the struts-framework.

Yep. If you use nested business object, you can easily clean the
action form after you finish or cancel your wizard just by setting
reference to null. Otherwize you would have to clean it field by
field...

The catch is that if a user simply leaves the wizard without
explicitly closing it, it will stay in the session.

Michael.

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



Not getting submitted values from textarea in logic:iterate

2005-07-20 Thread Neil Aggarwal
Hello:

I have a DynaForm with some beans stored in an array:

  


I have the form-bean declared as session scope for my actions:

  



   
   


The persistent.Feature class has a field text with setText and getText
accessors.

When want want to display the data, I first call /admin/editClubInit
to populate the DynaForm.  Here is the code that does that:
Feature[] features = new Feature[NUM_FEATURES];
for( int i=0; i
  
  


The data appears correctly on the page.

Unfortunately, when I submit the form to my action class to process it,
I do not get the text I submitted.  I get the original text that
EditClubInit prepopulated the form with.

Here is the code I am using to retrieve the data:

  Feature[] features = (Feature[]) df.get("features");
  for( int i=0; ihttp://newsletter.JAMMConsulting.com


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



Re: ApplicationException sample

2005-07-20 Thread erikweber
Rivka, I'll add to this:

Pick up "Core J2EE Patterns" from Sun. It is worth the money and will help you.

My solution would be similar to what Ed said. I would use a "manager" class 
(aka "business facade", "business delegate", "service manager", etc. although 
each one of these may mean something slightly different) to decouple Struts 
from your EJB layer. Struts actions talk to the manager only. The manager 
methods (typically logon + C.R.U.D. + search -- general user actions) throw 
SystemException and ApplicationException only. Struts is configured to handle 
these (or subclasses of these) declaratively (or else try/catch for these two 
in your Action class if you haven't gone declarative yet). Struts then knows 
nothing about RemoteException and other specific Exceptions like that. It only 
has to worry about two Exception types (but can go finer grained by handling 
subclasses of these when you are ready). Meanwhile your manager class (or some 
data access object/manager behind the main manager) handles try/catch for 
RemoteException, EJB Exception, etc. If manager cannot do his job, he either 
throws SystemException or ApplicationException at the "user" (Struts).

Erik


-Original Message-
From: Ed Griebel <[EMAIL PROTECTED]>
Sent: Jul 20, 2005 9:19 AM
To: Struts Users Mailing List 
Subject: Re: ApplicationException sample

Rivka-

Since you're developing from scratch, you might want to put a layer
in-between your EJBs and Struts. Some will call it business logic,
data access object (DAO), or Helper classes. This allows you to
separate the struts-related concerns from business-related concerns.
It also solves the issue you mentioned about where to catch
RemoteExceptions. Also, these helper classes can be used in more than
one action which could be a benefit.

A quick and dirty fix to your problem would be to declare the
execute() method in your action to also throw a RemoteException, and
then declaratively handle the exception in your Struts config inside
. I'd only use this if there's no way for you to
recover the transaction when a remoteException occurs. It's an old
article, but take a look at
http://www.onjava.com/pub/a/onjava/2002/10/30/jakarta.html. These
sites are good for starting out in struts too:
http://husted.com/struts/ and http://www.reumann.net/struts/main.do

Good luck,
-ed

On 7/20/05, Rivka Shisman <[EMAIL PROTECTED]> wrote:
> 
> Erik, Glen, Laurie - Thanks for your help
> 
> After doing some more homework about exception handling - I have another
> question:
> 
> If my Sturts Action calls directly to EJB methods (with no delegate
> Layer) - then I have to catch RemoteException for all runtime
> exceptions? Or is there a better way to work?
> 
> Thanks
> Rivka
>

-
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: TilesRequestProcessor is executed twice

2005-07-20 Thread David G. Friedman
Ronnie,

What do you see that makes you think the tiles request is bring processed
twice?  Perhaps that indicator can help us determine your problem.

Regards,
David

-Original Message-
From: Ronnie Arosa [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 20, 2005 6:19 AM
To: Struts Users Mailing List
Subject: TilesRequestProcessor is executed twice


Hello everybody,
I'm working in a struts application with tiles and modules. It’s my first
time working with tiles and I felt into a problem: the TilesRequestProcessor
is called twice. This happens when I forward my actions to a tile. If the
same action is forward to a simple page (i.e. a jsp page) everything goes
normally. 
Here is one of my actions’ definition:






And this is my tiles’ definition file:














Thanks in advance.
Ronnie.




-
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: TextArea

2005-07-20 Thread Larry Meadors
Yep, not an option in HTML, gotta javascript it, or catch it on the server.

Larry


On 7/20/05, Mark Benussi <[EMAIL PROTECTED]> wrote:
> Sadly, JavaScript I am afraid.
> 
> -Original Message-
> From: Vijay K Anand [mailto:[EMAIL PROTECTED]
> 
> How to control char maxlength in  ?
>

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



RE: TextArea

2005-07-20 Thread Mark Benussi
Sadly, JavaScript I am afraid.

-Original Message-
From: Vijay K Anand [mailto:[EMAIL PROTECTED] 
Sent: 20 July 2005 15:39
To: Struts Users Mailing List
Subject: TextArea

Hi Guys

How to control char maxlength in  ?

Regards
Vijay



-
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: TextArea

2005-07-20 Thread Brent Vaughn
You can use JavaScript to do it.  That is how I have done it beforehand.

-Original Message-
From: Vijay K Anand [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 20, 2005 9:39 AM
To: Struts Users Mailing List
Subject: TextArea

Hi Guys

How to control char maxlength in  ?

Regards
Vijay



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



TextArea

2005-07-20 Thread Vijay K Anand

Hi Guys

How to control char maxlength in  ?

Regards
Vijay



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



Re: Validation is called before form is populated from my database

2005-07-20 Thread William Shief
Finally, I found two valuable solutions to my problem.

The first one is MappingDispatchAction, as suggested
by Hubert. It is efficient but I dislike to have so
much entries in my struts-config (my application is
going big enough)
I found a good explanation for it by the frustrated
programmer (who gives us some remarks about Struts
which were helpful for me)
http://frustratedprogrammer.blogspot.com/2004/07/struts-121-mappingdispatchaction.html

The second one is to redefine the methode "validate"
in my form-bean (EditionPersonneForm, which extends
validator.ValidateForm) and add a condition in it,
which enables validation or not, according to my
dispatch parameter "do".
public ActionErrors validate(ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
{
if (someCondition)
{ 
return new ActionErrors(); 
}

return super.validate(mapping, request);
}

Thanks again, Hubert !

Billy


--- Hubert Rabago <[EMAIL PROTECTED]> wrote:

> Another option is to switch to
> MappingDispatchAction* so you can set
> different attributes for the different situations
> that your Action
> needs to handle.
> 
> Hubert
> 
>
*http://struts.apache.org/api/org/apache/struts/actions/MappingDispatchAction.html
> 
> On 7/19/05, Hubert Rabago <[EMAIL PROTECTED]> wrote:
> > No, always respond to the user list when it's
> relevant to the question
> > you posted.  This way, other people can offer
> solutions as well, and
> > those having the same problems will get to
> hear/read what the solution
> > is.
> > 
> > Since you're extending DispatchAction, you
> probably should turn off
> > automatic validation and handle it yourself. 
> Search the archives for
> > discussion on automatic validation, it's been
> discussed a lot the past
> > few months.
> > 
> > Mail archives are available at
> > http://marc.theaimsgroup.com/?l=struts-user and
> >
> http://www.mail-archive.com/user@struts.apache.org/
> > 
> > Hubert
> > 
> > On 7/19/05, William Shief
> <[EMAIL PROTECTED]> wrote:
> > > Unfortunately EditerPersonneAction do extend
> > > DispatchAction (using parameter "do") !
> (Otherwise
> > > your solution would be good)
> > >
> > > (I answer you personally because I assume such a
> > > message is not useful for the list)
> > >
> > > Billy
> > >
> > > --- Hubert Rabago <[EMAIL PROTECTED]> wrote:
> > >
> > > > It seems that you're trying to prepopulate a
> form
> > > > with values from the
> > > > DB before showing it to the user.
> > > >
> > > > So, you have
> > > > 1) call /EditionPersonne to prepopulate the
> form
> > > > 2) show EditerPersonne.jsp to display the form
> > > > 3) submit the form to
> /SomePathLikeSubmitPersonne
> > > >
> > > > If so, you don't need to specify the "form"
> > > > attribute in
> > > > /EditionPersonne.  The "form" attribute
> identifies
> > > > the input form for
> > > > that Action, to carry the data being submitted
> to
> > > > that Action.
> > > >
> > > > Try removing the "scope", "form" and "input"
> > > > attributes to
> > > > /EditionPersonne, and specify them instead on
> the
> > > > Action to which the
> > > > form will be submitted to.
> > > >
> > > > On the other hand, if EditerPersonneAction
> extends a
> > > > DispatchAction
> > > > class, send another message and we'll offer a
> > > > different solution.
> > > >
> > > > Hubert
> > > >
> > > >
> > > > On 7/19/05, William Shief
> > > > <[EMAIL PROTECTED]> wrote:
> > > > > Hello,
> > > > > I'm currently having a problem with the
> Struts
> > > > > validator.
> > > > > I have a very simple Struts bean
> > > > "EditionPersonneForm"
> > > > > (extending
> > > > > ValidatorForm) associated with an action
> > > > > "EditerPersonneAction" and a
> > > > > JSP form "EditerPersonne.jsp"
> > > > >
> > > > > [From struts-config.xml]
> > > > >  path="/EditionPersonne"
> > > > >
> > > > >
> type="com.myproject.actions.EditerPersonneAction"
> > > > > scope="session"
> > > > > name="EditerPersonneForm"
> > > > >
> > > > > input="/pages/EditerPersonne.jsp"
> > > > > parameter="do"
> > > > > validate="true">
> > > > >  > > > > name="afficherEditionPersonne"
> > > > > path="/pages/EditionPersonne.jsp"/>
> > > > >  > > > > name="afficherAjoutPersonne"
> > > > >
> > > > > path="/pages/AjoutPersonne.jsp" />
> > > > > 
> > > > > [end of listing]
> > > > >
> > > > > The matter is that the method validate() is
> called
> > > > > BEFORE the form is
> > > > > displayed. So if the Struts bean is filled
> in with
> > > > > wrong values at this
> > > > >
> > > > > very moment, the validator causes an error
> and
> > > > Struts
> > > > > redirects me to
> > > > > the "input" error page, and the action
> (which
> > > > > populates the form
> > > > > with the right data from the database) is
> never
> > > > called
> > > > > !
> > > > > Does anyone have a clue ?
> > > > > Thanks in advance,
> > > 

Re: Checkbox

2005-07-20 Thread Stéphane Zuckerman

Hi Vijay,


How to make checkbox checked in  ?


One way is to prepopulate the form property with the values you want 
checked. It works for me.



--
Stéphane Zuckerman

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



Checkbox

2005-07-20 Thread Vijay K Anand

Hi All

How to make checkbox checked in  ?

Regards
Vijay

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



RE: TilesRequestProcessor is executed twice

2005-07-20 Thread Ronnie Arosa
Hi,

I have already tested it, but unfortunately nothing to do with it. Thanks
for the advice, I will go on looking for a solution.

Ronnie.

De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Enviado el: miércoles, 20 de julio de 2005 14:30
Para: Struts Users Mailing List
CC: Struts Users Mailing List
Asunto: Re: TilesRequestProcessor is executed twice

I am currently working on my first tiles / struts module program myself. One
thing that I had to do was to add the module aware option to the plug-in in
struts-config.xml.






I have not had a problem with the request processor running twice. Not sure
if this has anything to do with it or not, but it is worth a try :)




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



Re: instantiation of actionforms in session scope

2005-07-20 Thread Martin Morawetz



[EMAIL PROTECTED] schrieb:
In the case you outlined, wizardForm should be placed into the session 
scope when leaving the Funds action.


Shouldn't it be in the session scope by specifying
scope="session" in the action tags in the struts-config.xml?

 You are not required to use the
struts tags to access the data, but if you are using the struts html 
tags for input etc, you will need to use the html:form tag. If you are 
not using the struts tags, you should still be able to use the form bean 
with a standard  You should 
also be able to access it from other action classes by explicitly 
calling the getAttribute("wizardForm"). When you say that it is 
instantiated with every new page, how are you attempting to access the bean?


I use the bean in several pages. The idea is to have something like
a wizard. On every page a part of data gets added to the wizard bean.
Action.execute() provides a ActionForm parameter. By using this
parameter I access the bean.

What happens is that the bean gets created, filled with the parameters
from the request. In the action class I can access it (and I see
the filled in values on the next page). On the following page a new
formular gets filled. Then the bean gets created again, and filled
with the new parameters. The values from the last page are lost.

Now a possible workaround would be to copy the data from the bean
to some wizard-object which I put in session-scope manually. But
I would like to have a workaround-free solution.
I thought, the supposed behavior is that a bean declared to be within
session-scope lives within the session as long as the session lives.
And if it doesn't exist, it gets created by the struts-framework.
Am I wrong?

I mapped the same bean to several actions in the struts-config.xml:

  
:
:
 

 
 
 
 
 
:
:




Martin Morawetz <[EMAIL PROTECTED]>


Martin Morawetz <[EMAIL PROTECTED]>

07/19/2005 07:12 AM
Please respond to
"Struts Users Mailing List" 



To

Struts Users Mailing List 

cc


Subject

Re: instantiation of actionforms in session scope





Thanks a lot for your answer.


 > There could be several poteintal problems.
 >
 > 1) make sure the JSP does not have the session=false page directive set.

It doesn't.

 > 2) Make sure you are referencing the form using the same name as you
 > have it defined in the struts config (remember capitalization does 
count).


I've checked that and than again, the right bean gets filled with the
right parameters from the request, so I think the problem isn't the
configuration. The problem arises on the following pages, where I need
the data to, but the bean gets instantiated with every new page again.
The following lines are from my struts-config.xml:


:
:
 
   

:
:

 > 3) Make sure you are accessing the form from within the html:form tag
 > and that the struts action specified in the form action has the expected
 > form as the type in the struts config.
 >

I don't use html:form-tags. Could that be a problem?

 >
 >
 >
 >
 > Hi to all,
 >
 > I use a formbean within session-scope (declared in
 > struts-config.xml). However it behaves like it would
 > be within request-scope. Every new page it gets
 > instantiated again. I checked the sessionid and
 > it is every page the same, so I guess am within the
 > same http-session.
 >
 > Does anyone have some ideas what the reason may be?
 >
 > Every hint is highly appreciated.
 >


--

Regards
Martin



-
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: ApplicationException sample

2005-07-20 Thread Ed Griebel
Rivka-

Since you're developing from scratch, you might want to put a layer
in-between your EJBs and Struts. Some will call it business logic,
data access object (DAO), or Helper classes. This allows you to
separate the struts-related concerns from business-related concerns.
It also solves the issue you mentioned about where to catch
RemoteExceptions. Also, these helper classes can be used in more than
one action which could be a benefit.

A quick and dirty fix to your problem would be to declare the
execute() method in your action to also throw a RemoteException, and
then declaratively handle the exception in your Struts config inside
. I'd only use this if there's no way for you to
recover the transaction when a remoteException occurs. It's an old
article, but take a look at
http://www.onjava.com/pub/a/onjava/2002/10/30/jakarta.html. These
sites are good for starting out in struts too:
http://husted.com/struts/ and http://www.reumann.net/struts/main.do

Good luck,
-ed

On 7/20/05, Rivka Shisman <[EMAIL PROTECTED]> wrote:
> 
> Erik, Glen, Laurie - Thanks for your help
> 
> After doing some more homework about exception handling - I have another
> question:
> 
> If my Sturts Action calls directly to EJB methods (with no delegate
> Layer) - then I have to catch RemoteException for all runtime
> exceptions? Or is there a better way to work?
> 
> Thanks
> Rivka
>

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



[OT] Secure Email w/ java

2005-07-20 Thread Brian McGovern
Sorry for the off topic, but hopefully someone here has done this before.  Im 
using a tomcat smtp resource and JavaMail to send e-mail with my system.  I 
want to secure it and am getting confused.  Can anyone give me some clear docs 
or help on how to do this.



Thanks
-B


Re: TilesRequestProcessor is executed twice

2005-07-20 Thread BHansard

I am currently working on my first tiles / struts module program myself.  One thing that I had to do was to add the module aware option to the plug-in in struts-config.xml.

  


  

I have not had a problem with the request processor running twice.  Not sure if this has anything to do with it or not, but it is worth a try :)

">"Ronnie Arosa" <[EMAIL PROTECTED]>








"Ronnie Arosa" <[EMAIL PROTECTED]> 
07/20/2005 06:18 AM

Please respond to
"Struts Users Mailing List" 








To
"Struts Users Mailing List" 


cc



Subject
TilesRequestProcessor is executed twice








Hello everybody,
I'm working in a struts application with tiles and modules. It’s my first
time working with tiles and I felt into a problem: the TilesRequestProcessor
is called twice. This happens when I forward my actions to a tile. If the
same action is forward to a simple page (i.e. a jsp page) everything goes
normally. 
Here is one of my actions’ definition: 

 
		 
		 


And this is my tiles’ definition file:

		 
		 
		 
		 
		 
		 



		 
		 


Thanks in advance.
Ronnie.




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




html:button validation problem

2005-07-20 Thread EROL TEZCAN
Hi all,
 
In my JSP page, I defined a html:form like this.
 

 
...

  
 
It works fine and does client-side validation truly.
 
But when I used to html:button instead of  html:submit, it gives an error.
 

 
...

  
 
Using a html:button tag, how can I do validation with "return validate" or 
whatelse?
 
 
Erol

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re[2]: submit form

2005-07-20 Thread Sergey Livanov
Jeff,

The target is to define functional buttons because the staff used to such
combinations. There are not sumbit buttons in my application. It is
controlled by images. In whole it is necessary to create windows
interface which is usual with control buttons ( CTRL+S-save, CRTL-C -
copy, CTRL-F find e.t.c. ) for clients who used to old application.
Excuse me if something is not clear because I wanted to
underline  that I am not able to solve this problem by standard methods.
Your code is the best for me and can solve definitely my problem.
That's why, thank you very much.

Sergey,


> Mnemonics are onlly non-standard because most people don't use them!
> Our application uses them all over the place, and our users love us
> for it.  W3C accessibility guidelines strongly recommend heavy usage
> of mnemonics, also.

> That said, the standard modifier key for mnemonics is Alt, not Ctrl,
> and usually the mnemonic just puts focus on the element with the
> accessKey, it doesn't fire it.  I am also not sure what the accessKey
> on a form would do; it might just focus the first control in that form
> -- I doubt it would submit the form.  For a non-javascript approach,
> put the accessKey of 's' on your submit button:
>   

> Of course, this highlights a weakness of the  --
> there's no way to mark the 'S' as a mnemonic, because it's an
> attribute instead of element content.  If you only have one button in
> your form, you can try the following:

>   Submit

> However, Internet Explorer's handling of the  element is
> broken; so if you want to perform any logic based on which of several
> buttons was pressed, you can't use 

> As Martin suggested, to get this to work with Ctrl+S instead of Alt+S,
> you'll need to use a JavaScript event handler.  I think you'll need to
> register the handler with the BODY element, though, not a BUTTON. We
> do something like the following:

> 
>   function init() {
>  body.onclick = doKey;
>   }

>   function doKey() {
>var keyCode = (document.all) ? event.keyCode : event.which;
> if (window.event.ctrlKey) {
>   if (keyCode == 83) {
> // Ctrl+S was pressed
>   } else if (keyCode == 84) {
> // Ctrl +T was pressed
>   } // and so on for all of our key handlers
> }
>   }
> 

> On 7/18/05, Glen Mazza <[EMAIL PROTECTED]> wrote:
>> Still, mnemonics are non-standard for web applications, no?  This
>> doesn't seem right.
>> 
>> Glen
>> 
>> Niall Pemberton escribió:
>> > The short and not v.helpful response is you can't submit  - its
>> > just a JSP tag that renders a HTML  element and has nothing to do 
>> > with
>> > the submit process.
>> >
>> > Some of the Struts tags have the "accesskey" attribute which defines a key
>> > that can be used with the accelerator key (usually ALT) to invoke a form
>> > control. So if you use the struts submit tag you could do something like...
>> >
>> >   
>> >
>> > Niall
>> >
>> > - Original Message -
>> > From: "Sergey Livanov" <[EMAIL PROTECTED]>
>> > Sent: Monday, July 18, 2005 8:36 PM
>> >
>> >
>> >
>> >>How can I submit html:form by pressing CTRL+S ?
>> >
>> >
>> >
>> >
>> >
>> -
>> > 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]



-- 
regards,
 Sergey  mailto:[EMAIL PROTECTED]


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



Re: Struts how initialises the value

2005-07-20 Thread senthil Kumar
Fine.

- Original Message - 
From: "raghavendra" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" 
Sent: Wednesday, July 20, 2005 4:10 PM
Subject: RE: Struts how initialises the value


> Hi senthil Kumar
>   See senthil Struts class exact to any other java class. All class
> level variables are takes default values. So not only in struts all java
> class in the following initializes are same.
> long productId;
> long productId = 0;
> Sting abc;
> Sting abc = null
> 
> -Original Message-
> From: senthil Kumar [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 20, 2005 3:14 PM
> To: user@struts.apache.org
> Subject: Struts how initialises the value
> 
> Hi all.,
> 
> 
> long productId;
> long productId = 0;
> 
> 
> Sting abc;
> Sting abc = null
> 
> 
> In struts, how the above satements are differ?.
> is it compulsary to initialise the  value?. 
> What are all the advantage to initialise the value?.
> 
> 
> 
> Regs.,
> Senthil
> 
> This e-mail and any files transmitted with it are for the sole use of
> the intended recipient(s) and may contain confidential and privileged
> information. If you are not the intended recipient or received it in
> error, please contact the sender by reply e-mail and destroy all copies
> of the original message. Please do not copy it for any purpose or
> disclose its contents.
> 
> Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights
> Reserved
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 





This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient or received it in error, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
Please do not copy it for any purpose or disclose its contents.

Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights Reserved

Re: Iterate question

2005-07-20 Thread Mariano García

Mariano García escribió:

Hi guys,

I have a question about the best way to do some stuff. I am generating 
an array of objects (conection) in one action in order to show all of 
them in a jsp page, using a  tag. Each of these object 
has an int attribute that represents an error identification stored in a 
DB.


So, I have two beans: conection and error. I need to get the error 
identification from the conection object. My question is how to generate 
the eror collection. The easy way is to generate an array with the same 
length as conection array (and then iterate it), but I think this is not 
a very efficient solution because an error can be repeated several times.




I forgot to say that I want to do that using struts tags. Now I have 
implemented it using java code into de jsp (but I think it is horrible). 
Maybe the solution is use the nested tag, but I think it is not possible 
(i think the conection object need a reference to its error fot that).


Regards,
Mariano.

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



RE: Struts how initialises the value

2005-07-20 Thread raghavendra
Hi senthil Kumar
  See senthil Struts class exact to any other java class. All class
level variables are takes default values. So not only in struts all java
class in the following initializes are same.
long productId;
long productId = 0;
Sting abc;
Sting abc = null

-Original Message-
From: senthil Kumar [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 20, 2005 3:14 PM
To: user@struts.apache.org
Subject: Struts how initialises the value

Hi all.,


long productId;
long productId = 0;


Sting abc;
Sting abc = null


In struts, how the above satements are differ?.
is it compulsary to initialise the  value?. 
What are all the advantage to initialise the value?.



Regs.,
Senthil

This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If you are not the intended recipient or received it in
error, please contact the sender by reply e-mail and destroy all copies
of the original message. Please do not copy it for any purpose or
disclose its contents.

Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights
Reserved



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



Re: JSP - Constant

2005-07-20 Thread ichy
sorry, you don't have to use page directive since you use full package name.
 
 so, another thing to check.
 i had a situation when i use  and the constant value is 
primitive,
i had to write as
 
 to make value as String.
 ichy


TilesRequestProcessor is executed twice

2005-07-20 Thread Ronnie Arosa
Hello everybody,
I'm working in a struts application with tiles and modules. It’s my first
time working with tiles and I felt into a problem: the TilesRequestProcessor
is called twice. This happens when I forward my actions to a tile. If the
same action is forward to a simple page (i.e. a jsp page) everything goes
normally. 
Here is one of my actions’ definition: 

 




And this is my tiles’ definition file:














Thanks in advance.
Ronnie.




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



Re: JSP - Constant

2005-07-20 Thread ichy
do you have page directive like
 <%@ page import="
com.freescale.npidashboard.common.Constants.FormState.CREATE" %>
 regards
ichy


Re: Struts how initialises the value

2005-07-20 Thread ichy
Hi, Senthil.
 if you don't set initial values for fields you declare, they are 
initialized as mentioned
in java specification. you can check at
 
http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.12.5
 so, 
long productId;
long productId = 0;
are the same.
 String abc;
String abc = null;
are the same.
 these are not struts specifc.
 are you talking about anything struts-specific thing such as ActionForm?
 regards
ichy


RE: Re: Dynamic from Elements Generation

2005-07-20 Thread raghavendra
Hi Amol Yadwadkar


In u r approach u r not mention how u got data. I mean in logic:iterare
u must give id value i.e u must set exact data format in  any collection
that will work fine. This my simple solution for your given information
-Original Message-
From: Amol Yadwadkar [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 20, 2005 11:31 AM
To: Struts Users Mailing List
Subject: RE: Re: Dynamic from Elements Generation



Hi Laurie,
The Screen details are as follows :-

When the page loads by default it shows one Check Box ,Text Box and
Select Box in one row.

1 > On the top of the page we  have a Select Box which has number count
ranging from 1 to 20.

2 > On selction of the number one shall get that many number of rows
with the above form elements.

My approach :-

I had encorporated the above by using logic:iterate and the count is
deciding the number of iteration ... which is fine but the retrival of
the dynamic generated data is not correct.

Thankx
Best regds,

Amol
 

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Wednesday, July 20, 2005 12:54 AM
To: user@struts.apache.org
Subject: Re: Dynamic from Elements Generation

Amol Yadwadkar wrote:
> Hi List,
> I want to generate Dynamic Form elements in Struts.
> I had achieved by doing  but the issue in that is I am
> not getting the dynamic values while retrieval or after the submission
> of the form. Can anyone suggest me the better way of getting the
dynamic
> form elements in Struts.
> Thankx in advance !!!
> Best regds,
> Amol

Can you provide a little more detail? Relevant parts from your JSP, 
struts-config.xml, form bean and action implementations, etc. would help

see what you're doing wrong.

L.
-- 
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


-
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: Struts how initialises the value

2005-07-20 Thread Vijay K Anand

It is no way different to struts

Primitive types are always initilxed to its defaults...

senthil Kumar wrote:


Hi all.,


long productId;
long productId = 0;


Sting abc;
Sting abc = null


In struts, how the above satements are differ?.
is it compulsary to initialise the  value?. 
What are all the advantage to initialise the value?.




Regs.,
Senthil

This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If you are not the intended recipient or received it in
error, please contact the sender by reply e-mail and destroy all copies
of the original message. Please do not copy it for any purpose or
disclose its contents.

Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights
Reserved
 




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



Iterate question

2005-07-20 Thread Mariano García

Hi guys,

I have a question about the best way to do some stuff. I am generating 
an array of objects (conection) in one action in order to show all of 
them in a jsp page, using a  tag. Each of these object 
has an int attribute that represents an error identification stored in a DB.


So, I have two beans: conection and error. I need to get the error 
identification from the conection object. My question is how to generate 
the eror collection. The easy way is to generate an array with the same 
length as conection array (and then iterate it), but I think this is not 
a very efficient solution because an error can be repeated several times.


Some help?

Regards,
Mariano.

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



Struts how initialises the value

2005-07-20 Thread senthil Kumar
Hi all.,


long productId;
long productId = 0;


Sting abc;
Sting abc = null


In struts, how the above satements are differ?.
is it compulsary to initialise the  value?. 
What are all the advantage to initialise the value?.



Regs.,
Senthil

This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient or received it in error, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
Please do not copy it for any purpose or disclose its contents.

Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights Reserved

RE: JSP - Constant

2005-07-20 Thread raghavendra
I tested it worked fine the following code.



Check in u system for paths of
com.freescale.npidashboard.common.Constants.FormState.CREATE and
styleClas



-Original Message-
From: Vijay K Anand [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 20, 2005 1:43 PM
To: user@struts.apache.org
Subject: JSP - Constant

Hi All

Please help me to figure out what is wrong in this...


  
  

rg
Vijay

-
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: Manually Instantiating Action classes

2005-07-20 Thread Leon Rosenberg
On Wed, 2005-07-20 at 08:43 +0200, Borislav Sabev wrote:
> a k wrote:
> 
> >In the process of writing an Action class, I realized that it needs
> >some application functionality (not general utility kinda
> >functionality) that is already part of a method in a different Action
> >class.
> >
> >So, Action MyAction1 needs to access method myMethod2 in Action
> >MyAction2. Here are the options that I could think of:
> >  
> >
> IMHO this breaks OO principle: a class to have one and only one purpose. 
> So instantiate MyAction2 just to use one of it's methods is a bad practice.
> 

It is a bad practice, but it DOES NOT break the OO principle, that's why
OO is an obsolescent model. 

If you look into component-oriented or responsibility (contract) -
oriented architectures, you would find this principle :-)

regards
Leon



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



JSP - Constant

2005-07-20 Thread Vijay K Anand

Hi All

Please help me to figure out what is wrong in this...

value="<%=com.freescale.npidashboard.common.Constants.FormState.CREATE %>">
 value="  Create  " styleClass="NPIButton"/>
 


rg
Vijay

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



RE: ApplicationException sample

2005-07-20 Thread Rivka Shisman

Erik, Glen, Laurie - Thanks for your help

After doing some more homework about exception handling - I have another
question:

If my Sturts Action calls directly to EJB methods (with no delegate
Layer) - then I have to catch RemoteException for all runtime
exceptions? Or is there a better way to work?

Thanks
Rivka

-Original Message-
From: Rivka Shisman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 19, 2005 9:38 AM
To: Struts Users Mailing List
Subject: ApplicationException sample

Hi all,

 

Can someone please attach a sample of an ApplicationException,
BaseException & SystemException classes?

An example of catching them in an Action class will be very helpful too.

 

 

Thanks a lot

Rivka

 


**
The contents of this email and any attachments are confidential.
They are intended for the named recipient(s) only.
If you have received this email in error please notify the system
manager or  the 
sender immediately and do not disclose the contents to anyone or make
copies.

** eSafe scanned this email for viruses, vandals and malicious content.
**

**
**
The contents of this email and any attachments are confidential.
They are intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or  
the 
sender immediately and do not disclose the contents to anyone or make copies.

** eSafe scanned this email for viruses, vandals and malicious content. **
**

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