Re: Re: struts validator

2003-06-06 Thread Chuck Cavaness
Obviously I can only speak for the multiple projects (both my own and those I've 
consulted on), various articles and presentations that I've written on the Validator 
and of course the work that I've done with it while writing the Struts books, but the 
fact is that the Validator does work. 

Like other framework components underneath Jakarta, there are versions that have this 
bug or that bug. In general however, I have found the Validator to do everything that 
it was designed to do. I can't explain why some have had more trouble than others; it 
might just be the version of the software they were using at the time. Like many other 
facets about Struts and its related technologies, it can become unyielding at times, 
but is manageable.

So, for those of you who have yet to try it, don’t be afraid. Get yourself a book that 
covers it, read the docs, search the lists. Whatever you do, don’t reinvent the wheel. 
For lexical or syntactical validation (whether client or server side), the Validator 
gives you a development boost. You just have to take the time to learn how to use it.


Chuck


> 
> From: "David Graham" <[EMAIL PROTECTED]>
> Date: 2003/06/05 Thu AM 09:50:08 EDT
> To: [EMAIL PROTECTED]
> Subject: Re: struts validator
> 
> >Not sure all this talk of validator is that justifiable. I've had no  
> >issues generating both the client side and server side validation, and  its 
> >saved me a lot of work.
> >
> >Like others i think it would be nice to define form beans and  validation 
> >rules in the same place but I like it as it is, unless  anybody has any 
> >alternatives?
> 
> One thing to consider is that Struts validation is based on 
> commons-validator which reads its own xml config file.  Moving the 
> validation configuration to struts-config.xml would require us to do all the 
> validator setup in Struts rather than leveraging the commons-validator code.
> 
> David
> 
> >
> >Thats my 2 pence..
> >
> >Mark
> >
> >On Thursday, Jun 5, 2003, at 05:24 Europe/London, Jeff Kyser wrote:
> >
> >>So jump in and help David fix it. Otherwise, you're likely to
> >>wake up and find a large block of cheddar in your bed. :)
> >>
> >>On Wednesday, June 4, 2003, at 11:18  PM, Mark Galbreath wrote:
> >>
> >>>You know, I just don't get it. I think Validator was a great idea that
> >>>simply proved wrong in implementation.  And I know I am not alone it  
> >>>this
> >>>assessment.
> >>>
> >>>Mark
> >>>
> >>>-Original Message-
> >>>From: Jeff Kyser [mailto:[EMAIL PROTECTED]
> >>>Sent: Thursday, June 05, 2003 12:03 AM
> >>>To: Struts Users Mailing List
> >>>Subject: Re: struts validator
> >>>
> >>>
> >>>Like I said, I dont use client-side, and its been pretty smooth  sailing 
> >>>for
> >>>me. Sorry your experience was different, but personally, I like it.
> >>>Especially defining constants for validation masks and using them  over 
> >>>and
> >>>over on lots of different forms in different projects even. And the
> >>>requiredif has been pretty handy for a number of cases to boot
> >>>
> >>>Of course, there are still cases where I need to go to
> >>>validate() methods in the actions, but they are less
> >>>and less, just as I use actual FormBeans less and less,
> >>>now that i halfway grok DynaValidatorForms...
> >>>
> >>>cheers,
> >>>
> >>>-jeff
> >>>
> >>>On Wednesday, June 4, 2003, at 10:40  PM, Mark Galbreath wrote:
> >>>
> yeah, well, DUH!  When are you guys going to realize that Validator
> should
> never have come out here even in beta. It sucks.
> 
> Mark
> 
> -Original Message-
> From: Jeff Kyser [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 04, 2003 9:25 PM
> To: Struts Users Mailing List
> Subject: Re: struts validator
> 
> 
> I only did server-side validations, using v1.1b3, until I saw lots of
> people
> complaining that v1.1rc1 wasn;t working for client-side validations.
> 
> I tried it (rc1) and it didn't work for me either. I haven't messed
> with the nightly builds - just went back to 1.1b3. Its probably been
> fixed in the
> latest, but since 1.1rc2 is coming out soon, figure I'll wait until
> then to
> check it out again.
> 
> -jeff
> 
> On Wednesday, June 4, 2003, at 08:18  PM, Mark Galbreath wrote:
> 
> >Beats me, dude.  I struggled with it for 3 days and said enough is
> >enough, and wrote my own validations in my Action classes.  If you
> >look through the
> >mail archive, you'll see right off that this is what happens to the
> >majority
> >of people trying to get Validator to work.
> >
> >Good luck,
> >Mark
> >
> >-Original Message-
> >From: Frances Aleah Z. de Guzman [mailto:[EMAIL PROTECTED]
> >Sent: Wednesday, June 04, 2003 8:55 PM
> >To: Struts Users Mailing List; Mark Galbreath
> >Subject: Re: struts validator
> >
> >
> >how can i fix it?
> >
> >On Friday 30 May 2003 0

Validator Presentation

2003-06-04 Thread Chuck Cavaness
To anyone who might need it, I gave a presentation on the Validator at the Struts 
Atlanta group last week. The presentation has been posted on the Struts resource page: 
http://jakarta.apache.org/struts/resources/articles.html (Thanks James!).

It's also available from the Struts Atlanta Site.

Let me know if you want the powerpoint to swipe any of the slides out of it. Email me 
at [EMAIL PROTECTED]

Chuck


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



[ANNOUNCE] Jakarta Struts Pocket Reference Available

2003-06-04 Thread Chuck Cavaness
I wanted to let everyone know that the Jakarta Struts Pocket Reference published by 
O’Reilly is now available. This purpose of this small (144 pages) book is to provide a 
quick way of looking up often-used information and have it small enough to shove in 
your back pocket. Information like config files settings, built-in action usage and 
especially tags is covered. In fact, 100 of the 144 pages are dedicated to how to use 
the tags, including examples of each.

You can find more information about the book here 
http://www.oreilly.com/catalog/jakartapr.  The table of contents is here 
http://www.oreilly.com/catalog/jakartapr/toc.html and there’s a sample chapter 
(“Configuring Struts”) available for download 
http://www.oreilly.com/catalog/jakartapr/chapter/ch01.pdf.

You can order the book from the typical places like Amazon and bookpool.com, although 
Amazon has the wrong cover (What’cha going do?).

Chuck



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



RE: Re: Specifying comma-delimted Struts Config Files

2003-03-13 Thread Chuck Cavaness
I agree with Susan. I would take a very close look at your config files. Try using 
Struts console and loading the multiple configuration files and see if it finds 
something hard to see with the naked eye.

chuck

> 
> From: "Susan Bradeen" <[EMAIL PROTECTED]>
> Date: 2003/03/13 Thu AM 08:26:18 EST
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Subject: RE: Re: Specifying comma-delimted Struts Config Files
> 
> Michael, 
> 
> Did you get this figured out? I've got four config files in my list, and 
> it has worked like a charm from the get-go (with Struts 1.1b3, and now on 
> yesterday's nightly). I do not have spaces in my list, as David suggested. 
> I am not using Tomcat, but I wonder if your problem lies elsewhere, not in 
> your config files list. 
> 
> Susan Bradeen
> 
> On 03/12/2003 05:23:11 PM "Michael Cardon" wrote:
> 
> > Thanks David, I did, but it still doesn't work. When I start my tomcat
> > server I get the following error:
> > 
> > SEVERE: Parsing error processing resource path
> > java.lang.NullPointerException
> > at
> > 
> org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:9
> > 41)
> 
> > 
> > Any more idea?
> > 
> > 
> > -Original Message-
> > From: David Graham [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, March 12, 2003 1:51 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Re: Specifying comma-delimted Struts Config Files
> > 
> > 
> > Try removing the space after the comma.
> > 
> > David
> > 
> > 
> > >
> > >I've never been able to get the comma config file feature to work, but 
> you
> > >did? If you can tell me how you did it, I would appreciate it. Here is 
> my
> > >sniplet from my web.xml file:
> > >
> > > 
> > >   config
> > >   
> > > /WEB-INF/struts-config.xml, 
> /WEB-INF/struts-config-reports.xml
> > >   
> > > 
> > >
> > >Thanks.
> > >
> > >-Original Message-
> > >From: Chuck Cavaness [mailto:[EMAIL PROTECTED]
> > >Sent: Wednesday, March 12, 2003 1:41 PM
> > >To: Struts Users Mailing List
> > >Subject: Re: Re: Specifying comma-delimted Struts Config Files
> > >
> > >
> > >As embarassing as it is to admit, the error was a pure operator type 
> error.
> > >There was an  element missing in the second config 
> file. I
> > >was actually taking one config file apart and splitting it into two to
> > >demonstrate this feature. Why the error complained about a missing
> > >, I'm not sure.
> > >
> > >Anyway, the feature works as expected. Sorry for the distraction. Back 
> to
> > >your regularly scheduled program...
> > >
> > >chuck
> > >
> > >
> > > >
> > > > From: Rick Reumann <[EMAIL PROTECTED]>
> > > > Date: 2003/03/12 Wed PM 04:15:53 EST
> > > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > > Subject: Re: Specifying comma-delimted Struts Config Files
> > > >
> > > > On Wed, 12 Mar 2003 16:00:46 -0500
> > > > Chuck Cavaness <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > Is anyone using the feature of the framework where you can specify
> > > > > multiple configuration files in the web.xml:
> > > >
> > > > Sorry I can't help Chuck, since I'm not using multiple config.xml's.
> > > > I'd like to start using them though, so when you figure what the 
> problem
> > > > is could you please post the solution (since I'm sure I'll run 
> across it
> > > > as well).
> > > >
> > > >
> > > > Thanks,
> > > >
> > > > --
> > > > Rick Reumann
> > > >
> > > > 
> -
> > > > 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]
> > 
> > 
> > _
> > The new MSN 8: smart spam protection and 2 months FREE*
> > http://join.msn.com/?page=features/junkmail
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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



Re: Re: Specifying comma-delimted Struts Config Files

2003-03-12 Thread Chuck Cavaness
As embarassing as it is to admit, the error was a pure operator type error. There was 
an  element missing in the second config file. I was actually taking 
one config file apart and splitting it into two to demonstrate this feature. Why the 
error complained about a missing , I'm not sure. 

Anyway, the feature works as expected. Sorry for the distraction. Back to your 
regularly scheduled program...

chuck


> 
> From: Rick Reumann <[EMAIL PROTECTED]>
> Date: 2003/03/12 Wed PM 04:15:53 EST
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Subject: Re: Specifying comma-delimted Struts Config Files
> 
> On Wed, 12 Mar 2003 16:00:46 -0500
> Chuck Cavaness <[EMAIL PROTECTED]> wrote:
> 
> > Is anyone using the feature of the framework where you can specify
> > multiple configuration files in the web.xml:
>  
> Sorry I can't help Chuck, since I'm not using multiple config.xml's.
> I'd like to start using them though, so when you figure what the problem
> is could you please post the solution (since I'm sure I'll run across it
> as well).
> 
> 
> Thanks,
> 
> -- 
> Rick Reumann
> 
> -
> 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]



Specifying comma-delimted Struts Config Files

2003-03-12 Thread Chuck Cavaness
Is anyone using the feature of the framework where you can specify multiple 
configuration files in the web.xml:


  config
  /WEB-INF/struts-config.xml,/WEB-INF/struts-config2.xml


I'm using the latest nightly build and when I try to start the application, it gives 
me a Digester parser error. Even if I use two of the same (valid) config files, I 
still get the error. 

The error is telling me that there's not a closing  element, but there 
is.

Any thoughts or similar problems?

chuck


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



Re: Re: struts banking example

2003-02-28 Thread Chuck Cavaness
Yes,
  This example app is from chapter 3 of my book. It was a very simple example. It was 
essentially the proverbial "Hello World" of Struts examples. The Storefront, which is 
used from chapter 4 on, was more complete.

chuck
> 
> From: "Richard Raquepo" <[EMAIL PROTECTED]>
> Date: 2003/02/27 Thu AM 12:08:04 EST
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>, 
>   <[EMAIL PROTECTED]>
> Subject: Re: struts banking example
> 
> http://examples.oreilly.com/jakarta/
> - Original Message -
> From: "Andrew Hill" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, February 27, 2003 12:55 PM
> Subject: RE: struts banking example
> 
> 
> > Ive not seen this example myself. Can give us the url?
> >
> >
> > -Original Message-
> > From: joni santoso [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, 27 February 2003 12:44
> > To: Struts Users Mailing List
> > Subject: Re: struts banking example
> >
> >
> > nope. someone on the list told me already.
> >
> > but, now i wonder what the example wants to show? i only
> > see it shows list. nothing like adding, updating,
> > deleting, etc.
> >
> > On Wed, 26 Feb 2003 21:41:25 -0700
> >   "David Graham" <[EMAIL PROTECTED]> wrote:
> > >Struts does not supply a banking example app.  It's
> > >highly unlikely that anyone on this list will know your
> > >username and password to an app we've never seen.
> > >
> >
> 
> > ===
> > Dapatkan Telepon SMS untuk rumah dan kantor hanya di PlasaCom melalui
> > http://toko.plasa.com
> > 50% Lebih Murah untuk Domain dan Hosting di http://idc.plasa.com khusus di
> > bulan Februari !
> >
> 
> > ===
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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



Re: struts banking example

2003-02-28 Thread Chuck Cavaness
If it's the one that I'm thinking of, try 1234 as the access number and 5678 as the 
pin.

chuck
> 
> From: "joni santoso" <[EMAIL PROTECTED]>
> Date: 2003/02/26 Wed PM 11:10:47 EST
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Subject: struts banking example
> 
> hi,
> 
> i got a struts banking app example. however, i dont know 
> the user id and password. could anyone tell me?
> 
> regards,
> ===
> Dapatkan Telepon SMS untuk rumah dan kantor hanya di PlasaCom melalui 
> http://toko.plasa.com
> 50% Lebih Murah untuk Domain dan Hosting di http://idc.plasa.com khusus di bulan 
> Februari !
> ===
> 
> -
> 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]



DataSourceConfig - className property

2003-02-16 Thread Chuck Cavaness
Can someone tell me if the disappearance of the className property from the 
DataSourceConfig class was intentional or not? The 1.1 dtd still shows it as an 
attribute, but I don’t see the property in the class anymore.

Thanks,

Chuck



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




Re: Prevent Cache.

2003-01-24 Thread Chuck Cavaness
Just out of curiosity, are you using a proxy server?

chuck
> 
> From: "carlos list" <[EMAIL PROTECTED]>
> Date: 2003/01/24 Fri PM 06:09:53 EST
> To: [EMAIL PROTECTED]
> Subject: Prevent Cache.
> 
> 
> 
> 
> 
> Hello List, i'm dealing with the old problem of preventing browser chache.
> I've tried all the combinations i found in the archive:
> 
> Code in my JSP view:  <%response.setHeader("Cache-Control","no-cache");
>  response.setHeader("Pragma","no-cache");
>  response.setDateHeader("Expires",0);
>%>
> 
> Also the same code in my Action class.
> 
> And nocache=true in the initialization parameters of the ActionServlet.
> 
> But nothing seems to work.
> 
> Has anyone solved this problem effectively?
> 
> thanks in advanced.
> 
> Carlos.
> 
> _
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
> http://join.msn.com/?page=features/virus
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Oreilly Banking example - Login

2002-12-05 Thread Chuck Cavaness
Eric,

  The messages you see are the result of validation errors and exceptions being thrown 
by the security service. In the banking example, the LoginForm performs the validation 
to ensure that both fields have been populated by the user. If not, the application 
doesn't even bother attempting to authenticate against the service. (Note: Since this 
example is earlier in the book, I was not using Dynamic Forms and/or the Validator 
like I do in the Storefront later in the book)

The InvalidLoginException is thrown when both fields have been populated, but fail to 
authenticate against some security realm, there's really no security realm used here, 
but in real life this might be a RDBMS, LDAP, etc.

I hope that explains things better.

Chuck
> 
> From: "Eric Tse" <[EMAIL PROTECTED]>
> Date: 2002/12/05 Thu AM 02:19:50 EST
> To: <[EMAIL PROTECTED]>
> Subject: Oreilly Banking example - Login
> 
> Hi all,
> 
> I tried the online banking example from Oreilly 
>(http://examples.oreilly.com/jakarta/) . And I have a question of it and hope you can 
>help.
> 
> In struts-config.xml, it shows:
>  path="/login"
> type="com.oreilly.struts.banking.action.LoginAction"
> scope="request"
> name="loginForm"
> validate="true"
> input="/login.jsp">
> 
> 
>   
> 
> My understanding of the example is the following, please correct me if I understand 
>wrong.
> 1. http://localhost:8080/banking
> 2. Login.jsp loaded, a form named loginForm is displayed, 
>action=/banking/action/login
> 3. org.apache.struts.action.ActionServlet dispatches to 
>"com.oreilly.struts.banking.action.LoginAction"
> 4. "com.oreilly.struts.banking.action.LoginAction" logins to SecurityService
> 5. SecurityService determines if login successful. If Yes, 
>"com.oreilly.struts.banking.action.LoginAction" continues to execute and finally 
>forward to /action/getaccountinformation. If No, SecurityService throws 
>InvalidLoginException to ancestor (LoginAction), which throws Exception.
> 
> My question appears in here. Which class handles the Exception and show the correct 
>error message? And so, where to define the error message? I saw different error 
>message, e.g.:
> 1. The Access Number is required for login
> 2. The Pin Number is required for login
> 3. Invalid Access Number and/or Pin   
> 
> Thanks a lot.
> 
> ---
> Eric Tse 
> SCP, SCWCD
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Re: Huge Files Intended for Chuck Cavaness

2002-12-04 Thread Chuck Cavaness
I'm not sure what's going on, but I haven't sent those to myself lately and I can't 
imagine how they made it to you. 

Sorry for whatever's going on!

Chuck
> 
> From: micael <[EMAIL PROTECTED]>
> Date: 2002/12/04 Wed PM 09:14:12 EST
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Subject: Re: Huge Files Intended for Chuck Cavaness
> 
> Storefront wars and sourcecode.  Says you were sending them to yourself, 
> and I got them.  I have been waiting for your book and complained to Amazon 
> about it.  Think they are out to get me?
> 
> Micael
> 
> At 09:09 PM 12/4/2002 -0500, you wrote:
> >Micael,
> >
> >   What kind of files are they and who are they from? I'm not sure what's 
> > going on but if you find out, please let me know!
> >
> >Chuck
> > >
> > > From: micael <[EMAIL PROTECTED]>
> > > Date: 2002/12/04 Wed PM 08:58:31 EST
> > > To: [EMAIL PROTECTED]
> > > Subject: Huge Files Intended for Chuck Cavaness
> > >
> > > I am getting these huge files intended for Chuck Cavaness at my home
> > > email.  What is up?  It has the intended target as
> > > [EMAIL PROTECTED]  Anyone have a clue what is up?
> > >
> > > Micael
> > >
> > > ---
> > >
> > > This electronic mail  transmission and any accompanying documents contain
> > > information belonging to the sender which may be confidential and legally
> > > privileged.  This information is intended only for the use of the
> > > individual or entity to whom this electronic mail transmission was sent as
> > > indicated above. If you are not the intended recipient, any disclosure,
> > > copying, distribution, or action taken in reliance on the contents of the
> > > information contained in this transmission is strictly prohibited.  If you
> > > have received this transmission in error, please delete the 
> > message.  Thank you
> > >
> > >
> > >
> > > --
> > > To unsubscribe, 
> > e-mail:   <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail: 
> > <mailto:[EMAIL PROTECTED]>
> > >
> > >
> >
> >
> >--
> >To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> Micael
> 
> ---
> 
> This electronic mail  transmission and any accompanying documents contain 
> information belonging to the sender which may be confidential and legally 
> privileged.  This information is intended only for the use of the 
> individual or entity to whom this electronic mail transmission was sent as 
> indicated above. If you are not the intended recipient, any disclosure, 
> copying, distribution, or action taken in reliance on the contents of the 
> information contained in this transmission is strictly prohibited.  If you 
> have received this transmission in error, please delete the message.  Thank you 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 


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




Re: Huge Files Intended for Chuck Cavaness

2002-12-04 Thread Chuck Cavaness
Micael,

  What kind of files are they and who are they from? I'm not sure what's going on but 
if you find out, please let me know!

Chuck
> 
> From: micael <[EMAIL PROTECTED]>
> Date: 2002/12/04 Wed PM 08:58:31 EST
> To: [EMAIL PROTECTED]
> Subject: Huge Files Intended for Chuck Cavaness
> 
> I am getting these huge files intended for Chuck Cavaness at my home 
> email.  What is up?  It has the intended target as 
> [EMAIL PROTECTED]  Anyone have a clue what is up?
> 
> Micael
> 
> ---
> 
> This electronic mail  transmission and any accompanying documents contain 
> information belonging to the sender which may be confidential and legally 
> privileged.  This information is intended only for the use of the 
> individual or entity to whom this electronic mail transmission was sent as 
> indicated above. If you are not the intended recipient, any disclosure, 
> copying, distribution, or action taken in reliance on the contents of the 
> information contained in this transmission is strictly prohibited.  If you 
> have received this transmission in error, please delete the message.  Thank you 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 


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




Re: did anyone run beer4all successfully?

2002-12-03 Thread Chuck Cavaness
I just downloaded it and ran it with the environment that you mentioned and it worked 
fine. Make sure that you read the readme.first file included with the download. You 
need to copy the beer4.properties, .script and .data files to a directory and then 
update the dbalias attribute in the repository.xml file with that directory. 

Email me personally if this doesn't work and I'll help you get it going.

Chuck
> 
> From: c tang <[EMAIL PROTECTED]>
> Date: 2002/12/03 Tue AM 09:20:18 EST
> To: [EMAIL PROTECTED]
> Subject: did anyone run beer4all successfully?
> 
> I downloaded a web app created by Chuck Cavaness from
> http://jakarta.apache.org/struts/resources/projects.html
> and failed to run it?
> I am running struts 1.1b2 and tomcat4.1.12, jdk1.3.1.
> 
> The exception I got is
> 
> [org.apache.ojb.broker.accesslayer.JdbcAccess] ERROR:
> SQLException during the ex
> ecution of materializeObject: Table not found: S0002
> Table not found: OJB_HL_SEQ
>  in statement [SELECT
> MAX_KEY,TABLENAME,GRAB_SIZE,FIELDNAME FROM OJB_HL_SEQ
> WHER
> E (OJB_HL_SEQ.TABLENAME = 'OJB_DLIST' ) AND
> (OJB_HL_SEQ.FIELDNAME = 'id' )]
> Table not found: S0002 Table not found: OJB_HL_SEQ in
> statement [SELECT MAX_KEY,
> TABLENAME,GRAB_SIZE,FIELDNAME FROM OJB_HL_SEQ WHERE
> (OJB_HL_SEQ.TABLENAME = 'OJB
> _DLIST' ) AND (OJB_HL_SEQ.FIELDNAME = 'id' )]
> java.sql.SQLException: Table not found: S0002 Table
> not found: OJB_HL_SEQ in sta
> tement [SELECT MAX_KEY,TABLENAME,GRAB_SIZE,FIELDNAME
> FROM OJB_HL_SEQ WHERE (OJB_
> HL_SEQ.TABLENAME = 'OJB_DLIST' ) AND
> (OJB_HL_SEQ.FIELDNAME = 'id' )]
> at org.hsqldb.Trace.getError(Trace.java:226)
> at
> org.hsqldb.jdbcResultSet.(jdbcResultSet.java:6595)
> at
> org.hsqldb.jdbcConnection.executeStandalone(jdbcConnection.java:2951)
> 
> at
> org.hsqldb.jdbcConnection.execute(jdbcConnection.java:2540)
> at
> org.hsqldb.jdbcStatement.fetchResult(jdbcStatement.java:1804)
> at
> org.hsqldb.jdbcStatement.executeQuery(jdbcStatement.java:199)
> at
> org.hsqldb.jdbcPreparedStatement.executeQuery(jdbcPreparedStatement.j
> ava:391)
> at
> org.apache.ojb.broker.accesslayer.JdbcAccess.materializeObject(Unknow
> n Source)
> at
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getDBObject(Unkn
> own Source)
> at
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getObjectByIdent
> ity(Unknown Source)
> at
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getObjectByExamp
> le(Unknown Source)
> at
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getObjectByQuery
> (Unknown Source)
> at
> org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.getUni
> queId(Unknown Source)
> at
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getUniqueId(Unkn
> own Source)
> at
> org.apache.ojb.odmg.collections.DListImpl.generateNewId(Unknown
> Sourc
> e)
> at
> org.apache.ojb.odmg.collections.DListImpl.(Unknown
> Source)
> at java.lang.Class.newInstance0(Native Method)
> at java.lang.Class.newInstance(Class.java:232)
> at
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQ
> uery(Unknown Source)
> at
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQ
> uery(Unknown Source)
> at
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQ
> uery(Unknown Source)
> at
> org.apache.ojb.odmg.oql.OQLQueryImpl.execute(Unknown
> Source)
> at
> com.cavaness.beer4all.service.Beer4AllOBJService.getFeaturedCatalogs(
> Beer4AllOBJService.java:32)
> at
> com.cavaness.beer4all.catalog.WelcomeAction.execute(WelcomeAction.jav
> a:18)
> at
> org.apache.struts.action.RequestProcessor.processActionPerform(Reques
> tProcessor.java:446)
> at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
> va:266)
> at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:129
> 2)
> at
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
> atcher.java:684)
> at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
> ispatcher.java:432)
> at
> org.apache.catalina.core.ApplicationDispatcher.forward(Applic

Re: FW: struts with ojb, multiple repositories

2002-11-29 Thread Chuck Cavaness
Jack,

  I don't see why it can't be, although I should admit that I haven't tried it myself. 
I would indeed use a factory to return back an instance of whichever repository you 
needed to use. If you plan to use any type of caching and you need multiple caches to 
be synchronized, I think the latest release of OJB provides some type of mechanism for 
this. Sorry for the fuzzy details, I just remember reading something about it on the 
OJB site.

Good luck,
Chuck

> 
> From: "Jack" <[EMAIL PROTECTED]>
> Date: 2002/11/29 Fri AM 10:05:59 EST
> To: <[EMAIL PROTECTED]>
> Subject: FW: struts with ojb, multiple repositories
> 
>  
>  I'm using an application scoped 'service' which uses ojb's odmg 
>  implementation as done in Chuck Cavaness' Struts Model Components 
>  chapter. Works well with one repository. I now need to use two 
>  repositories. I've worked out the configuration for multiple 
>  repositories (one postgresql db, and one mysql) in ojb, which 
>  'works' but am concerned about threading issues given that 
>  OJB.java holds open one database at a time. I've also reviewed 
>  Chuck's Beer4All app and it seems to take a slightly different 
>  approach, getting an instance of the 'service' from a service 
>  factory from within a base action. Is this latter approach better 
>  for using multiple ojb repositories in a Struts framework ? Can 
>  the O'Reilly book example be modified to handle multiple 
>  databases in odmg...
>  
>- jack
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 


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




Re: RE: [ANNOUNCE] O'Reilly Struts Book Now Available

2002-11-26 Thread Chuck Cavaness
I'm sorry the copy hasn't been shipped by bookpool yet. I noticed they are still 
saying "not yet published" yesterday. If it's any consolation, I haven't got my copies 
yet either. I haven't even seen the finished product yet :( 

chuck

> 
> From: "Paananen, Tero" <[EMAIL PROTECTED]>
> Date: 2002/11/26 Tue PM 03:57:09 EST
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Subject: RE: [ANNOUNCE] O'Reilly Struts Book Now Available
> 
> > I just wanted to let everyone know that my Struts book 
> > published by O'Reilly is 
> > now available and shipping. You can get it from Amazon, 
> > Bookpool, etc. 
> 
> http://www.bookpool.com/.x/3ezbbr1tf4/sm/0596003285
> 
> "Not-Yet-Published" :(
> 
> -TPP - patience is a virtue, I know, but I've had the
>book on preorder for 3 months now.
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: RE: [ANNOUNCE] O'Reilly Struts Book Now Available

2002-11-26 Thread Chuck Cavaness
The book is now available on Safari. I worked with them to get it up yesterday. Here's 
a link to Safari - http://safari.oreilly.com

Chuck
> 
> From: "Andy Kriger" <[EMAIL PROTECTED]>
> Date: 2002/11/26 Tue AM 10:48:34 EST
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Subject: RE: [ANNOUNCE] O'Reilly Struts Book Now Available
> 
> According to a response from O'Reilly customer service 'in the next few
> days'
> 
> -Original Message-
> From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 24, 2002 22:20
> To: 'Struts Users Mailing List'
> Subject: RE: [ANNOUNCE] O'Reilly Struts Book Now Available
> 
> 
> Chuck wrote:
> > I just wanted to let everyone know that my Struts book published by
> O'Reilly is
> > now available and shipping. You can get it from Amazon, Bookpool, etc.
> 
> Any idea if/when they will put it on Safari (http://safari.oreilly.com)?
> Technical books go out of date so fast that I like to make sure it's truly
> classic before adding it to the collection. Besides, work pays for the
> Safari subscription.  ;)
> 
> --
> Wendy Smoak
> Application Systems Analyst, Sr.
> ASU IA Information Resources Management
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Re: [ANNOUNCE] O'Reilly Struts Book Now Available

2002-11-25 Thread Chuck Cavaness
As far as the Struts book showing up on Safari, I just sent an email off to the 
marketing person for my book and asked her. I'll let you know as soon as I hear 
something. Regarding the usefulness of the site, I've never used it but I'm sure 
someone else can comment.

Chuck

> 
> From: Martyn Inglis <[EMAIL PROTECTED]>
> Date: 2002/11/25 Mon AM 09:10:05 EST
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: [ANNOUNCE] O'Reilly Struts Book Now Available
> 
> Just seen this, interested by the safari site, whats the feedback on 
> it's usefulness? Sounds too good to be true! (if my company'd pay for it 
> too! )
> 
> Martyn
> 
> 
> Chuck Cavaness wrote:
> 
> >Wendy,
> >
> >  That's a great question that I don't know the answer to. I would direct that 
>question directly to O'Reilly at [EMAIL PROTECTED]
> >
> >Chuck
> >
> >  
> >
> >>From: Wendy Smoak <[EMAIL PROTECTED]>
> >>Date: 2002/11/24 Sun PM 10:20:27 EST
> >>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> >>Subject: RE: [ANNOUNCE] O'Reilly Struts Book Now Available
> >>
> >>Chuck wrote:
> >>
> >>
> >>>I just wanted to let everyone know that my Struts book published by
> >>>  
> >>>
> >>O'Reilly is 
> >>
> >>
> >>>now available and shipping. You can get it from Amazon, Bookpool, etc. 
> >>>  
> >>>
> >>Any idea if/when they will put it on Safari (http://safari.oreilly.com)?
> >>Technical books go out of date so fast that I like to make sure it's truly
> >>classic before adding it to the collection. Besides, work pays for the
> >>Safari subscription.  ;)
> >>
> >>-- 
> >>Wendy Smoak
> >>Application Systems Analyst, Sr.
> >>ASU IA Information Resources Management 
> >>
> >>
> >>
> >>
> >>
> >
> >
> >--
> >To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> >
> >
> >  
> >
> 
> 
> 
> 
> 
> MX Financial Solutions is a trading name of MX Moneyextra Financial
> Solutions Ltd, which is regulated by the Financial Services Authority and a
> member of the General Insurance Standards Council.
> 
> MX Moneyextra Financial Solutions Ltd is registered in England No. 3379907.
> 
> Registered Office: One Temple Back East, Temple Quay, Bristol BS1 6DX
> A wholly owned subsidiary of Bristol & West plc.
> 
> 
> 


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




Re: RE: [ANNOUNCE] O'Reilly Struts Book Now Available

2002-11-25 Thread Chuck Cavaness
Wendy,

  That's a great question that I don't know the answer to. I would direct that 
question directly to O'Reilly at [EMAIL PROTECTED]

Chuck

> 
> From: Wendy Smoak <[EMAIL PROTECTED]>
> Date: 2002/11/24 Sun PM 10:20:27 EST
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: [ANNOUNCE] O'Reilly Struts Book Now Available
> 
> Chuck wrote:
> > I just wanted to let everyone know that my Struts book published by
> O'Reilly is 
> > now available and shipping. You can get it from Amazon, Bookpool, etc. 
> 
> Any idea if/when they will put it on Safari (http://safari.oreilly.com)?
> Technical books go out of date so fast that I like to make sure it's truly
> classic before adding it to the collection. Besides, work pays for the
> Safari subscription.  ;)
> 
> -- 
> Wendy Smoak
> Application Systems Analyst, Sr.
> ASU IA Information Resources Management 
> 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: RE: [ANNOUNCE] O'Reilly Struts Book Now Available

2002-11-24 Thread Chuck Cavaness
Yes they will be. They have asked me to put those together and they are planning to 
make them available for download. The files will probably be up by the end of the week.

Chuck

> 
> From: "Jonathan Holloway" <[EMAIL PROTECTED]>
> Date: 2002/11/24 Sun PM 08:48:53 EST
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Subject: RE: [ANNOUNCE] O'Reilly Struts Book Now Available
> 
> Just out of interest Chuck, are the examples that are mentioned in your
> book in particular the online banking example and the virtual shopping
> example available in any form.  I can't seem to see the examples to
> download from the Oreilly website.
> 
> Thanks,
> Jonathan Holloway.
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
> Sent: 25 November 2002 00:54
> To: [EMAIL PROTECTED]
> Subject: [ANNOUNCE] O'Reilly Struts Book Now Available
> 
> I just wanted to let everyone know that my Struts book published by
> O'Reilly is 
> now available and shipping. You can get it from Amazon, Bookpool, etc. 
> 
> Again I wanted to say thanks to all of those who reviewed and provided
> feedback on the material. It was a great aide for me to get that sort of
> instant feedback, both positive and negative. As Craig and Ted have said
> many times, the Struts mailing list is very unique and full of really
> great people. I hope it adds value to the community.
> 
> Thanks to all,
> 
> Chuck Cavaness
> Author - Programming Jakarta Struts
> ISBN: 0596003285
> 
> Amazon
> http://www.amazon.com/exec/obidos/ASIN/0596003285/qid=1038174812/sr=2-1/
> ref=sr_2_1/104-4064794-3140717
> 
> Bookpool
> http://www.bookpool.com/.x/6kq93k1kim/sm/0596003285
> 
> O'Reilly
> http://www.oreilly.com/catalog/jakarta
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 


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




O'Reilly Struts Cover

2002-07-24 Thread Chuck Cavaness

For all of those guessing and suggesting earlier this week on an animal for 
the Struts book, I've finally seen it and it's NONE of the ones suggested 
so far. It's really good though and does the framework proud. I'm told that 
the book will be available for pre-orders this week or next and the cover 
will be visible then and no matter how much money you offer, I won't tell :)

Chuck


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts & Persistence

2002-07-23 Thread Chuck Cavaness

I used this on the Storefront application including in several chapters as 
if my memory serves me correctly, you can plugin different sequence manager 
implementations in the ojb.properties class.

Something like this I think:
SequenceManagerClass=ojb.broker.util.sequence.SequenceManagerHighLowImpl

There are several other properties that you can control as well, like are 
the ids global to all enties or does each entity have its own set. Very nice.

chuck

At 12:24 PM 7/23/2002 -0700, you wrote:
>That makes sense, I was wondering how it could handle it in a generic
>fashion.  I suppose it adds a row to the OJB_SEQ table for every table
>column that it has to autoincrement.
>
>I further suppose it could accomplish an auto-increment insert with a single
>DB call if they use a nested select from the OJB_SEQ table for the
>auto-increment column, followed by an update to the OJB_SEQ table to
>actually increment that column value, both statements executed as a single
>batch call.
>
>I'll have to check it outthanks!
>
>peace,
>Joe
>
>-Original Message-
>From: Graham Lounder [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, July 23, 2002 12:08 PM
>To: Struts Users Mailing List
>Subject: RE: Struts & Persistence
>
>
>I've been using OJB for the past couple of weeks so I'm by no means an
>expert.  What I can tell you is that OJB requires an OJB_SEQ table in the
>database.  This allows OJB to hanlde autoincrementing fields on its own, and
>not on any one specific implementation.
>
>I have been using OJB with MsAccess and haven't had a problem yet (crossing
>my fingers) :-)
>
>Graham
>
>-Original Message-
>From: Joe Barefoot [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, July 23, 2002 4:04 PM
>To: Struts Users Mailing List
>Subject: RE: Struts & Persistence
>
>
>I haven't had time to play with OJB yet, but does anyone know if it works
>properly with Oracle?  I mean, I know it should work fine with any DB for
>generating select and update statements, but what about inserts when you are
>using sequence numbers?  The increments are handled differently in different
>databases, so I'm curious how OJB addresses this (if at all).
>
>thanks,
>Joe
>
>-Original Message-
>From: Mete Kural [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, July 23, 2002 11:42 AM
>To: Struts Users Mailing List; [EMAIL PROTECTED]
>Subject: RE: Struts & Persistence
>
>
>OJB is great. (jakarta.apache.org/ojb) You can easily
>map your tables to objects. It works with MySQL. I
>recommend that you implement DAO objects that call
>OJB's APIs and keep all the persistence operations
>there.
>
>Good luck,
>Mete
>
>--- James Mitchell <[EMAIL PROTECTED]> wrote:
> > I'll be uploading a modified version of the example
> > app (struts-example.war)
> > which uses OJB as soon as I can finish it.
> >
> > Basic O/R mapping using JDO API w/MySql on the
> > backend.
> >
> > It's not there yet, but here's the url:
> > http://sourceforge.net/projects/struts/
> >
> >
> > James Mitchell
> > Software Engineer\Struts Evangelist
> > Struts-Atlanta, the "Open Minded Developer Network"
> > http://www.open-tools.org/struts-atlanta
> >
> >
> >
> >
> > > -Original Message-
> > > From: Elderclei R Reami
> > [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, July 23, 2002 2:54 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Struts & Persistence
> > >
> > >
> > > Hi again,
> > >
> > > Does anyone know about usage of persistence
> > frameworks, like Torque & OJB
> > > from Apache Group, with Struts?
> > >
> > > Thanks for all the help with code generation. I
> > downloaded StrutsBuilder
> > > and Eclipse+EasyStruts to evaluate and they are
> > great tools. About self-
> > > generated apps from database schema and beer...
> > Huhr! Sounds nice and we
> > > can start a new project from the idea :)
> > >
> > > Best Regards,
> > > Elder
> > >
> > > --
> > > To unsubscribe, e-mail:
> > >
> > 
> > > For additional commands, e-mail:
> > > 
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
>
>
>__
>Do You Yahoo!?
>Yahoo! Health - Feel better, live better
>http://health.yahoo.com
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: struts book

2002-07-23 Thread Chuck Cavaness

It's not going to be available for review, but it will be in the book. I'm 
still rewriting this very moment :)

chuck

At 09:14 AM 7/23/2002 -0500, you wrote:
>Is chapter 8 of the O'Reilly struts book not going to be up for review?
>
>Jose Casas
>
>E-Commerce Applications
>(501) 277-3112
>[EMAIL PROTECTED]
>
>
>
>
>**
>Notice:  The area code for the Wal-Mart Bentonville General
>Office in the US has changed from 501 to 479.  Please make
>sure that you are dialing 479 when making calls to any
>General Office location.
>
>**
>This email and any files transmitted with it are confidential
>and intended solely for the individual or entity to
>whom they are addressed.  If you have received this email
>in error destroy it immediately.
>**
>  Wal-Mart Stores, Inc. Confidential
>**
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [ANN] Chapter 18 of the O'Reilly Struts book now available

2002-07-18 Thread Chuck Cavaness

Simon,

   I have to be finished by the end of the month. O'Reilly has done a good 
thing and forced me to finish the book this month. What this means is that 
several chapters will not make it into this first edition. They will be 
covered in the 2nd edition, which I've already had discussions with them 
about. The simple truth is that I was trying to cover to much material in 
one book and I'm a slow writer.

This is both good and bad. Good because the book is getting so large and 
would have been huge if I actually put every chapter into it. Not to 
mention that it wouldn't be out for 10 more years :) But unfortunately, 
several chapters will not make it into this edition.

Having said all of that, I expect the book to be out in very late August or 
early September. O'Reilly told me that it should be available for 
pre-ordering this month. I think it's taking them a long time to figure out 
which animal they want on the cover :)

Chuck

At 03:13 PM 7/18/2002 -0500, you wrote:
>Chuck,
>
>Any word on your expected publication date yet? I have $$$ burning a hole 
>in my pocket waiting for your book. I see that Sue Spielman's book is 
>expected in October, according to Amazon, but I couldn't find your book on 
>there.
>
>Simon
>
>-
>Simon P. Chappell [EMAIL PROTECTED]
>Java Programming Specialist  www.landsend.com
>Lands' End, Inc.   (608) 935-4526
>
>
> >-Original Message-
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> >Sent: Thursday, July 18, 2002 12:21 PM
> >To: [EMAIL PROTECTED]
> >Subject: [ANN] Chapter 18 of the O'Reilly Struts book now available
> >
> >
> >Chapter 18 "Logging in a Struts Application" has been
> >posted on theserverside.com.
> >
> >http://www.theserverside.com/resources/strutsreview.jsp
> >
> >The EJB Chapter is finished and will be posted within
> >the next day or so, followed by Tiles and the
> >Performance chapter.
> >
> >Chuck
> >
> >--
> >To unsubscribe, e-mail:
> >
> >For additional commands, e-mail:
> >
> >
> >
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: getting nested tags to work with DynaActionForm???

2002-07-16 Thread Chuck Cavaness

In answer to this question, take a look at several of the chapters from my 
upcoming O'Reilly book on Struts, especially chapter 5 where I cover the 
steps that the controller goes through while processing a request.

http://www.theserverside.com/resources/strutsreview.jsp

chuck

>
>This is another example of where knowing the exact sequence of Struts 
>events is crucial.  Has anyone ever written up a detailed step-by-step of 
>what the controller does when a request comes in?  I've written a brief 
>one for our company's developers - shall I post it?
>
>Roman Fail
>Sr. Web Application Developer
>POS Portal, Inc.
>
>
> -Original Message-
> From: Rick Reumann [mailto:[EMAIL PROTECTED]]
> Sent: Tue 7/16/2002 1:33 PM
> To: Struts List
> Cc:
> Subject: getting nested tags to work with DynaActionForm???
>
>
>
> I had an ArrayList property set in my DynaActionForm and it worked
> fine with the nested tag in displaying the information from the beans
> in the ArrayList of this DynaActionForm. The problem however came 
> when
> I when I hit submit with the updated information. I kept getting
> BeanUtils.populate errors with no index value set for 
> 'field.[0]'.
> Sorry can't cite the exact error since I now went to using a typical
> ActionForm and the nested tag page submits fine.
>
> Is there something special I need to do in order to get
> DynamicActionForms to work with Nested tags?
>
> Thanks,
>
> --
>
> Rick
> mailto:[EMAIL PROTECTED]
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Help with enabling Struts logging

2002-07-16 Thread Chuck Cavaness

My chapter on Logging with Struts Applications should be posted on 
theserverside.com tonight or tomorrow. When it shows up, download it and 
read it and see if it helps. That will be a good test on how effective it 
is. Any feedback you can provide will be very helpful.

You can find it (when it's actually posted) here: 
http://www.theserverside.com/resources/strutsreview.jsp

Chuck


At 04:19 PM 7/16/2002 -0400, you wrote:
>Hello,
>
>Please forgive what I believe to be a newbie question.  I tried RTFM and 
>the RTFMLA (mailing list archives).  I dunno, maybe my brain isn't 
>functioning at the moment.  Anyway.  I have a simple Tomcat 4.0.4 
>installation with Struts 1.1b1.  I haven't done anything to the logging 
>configuration.  I would like the lines:
>
> if (log.isDebugEnabled()) {...
>
>to return true and the for results of the lines:
>
> log.debug("...
>
>to get print to System.out.
>
>I can't for the life of me figure out how to enable debugging for 
>Struts.  Please HELP!
>
>Thanks!
>Matthew
>
>
>
> protected ActionForm processActionForm(HttpServletRequest request,
>HttpServletResponse response,
>ActionMapping mapping) {
>
> // Create (if necessary a form bean to use
> ActionForm instance = RequestUtils.createActionForm
> (request, mapping, appConfig, servlet);
> if (instance == null) {
> return (null);
> }
>
> // Store the new instance in the appropriate scope
> if (log.isDebugEnabled()) {
> log.debug(" Storing ActionForm bean instance in scope '" +
> mapping.getScope() + "' under attribute key '" +
> mapping.getAttribute() + "'");
> }
> if ("request".equals(mapping.getScope())) {
> request.setAttribute(mapping.getAttribute(), instance);
> } else {
> HttpSession session = request.getSession();
> session.setAttribute(mapping.getAttribute(), instance);
> }
> return (instance);
>
> }
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [ANN] Chapter 11 of the O'Reilly Struts book now available

2002-07-10 Thread Chuck Cavaness

William,

It just wasn't one of the topics that developers seemed to ask about. 
If you think it's worth discussing, send feedback for this or other 
suggestions to the email listed in the chapter: 
[EMAIL PROTECTED] and I'll try to add it to the material. I 
don't want to tie up the mailing list with feedback about the chapters.

Chuck

At 12:47 PM 7/10/2002 +, you wrote:

>Hi Chuck !!
>Why didn't you talk about using validator with DispatchAction ?
>David was helping me to program a good example, and now , it is working.
>
>William.
>
>
>>From: [EMAIL PROTECTED]
>>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>To: [EMAIL PROTECTED] Subject: [ANN] Chapter 11 of the 
>>O'Reilly Struts book now available
>>Date: Tue, 09 Jul 2002 15:49:15 +
>>
>>Chapter 11 "Using the Struts Validator " has been
>>posted on theserverside.com.
>>
>>http://www.theserverside.com/resources/strutsreview.jsp
>>
>>Chapters 8 and 20 will also be posted this week.
>>
>>As always, I look forward to the feedback.
>>
>>Chuck
>>
>>--
>>To unsubscribe, e-mail:
>>
>>For additional commands, e-mail: 
>
>
>
>
>_
>Join the world's largest e-mail service with MSN Hotmail. 
>http://www.hotmail.com
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: DynaActionForm and Nested property -- (to Craig)

2002-07-05 Thread Chuck Cavaness

Thanks for catching me on that. I looked at the form-bean element twice and 
still thought there was a custom impl there, but that was actually the type 
attribute.

Sorry for the confusion.
chuck

At 12:42 PM 7/5/2002 -0700, you wrote:


>On Fri, 5 Jul 2002, Chuck Cavaness wrote:
>
> > Date: Fri, 05 Jul 2002 15:32:13 -0400
> > From: Chuck Cavaness <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > Subject: Re: DynaActionForm and Nested property -- (to Craig)
> >
> > Raveendra,
> >
> >I was reading your email and just thought I would mention something that
> > I saw that may be a hard bug to find later. When using dynamic forms, you
> > have to set the "dynamic" attribute to true, like this:
> >
> > > > >type="org.apache.struts.action.DynaActionForm">>
> > >type="rb.pc.vo.pcCompanies.PCCompanyVO"/>>
> > >
> >
> >
> > Just wanted to point that out in case you didn't see it.
> >
>
>Actually, you don't need to do this if you use the standard implementation
>class (org.apache.struts.action.DynaActionForm).  It is only required on
>your own custom subclasses of DynaActionForm.
>
> > Chuck
>
>Craig
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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




Re: DynaActionForm and Nested property -- (to Craig)

2002-07-05 Thread Chuck Cavaness

Raveendra,

   I was reading your email and just thought I would mention something that 
I saw that may be a hard bug to find later. When using dynamic forms, you 
have to set the "dynamic" attribute to true, like this:

>type="org.apache.struts.action.DynaActionForm">>
>   >
>


Just wanted to point that out in case you didn't see it.

Chuck



At 11:09 AM 7/5/2002 -0700, you wrote:


>On Fri, 5 Jul 2002, Boyalla, Raveendra wrote:
>
> > Date: Fri, 5 Jul 2002 11:59:54 -0400
> > From: "Boyalla, Raveendra" <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> > Subject: DynaActionForm and Nested property -- (to Craig)
> >
> > Hi Craig,
> >
> > this is my form bean.
> >
> >
> >  > type="org.apache.struts.action.DynaActionForm">
> >
> >> type="rb.pc.vo.pcCompanies.PCCompanyVO"/>
> >
> > 
> >
> >
> >
> > and in form
> >
> > 
> >
> >
> > java.lang.IllegalArgumentException: Null property value for 'pcCompany'
> >   at
> > 
> org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.j
> > ava:693)
> >   at
> > 
> org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:74
> > 1)
> >   at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:723)
> >
> >
> > It seems I need to initialize form-bean   property pcCompany to new
> > rb.pc.vo.pcCompanies.PCCompanyVO().
> >
>
>Yep ... you sure do.
>
> >
> > Please help me out so that I can change all my form beans to DynaActionForm
> > having nested properties.
> >
>
>The approach I generally take is to do this sort of thing is to subclass
>DynaActionForm with a class that only has a reset() method (and optionally
>a validate() method if you need one), and do the setup in reset().  This
>works because reset() is always called when Struts creates an instance of
>this form bean for you (in 1.1 -- it wasn't always true in 1.0), so it
>makes a good spot to do initialization like this.
>
> > Thanks to Struts Authors for making life easier.
> >
>
>You're welcome :-).
>
> > Raveendra Boyalla
> >
>
>Craig
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Just how cooked is Struts Validation at this point?

2002-07-03 Thread Chuck Cavaness

I've used it in 1.1b quite a bit and find it very stable and have used it 
in more than just trivial examples. I also know or several large projects 
using it, both within Struts and in the business components. No issues. I 
would recommend using it.

For what that's worth,
Chuck

At 06:30 PM 7/3/2002 -0400, you wrote:
>How ready to use do people consider the validation portion of Struts right 
>now?  I'm basing this question on having spent several hours trying to get 
>it installed, and discovering that:
>
>1) It required commons-validator
>2) commons-validator has never been made available as a binary
>3) Building the nightly commons dist is an adventure
>
>Personally, I don't feel comfortable using or recommending software based 
>on a package (commons-validator) still classified as pre-release.  Does 
>anyone have a feel for when this code is going to enter a stable phase?
>
>Thanks,
>James
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts Examples

2002-07-01 Thread Chuck Cavaness

Glen,
Thanks for mentioning my example in chapter 3. In the chapter on packaging, 
I mention the different ways that you might want to package your classes 
and the pros and cons of each way. That chapter is finished, just not 
posted yet. I wanted to provide an example of each way. As you said, the 
example in chapter 3 illustrates one approach. The Storefront application 
that runs from chapter 4 to the end of the book, is packaged by 
functionality (e.g. catalog, order, security, framework...).

Just wanted to point that out.

Chuck

At 06:48 AM 7/1/2002 -0500, you wrote:
>The Struts book being reviewed at the ServerSide
>(http://www.theserverside.com/resources/strutsreview.jsp)
>has a good example using Struts V1.1 in Chapter 3.
>Sample code is given to work with.  I'm looking at it
>now.
>
>Only issue is that they've divided the Java packages
>not by functionality (login, search, transaction,
>etc.), etc., but by class of behavior (form, action,
>view, etc.)  Earlier postings on this ML have
>indicated that this is not the best design, as it
>limits class reuse.
>
>Glen
>
> > -Original Message-
> > From: Manish_Purang
>[mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, June 30, 2002 5:24 AM
> > To: [EMAIL PROTECTED]
> > Subject: Struts Examples
> >
> >
> > Hi,
> >
> > Where can i find examples or sample codes for Struts
>framework. I
> > basically
> > new to Struts and want to get more info through such
>examples.
> > Any suggestions..?
> >
> > Regards,
> >
>**
>
>
>_
>Do You Yahoo!?
>Información de Estados Unidos y América Latina, en Yahoo! Noticias.
>Visítanos en http://noticias.espanol.yahoo.com
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: users guide(s) for DynaActionForm et al?

2002-06-25 Thread Chuck Cavaness

One source is chapter 7 of my Struts book at 
http://www.theserverside.com/resources/strutsreview.jsp

Chuck

At 03:30 PM 6/25/2002 -0400, you wrote:
>I've been doing wizards for Action's, ActionForm's, and action
>mappings, as part of a group doing "Struts tooling" for WSED, an
>Eclipse-based IDE. So far we've only been working with Struts 1.0, but
>are thinking about 1.1. I'm particularly interested in DynaActionForm
>(et al), about which I've already had a request.
>
>Is there any users-guide-level documentation for DynaActionForm et al?
>I've read
>
>http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils/package-summary.html
>
>and combed through the struts-user archives. But all I see are
>fragments, and I'd prefer "the big picture" :-)
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: hello

2002-06-25 Thread Chuck Cavaness

Tooting my own horn, read my posted chapters at: 
http://www.theserverside.com/resources/strutsreview.jsp

Chuck

At 01:40 PM 6/25/2002 -0400, you wrote:
>I am new to sturts and  i want to know some thing about   ActionForm and
>ActionServlet.
>i mean what does ActionForm will do, and what ActionServlet.
>
>  thanks for your reply


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Starter Action? Where to find Plugin Documentation?

2002-06-14 Thread Chuck Cavaness

I know it doesn't help you now, but Chapter 9 of my book will cover plugins 
and show how to use them. Chapter 9 is finished and will be published very 
shortly at http://www.theserverside.com/resources/strutsreview.jsp.

Chuck

At 08:37 AM 6/14/2002 -0800, you wrote:
>Can someone give me a hint where to find documentation on
>this topic? (i.e. Plugins, how they are configured, and how
>you attach them to events.)
>
>Thanks.
>
>
> Original message 
> >Date: Fri, 14 Jun 2002 08:57:50 -0700 (PDT)
> >From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> >Subject: Re: Starter Action?
> >To: Struts Users Mailing List [EMAIL PROTECTED]>
> >
> >
> >
> >On Thu, 13 Jun 2002, Struts Newsgroup wrote:
> >
> >> Date: Thu, 13 Jun 2002 23:10:02 -0700
> >> From: Struts Newsgroup <[EMAIL PROTECTED]>
> >> Reply-To: Struts Users Mailing List [EMAIL PROTECTED]>
> >> To: [EMAIL PROTECTED]
> >> Subject: Starter Action?
> >>
> >> Subject: Starter Action?
> >> From: "Christopher Cheng" <[EMAIL PROTECTED]>
> >>  ===
> >> Is it possbile to define one of the actions to be executed
>during startup
> >> instead of defining a new servlet in web.xml?
> >>
> >
> >In Struts 1.1, you can define and register a PlugIn that is
>notified when
> >the Struts controller servlet is started and stopped.  The
>init() method
> >can do whatever setup things you need.
> >
> >In Struts 1.0, you can accomplish the same thing by
>subclassing
> >org.apache.struts.action.ActionServlet and overriding the
>init() method --
> >something like this:
> >
> >  public void init() throws ServletException {
> >super.init();
> >... do my own setup ...
> >  }
> >
> >and using this class as the "action" servlet in web.xml.
> >
> >Craig
> >
> >
> >--
> >To unsubscribe, e-mail:   [EMAIL PROTECTED]>
> >For additional commands, e-mail: [EMAIL PROTECTED]>
> >
>
>
>===
>  Experience is something you don't
>  get until just after you need it.
>===
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts book bug?

2002-06-11 Thread Chuck Cavaness

Adolfo,

   It is required according to the DTD and the source code, because there 
is not default specified. However, I think I may know how it's working for 
you. I'm just guessing here however. Do you have the properties file 
specified in the web.xml? Version 1.1 supports backwards-compatibility with 
1.X and it will still load the message resources from the web.xml for the 
default application. It may be getting the message resources for the 
default application from there. Take a look at the 
defaultMessageResourcesConfig() method in the ActionServlet class. There's 
a note that this will be removed in a later release.

This might be how it's not breaking for you, I'm not really sure. I didn't 
see anywhere a default message bundle name is being set. Maybe we're 
looking at different versions?

Chuck


At 04:35 PM 6/11/2002 +, you wrote:

>I read in chapter 4, in  element definition of 
>parameters that the parameter "parameter" is required. I think this is not 
>rtue, since I am able to leave it blank and Struts assigns the default one 
>org.apache.struts.action.MESSAGE/mi_subapplication as key in the 
>ServletContext for this bundle.
>
>Adolfo.
>
>
>
>_
>Join the world's largest e-mail service with MSN Hotmail. 
>http://www.hotmail.com
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




O'Reilly Struts Chapter 7 Posted

2002-06-07 Thread Chuck Cavaness

Just a note for everyone that I've posted Chapter 7 on theserverside.com.

Here's the link:
http://www.theserverside.com/resources/strutsreview.jsp

I've included an .rtf version with the ZIP file for those w/o MS Word. As 
always, I appreciate any feedback on the material.

Enjoy,
Chuck


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Where do I find documentation an examples about the new tags in the struts-config 1.1 dtd?

2002-06-06 Thread Chuck Cavaness

I cover them in my chapter 4 from here:

http://www.theserverside.com/resources/strutsreview.jsp

Chuck

At 06:52 AM 6/6/2002 -0500, you wrote:

>- Original Message -
>From: "Dirk Storck" <[EMAIL PROTECTED]>
>To: "Struts User (E-Mail)" <[EMAIL PROTECTED]>
>Sent: Thursday, June 06, 2002 4:00 AM
>Subject: Where do I find documentation an examples about the new tags in the
>struts-config 1.1 dtd?
>
>
>http://jakarta.apache.org/struts/userGuide/release-notes-1.1-b1.html
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: related to: Re: #2 - Use DispatchAction to organize related operations

2002-06-04 Thread Chuck Cavaness

Todd,
  No big ones that I can come up with, other than what Vic was trying to 
stress about letting the container do the work for you. My comments to Rick 
were about a specific problem with putting it into the Actions, due to the 
order of events that take place to process a request. I was just trying to 
remind Rick that in most cases, the Action is way to late in the process. I 
think there are several ways to skin this cat.

Chuck

At 08:19 AM 6/4/2002 -0400, you wrote:
>I have to ask a question;  Why not use a filter to handle this?  The filter
>will be called before any components of struts are invoked.  It has access
>to the request, response and session and can handle forwarding the request
>to the login page or error page if they are not currently logged in.  If
>container managed security is used, it will get invoked prior to the filter,
>which can then check the getRemoteUser() and the session to ensure that they
>have been logged in and perform any setup that is required for creating a
>user object and storing the information in the session or wherever.  The
>filter can then chain to the requested page with the chain.doFilter().
>
>Any reason not to do this?
>
>Todd
>
>-Original Message-
>From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, June 04, 2002 7:56 AM
>To: 'Struts Users Mailing List'
>Subject: RE: related to: Re: #2 - Use DispatchAction to organize related
>operations
>
>
>Chuck is absolutely correct on the linear progression of action processing.
>I, too am overriding processPreprocess and it works beautifully.  Besides
>increasing security, it cuts down on unnecessary CPU bandwidth.
>
>Mark
>
>-Original Message-
>From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
>Sent: Monday, June 03, 2002 10:58 PM
>
>Rick,
>
>catch this earlier. I had implemented something along these lines awhile
>back and soon remembered that the ActionForm is populated and the
>validate() method is called, all of this before the Action's execute()
>method is invoked. The question is, do you want to check whether or not the
>
>What I suggest is to look at the processPreprocess() method in the
>RequestProcessor and possibly override this to do your checks. It's called
>
>Just some things to think about,
>Chuck
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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




Re: related to: Re: #2 - Use DispatchAction to organize related

2002-06-03 Thread Chuck Cavaness

Vic/Rick,

This has been my experience with container-managed security. If your 
application doesn't need to execute any special business logic as part of 
the login process, yes it works fine. However, if I've got to authenticate 
with LDAP, or check how many failed login attempts this usedid has before 
letting them in, or check with the userid locked out for any reason, or if 
I have multiple datasources, container-managed security has been a big pain 
in the ass.

I haven't found any portable and generic hook to allow for the kind of 
functionality that I described above with container-managed security. Now, 
having said that, I do agree that anything that can be done declaratively, 
rather than programmatically, is a good thing. But even the EJB spec 
members left in programmatic security, because they knew that not every app 
had the same requirements. I thought JAAS was going to be the greatest 
thing since sliced bread when it came out, unfortunately it wasn't and I'm 
still waiting...

Chuck


>Guys, guys, please! Do not do login and check login using Struts.
>The web container/ app. server does it for you and then redirects to the
>   page you want to go to. It has to, to be compliant. Every web app
>server I know of does it. http://www.basebeans.com/down/struts.zip ,
>look at chapter 16.
>
>Again, it is a bad practice to do security in action or in Struts. It
>should be done using the web container, search Google for JAAS, it is
>already done for you.
>
>hth, V.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re[2]: related to: Re: #2 - Use DispatchAction to organize related operations

2002-06-03 Thread Chuck Cavaness

The processPreprocess() method has the request and response as arguments, 
so you should be able to get everything you need. Remember, the method 
returns a boolean that tells the RequestProcessor whether it should 
continue to process the request or not. If you find that the user is not 
logged in, you'll need to return false, but also redirect the user 
manually. You can still get access to the GlobalForwards and such; it's 
just that you'll need to take care of the redirecting part. You can call 
the processActionForward() method and pass it the ActionForward for the 
login page, for example.

Chuck

At 11:04 PM 6/3/2002 -0400, you wrote:
>On Monday, June 3, 2002, 10:58:07 PM, Chuck Cavaness wrote:
>
>CC> What I suggest is to look at the processPreprocess() method in the
>CC> RequestProcessor and possibly override this to do your checks. It's 
>called
>CC> for every request and long before ActionForm's are populated and Action's
>CC> are invoked. The default value is to return true, which allows request
>CC> processing to continue. What I've done in the past is to override this,
>CC> check the login, and possibly redirect the user to the login page. If the
>CC> user's logged in, just return true to continue processing the request.
>
> Excellent idea. Thanks. You are right I wouldn't even want form
> validation to take place if they weren't logged in ( which would
> be allowed to happen if I only checked in the action ). I take it
> I'll have access to the session as well inside of
> RequestProcessor, because if I go this route I will also need to
> check for particular roles that will be stored in a UserBean put
> in the Session and possibly deny or grant access based on these
> roles.
>
>--
>
>Rick
>
>mailto:[EMAIL PROTECTED]
>
>"I wish I had a dollar for every time I spent a dollar, because then,
>Yahoo!, I'd have all my money back."
>   -Jack Handey
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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




Re: related to: Re: #2 - Use DispatchAction to organize related operations

2002-06-03 Thread Chuck Cavaness

Rick,

  Let me mention something. One potential problem with this approach is 
that by the time the action is called, may be too late. You really need to 
catch this earlier. I had implemented something along these lines awhile 
back and soon remembered that the ActionForm is populated and the 
validate() method is called, all of this before the Action's execute() 
method is invoked. The question is, do you want to check whether or not the 
user is logged in after this, or before it. Maybe this is app specific, I'm 
not sure. It's my opinion, and only an opinion, that you really should be 
catching this before the action is invoked, if nothing else, for security 
reasons.

What I suggest is to look at the processPreprocess() method in the 
RequestProcessor and possibly override this to do your checks. It's called 
for every request and long before ActionForm's are populated and Action's 
are invoked. The default value is to return true, which allows request 
processing to continue. What I've done in the past is to override this, 
check the login, and possibly redirect the user to the login page. If the 
user's logged in, just return true to continue processing the request.

Just some things to think about,
Chuck

At 09:31 PM 6/3/2002 -0400, you wrote:
>On Friday, May 31, 2002, 7:11:47 AM, Ted Husted wrote:
>
>TH> The Struts Dispatch Action is designed to do exactly the same thing, but
>TH> without messy branching logic. The base perform method will check a
>TH> dispatch field for you, and invoke the indicated method. The only catch
>TH> is that the dispatch methods must use the same signature as perform.
>TH> This is a very modest requirement, since in practice you usually end up
>TH> doing that anyway.
>
> Ted, I was discussing with James Mitchell about ways to manage a
> user being logged in and he suggested a way that I really liked
> where you have a base class perform method handle checking the
> login status and then call something like a doWork() method that
> will invoke the work in your subclass Actions (avoiding have to
> have all your actions handle the loggin check).
>
> The question I have is I'm now using a dispatch action class that
> handles most of the action work. Do I need to go in and modify the
> base DispatchAction class' perform method in order to get
> something similar to the above functionality? Or maybe there is an
> easier way to handle checking login status using a subclass of
> DispatchAction?
>
> Thanks
>
>--
>
>Rick
>
>mailto:[EMAIL PROTECTED]
>
>"Probably the earliest flyswatters were nothing more than some sort of
>striking surface attached to the end of a long stick."
>   -Jack Handey
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Why separate form bean to collect form data?

2002-05-28 Thread Chuck Cavaness

Ryan,
  If you're using 1.1B, look into the Dynamic forms. Along with the 
validator, this is probably your best bet.
Chuck


At 05:00 PM 5/28/2002 -0700, you wrote:
>Hi,
>
>I am Norman.
>
>Instead of creating a new form bean for each form, can we create a generic
>form class that can collect all the data in a form? Using methods in the
>request
>object through which we can find all the control names and their values or a
>definition that identifies form data to be copied to the generic form bean,
>we eliminate mechanical coding get and set properties for each new form.
>Other generic form processing can be added to this form as well. To further
>"validate" the form, we can extend generic form class for each specific
>form.
>
>The intent is to write minimal amount of new code for new application or
>function.
>
>Any comments, opinions, criticism?
>
>Thanks
>
>Ryan Norman
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts Validator

2002-05-27 Thread Chuck Cavaness

This may be of no help, but I didn't see that you had the dynamic attribute 
to "true" like this:



Chuck

At 02:42 PM 5/27/2002 -0300, you wrote:
>Hi,
>
>Has anyone used the server-side validation with DynaActionForms using
>the Struts Validator included in Struts 1.1-b1?
>
>There are two classes (DynaValidatorForm and DynaValidatorActionForm) in
>the package org.apache.struts.validator, but when I tried always generates
>a NullPointerException whith the getDynaClass() method.
>
>Example:
>
>// OK, but no validation
>
>...
>
>
>// NullPointerException in getDynaClass() method
>type="org.apache.struts.validator.DynaValidatorActionForm">
>...
>
>
>Thanks in advance,
>
>Fernando.
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts User Group

2002-05-24 Thread Chuck Cavaness

Depending on how far north, count me in.
Chuck

At 03:09 PM 5/24/2002 -0400, you wrote:
>Are there any Struts Users Group(s) that meet in the Atlanta, GA area?
>
>I am aware of (and attend when possible) the AJUG (http://www.ajug.org/)
>meetings, but I mean specifically for "Web Development using the Struts
>framework".
>
>I was wondering what kind of audience we might get if I started one in the
>North Atlanta area.
>
>
>Any feedback is appreciated.
>
>
>James Mitchell
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




ActionForm-reset() method

2002-05-18 Thread Chuck Cavaness

Thanks for the insight on the reset() method.

Chuck

At 09:40 AM 5/18/2002 -0700, you wrote:


>On Sat, 18 May 2002, Galbreath, Mark wrote:
>
> > Date: Sat, 18 May 2002 11:27:15 -0400
> > From: "Galbreath, Mark" <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> > Subject: RE: Small Complaint - Struts Impl.
> >
> > Ted/Craig,
> >
> > Speaking of states (like the insane one I find myself in, being in the
> > office on yet another Saturday :-( ), the spec allows the specification of
> > scope for an ActionForm in struts-config.xml but I've found it has no
> > effect.  For example, I specify an form bean in session scope, but all the
> > properties get reset to defaults after every "pass through" by the Action.
> > The only way I've found to maintain the bean's state is removing the 
> body of
> > reset() in the bean and providing only a call to super.reset( mapping,
> > request ).
> >
>
>If you are resetting evertying to defaults in your reset() method, that is
>exactly what you should expect.  Struts calls reset() before it populates
>the form bean properties, on every request -- so, if you have your form
>bean in session scope, you'll only want to reset properties that are
>present on the current page (and will thus get repopulated with their
>current values).
>
> > I'll be testing my app with multiple clients soon, but what I'm not 
> clear on
> > now is how Struts handles beans in session scope with respect to different
> > simultaneous clients.  Does ActionServlet create a pool of stateless beans
> > to serve each client, or are multiple clients going to see the state of the
> > bean previously set by a separate client?  My understanding is that the
> > Action uses one instance of a bean like a singleton, resetting its
> > properties before releasing it to service another thread.  If this is
> > correct, what exactly is happening if the bean is declared in session scope
> > and/or the reset() is stripped?
> >
>
>Although Action instances are singletons, form beans are not.  Form beans
>placed in request scope are instantiated on every request, while form
>beans placed in session scope are created only if they are not in session
>scope already.
>
>After that decision, form beans are treated identically, no matter which
>scope they are in.  In particular, reset() is called on every request.
>
> > Mark
> >
>
>Craig
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Problem with Resin 2.1.0 and Struts 1.1b (from CVS)

2002-05-18 Thread Chuck Cavaness

Post the part of your mainMenu.jsp that is setting the encodiing.

Chuck

At 03:43 PM 5/18/2002 +0400, you wrote:
>when accessing struts-example/logon.do i've got this
>500 Servlet Exception
>
>java.lang.NullPointerException
>at com.caucho.vfs.ReadStream.setEncoding(Compiled Code)
>at com.caucho.server.http.Request.setCharacterEncoding(Compiled Code)
>at 
>com.caucho.server.http.RequestAdapter.setCharacterEncoding(RequestAdapter.java:270)
>at _mainMenu__jsp._jspService(Compiled Code)
>at com.caucho.jsp.JavaPage.service(JavaPage.java:74)
>at com.caucho.jsp.Page.subservice(Page.java:485)
>at com.caucho.server.http.FilterChainPage.doFilter(Compiled Code)
>at com.caucho.server.http.Invocation.service(Compiled Code)
>at com.caucho.server.http.CacheInvocation.service(Compiled Code)
>at 
>com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:212)
>at 
>com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:99)
>at 
>com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:76)
>at 
>org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:972)
>at 
>org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:408)
>at 
>org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
>at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1161)
>at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:471)
>at javax.servlet.http.HttpServlet.service(Compiled Code)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
>at 
>com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:95)
>at com.caucho.server.http.Invocation.service(Compiled Code)
>at com.caucho.server.http.CacheInvocation.service(Compiled Code)
>at com.caucho.server.http.HttpRequest.handleRequest(Compiled Code)
>at com.caucho.server.http.HttpRequest.handleConnection(Compiled Code)
>at com.caucho.server.TcpConnection.run(Compiled Code)
>at java.lang.Thread.run(Thread.java:485)
>
>Can anybody help?
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Iterator Simple

2002-05-18 Thread Chuck Cavaness

I also just noticed that reset is called again immediately after the 
processActionForm() method in the RequestProcessor during the 
processPopulate() method. It doesn't check scope at all here either. So, 
the reset() is actually being called twice here during the same request; 
once during the processActionForm() method and then again during the 
processPopulate() method. Both are being done unconditionally.

Chuck

At 12:06 PM 5/18/2002 -0400, you wrote:
>I think what the guy wants, Joe, is something like list.size() so he can
>perform some action when the iteration reaches element n-1.  The only way I
>can think of doing it is something like:
>
>
>   
>   
> out.println( "No more data.");
>   
>
>
>Mark
>
>-Original Message-
>From: Joseph Barefoot [mailto:[EMAIL PROTECTED]]
>Sent: Friday, May 17, 2002 6:55 PM
>
>The tag does have an optional attribute called "indexId" whose value is the
>name of a page scope bean to hold the index.  I think that this index bean
>must be of type Integer (someone correct me if this is wrong), so you would
>do a  for the Integer bean with an appropriate name.  Then you
>can reference the bean with  or  tags within the
> tag.  Or you can just use a scriplet. > :)
>
>I'm assuming you could re-use the same index bean for different
> tags as long as they are not nested inside one another..
>
> > -Original Message-
> > From: Mannem, Taati [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, May 17, 2002 3:41 PM
> > To: [EMAIL PROTECTED]
> > Subject: Iterator Simple
> >
> >
> > Guys,
> >   When I iterate thru  how do I know that I am in the
> > last element?
> > I have tried using some other way like getting the index and comparing but
> > it doesnt seem to work..
> > The reason why I want to do this
> >
> > if I am in the last element I need to print something and if I am
> > not then I
> > dont have to print.
> > Thanks in advance.
> >
> > Regards,
> > Taati
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Small Complaint - Struts Impl.

2002-05-18 Thread Chuck Cavaness

Mark and all,

   I was working on the View chapter today and I noticed that reset() is 
called on an ActionForm, regardless of the scope. This is done at the very 
end of the createActionForm() method in the RequestUtils. The 
createActionForm() method is called for every request in the 
processActionForm() method of the RequestProcessor.

I was just wondering about that and whether this is intended for some 
reason or possibly a bug. Maybe the reset should only be called if the 
scope = "request"?

Chuck

At 11:27 AM 5/18/2002 -0400, you wrote:
>Ted/Craig,
>
>Speaking of states (like the insane one I find myself in, being in the
>office on yet another Saturday :-( ), the spec allows the specification of
>scope for an ActionForm in struts-config.xml but I've found it has no
>effect.  For example, I specify an form bean in session scope, but all the
>properties get reset to defaults after every "pass through" by the Action.
>The only way I've found to maintain the bean's state is removing the body of
>reset() in the bean and providing only a call to super.reset( mapping,
>request ).
>
>I'll be testing my app with multiple clients soon, but what I'm not clear on
>now is how Struts handles beans in session scope with respect to different
>simultaneous clients.  Does ActionServlet create a pool of stateless beans
>to serve each client, or are multiple clients going to see the state of the
>bean previously set by a separate client?  My understanding is that the
>Action uses one instance of a bean like a singleton, resetting its
>properties before releasing it to service another thread.  If this is
>correct, what exactly is happening if the bean is declared in session scope
>and/or the reset() is stripped?
>
>Mark
>
>-Original Message-
>From: Ted Husted [mailto:[EMAIL PROTECTED]]
>Sent: Saturday, May 18, 2002 7:59 AM
>
>The properties in the ActionForm aren't states but ~prospective~ states.
>
>After the input is validated, then it can be converted (and perhaps
>transformed) to an actual state.
>
>The underlying problem is that HTML controls have no input buffer. There
>is no place to store whatever claptrap people might enter into a field
>-- except in an ActionForm. Just because they enter "a1" into a field
>that doesn't make it a valid state for that field.
>
>ActionForms are also a firewall. Most Web applications are living in
>hostile environments. Even if you use JavaScript validation on your
>form, there is no guarantee that a hostile will use it. CGI accepts
>input first -- ActionForm ask questions later.
>
>Finally, ActionForms often represents many presention-states that are
>not present elsewhere in the application. This gives you a place where
>you can have everything you need to handle an input request in one
>place.
>
>For more see,
>
>http://jguru.com/forums/view.jsp?EID=811382
>
>-- Ted Husted, Husted dot Com, Fairport NY US
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Application State == View or Business Logic

2002-05-15 Thread Chuck Cavaness

My thinking is that the data transfer objects (also referred to as value 
objects) are still part of the model. The view components do access these 
as JavaBeans to help render the dynamic data. Here's a linke from the 
Struts user guide:

http://jakarta.apache.org/struts/userGuide/building_model.html#system_state

The business interface can be accessed from the action class, this way 
exceptions can be dealt with gracefully and forwarded to the proper 
location. The business interface typically returns dto that are placed in 
an ActionForm, a DynaForm, or some other shared resource like session 
scope. The view components, JSP pages, tags, etc... can use these immutable 
snapshots of the model to render the view for the client.

That's how I see it working.

Chuck

At 03:21 PM 5/15/2002 -0300, you wrote:
>The diagram comes from section 1.4 of the J2EE Blueprints: Introduction to 
>the Blueprints at Sun.
>
>http://java.sun.com/blueprints/guidelines/designing_enterprise_applications/introduction/summary/index.html#1035154
>
>
>Steven Banks
>368-0566
>
> >>> "Robert Taylor" <[EMAIL PROTECTED]> 05/15/02 02:47PM >>>
>The problem with accessing the model directly from the view is that if for
>some reason an error were to occur while accessing the model, then there is
>no mechanism to notify the user with a meaningful message.
>
>For example:
>
>If I had a custom select tag which retrieved a list of companies where the
>list was retrieved from the database and it was unable to retrieve the list,
>then there is no intuitive way for the user to know what went wrong besides
>an empty drop down box.
>
>Where as if  your Action (controller) were responsible for retrieving the
>list and placing it in the appropriate scope for the view to access and an
>error occurred, then the user could be forwarded/redirected to the
>appropriate view which contained meaningful information about the error.
>
>Although I have not yet seen it, I would have to believe the diagram meant
>the view _indirectly_ accesses the model via the controller.
>
>robert
>
> > -Original Message-
> > From: Dan Cancro [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, May 15, 2002 1:28 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Application State == View or Business Logic
> >
> >
> > I thought that a view could access a model directly to display the model's
> > state.  There used to be a MVC2 diagram on the Struts site that had a line
> > connecting the view directly to the model.  Does Struts work differently
> > now?  That was a good diagram.  I wish it was easier to find.
> >
> > Thanks,
> > Dan
> >
> > > -Original Message-
> > > From: Ted Husted [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, May 15, 2002 9:44 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: Application State == View or Business Logic
> > >
> > >
> > > In remote applications, including Web applications, MVC is usually
> > > moderated by the Layers pattern, so that the View and the Controller
> > > interact and the Controller and Model interact, but the View and Model
> > > do not interact.
> > >
> > > V <-> C <-> M <-> (persistent store)
> > >
> > >
> > > -- Ted Husted, Husted dot Com, Fairport NY US
> > > -- Developing Java Web Applications with Struts
> > > -- Tel: +1 585 737-3463
> > > -- Web: http://husted.com/about/services
> > >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [ANN] Chapters 5 and 6 of the O'Reilly Struts book are now available

2002-05-10 Thread Chuck Cavaness

Joe,

   Thanks for the comments. The reason that we went with WL was at the time 
we started writing it (long before the EJB 2.0 spec became public), it was 
the most complete 2.0 EJB container. We looked at some of the others, 
JBoss, Orion, and a few others, but they didn't implement the complete 
spec. That had alot of the functionality, but not all of it. That's the 
only reason.

As we got towards the end of the book, others started getting certified, 
but there were still very few that implemented it completly. Probably 
another reason is because that's what we had been using for quite awhile at 
the .com I was working at the time. We had built an Auction application 
with it and then a huge B2B e-commerce application.

Chuck

At 04:51 PM 5/10/2002 -0700, you wrote:
>Cool.  Chuck, I must say I enjoyed "Special Edition Using Enterprise
>JavaBeans 2.0".  Very good presentation of some tricky subject matter.  No
>EJB flame-wars please, just giving credit where it's due. :)
>
>b.t.w., why not point readers to JBoss instead of Weblogic (distributed w/
>the book)?  IMO, EJB newbies would benefit more from JBoss's simplicity and
>strict adherence to standards than Weblogic's overwhelming configuration
>details and "fluff".
>
>joe
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, May 10, 2002 4:06 PM
> > To: [EMAIL PROTECTED]
> > Subject: [ANN] Chapters 5 and 6 of the O'Reilly Struts book are now
> > available
> >
> >
> > I wanted to let everyone know that Chapters 5 and 6 have been
> > posted on theserverside. You can download them from
> > http://www.theserverside.com/resources/strutsreview.jsp.
> >
> > As I mentioned previously, I really do appreciate all of the kind
> > words and feedback from the previous chapters. To be honest, the
> > number of correspondences overwhelmed me initially. I'm still
> > trying to reply to each email that I've received, so if you
> > haven't received a response, you will eventually.
> >
> > I appreciate the time that everyone has taken and I hope that the
> > material has given value to those that have had a chance to read it.
> >
> > Enjoy,
> > Chuck
> >
> > --
> > Sent via jApache.org
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: xml-xslt v jsp

2002-05-10 Thread Chuck Cavaness

Interesting digression, Brett is the editor for my Struts book. He's an 
awesome editor!

Chuck

At 01:42 PM 5/10/2002 -0700, you wrote:
>Brett Mclaughlin is the man.  JDOM rules.
>
>my .02
>
>
>peace,
>Joe
>
> > -Original Message-
> > From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, May 10, 2002 1:26 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: xml-xslt v jsp
> >
> >
> > And just for reference:
> >
> > Brett Mclaughlin, "Java and XML" (O'Reilly, 2001)
> > Eric Burke, "Java and XSLT" (O'Reilly, 2001)
> > Michael Kay, "XSLT, 2d ed." (Wrox, 2001)-considered the bible of XSLT
> >
> > Mark
> >
> > -Original Message-
> > From: Stout, Kenneth [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, May 10, 2002 4:10 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: xml-xslt v jsp
> >
> >
> > There are a couple of issues (OK, I will only bring up a couple).
> >
> > 1) The development of the XSLT will be done by whom? Normally you want to
> > separate the presentation from the development. XSLT is a very strong tool
> > but can be considered almost a programming language. So you
> > either teach web
> > designer's XSLT, or you have a programmer convert the HTML into
> > XSLT. Tools
> > are on the way which should help solve this issue.
> > 2) Performance. XSLT is interrupted, and is executed each time. It is my
> > understanding that there is an initiative underway to create compiled XSLT
> > (I believe they are called translets, but I've not kept in touch with that
> > arena).
> >
> > Neither of these answer the "can you" question. They address the
> > "should you
> > today" question. I am not say don't do it. Just be aware.
> >
> > Kenneth.
> >
> > -Original Message-
> > From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, May 10, 2002 12:55 PM
> > To: [EMAIL PROTECTED]
> > Subject: xml-xslt v jsp
> >
> >
> > Subject: xml-xslt v jsp
> > From: jisv <[EMAIL PROTECTED]>
> >  ===
> > Just wondering what people's thoughts are on using XML pages that
> > have XSLT
> > applied to them to display html pages rather than using JSP's. I read an
> > article recently that outlined this particular idea, apparently to even
> > more separate the business logic from presentation, and
> > supposedly increase
> > development time. I would have a couple of questions about how
> > performance
> > would differ, just how much quicker development time would be and simply
> > why this hasn't been implemented already, is there a flaw which
> > has stopped
> > such an implementation being used?
> > Thanks for your thoughts.
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
> > --
> > To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [ERROR] Digester

2002-04-29 Thread Chuck Cavaness

Not sure if you are still having this problem, but I believe the answer is 
that it's using the 1.0 DTD and not 1.1. Look at the top of the config file 
and see if it's referencing the 1.0 DTD.

Chuck

At 10:04 AM 4/29/2002 -0700, you wrote:
>No ideas at all?  I've even rebuilt the project based on the Struts-Blank 
>project.  Maybe it's the version of the XML parser, but I've tried a few 
>different ones all with the same result.
>
>Any other suggestions would be great.
>
>
>Anthony
>
>On Friday, April 26, 2002, at 01:17 PM, Anthony Martin wrote:
>
>>I get these messages from stderr every time I start Tomcat:
>>
>>[ERROR] Digester - -Parse Error at line 198 column 60: Element type 
>>"form-property" must be declared. >type "form-property" must be declared.>
>>[ERROR] Digester - -Parse Error at line 198 column 60: Attribute "name" 
>>must be declared for element type "form-property". 
>>>element type "form-property".>
>>[ERROR] Digester - -Parse Error at line 198 column 60: Attribute "type" 
>>must be declared for element type "form-property". 
>>>element type "form-property".>
>>[ERROR] Digester - -Parse Error at line 199 column 15: The content of 
>>element type "form-bean" must match "(icon?,display-
>>name?,description?,set-property*)". >content of element type "form-bean" must match "(icon?,display-
>>name?,description?,set-property*)".>
>>[ERROR] Digester - -Parse Error at line 1664 column 72: Element type 
>>"message-resources" must be declared. >Element type "message-resources" must be declared.>
>>[ERROR] Digester - -Parse Error at line 1664 column 72: Attribute 
>>"parameter" must be declared for element type "message-resources". 
>>>for element type "message-resources".>
>>[ERROR] Digester - -Parse Error at line 1666 column 17: The content of 
>>element type "struts-config" must match "(data-sources?,form-
>>beans?,global-forwards?,action-mappings?)". 
>>>"struts-config" must match "(data-sources?,form-beans?,global-
>>forwards?,action-mappings?)".>
>>
>>
>>However, none of these errors hinder how the application works.  I'm 
>>glad, but I'd still like to address them because they get my attention.
>>
>>
>>Anthony
>>
>>
>>--
>>To unsubscribe, e-mail:    
>>[EMAIL PROTECTED]>
>>For additional commands, e-mail:  
>>[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Exception handling by radhika

2002-04-28 Thread Chuck Cavaness

I'm not sure of your reasons for not wanting to ActionErrors or 
ActionMessages, but that is only a fraction of what might be considered the 
exception handling framework in Struts.

The Exception Handling Chapter is one of the chapters that many have asked 
me about and I'm working hard to get that one ready for the next release of 
chapters of theserverside.com.

Chuck

At 05:53 PM 4/27/2002 +0500, you wrote:
>hi,
>  How can I do exception handling in struts apart from using errors object ???
>ie. i dont want to use
>ActionErrors errs = new ActionErrors();
>errs.add("policyNo", new ActionError("error.policyNo"));
>how can I do exception handling ???
>
>Help reqd. urgently.
>Thanking in anticipation.
>Regards,
>Radhika
>
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Action + Session Beans + JMS

2002-04-26 Thread Chuck Cavaness

The Action class isn't the only place to store a remote reference to a 
session bean. In fact, it's not a good place. Each user needs to have its 
own remote reference due to the restrictions how many threads can access a 
single EJBObject.

In what you describe (locking on a queue), you are in fact, using JMS 
really as you would a session bean. You can store the remote reference or a 
handle in a proxy object and put that proxy object into the user's 
sesson.  I like JMS/MDB for many different scenarios, but I don't think it 
fits here.

But obviously everyone has their own approach to architectures. I just 
would take a closer look at some other documentation and books to see what 
the pros and cons. Pick up one of the EJB books. The fact that you're using 
Struts really has nothing to do with this design. You would have the same 
issues if you were using any other presentation framework.

Don't let the fact that you have Action classes throw you. They have 
nothing to do with this situtation.

Chuck

At 08:15 AM 4/26/2002 -0400, you wrote:



>I disagree - though  not completely. I think that the approach Chuck
>recommends is fine - and is likely the most popular choice.
>
>But I think that using a JMS queue or MDB as the front to the facade isn't
>always inapropriate. Especially in this case, because:
>
>  - The Action classes are singletons. You can't store a reference to a
>session bean in one because other sessions will be using the same object.
>- A reference to an MDB or JMS queue doesn't have to have session scope.
>Its reference can be stored in the action class and reused.
>
>- Also, you can write to a JMS Queue/MDB and the immediately lock on a read
>on the same to wait for your response.
>- Multiple sessions can concurrently lock on a read on the queue - each
>waiting for just their own response.
>  - Make sure when you lock on it, that you specify a timeout so you don't
>hang. This way you'll be interrupted if you timeout.
>  - You can lock on a JMS queue waiting for a particular response - you'll
>need to figure out how to look for a particular reponse on the queue - look
>at the JMS spec, there are a number of ways to do this.
>
>I think a MDB/JMS queue may be an appropriate front to the facade whenever
>you need to queue up access to a limited resource (such as a specific
>entity bean instance, or some other remote system). An MDB makes it easier
>to ensure that no two session beans are concurrently attempting to lock a
>resource or engage the resource in a transaction.
>
>Both Weblogic and JBoss have good JMS/MDB implementations. I haven't used
>or reviewed other containers' JMS/MDB implementations.
>
>I agree with Chuck on the use of value objects instead of booleans as a
>response. JMS/MDB allow you to write objects into them and also to read
>them back out as responses.
>
>Also, the action class itself cannot be a session bean. The primary
>org.apache.struts.action.Action servlet wouldn't be able to instantiate it
>or store a reference to it correctly - unless you modified how struts
>itself works (you have the source code - go ahead of you want!).
>
>
>
>
>
>
>
>
>
>
>
>
>
>Chuck Cavaness <[EMAIL PROTECTED]> on 04/25/2002 10:08:21 PM
>
>Please respond to "Struts Users Mailing List"
>   <[EMAIL PROTECTED]>
>
>To:   "Struts Users Mailing List" <[EMAIL PROTECTED]>
>cc:
>Subject:  Re: Action + Session Beans + JMS
>
>
>I think I understand your design and I really think you need to stick to a
>synchronous call, instead of the asynchronous JMS call. By its very nature,
>the client publishing the message will not get an immediate response, other
>than an acknowledgement for the message itself.
>
>I think you're better off putting the session bean back into the picture.
>You don't have to use entity beans, but a session bean method like
>authenticate() that returns some type of ValueObject. I wouldn't just
>return a boolean. You would be wise to use an object, where you can plan
>for growth. Later, if you needed to return more data, you would need to
>change the method signature. If you go ahead and return a lightweight
>JavaBean-like object now, more data would only mean additional properties
>in the view object.
>
>This is a very common approach to this type of problem. There are plenty of
>design patterns for this scenario. Check out the Session Facade and
>ValueObject patterns here:
>http://java.sun.com/blueprints/patterns/j2ee_patterns/catalog.html
>
>
>My two cents.
>Chuck
>
>
>
>At 04:57 PM 4/25/2002 -0500, you wrote:
> >Hey all,
> >
> >I have a design question and I'm lo

Re: Action + Session Beans + JMS

2002-04-25 Thread Chuck Cavaness

I think I understand your design and I really think you need to stick to a 
synchronous call, instead of the asynchronous JMS call. By its very nature, 
the client publishing the message will not get an immediate response, other 
than an acknowledgement for the message itself.

I think you're better off putting the session bean back into the picture. 
You don't have to use entity beans, but a session bean method like 
authenticate() that returns some type of ValueObject. I wouldn't just 
return a boolean. You would be wise to use an object, where you can plan 
for growth. Later, if you needed to return more data, you would need to 
change the method signature. If you go ahead and return a lightweight 
JavaBean-like object now, more data would only mean additional properties 
in the view object.

This is a very common approach to this type of problem. There are plenty of 
design patterns for this scenario. Check out the Session Facade and 
ValueObject patterns here:
http://java.sun.com/blueprints/patterns/j2ee_patterns/catalog.html


My two cents.
Chuck



At 04:57 PM 4/25/2002 -0500, you wrote:
>Hey all,
>
>I have a design question and I'm looking for the best practice in
>handling it.
>
>
>
>I am using a customer login for a proof of concept with regards to the
>architecture, here is the current architecture.
>
>
>
>I have a logon jsp that invokes a logonAction. This action takes the
>login information and publishes a message (JMS) to a MDB (message Driven
>Bean).
>
>The MDB calles a Session Bean the authenticates the user.
>
>
>
>Here is the problem - the action pubs the message and once sent - it
>does not know when the process is complete.
>
>
>
>I initially didn't have the JMS layer - So the LogonAction was calling a
>SessionBean Method - ValidateUser and that method returned a Boolean.
>The LogonAction would use the returned Boolean to figure out what view
>to display.
>
>
>
>
>
>I want an elegant way to know when the validation is complete. I was
>thinking about creating a generic action class that's a session bean.
>But I'm wondering since the action classes are singletons, am I creating
>threading problems by doing this. If I was able to make the action a
>SessionBean - The actionSessionBean could become the manager of the
>process and determine what view to display.
>
>
>
>I also thought about sticking something in the session itself - the
>problem with that is the action will not know when to inspect the
>session since the action is only able to publish the message - but not
>listen to it.
>
>
>
>I hope this is a good enough explanation about what I am trying to
>accomplish. Any suggestions would be greatly appreciated.
>
>
>
>DD


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts 1.1 b1 and how to set form-property initial value for java.util.List

2002-04-25 Thread Chuck Cavaness

I don't really think the framework is setup to do what you want it to do. 
The "initial" attribute is really designed to be a primitive. The 
ConvertUtils "convert" method is not really capable of doing what you want 
it to do. You'll probably have to extend the FormPropertyConfig class and 
override the initial() method and a few other things to do that. Shouldn't 
be too bad, but the current framework will probably not handle your situation.

I could be wrong, it's happened before. But this is how I understand it to 
work, looking at the source. I definitely should make this a note in the 
book, eh?

Chuck Cavaness

At 04:34 PM 4/25/2002 +1000, you wrote:
>Hi,
>
>I have not located too many examples on setting the intial bean value for
>types in the form-property tag other than java.lang.String.  I would like to
>set the initial value in a java.util.List.  Is this possible? if so, how do
>I do it?
>
>
>
>
> type="org.apache.struts.action.DynaActionForm">
> type="java.lang.String"/>
> 
> ...
>
>Thanks in advance for any help.
>
>Craig Laverty.
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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




Re: DynaActionForm problem with non-string objects

2002-04-25 Thread Chuck Cavaness

I think that you'll have to extend the framework. The "initial" value is 
really designed to be a primitive or one of the wrappers around it.  The 
ConvertUtils "convert" method is used and it's not really capable of doing 
what you want it to do. I think you might take a look at extending the 
FormPropertyConfig class, rather than the DynaActionForm. The 
DynaActionForm uses a Map already and should be capable of dealing with 
Objects. It's the initialization portion of the process that you need to 
override and I believe that starts in the FormPropertyConfig class.

Chuck Cavaness

At 11:38 AM 4/19/2002 -0300, you wrote:
>I'm using some DynaActionForms, but some of them
>require more complex objects with nested fields, and
>not only Strings as fields.
>The problem is that I can only seem to set my objects
>as null, and it causes problems in the JSPs.
>Consider this example, taken from struts-config.xml:
>
> type="org.apache.struts.action.DynaActionForm"
>name="myForm">
> type="vo.MyObject" />
> 
>
>
>I could not use the "initial" property of the
>form-property element because my object is not a
>String. So it is set to null instead.
>All I want is a new instance of the object to be
>created as the field's initial value.
>I could set a newly allocated object to the Dynamic
>form myself, but it sounds like a rather crude
>solution to me.
>Isn't there a better way to do this, or will I have to
>extend the DynaActionForm class to solve this issue?
>
>
>=
>
>Frederico Ferro Schuh
>[EMAIL PROTECTED]
>ICQ: 20486081
>
>___
>Yahoo! Empregos
>O trabalho dos seus sonhos pode estar aqui. Cadastre-se hoje mesmo no 
>Yahoo! Empregos e tenha acesso a milhares de vagas abertas!
>http://br.empregos.yahoo.com/
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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




Re: requestDispatcher.include rather than requestDispatcher.forward

2002-04-22 Thread Chuck Cavaness

Take a look at the org.apache.struts.actions.IncludeAction. It may be just 
what you need.

Chuck

At 12:42 PM 4/23/2002 +1000, you wrote:
>Team,
>
>I'm fairly new to Struts and would like to know if the following is possible.
>
>When returning an ActionForward object from the perfom method of a Action
>object, (usually acheived by mappings.findForward("name")) is it possible to
>have the Struts framework execute a requestDispatcher.include() rather than a
>requestDispatcher.forward()?
>
>ie:
>
>public class MyAction extends org.apache.struts.action.Action {
>   public org.apache.struts.action.ActionForward perform(
>   org.apache.struts.action.ActionMapping actionMapping,
>   org.apache.struts.action.ActionForm actionForm,
>   javax.servlet.http.HttpServletRequest request,
>   javax.servlet.http.HttpServletResponse response)
> throws java.io.IOException, javax.servlet.ServletException {
>
> // Is it possible that the Struts framework execute a
> // requestDispatcher.include, rather than a forward on
> // the resulting ActionForward?
> return actionMapping.findForward("success");
>   }
>
>}
>
>--
>Regards,
>
>Brent Burgess
>JP
>#
>Attention:
>The information contained in this message and or attachments is intended
>only for the person or entity to which it is addressed and may contain
>confidential and/or privileged material. Any review, retransmission,
>dissemination or other use of, or taking of any action in reliance upon,
>this information by persons or entities other than the intended recipient
>is prohibited. If you received this in error, please contact the sender and
>delete the material from any system and destroy and copies.
>#
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Internationalization and

2002-04-19 Thread Chuck Cavaness

Although I'm not real found of this action, I would look at the 
org.apache.struts.actons.LookupDispatchAction. This is a pre-built action 
that can be used exactly for what you are trying to do.

Chuck

At 04:30 PM 4/19/2002 +0200, you wrote:
>Hi,
>
>we are developing an application that uses the i18n capabilities of Struts,
>and we have found a problem trying to use this capability with the
>. For instance, if we use in our JSP pages: then in our code we will do 
>like this: if (action.equals("Accept")){ returnPage = "accept"; } else{ 
>returnPage = "cancel"; } but if we want to translate the value of the 
>buttons the another languages let's say: How can we make the presentation 
>of the value, and the value passed to the property 'action' not coupled. I 
>would like to put into the 'action' property always the content in 
>English, but the view in the JSP page in different languages depending on 
>the localization of the user? Is this possible in Struts? Regards Diego 
>XpertOnline Technical Manager e-mail: [EMAIL PROTECTED] Adecco 
>OleCenter C/Severo Ochoa, 55 Parque Empresarial Casablanca II 28100 
>Alcobendas Madrid - Spain Telf: +34 91 484 77 08 -- To unsubscribe, 
>e-mail: For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [ANN] First two beta chapters of O'Reilly Struts book are available

2002-04-18 Thread Chuck Cavaness

Just the doc is fine. If you have comments relating to the source and other 
files, just add it to the doc where appropriate.

I look forward to your input, I think :)
Chuck

At 08:51 AM 4/18/2002 -0500, you wrote:
>Chuck,
>
>This is looking good! I'm reading through chapter 3 and making notes, 
>suggestions and snide comments as I go! :-)
>
>Do you want just the annotated doc files or do you need us to zip the 
>whole thing back up and send it to you? (I suspect you only need the doc 
>file, but I thought I'd better ask).
>
>Simon
>
>-
>Simon P. Chappell [EMAIL PROTECTED]
>Java Programming Specialist  www.landsend.com
>Lands' End, Inc.   (608) 935-4526
>
>
> >-Original Message-
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> >Sent: Wednesday, April 17, 2002 4:46 PM
> >To: [EMAIL PROTECTED]
> >Subject: [ANN] First two beta chapters of O'Reilly Struts book are
> >available
> >
> >
> >I wanted to let everyone know that the first two beta chapters
> >from my O'Reilly Struts book are available for download from
> >http://www.theserverside.com. You have to register an account
> >to be able to download the chapters. This is their policy, not
> >mine. I believe this is true even if you wanted to join the
> >discussion group or post a question.
> >
> >The chapters have not been through a formal editing process
> >yet. Therefore, you will find typos, run-ons, fragments, and
> >various other incorrect usages of the English language. All of
> >the chapters will eventually go through a formal review by
> >individuals that spent four or more years of their lives
> >learning how to construct a proper sentence, for which I have
> >yet to figure out.
> >
> > The purpose of providing the chapters so early is twofold.
> >The first reason is to get the material to the community as
> >quickly as possible. There have been a multitude of new
> >features added to the framework for 1.1, and hopefully the
> >information within the book will be valuable to the Struts
> >developer community. Obviously, I incur great peril in doing
> >this, in the off chance that I stink as a writer. Hopefully,
> >you won't find that to be true. But in either case, don't
> >worry; everything will be edited before being published.
> >
> >The other reason to allow the chapters to be made public
> >before they are final is to ask anyone that cares to
> >participate, to help out in the editing process. The chapters
> >are in MS Word format, with the track changes option on. As
> >you type in the document, your text should appear in a
> >different color, which allows me to see your recommended
> >changes. Once you have completed any changes, suggestions, or
> >just general comments on how good the chapter is (I hope),
> >just email a copy of the resulting document to:
> >
> >[EMAIL PROTECTED]
> >
> >Feel free to correct any general language problems that you
> >find. More importantly however, if you see any confusing
> >sections, technical mistakes, or would like me to add
> >something that is not there, that would be very beneficial.
> >Where appropriate, I've also included the source code for the
> >chapter within the ZIP file that you download. Feel free to
> >view it, modify it, or reuse it, as you need. In some cases,
> >entire web applications are included, along with ant build
> >scripts. If you detect problems or issues there, feel free to
> >mention those in the document as well.
> >
> >I will incorporate all of the changes back into the master
> >document. You might ask, "What do I get for doing this?" This
> >is the great thing about being an editor (ask any of them),
> >you get the satisfaction of knowing you helped to make a
> >published work better. Of course, you also get to keep the
> >word documents for reference, as long as you promise to buy a
> >copy of the book, (Just kidding on that part!) and everyone
> >will get a collective thank you in the acknowledgments of the
> >book. Unfortunately, I won't be able to thank everyone
> >personally, but if anyone goes beyond the call of duty, I will
> >add a personal thank you. Space is limited on this page, I
> >have a wife and three boys to thank, or they will kick me out
> >of the house.
> >
> >I will make new chapters available every few weeks on the
> >site, and this will go on until all of the chapters have been
> >edited and sent off to the printer. There's no real schedule
> >right now as to which chapters will be available when. I have
> >to be careful that it doesn't impact my overall schedule,
> >which I must hit. I have received a great deal of input from
> >everyone about which chapters are the most important to them
> >and I will try to follow that order, as long as it makes sense
> >from the standpoint of the table of contents. There are
> >dependencies in writing books, just as there are in software.
> >
> >I hope everyone gets s

Re: Warning when extending ActionMapping.

2002-04-17 Thread Chuck Cavaness

The struts DTD, whose job it is to make sure the struts-config.xml is 
valid, doesn't know about the screen attribute. You'll need to modify the 
DTD, or turn parsing off.

Chuck

At 05:09 PM 4/17/2002 +0200, you wrote:
>Hi,
>
>In struts-config.xml, I've added a property to the default struts mapping, 
>to be able to map each URL with a screen id:
>
>By example:
>
> forward="/views/authentication/logon.jsp"
> screen="ADP-000" />
>
>To do this, I wrote my own class which extends ActionMapping.
>All works fine, I can access the screen id by calling "mapping.getScreen()".
>
>But, I don't understand the logs:
>
>Parse Error at line 120 column -1: Attribute "screen" is not declared for 
>element "action".
>org.xml.sax.SAXParseException: Attribute "screen" is not declared for 
>element "action".
>...
>
>
>Anyone has an idea?
>
>--
>C. Bouessay
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: No action instance for path [/path] could be created

2002-04-15 Thread Chuck Cavaness

Look at the processActionCreate() method in the RequestProcessor. This is 
where the problem surfaces. Here's a fragment:

  try {
   instance = (Action)RequestUtils.applicationInstance(className);
   instance.setServlet(this.servlet);
   actions.put(className, instance);
  } catch (Throwable t) {
log.error(getInternal().getMessage("actionCreate", 
mapping.getPath()), t);


The applicationInstance() method just does a newInstance(). Either the 
className variable is null, which means the className could not be 
retrieved from the mapping. This would be some type of mapping glitch. If 
the className is not null, then newInstance() failed for other reasons.

Sprinkle a few println's around in here and the problem will become very 
evident.

Chuck


At 04:44 PM 4/15/2002 -0400, you wrote:
>This one is driving me crazy.  I've already checked the archive but found
>nothing relevant.  I get the following error whenever I run the following
>action:
>
>No action instance for path /addToCart could be created
>
>The other actions are found, just not this one.  Here's the relevant parts
>of my struts-config.xml:
>
>
>
>   
>   
>
> 
> 
>
>   
>
>   
>   
>
> type="y21.isac.struts.action.AddToCartAction">
>   
> 
>
> type="y21.isac.struts.action.WelcomeAction"
>name=""
>   scope="request"
>   input="">
>   
> 
>
> 
>
> type="y21.isac.struts.action.IsacTestStartAction">
>   
>   
> 
>
>   
>
>
>I have tried /addToCart both with and without an ActionForm just to see if
>it made any difference, but it didn't.  Wanting to make sure whether or not
>the ActionServlet was finding AddToCartAction, I added the following snippet
>to IsacTestStartAction (which is where I'm calling /addToCart from):
>
> try
> {
> Class.forName("y21.isac.struts.action.AddToCartAction",
>true, this.getClass().getClassLoader());
> System.err.println("ISAC Test Message:  AddToCartAction
>Found");
> }
> catch (Exception ex)
> {
> ex.printStackTrace();
> System.err.println("ISAC Test Message:  AddToCartAction NOT
>Found");
> }
>
>The AddToCartAction class is reported as found (removing the class file gave
>me the expected "NOT Found").  However if I change the Class.forName line to
>read:
>
>Class.forName("y21.isac.struts.action.AddToCartAction", true,
>this.getClass().getClassLoader());
>
>I get a ClassNotFoundException and the "NOT Found" message.  The class files
>are where they should be however.  What I can't understand is how
>WelcomeAction and IsacTestStartAction can be found, but AddToCart isn't.
>I've stripped the code from AddToCartAction down to the point where all it
>does is return the ActionForward.
>
>Here are the calls to the action from my jsp:
>
>Add To Cart Action Test Add To Cart Action Direct Does anyone have any 
>ideas? Here is the code for IsacTestStartAction and AddToCartAction for 
>reference. Thanks in advance. Jason  package 
>y21.isac.struts.action; import java.io.*; import javax.servlet.*; import 
>javax.servlet.http.*; import org.apache.struts.action.*; class 
>AddToCartAction extends org.apache.struts.action.Action { public 
>ActionForward perform(ActionMapping mapping, ActionForm form, 
>HttpServletRequest request, HttpServletResponse response) throws 
>IOException, ServletException { return mapping.findForward("success"); } } 
> package y21.isac.struts.action; import java.io.*; 
>import javax.servlet.*; import javax.servlet.http.*; import 
>org.apache.struts.action.*; import y21.isac.IsacUser; import 
>netscape.ldap.LDAPException; public class IsacTestStartAction extends 
>Action { public ActionForward perform(ActionMapping mapping, ActionForm 
>form, HttpServletRequest request, HttpServletResponse response) throws 
>IOException, ServletException { ActionErrors errors = new ActionErrors(); 
>IsacUser user = new IsacUser(); String testLevel = 
>request.getParameter("testLevel"); try { if ("tb".equals(testLevel)) 
>user.load("isac-tb-1"); else if ("oo".equals(testLevel)) 
>user.load("isac-oo-1"); else if ("bo".equals(testLevel)) 
>user.load("isac-bo-1"); else if ("ao".equals(testLevel)) 
>user.load("isac-ao-1"); else if ("pmbm".equals(testLevel)) 
>user.load("isac-pm-1"); else { System.err.println("Error in 
>IsacTestStartAction: testLevel not recognized"); return ( 
>mapping.findForward("error") ); } } catch (LDAPException e) { 
>e.printStackTrace(); errors.add(ActionErrors.GLOBAL_ERROR, new 
>ActionError("error.exception.ldap")); saveErrors(request, errors); 
>return(mapping.findForward("error")); } 
>request.getSession().setAttribute("user", user); String test = 
>request.getParameter("test"); if ("AddToCartAction".equals(test)) { 
>System.err.println("ISAC Test Message: Testing 

Re: Configuring sub-applications

2002-04-12 Thread Chuck Cavaness


I had the same realization as I was trying to use the new multi-app 
features. Although I haven't tried it yet, take a look at the 
org.apache.struts.actions.SwitchAction. Craig added it recently. It may be 
the rest of what you need, not sure however.

Chuck

[...ripped earlier messages ...]

>   Uh oh. This works great for forward, but what about the action's
>   input attribute? It seems action needs an inputContextRelative
>   attribute...
>
>   Uh oh. Now my html:img and html:link URLs are broken too. I'd like
>   these to be relative to the webapp, not the subapps.
>
>   Except for the contextRelative attribute, it appears that the
>   concept of subapps is "strong" meaning that a subapp is on par as an
>   app. I essentially wanted the same directory structure, but separate
>   configuration files.
>
>   Maybe there's another cool attribute that elludes me.
>
>--
>Bill Wohler <[EMAIL PROTECTED]>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
>Maintainer of comp.mail.mh FAQ and mh-e. Vote Libertarian!
>If you're passed on the right, you're in the wrong lane.
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts 1.1 beta Exception Handling

2002-04-11 Thread Chuck Cavaness

That's one of the most requested Chapters for me to put out and I'm working 
hard to get that one out next. In the meantime, take a look at the 
findException() method in the ActionMapping class. This is where it loops 
up the superclass chain of the Exception class looking for a 
ExceptionConfig for that type of Exception. It either finds one and uses 
that handler or returns null.

I'll try to get that Exception Handling chapter out soon.

Chuck

At 11:43 AM 4/11/2002 -0300, you wrote:

> Anyone knows of any documentation on the exception handling 
> feature in the 1.1 beta release?
>
> I was looking at it to (maybe) substitute our internal exception 
> handling mechanism, but I found very little documentation (mostly the 
> comments in the DTD and the short Javadoc in the ExceptionHandler class), 
> and I have many doubts (the biggest being if I can declare a "type" in 
> the config file and all subclasses of that type would be caught, not just 
> those of the exact type).
>
>--
>[]'s
>Marcelo Vanzin
>Touch Tecnologia
>[EMAIL PROTECTED]
>"Life is too short to drink cheap beer"
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat error log: Element "struts-config" does not allow "message-resource" here

2002-04-11 Thread Chuck Cavaness

It's .  I think that yoy're missing the "s" according to 
the error message.

Chuck


At 12:16 PM 4/11/2002 +, you wrote:
>Hi,
>
>Tomcat3.2.3+JBoss2.4.1 on JDK1.3.1_01 on SuSE7.2 (2.4.13)
>Struts1.0.2
>
>
>I am getting the following error message on startup of my containers(only 
>happens with 'tiles-doc.war' in tc/webapps):
>
>.. startup of JBoss .
>[Default] Starting tomcat. Check logs/tomcat.log for error messages
>[sax] startDocument()
>[sax] endDocument()
>[sax] startDocument()
>[Digester] Parse Error at line 219 column -1: Element "struts-config" does 
>not allow "message-resource" here.
>org.xml.sax.SAXParseException: Element "struts-config" does not allow 
>"message-resource" here.
>at org.apache.crimson.parser.Parser2.error(Parser2.java:3013)
>at 
> 
>org.apache.crimson.parser.ValidatingParser$ChildrenValidator.consume(ValidatingParser.java:349)
>at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1303)
>at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
>at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
>at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:499)
>at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
>at 
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
>at org.apache.commons.digester.Digester.parse(Digester.java:1299)
>at 
> org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:741)
>at org.apache.struts.action.ActionServlet.init(ActionServlet.java:408)
>at 
> org.apache.struts.tiles.ActionComponentServlet.init(ActionComponentServlet.java:52)
>at javax.servlet.GenericServlet.init(GenericServlet.java:258)
>at 
> org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
>at org.apache.tomcat.core.Handler.init(Handler.java:215)
>at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
>at 
> 
>org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130)
>at 
> org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
>at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
>at org.jboss.tomcat.TomcatEntry.execute(TomcatEntry.java:337)
>at org.jboss.tomcat.TomcatEntry.(TomcatEntry.java:76)
>at 
> 
>org.jboss.tomcat.EmbeddedTomcatServiceSX.startService(EmbeddedTomcatServiceSX.java:91)
>at 
> org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:107)
>at java.lang.reflect.Method.invoke(Native Method)
>at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
>at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
>at 
> 
>org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:836)
>at $Proxy0.start(Unknown Source)
>at org.jboss.util.ServiceControl.start(ServiceControl.java:81)
>at java.lang.reflect.Method.invoke(Native Method)
>at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
>at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
>at org.jboss.Main.(Main.java:210)
>at org.jboss.Main$1.run(Main.java:116)
>at java.security.AccessController.doPrivileged(Native Method)
>at org.jboss.Main.main(Main.java:112)
>[Digester] Parse Error at line 219 column -1: Element type 
>"message-resource" is not declared.
>org.xml.sax.SAXParseException: Element type "message-resource" is not 
>declared.
>at org.apache.crimson.parser.Parser2.error(Parser2.java:3013)
>at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1308)
>at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
>at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
>at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:499)
>at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
>at 
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
>at org.apache.commons.digester.Digester.parse(Digester.java:1299)
>at 
> org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServlet.java:741)
>at org.apache.struts.action.ActionServlet.init(ActionServlet.java:408)
>at 
> org.apache.struts.tiles.ActionComponentServlet.init(ActionComponentServlet.java:52)
>at javax.servlet.GenericServlet.init(GenericServlet.java:258)
>at 
> org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
>at org.apache.tomcat.core.Handler.init(Handler.java:215)
>at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
>at 
> 
>org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterce

Re: Preview OReilly Struts Chapters Online - Soon

2002-04-11 Thread Chuck Cavaness

If not, I'll make them available here. Keep in mind that this is only 
chapters 3 and 4 to begin with and get this started. They are "Overview of 
the Struts Framework" and "Configuring the Struts Application". Others will 
following accordingly.

Chuck

At 12:00 PM 4/11/2002 +0530, you wrote:

>will this be available on the site by this weekend ???
>
>rgds,
>amit
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Preview OReilly Struts Chapters Online - Soon

2002-04-10 Thread Chuck Cavaness

Everything has been approved by OReilly. I'm working with the folks at 
theserverside.com right now to get the first chapters online. In fact, I 
was writing the introductory information for the page when I saw this 
email. It may take several days for them to be mae available over there, 
because they will need to create a page for the book on their site and 
perform some other initial setup for the discussions. The first two 
chapters are ready for review and I have sent them over. Hopefully, they 
will be there soon.

Chuck

At 07:20 PM 4/10/2002 -0700, you wrote:
>Any further news on this. At java one in SF I met the
>editor and he said there shouldn't be a problem in
>putting this on Web.
>
>There is another book "Mastering Struts" by James
>Goodwil from Wiley publications, due to release in
>May.
>Does anybody knows if contents if this book were
>published on the web.
>
>-sanjay
>
>__
>Do You Yahoo!?
>Yahoo! Tax Center - online filing with TurboTax
>http://taxes.yahoo.com/
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: NoClassDefFoundError - Weblogic 6.1

2002-04-08 Thread Chuck Cavaness

I had this problem recently with our WL installation. I can't remember the 
exact cause. Obviously it's all about class loaders. The difference between 
the parent class loader and the one that is used to load the web app. One 
thing to check, see if you have the WEB-INF classes directory in the system 
classpath. If it is, try taking it out and see what happens. You're right 
of course, the struts.jar should be in the lib directory of the web app.

Chuck

At 09:55 PM 4/8/2002 +0530, you wrote:
>Hi all,
>
>The error is:
>
>java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm
>The environment is:
>Weblogic 6.1 SP1
>WIN NT 2000
>Struts.jar is in the lib directory of our application.
>The JSP includes other JSPs which are included using the directive. I have 
>traced the error to an included JSP which is using the  tag. 
>This error is being thrown by this tag library as it is not finding the 
>above class.
>The error goes away by keeping struts.jar in the classpath of Weblogic 
>startup. Of course this is not the solution.
>Any clues?
>Rgs,
>Vikram
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Nested properties

2002-04-05 Thread Chuck Cavaness

Have you defined a getLoanDetailBean() method in the ActionForm? Also, the 
LoanDetailBean must have a getLoanSummaryBean() method as well.

Chuck

At 04:28 PM 4/5/2002 -0500, you wrote:
>Hi,
>
>my form bean contains another form bean which in turn contains a property
>that
>I want to access in my original jsp.
>
>code: property="loanDetailBean.loanSummaryBean.statusId" />
>
>loanSummaryBean has getter method for statusId, but I am getting this error:
>
>"No getter method for property loanDetailBean.loanSummaryBean.statusId of
>bean org.apache.struts.taglib.html.BEAN"
>Any pointers on solving this problem?
>Thnx,
>GB
>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts1.1-b1 - generated buttons tags has wierd default titles and alt attributes

2002-04-05 Thread Chuck Cavaness

I'm pretty sure that it's related to this bug I submitted last week. It's 
in the BaseHandlerTag, so many tags are probably affected by this. Here's 
the bug report link:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7411


chuck

At 10:06 AM 4/5/2002 -0300, you wrote:
>I had the same problem.
>All you have to do is call the setReturnNull(true)
>method on the PropertyMessageResources object that
>struts uses to holds the messages.
>I don't know if there is a better solution, but I
>think they forgot to set that property to true to
>avoid getting those ???en_US.null??? stuff when it
>doesn't find entries on the MessageResources object...
>So on the load-startup I have a servlet that sets the
>property to true.
>You can do it like this:
>
>((org.apache.struts.util.PropertyMessageResources)getServletContext().getAttribute("org.apache.struts.action.MESSAGE")).setReturnNull(true);
>
>If someone knows of a configuration parameter to avoid
>doing this, please let us know.
>
>
>  --- Struts Newsgroup <[EMAIL PROTECTED]> escreveu:
> > Subject: Struts1.1-b1 - generated buttons tags has
> > wierd default titles and alt attributes
> > From: "Lian Seng, Loh" <[EMAIL PROTECTED]>
> >  ===
> > Hi,
> > Never noticed this before with 1.0, but view source
> > on a Struts page and my
> > buttons looked like :-
> >
> >  > title="???en_US.null???"
> > alt="???en_US.null???">
> >
> > Is this a configuration problem ?
> >
> > Thanks for any help
> > LS
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
>
>=
>
>Frederico Ferro Schuh
>[EMAIL PROTECTED]
>ICQ: 20486081
>
>___
>Yahoo! Empregos
>O trabalho dos seus sonhos pode estar aqui. Cadastre-se hoje mesmo no 
>Yahoo! Empregos e tenha acesso a milhares de vagas abertas!
>http://br.empregos.yahoo.com/
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Where can I do some application initialize work?

2002-04-04 Thread Chuck Cavaness

If you're using 1.1, you can setup a plugin for it. If you're using a 2.3 
container and don't need to support 2.2, you can setup a event listener on 
the servlet context creation for the application. Or you could just put 
initialize it in the init() method of the ActionServlet.

Chuck


At 06:39 PM 4/3/2002 -0800, you wrote:
>HI,
>
>I'm using struts & torque together. I put some initialize code in one of 
>my class as a static code. But these code is not executed until class 
>DataModel is lodaded. So, if I call any function of Torque, it will report 
>that "Torque is not initialized".
>
>Where can I put some global initialize code for the application ? Thanks.
>
>Annie
>
>public class DataModel {
>
>   static {
>   try{
>   Torque.init("piso.properties");
>   }
>   catch (Exception e)
>   {
>   e.printStackTrace();
>   }
>   }


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Problem with tag

2002-04-04 Thread Chuck Cavaness

One time I had this problem. Double check to make sure that you have the

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

at the top of the page.

Chuck

At 11:41 AM 4/4/2002 +0900, you wrote:
>I have some code in a jsp page
>
>
>logic:equal tag returned true
>
>
>
>logic:notEqual tag returned true
>
>
>When I access this page, I get the following
>
>logic:equal tag returned true
>logic:notEqual tag returned true
>
>
>
>Am I missing the point about the "logic:equal" and "logic:notEqual" tags, or
>is there a reason this might be happening?
>How can I make it print out only if value="false" ?
>
>
>
>Regards
>
>Antony
>
>
>
>
>
>_
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: DynaActionForm / DynaBean

2002-04-03 Thread Chuck Cavaness

I doubt this will be enough, but I'll offer it up to get you started. 
Suppose I have the following form-bean:


   
 
   
...


I have specified that the form will hold an object of type 
"com.oreilly.struts.catalog.view.ItemView", using a name of "view".

Further supposed that I have a GetItemDetailAction that has this execute 
method:

  ...
  public ActionForward executeAction(ActionMapping  mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response,
  UserContainer  userContainer) throws 
BaseException {
 String itemId = request.getParameter( IConstants.ID_KEY );
 ICatalogController catalogController = 
userContainer.getCatalogController();

 // Get a value object representing the item from the business tier
 ItemView itemView = catalogController.getItemView(itemId);

 // Set the ItemView into the Dynamic Action Form
 ((DynaActionForm)form).set("view", itemView);

 // The parameter name 'view' is what is defined in the Dynamic form
 // in struts-config. Maybe should use a constant there too?

 // Return to the success resource for this action
 return mapping.findForward(IConstants.SUCCESS_KEY);
}

Now, in the JSP page that the user is forwarded to, they can use all of the 
Struts tags to get at the ItemView data inside of the dynamic form. I won't 
show the JSP page, it's too long. Here's a couple of lines from it:

 

 

Notice that view.name would be translated into getView().getName() like a 
standard ActionForm.

I hope this helps somewhat.

Chuck



At 06:06 PM 4/3/2002 -0700, you wrote:
>I have read so much that talks about what the DynaBean DynaActionForm can
>accomplish but have been unable to find concrete examples. Does anybody have
>any code they could offer up to shed some light on the use.
>
>Brandon Goodin
>Phase Web and Multimedia
>P (406) 862-2245
>F (406) 862-0354
>[EMAIL PROTECTED]
>http://www.phase.ws
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: DynaActionForm / DynaBean

2002-04-03 Thread Chuck Cavaness

I doubt this will be enough, but I'll offer it up to get you started. 
Suppose I have the following form-bean:


   
 
   
...


I have specified that the form will hold an object of type 
"com.oreilly.struts.catalog.view.ItemView", using a name of "view".

Further supposed that I have a GetItemDetailAction that has this execute 
method:

  ...
  public ActionForward executeAction(ActionMapping  mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response,
  UserContainer  userContainer) throws 
BaseException {
 String itemId = request.getParameter( IConstants.ID_KEY );
 ICatalogController catalogController = 
userContainer.getCatalogController();

 // Get a value object representing the item from the business tier
 ItemView itemView = catalogController.getItemView(itemId);

 // Set the ItemView into the Dynamic Action Form
 ((DynaActionForm)form).set("view", itemView);

 // The parameter name 'view' is what is defined in the Dynamic form
 // in struts-config. Maybe should use a constant there too?

 // Return to the success resource for this action
 return mapping.findForward(IConstants.SUCCESS_KEY);
}

Now, in the JSP page that the user is forwarded to, they can use all of the 
Struts tags to get at the ItemView data inside of the dynamic form. I won't 
show the JSP page, it's too long. Here's a couple of lines from it:

 

 

Notice that view.name would be translated into getView().getName() like a 
standard ActionForm.

I hope this helps somewhat.

Chuck



At 06:06 PM 4/3/2002 -0700, you wrote:
>I have read so much that talks about what the DynaBean DynaActionForm can
>accomplish but have been unable to find concrete examples. Does anybody have
>any code they could offer up to shed some light on the use.
>
>Brandon Goodin
>Phase Web and Multimedia
>P (406) 862-2245
>F (406) 862-0354
>[EMAIL PROTECTED]
>http://www.phase.ws
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JSP optimiser that works with Struts

2002-04-02 Thread Chuck Cavaness

Not sure if I'm the first, but I have to ask (in a polite voice) why?

Chuck

p.s. Not sure if JPretty does JSP also, but here's the link:
http://www.mmsindia.com/JPretty.html


At 02:08 PM 3/27/2002 +1100, you wrote:
>Hi list,
>
>I'm looking for a jsp optimiser (open source/free) that will strip all white
>spaces from my jsp file. I have tried tidy but it doesn't work well with
>Struts tags. Is there a way to use tidy for Struts jsp?
>
>My jsp page contains a lot of indentation and formatting to make it human
>readable, so what I'm planning to do is before building the war file I want
>to run this optimiser over the jsp files and use the output on the war file.
>
>Anyone got any neat tricks/tools?
>
>cheers,
>
>--
>Victor Hadianto
>---
>Plastic... Aluminum... These are the inheritors of the Universe! Flesh and
>Blood have had their day... and that day is past! -- Green Lantern Comics
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: are there any good tag usage examples anywhere online?

2002-04-02 Thread Chuck Cavaness

I know this doesn't help you at all right now, but I'll be covering all of 
them in Chapter 8 of the OReilly Struts book. Hopefully that will be one of 
the early chapters that I put out for review, as many people have asked me 
for it. Again, sorry it's still a couple of weeks away, but I just wanted 
to respond to you question.

Chuck

At 07:50 AM 4/2/2002 -0500, you wrote:
>This never got answered.. anyone?
>
>- Original Message -
>Subject: are there any good tag usage examples anywhere online?
>
>
>Does anyone know of any good web sites that show *examples* of all
>the different Struts tags? The user guide is extremely ineffective in
>that capactity.
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Preview OReilly Struts Chapters Online - Soon - TILES???

2002-04-02 Thread Chuck Cavaness

As it stands right now, it's chapter 15.

Chuck

At 05:39 PM 4/2/2002 +0200, you wrote:
>Hi
>
>Which chapter contains "Tiles"???
>- Original Message -
>From: "Honman Lee" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Friday, March 29, 2002 7:00 PM
>Subject: RE: Preview OReilly Struts Chapters Online - Soon
>
>
>
>I vote for chapters 8, 10 and 21.  Thanks for giving us the opportunity to
>see it.
>-Original Message-
>From: Nicolas De Loof [mailto:[EMAIL PROTECTED]]
>Sent: Friday, March 29, 2002 12:03 AM
>To: Struts Users Mailing List; [EMAIL PROTECTED]
>Subject: Re: Preview OReilly Struts Chapters Online - Soon
>
>
>so am I !
>
>
> > i vote for the struts design strategies, packaging, and taglibs
> > as the most interesting.
> >
> > rjsjr
> >
> > > Chapter 2. The Web Server/Servlet Container Relationship
> > > Chapter 3. Overview of the Struts Framework
> > > Chapter 4. Configuring web.xml and struts-config.xml
> > > Chapter 5. Struts Controller Components
> > > Chapter 6. Struts Model Components
> > > Chapter 8. Custom Tag Libraries
> > > Chapter 10. Exception Handling
> > > Chapter 12. Internationalization and Localization
> > > Chapter 13. Struts and Enterprise JavaBeans (EJB)
> > > Chapter 16. Using Alternate Presentation Technologies
> > > Chapter 18. Logging in a Struts Application
> > > Chapter 19. Addressing Performance
> > > Chapter 20. Packaging your Struts Application
> > > Chapter 21. Struts Design Strategies
> >
> >
> > --
> > To unsubscribe, e-mail:
>
> > For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: AW: Preview OReilly Struts Chapters Online - Soon

2002-04-02 Thread Chuck Cavaness

Although I would like to write a chapter on that topic, I believe that the 
plate is so full and this topic is so broad, that I couldn't do it justice 
in the book. There are so many directions it could go. Using ORM frameworks 
like TopLink or Cocobase, to things such as JDO. Then you have to discuss 
connection management, transaction management, security, etc... I think 
this deserves a book on its own :)

Chuck

At 06:51 PM 4/2/2002 +0200, you wrote:
>Hi,
>
>for me, a struts book will be one major event of this year..
>I would like to be able to review some chapters.
>What about one chapter with focus on data persistence/ OR-mapping + struts?
>
>Concerning the flood of mails, it could well be that a lot of questions
>will be answered reading the posted chapters of the book, so
>the list would perhaps not be flooded.
>
>Dimi
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Global object

2002-04-01 Thread Chuck Cavaness

I don't think you'll find anything explicitly in the Struts framework. 
Obviously, you can use the ServletContext to store a Map object that 
everyone would have access to. However, this does couple it to the servlet 
layer, since it's stored in the ServletContext for the web app. Another 
idea might be to create an object that implements the Singleton pattern and 
allow it to hold onto the Map. With this approach, it's not coupled to the 
web tier, but is just an ordinary Java class.

Chuck

At 11:32 AM 4/1/2002 -0600, you wrote:
>I sent this item a sometime ago but no response...but here it goes again.
>
>
>
>Here is my problem, I have a java bean class that keeps track of who changes
>what on the table (e.g. modifiedby).  When a caller class changes something
>to the underlying table, I want to know who.  The problem is that this Java
>bean class doesn't have access to the session object.  In addition, I want
>to keep servlet layer separated from the backend java bean layer.  Again,
>does Struts have some kinds of global dictionary object so I can keep
>information in there and ask for it when I need it...this dictionary object
>should be available to everyone?
>
>
>
>Thank You,
>
>Hai Hoang
>
>
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Preview OReilly Struts Chapters Online - Soon

2002-03-28 Thread Chuck Cavaness

I'm scheduled to finish it in July. There's a technical editor process that 
must be completed also a copy edit process (to fix all of my typos and 
check the formatting). Probably about August.

Chuck

p.s. I'm going as fast as I can :)


At 05:18 PM 3/28/2002 -0500, you wrote:
>when does the book come out in print?
>
> > -Original Message-
> > From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, March 28, 2002 4:49 PM
> > To: Struts Users Mailing List
> > Subject: RE: Preview OReilly Struts Chapters Online - Soon
> >
> >
> > This is a wonderful idea. The chapter at a time thing will also
> > force us to read the chapter you want reviewed rather than the
> > one that grabs our attention at the time, given that these may
> > not always be the same chapter! :-)
> >
> > You have my commitment to read and comment upon each chapter that
> > you release. This list has been good to me, so this will be a way
> > that I can give back to the struts community.
> >
> > And I will be BUYING the book! :-)
> >
> > Simon
> >
> > -
> > Simon P. Chappell [EMAIL PROTECTED]
> > Java Programming Specialist  www.landsend.com
> > Lands' End, Inc.   (608) 935-4526
> >
> >
> > >-Original Message-
> > >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > >Sent: Thursday, March 28, 2002 3:32 PM
> > >To: [EMAIL PROTECTED]
> > >Subject: Preview OReilly Struts Chapters Online - Soon
> > >
> > >
> > >It looks like I'm going to get approval to post preview
> > >chapters from my OReilly Struts book somewhere on the net.
> > >There are still a few preliminary things that have to be
> > >worked out, but I don't think they will be a big deal. There
> > >are a few things that I'm not sure about yet. If anyone has an
> > >opinion, please let me know.
> > >
> > >First, where to post them. I was thinking about talking with
> > >the folks at theserverside.com, but might also be worth
> > >posting them here in the user mailing list as well. I'm not
> > >sure. Anyone know of a good reason to go either way. I'm a
> > >little afraid of the flood of emails to everyone's box that
> > >this could generate, but it might also generate some good discussions?
> > >
> > >Also, because of time and everything that's going on, I doubt
> > >that I'll be able to post all of them. So which ones are of
> > >the most interest? Here's what I thought:
> > >
> > >Chapter 2.   The Web Server/Servlet Container Relationship
> > >Chapter 3.   Overview of the Struts Framework
> > >Chapter 4.   Configuring web.xml and struts-config.xml
> > >Chapter 5.   Struts Controller Components
> > >Chapter 6.   Struts Model Components
> > >Chapter 8.   Custom Tag Libraries
> > >Chapter 10.  Exception Handling
> > >Chapter 12.  Internationalization and Localization
> > >Chapter 13.  Struts and Enterprise JavaBeans (EJB)
> > >Chapter 16.  Using Alternate Presentation Technologies
> > >Chapter 18.  Logging in a Struts Application
> > >Chapter 19.  Addressing Performance
> > >Chapter 20.  Packaging your Struts Application
> > >Chapter 21.  Struts Design Strategies
> > >
> > >(As many as I could get to before I finish the book)
> > >
> > >Anyone would be able to download the chapters, read them, and
> > >send me their comments (both good and bad). I'll make any
> > >neccessary changes to the source document. I would probably
> > >post a new one every week or so.
> > >
> > >This may take a couple of weeks to get everything setup, but I
> > >have 9 that are ready to go. I also have a complete 1.1
> > >storefront application that I could make available. It's what
> > >I'm using to showcase the Struts framework. It will eventually
> > >include every 1.1 feature in it.
> > >
> > >Let me know what everyone thinks.
> > >
> > >Chuck Cavaness
> > >--
> > >Sent via jApache.org
> > >
> > >--
> > >To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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




RE: OReilly Struts book

2002-03-19 Thread Chuck Cavaness

I hope Tim sees it that way as well. I will post something to the serverside.

Thanks,
Chuck

At 10:51 AM 3/12/2002 -0500, you wrote:
>I am sure you can convince Tim O'Reilly that community review does help
>to sell J2EE hot topic books - just take a look at The Middleware
>Company's EJB-related books.  Plus, O'Reilly did allow Richard
>Monson-Haefel to post his EJB book chapters on the web last July.  I am
>sure a Struts book would generate at least the same amount of interests,
>if not more.  BTW, you should post a message at theServersdie.com so
>more people will become aware of the book.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: OReilly Struts book

2002-03-19 Thread Chuck Cavaness

I truthfully think that would be awesome. I have asked OReilly if it would 
be OK if I shared some of the Chapters here. I'm waiting on their response. 
Keep in mind that legally, they own the chapters. I've got to get 
permission from deep in the bowels of the OReilly complex.

Chuck

At 06:22 AM 3/19/2002 -0500, you wrote:
>Nothing like a little preemptive peer review!  Come on!  Share!
>
>Mark
>
>-Original Message-----
>From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, March 19, 2002 6:11 AM
>
>Half of the Chapters are finished right now. Once I finish all of them, it
>then goes through several types of edits and technical reviews. It will
>probably not be out until the June or July timeframe. That's unfortunate
>because the need for this type of material is great and I would love to
>have it out right now.
>
>Chuck Cavaness
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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




RE: OReilly Struts book

2002-03-19 Thread Chuck Cavaness

Half of the Chapters are finished right now. Once I finish all of them, it 
then goes through several types of edits and technical reviews. It will 
probably not be out until the June or July timeframe. That's unfortunate 
because the need for this type of material is great and I would love to 
have it out right now.

Chuck Cavaness

At 06:10 PM 3/18/2002 -0500, you wrote:
>When is the book due out?
>
>-Original Message-
>From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, February 05, 2002 10:31 AM
>To: 'Struts Users Mailing List'
>Subject: RE: OReilly Struts book
>
>
>I'm definitely going to cover some design patterns/strategies related to
>Struts and EJB. I've been working on an a Struts/EJB application for over a
>year now and have learned a great deal about how to approach this, so this
>should be valuable to others. Brian Keeton and I just finished an EJB 2.0
>for Que and I will include some ideas we discovered while writing that as
>well. Someone did point out to me however that obviously not everyone is
>using EJB and I should give focus to that as well.
>
>The banking example is only used in chapter 3, which is an overview of
>Struts. From the point on, I plan to use other examples. Right now, I'm in
>the B2B world where orders, items, catalogs, and customers are important. So
>I might use that domain. Hopefully, I can use various "real" domains to
>bring something for everyone. Since I first posted the initial TOC, I've
>added several new chapters and taken away some. One of the ones that
>everyone has asked for is a chapter on alternatives to JSP. So a chapter on
>XML/XSLT or something along these lines will probably make it in. The new
>features like multiple sub-apps, workflow, role-based actions, etc...
>definitely will make it in. I'm not sure where at in the book, but for sure
>will be very important.
>
>Chuck
>
>-Original Message-
>From: Hertzel Karbasi - OPTinity eBusiness Solutions
>[mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, February 05, 2002 10:11 AM
>To: Struts Users Mailing List
>Subject: Re: OReilly Struts book
>
>
>Great!!
>1. IMO it's better to cover Struts 1.1 as I see in your TOC there is a just
>and appendix
> for changes in 1.1.
>2. Are you going to cover some design patterns related to J2EE+EJB in
>reference to Struts?
>3. An Order Entry/Shopping Cart application would be more usable and popular
>than Banking.
>4. What about XML/Wap in view components?
>5. What about extending Struts (Workflow, Service Manager, Data Formatting,
>...)?
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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




Re: I'm bagging my head on the keyboard on this one: Cannot retrieve definition for form bean PlayerMessageForm

2002-03-10 Thread Chuck Cavaness

The exception gets thrown from the FormTag in the following code:

  // Look up the form bean definition
  FormBeanConfig formBeanConfig = 
appConfig.findFormBeanConfig(mapping.getName());
  if (formBeanConfig == null) {
JspException e = new JspException
 (messages.getMessage("formTag.formBean", mapping.getName()));
   pageContext.setAttribute(Action.EXCEPTION_KEY, 
e,  PageContext.REQUEST_SCOPE);
   throw e;
  }

If you look at the code, it seems like the only reason this exception is 
thrown is if it can't find a FormBeanConfig with the name returned by 
mapping.getName(). I would suggest that you turn your debugging levels up 
high and look at the log output. It could be something as simple as a 
ClassPath issue or for some reason, the framework is not able to find or 
load the .class file. I'm sure that you have ruled out a typo between the 
form-bean definition and the value used in the action?

You could also put a few print lines in the FormTag class and recompile. 
That would for sure tell you what's going on.

Just a few thoughts,
Chuck


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: validate() and session expiry

2002-03-05 Thread Chuck Cavaness

matt,

I spoke wrong. The controller element goes before the message-resources
element.



Sorry about that,
Chuck


-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 1:44 PM
To: 'Struts Users Mailing List'
Subject: RE: validate() and session expiry


Remember, the RequestProcessor is a 1.1 thing. You'll have to be using the
nightly build for it. Of course, the beta is just around the corner. Anyway,
the Struts 1.1 DTD defines a new element called "controller". It goes under
the root element after the action-mappings. Make sure that it's in the
correct location. It should be the last element in your struts config,
unless you have plug-in's defined. Here's an example of one from my book:

 

Notice that many of the things that were configured in the web.xml in 1.0
are now attributes on this element. The CustomerRequestProcessor listed here
extends the Struts version and this is where I override the mehtod. 

You don't have to do anything with the ActionServlet. In fact, since the
RequestProcessor is where all of the meat is now, you can just use the
Struts ActionServlet as is and there's usually no need to subclass it.

Chuck Cavaness

-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 1:22 PM
To: [EMAIL PROTECTED]
Subject: RE: validate() and session expiry


Yes, but probably a little too ambitious for me I think. On a related note
though, I can't work out what to do with your subclassed RequestProcessor
class once you've overridden the processPreprocess() method? Any pointers on
the where you configure this to be used? Do you also have to subclass the
ActionServlet and set the processor field in your subclass to the new
RequestProcessor?

Thanks,
Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 16:16
To: 'Struts Users Mailing List'
Subject: RE: validate() and session expiry


You could always extend ActionMapping (or ActionConfig for 1.1) to accept
more parameter type attributes.  Of course at that point, you're extending
the framework but's that neccessarily a bad thing.

Chuck

-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:04 AM
To: [EMAIL PROTECTED]
Subject: RE: validate() and session expiry


That looks good too but given that you're only allowed to have one
 per action mapping it would preclude the use of parameter for
anything else. It would definitely make DispatchAction difficult to use. I
do like the idea of being able to configure this in struts-config.xml
though. Maybe it could be implemented as requiresSession="true"?

Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 12:57
To: Struts Users Mailing List
Subject: RE: validate() and session expiry


Matt,

   I had one other idea that I wanted to share with you. It came to be as I
was just starting to work on the security chapter for the Struts book. This
is for the case where you have a small number of actions that the user
needs to be logged in for, rather than all of them.

What if you added a value like "checkSession" using the parameter attribute
in the action mappings that required the user to be logged in. In the
"processPreprocess" method, you can look up the mapping for the action that
has been requested using

ActionMapping mapping = findMapping(path);

which is available in the ActionServlet class as well.

Once you have the mapping, yoy can call "getParameter", which will return a
String for the parameter in the ActionMapping. If no value is specified, a
null is returned. If "checkSession" of some other value is present, then
you know to check to see if the session is present and valid. If so, return
true, which allows the ActionServlet to continue on. Otherwise, you can use
the ActionMapping that you already found for the action and return to the
login page. You are probably better off declaring a global forward and
using the findForward(String name)  method in the ActionServlet to locate
the global login forward and forward to this.

By doing it like this, you make the whole thing very generic and
declarative. You are free to change which actions need to have the user
logged in without modifying any source code. The "processPreprocess" method
stays completly generic.

What does everything about this approach? I think I'll mention this in the
security chapter of the book.

Chuck

At 12:14 PM 3/5/2002 +, you wrote:
>Yep, all makes sense. Thanks to both of you. I'm a lot happier with how the
>logic is partitioned now and I like the validate="false" idea very much.
>
>Thanks,
>Matt.
>
>-Original Message-
>From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
>Sent: 05 March 

RE: validate() and session expiry

2002-03-05 Thread Chuck Cavaness

Remember, the RequestProcessor is a 1.1 thing. You'll have to be using the
nightly build for it. Of course, the beta is just around the corner. Anyway,
the Struts 1.1 DTD defines a new element called "controller". It goes under
the root element after the action-mappings. Make sure that it's in the
correct location. It should be the last element in your struts config,
unless you have plug-in's defined. Here's an example of one from my book:

 

Notice that many of the things that were configured in the web.xml in 1.0
are now attributes on this element. The CustomerRequestProcessor listed here
extends the Struts version and this is where I override the mehtod. 

You don't have to do anything with the ActionServlet. In fact, since the
RequestProcessor is where all of the meat is now, you can just use the
Struts ActionServlet as is and there's usually no need to subclass it.

Chuck Cavaness

-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 1:22 PM
To: [EMAIL PROTECTED]
Subject: RE: validate() and session expiry


Yes, but probably a little too ambitious for me I think. On a related note
though, I can't work out what to do with your subclassed RequestProcessor
class once you've overridden the processPreprocess() method? Any pointers on
the where you configure this to be used? Do you also have to subclass the
ActionServlet and set the processor field in your subclass to the new
RequestProcessor?

Thanks,
Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 16:16
To: 'Struts Users Mailing List'
Subject: RE: validate() and session expiry


You could always extend ActionMapping (or ActionConfig for 1.1) to accept
more parameter type attributes.  Of course at that point, you're extending
the framework but's that neccessarily a bad thing.

Chuck

-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:04 AM
To: [EMAIL PROTECTED]
Subject: RE: validate() and session expiry


That looks good too but given that you're only allowed to have one
 per action mapping it would preclude the use of parameter for
anything else. It would definitely make DispatchAction difficult to use. I
do like the idea of being able to configure this in struts-config.xml
though. Maybe it could be implemented as requiresSession="true"?

Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 12:57
To: Struts Users Mailing List
Subject: RE: validate() and session expiry


Matt,

   I had one other idea that I wanted to share with you. It came to be as I
was just starting to work on the security chapter for the Struts book. This
is for the case where you have a small number of actions that the user
needs to be logged in for, rather than all of them.

What if you added a value like "checkSession" using the parameter attribute
in the action mappings that required the user to be logged in. In the
"processPreprocess" method, you can look up the mapping for the action that
has been requested using

ActionMapping mapping = findMapping(path);

which is available in the ActionServlet class as well.

Once you have the mapping, yoy can call "getParameter", which will return a
String for the parameter in the ActionMapping. If no value is specified, a
null is returned. If "checkSession" of some other value is present, then
you know to check to see if the session is present and valid. If so, return
true, which allows the ActionServlet to continue on. Otherwise, you can use
the ActionMapping that you already found for the action and return to the
login page. You are probably better off declaring a global forward and
using the findForward(String name)  method in the ActionServlet to locate
the global login forward and forward to this.

By doing it like this, you make the whole thing very generic and
declarative. You are free to change which actions need to have the user
logged in without modifying any source code. The "processPreprocess" method
stays completly generic.

What does everything about this approach? I think I'll mention this in the
security chapter of the book.

Chuck

At 12:14 PM 3/5/2002 +, you wrote:
>Yep, all makes sense. Thanks to both of you. I'm a lot happier with how the
>logic is partitioned now and I like the validate="false" idea very much.
>
>Thanks,
>Matt.
>
>-Original Message-
>From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
>Sent: 05 March 2002 03:01
>To: Struts Users Mailing List
>Subject: RE: validate() and session expiry
>
>
>Your problem is slightly different than ours. In our application, the user
>had to be logged in to go anywhere. This mechanism was a way to catch the
>problem when a user has already logged in and let&#

RE: validate() and session expiry

2002-03-05 Thread Chuck Cavaness

You could always extend ActionMapping (or ActionConfig for 1.1) to accept
more parameter type attributes.  Of course at that point, you're extending
the framework but's that neccessarily a bad thing.

Chuck

-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:04 AM
To: [EMAIL PROTECTED]
Subject: RE: validate() and session expiry


That looks good too but given that you're only allowed to have one
 per action mapping it would preclude the use of parameter for
anything else. It would definitely make DispatchAction difficult to use. I
do like the idea of being able to configure this in struts-config.xml
though. Maybe it could be implemented as requiresSession="true"?

Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 12:57
To: Struts Users Mailing List
Subject: RE: validate() and session expiry


Matt,

   I had one other idea that I wanted to share with you. It came to be as I
was just starting to work on the security chapter for the Struts book. This
is for the case where you have a small number of actions that the user
needs to be logged in for, rather than all of them.

What if you added a value like "checkSession" using the parameter attribute
in the action mappings that required the user to be logged in. In the
"processPreprocess" method, you can look up the mapping for the action that
has been requested using

ActionMapping mapping = findMapping(path);

which is available in the ActionServlet class as well.

Once you have the mapping, yoy can call "getParameter", which will return a
String for the parameter in the ActionMapping. If no value is specified, a
null is returned. If "checkSession" of some other value is present, then
you know to check to see if the session is present and valid. If so, return
true, which allows the ActionServlet to continue on. Otherwise, you can use
the ActionMapping that you already found for the action and return to the
login page. You are probably better off declaring a global forward and
using the findForward(String name)  method in the ActionServlet to locate
the global login forward and forward to this.

By doing it like this, you make the whole thing very generic and
declarative. You are free to change which actions need to have the user
logged in without modifying any source code. The "processPreprocess" method
stays completly generic.

What does everything about this approach? I think I'll mention this in the
security chapter of the book.

Chuck

At 12:14 PM 3/5/2002 +, you wrote:
>Yep, all makes sense. Thanks to both of you. I'm a lot happier with how the
>logic is partitioned now and I like the validate="false" idea very much.
>
>Thanks,
>Matt.
>
>-Original Message-
>From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
>Sent: 05 March 2002 03:01
>To: Struts Users Mailing List
>Subject: RE: validate() and session expiry
>
>
>Your problem is slightly different than ours. In our application, the user
>had to be logged in to go anywhere. This mechanism was a way to catch the
>problem when a user has already logged in and let's the session timeout.
>They then invoke an action that has a form that uses the session object for
>something, like getting the user's Locale. Although I agree with Bryan that
>having anything other than presentation validation in the ActionForm is
>dangerous, let's face it; sometimes we do stupid things.
>
>Chuck
>
>At 02:50 AM 3/5/2002 +, you wrote:
> >Thanks, that sounds like a good solution. My only reservation is that in
> >processPreprocess() you'd have to effectively hard-code a list of the
> >request paths that require a user to login. I suppose you have to do it
> >somewhere though.
> >
> >Matt.
> >
> >-Original Message-
> >From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
> >Sent: 05 March 2002 02:34
> >To: Struts Users Mailing List
> >Subject: Re: validate() and session expiry
> >
> >
> >We had the same issue to deal with. What we did was in our ActionServet
> >(which subclassed Struts ActionServlet), was to override the
> >"processPreprocess" method, which is called for every request. We checked
> >the session there, instead of in every Action perform method. If the
> >session is expired or the user isn't logged in, we perform a redirect to
> >the login page. This worked out very nicely and also allowed us to remove
> >the check in the Action classes, since this method is called before the
> >ActionForm validate and the Action perform method.
> >
> >In 1.1, this method is moved to the RequestProcessor class, but it works
> >the same way. I'm sure there are other

RE: validate() and session expiry

2002-03-05 Thread Chuck Cavaness

Matt,

   I had one other idea that I wanted to share with you. It came to be as I 
was just starting to work on the security chapter for the Struts book. This 
is for the case where you have a small number of actions that the user 
needs to be logged in for, rather than all of them.

What if you added a value like "checkSession" using the parameter attribute 
in the action mappings that required the user to be logged in. In the 
"processPreprocess" method, you can look up the mapping for the action that 
has been requested using

ActionMapping mapping = findMapping(path);

which is available in the ActionServlet class as well.

Once you have the mapping, yoy can call "getParameter", which will return a 
String for the parameter in the ActionMapping. If no value is specified, a 
null is returned. If "checkSession" of some other value is present, then 
you know to check to see if the session is present and valid. If so, return 
true, which allows the ActionServlet to continue on. Otherwise, you can use 
the ActionMapping that you already found for the action and return to the 
login page. You are probably better off declaring a global forward and 
using the findForward(String name)  method in the ActionServlet to locate 
the global login forward and forward to this.

By doing it like this, you make the whole thing very generic and 
declarative. You are free to change which actions need to have the user 
logged in without modifying any source code. The "processPreprocess" method 
stays completly generic.

What does everything about this approach? I think I'll mention this in the 
security chapter of the book.

Chuck

At 12:14 PM 3/5/2002 +, you wrote:
>Yep, all makes sense. Thanks to both of you. I'm a lot happier with how the
>logic is partitioned now and I like the validate="false" idea very much.
>
>Thanks,
>Matt.
>
>-Original Message-
>From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
>Sent: 05 March 2002 03:01
>To: Struts Users Mailing List
>Subject: RE: validate() and session expiry
>
>
>Your problem is slightly different than ours. In our application, the user
>had to be logged in to go anywhere. This mechanism was a way to catch the
>problem when a user has already logged in and let's the session timeout.
>They then invoke an action that has a form that uses the session object for
>something, like getting the user's Locale. Although I agree with Bryan that
>having anything other than presentation validation in the ActionForm is
>dangerous, let's face it; sometimes we do stupid things.
>
>Chuck
>
>At 02:50 AM 3/5/2002 +, you wrote:
> >Thanks, that sounds like a good solution. My only reservation is that in
> >processPreprocess() you'd have to effectively hard-code a list of the
> >request paths that require a user to login. I suppose you have to do it
> >somewhere though.
> >
> >Matt.
> >
> >-Original Message-
> >From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
> >Sent: 05 March 2002 02:34
> >To: Struts Users Mailing List
> >Subject: Re: validate() and session expiry
> >
> >
> >We had the same issue to deal with. What we did was in our ActionServet
> >(which subclassed Struts ActionServlet), was to override the
> >"processPreprocess" method, which is called for every request. We checked
> >the session there, instead of in every Action perform method. If the
> >session is expired or the user isn't logged in, we perform a redirect to
> >the login page. This worked out very nicely and also allowed us to remove
> >the check in the Action classes, since this method is called before the
> >ActionForm validate and the Action perform method.
> >
> >In 1.1, this method is moved to the RequestProcessor class, but it works
> >the same way. I'm sure there are other solutions, but this is one approach.
> >
> >Chuck Cavaness
> >
> >At 02:20 AM 3/5/2002 +, you wrote:
> > >I've got a problem and I'm not sure whether it's my poor design or a
>struts
> > >limitation. I'd appreciate it if someone can shed some light. Let me know
> >if
> > >you require more details.
> > >
> > >I have an action mapping for an "update my profile" page with an
>associated
> > >ActionForm and validate="true". In order to navigate to this form the
>user
> > >has to login first. The Action itself checks that the user is logged in
>in
> > >the perform() method. If he isn't then he's forwarded back to the login
> > >action. This all works fine in the case where the session expires and the
> > >user clicks on the l

RE: validate() and session expiry

2002-03-04 Thread Chuck Cavaness

Your problem is slightly different than ours. In our application, the user 
had to be logged in to go anywhere. This mechanism was a way to catch the 
problem when a user has already logged in and let's the session timeout. 
They then invoke an action that has a form that uses the session object for 
something, like getting the user's Locale. Although I agree with Bryan that 
having anything other than presentation validation in the ActionForm is 
dangerous, let's face it; sometimes we do stupid things.

Chuck

At 02:50 AM 3/5/2002 +, you wrote:
>Thanks, that sounds like a good solution. My only reservation is that in
>processPreprocess() you'd have to effectively hard-code a list of the
>request paths that require a user to login. I suppose you have to do it
>somewhere though.
>
>Matt.
>
>-Original Message-
>From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
>Sent: 05 March 2002 02:34
>To: Struts Users Mailing List
>Subject: Re: validate() and session expiry
>
>
>We had the same issue to deal with. What we did was in our ActionServet
>(which subclassed Struts ActionServlet), was to override the
>"processPreprocess" method, which is called for every request. We checked
>the session there, instead of in every Action perform method. If the
>session is expired or the user isn't logged in, we perform a redirect to
>the login page. This worked out very nicely and also allowed us to remove
>the check in the Action classes, since this method is called before the
>ActionForm validate and the Action perform method.
>
>In 1.1, this method is moved to the RequestProcessor class, but it works
>the same way. I'm sure there are other solutions, but this is one approach.
>
>Chuck Cavaness
>
>At 02:20 AM 3/5/2002 +, you wrote:
> >I've got a problem and I'm not sure whether it's my poor design or a struts
> >limitation. I'd appreciate it if someone can shed some light. Let me know
>if
> >you require more details.
> >
> >I have an action mapping for an "update my profile" page with an associated
> >ActionForm and validate="true". In order to navigate to this form the user
> >has to login first. The Action itself checks that the user is logged in in
> >the perform() method. If he isn't then he's forwarded back to the login
> >action. This all works fine in the case where the session expires and the
> >user clicks on the link to take him to the form because he gets forwarded
>to
> >the login page.
> >
> >My problem is that if he navigates to this form, then waits for the session
> >to timeout then clicks submit  then the validate() method on the ActionForm
> >is called BEFORE the perform() method on the Action itself. In my case the
> >validation fails as it relies on being able to read data from the session.
> >
> >I can see a solution where in validation() methods I check that the session
> >is still valid but this seems clumsy to me. Is it good MVC design for the
> >request to be handled by the Model before the Controller gets to see it? Am
> >I incorrectly putting business logic into the validation() method when it
> >should be dealt with further down the chain? Or should I be handling my
> >authentication and session management in a subclass of the ActionServlet?
> >
> >I'd appreciate any insights.
> >Matt.
> >
> >
> >--
> >To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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




Re: validate() and session expiry

2002-03-04 Thread Chuck Cavaness

We had the same issue to deal with. What we did was in our ActionServet 
(which subclassed Struts ActionServlet), was to override the 
"processPreprocess" method, which is called for every request. We checked 
the session there, instead of in every Action perform method. If the 
session is expired or the user isn't logged in, we perform a redirect to 
the login page. This worked out very nicely and also allowed us to remove 
the check in the Action classes, since this method is called before the 
ActionForm validate and the Action perform method.

In 1.1, this method is moved to the RequestProcessor class, but it works 
the same way. I'm sure there are other solutions, but this is one approach.

Chuck Cavaness

At 02:20 AM 3/5/2002 +, you wrote:
>I've got a problem and I'm not sure whether it's my poor design or a struts
>limitation. I'd appreciate it if someone can shed some light. Let me know if
>you require more details.
>
>I have an action mapping for an "update my profile" page with an associated
>ActionForm and validate="true". In order to navigate to this form the user
>has to login first. The Action itself checks that the user is logged in in
>the perform() method. If he isn't then he's forwarded back to the login
>action. This all works fine in the case where the session expires and the
>user clicks on the link to take him to the form because he gets forwarded to
>the login page.
>
>My problem is that if he navigates to this form, then waits for the session
>to timeout then clicks submit  then the validate() method on the ActionForm
>is called BEFORE the perform() method on the Action itself. In my case the
>validation fails as it relies on being able to read data from the session.
>
>I can see a solution where in validation() methods I check that the session
>is still valid but this seems clumsy to me. Is it good MVC design for the
>request to be handled by the Model before the Controller gets to see it? Am
>I incorrectly putting business logic into the validation() method when it
>should be dealt with further down the chain? Or should I be handling my
>authentication and session management in a subclass of the ActionServlet?
>
>I'd appreciate any insights.
>Matt.
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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




RE: The message during startup

2002-02-27 Thread Chuck Cavaness

Also set one for detail like this:


   detail
   0
 


Chuck


At 11:35 AM 2/28/2002 +0800, you wrote:
>Do you mean
>
>
>   debug
>   0
> 
>
>
>in web.xml? I set the debug value  to 0. The message still came out.
>
>Regards,
>Vincent
>
>-Original Message-
>From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, February 27, 2002 11:59 AM
>To: Struts Users Mailing List
>Subject: Re: The message during startup
>
>
>Set the debug and detail parameters in the web.xml (if you're using 1.0) to
>0. If there are none there, add init-param elements with values of 0.
>
>Chuck
>
>At 11:40 AM 2/27/2002 +0800, you wrote:
> >Everytime the web server start, a lot of message shows in std out or
> >startup log. How can I disable the message during startup?
> >
> >Regards,
> >Vincent
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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




Re: The message during startup

2002-02-26 Thread Chuck Cavaness

Set the debug and detail parameters in the web.xml (if you're using 1.0) to 
0. If there are none there, add init-param elements with values of 0.

Chuck

At 11:40 AM 2/27/2002 +0800, you wrote:
>Everytime the web server start, a lot of message shows in std out or 
>startup log. How can I disable the message during startup?
>
>Regards,
>Vincent


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: RE: Controller and security

2002-02-08 Thread Chuck Cavaness

I've seen this solution work very well. When you extend the ActionServlet, you can 
override the "processPreprocess" method to determine if the user has the neccessary 
permissions, if the user has a valid session, etc... long before ever getting to the 
Action class (If you're using the 1.1 version, then the "processPreprocess" method is 
in the RequestProcessor now).

With this approach, you don't need to check if the session is valid in the Action 
classes. Another problem that this solution helps out with is say a user has logged in 
and has let the session time out while looking at a page. If the user then clicks a 
button like an update or something, control may go into the ActionForm before making 
it to the Action instance. What's going to happen if the ActionForm attempts to use 
the session (which has timed out). By putting the check in the front controller, 
you're able to save checking for a valid session in the ActionForm and/or Action 
classes. 

Chuck
--
Sent via jApache.org

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: OReilly Struts book

2002-02-05 Thread Chuck Cavaness

I'm definitely going to cover some design patterns/strategies related to
Struts and EJB. I've been working on an a Struts/EJB application for over a
year now and have learned a great deal about how to approach this, so this
should be valuable to others. Brian Keeton and I just finished an EJB 2.0
for Que and I will include some ideas we discovered while writing that as
well. Someone did point out to me however that obviously not everyone is
using EJB and I should give focus to that as well.

The banking example is only used in chapter 3, which is an overview of
Struts. From the point on, I plan to use other examples. Right now, I'm in
the B2B world where orders, items, catalogs, and customers are important. So
I might use that domain. Hopefully, I can use various "real" domains to
bring something for everyone. Since I first posted the initial TOC, I've
added several new chapters and taken away some. One of the ones that
everyone has asked for is a chapter on alternatives to JSP. So a chapter on
XML/XSLT or something along these lines will probably make it in. The new
features like multiple sub-apps, workflow, role-based actions, etc...
definitely will make it in. I'm not sure where at in the book, but for sure
will be very important. 

Chuck

-Original Message-
From: Hertzel Karbasi - OPTinity eBusiness Solutions
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 05, 2002 10:11 AM
To: Struts Users Mailing List
Subject: Re: OReilly Struts book


Great!!
1. IMO it's better to cover Struts 1.1 as I see in your TOC there is a just
and appendix
for changes in 1.1.
2. Are you going to cover some design patterns related to J2EE+EJB in
reference to Struts?
3. An Order Entry/Shopping Cart application would be more usable and popular
than Banking.
4. What about XML/Wap in view components?
5. What about extending Struts (Workflow, Service Manager, Data Formatting,
...)?




Re: RE: Are Vectors in a FormAction set to null after a user has subm itted a form?

2002-02-01 Thread Chuck Cavaness

Boris is right of course. That's the main reason that I was thinking when I said that. 
There's definitely no need for the overhead of synchronization in the case that we 
were discussing. Another reason that I was thinking about, but didn't elude to very 
well is that you should always try to declare variables as Interface types, rather 
than concrete classes. So instead of declaring:

Vector items = new Vector();

you should instead use the List interface, which the Vector is one of the implementors 
of:

List items = new Vector();

What's nice about dealing with interface types instead, especially if you isolate 
where your objects are instantiated is that you are then free to change the 
implementation type like this:

List items = new ArrayList();

Any client that used this items List is not affected as long as they deal with the 
interface type and not the concrete implementation. This is a big bonus.

Look through the Java API's and you'll see many factories taking advantage of this 
concept. Like JNDI, JMS, and JDBC. This is why I said that, but I should have 
elaborated more on the subject.

Sorry,
Chuck
--
Sent via jApache.org

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: log4j and weblogic

2002-02-01 Thread Chuck Cavaness

It seems that maybe you're trying to instantiate a log4j Logger in one of your actions 
or ActionServlet like this:

Logger.getInstance(  or  );

and the class (Logger) can't be found by the class loader. Here's a couple of things 
to try:

1) Is the log4j.jar in your WEB-INF/lib directory for the web application?
2) The Logger is a new class that is part of log4j 1.2 alpha and didn't exist in 
earlier version of log4j (e.g. 1.1.3). Do you have the correct version of log4j.jar in 
your WEB-INF/lib directory?

Those are two quickies that come to mind.

Chuck
--
Sent via jApache.org

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: RE: Are Vectors in a FormAction set to null after a user has subm itted a form?

2002-02-01 Thread Chuck Cavaness

I agree total with you on that. However, I didn't think he was trying to repopulate 
from the page. I read it as he wondered why the Vector wasn't still present in the 
form on the next go-around. I typically use a Collection for something like the 
iterate tag. I don't expect (and wouldn't do it that anyway) that the form would 
reconstruct the objects back into the Vector on the submit.

Sometimes, there's data that you need to hang on to longer than a request will allow. 
This is the purpose (I think) of being able to define a mapping as session scope. 
Obviously there's a cost involved of putting things in the session, however, there can 
also can be a more taxing cost of retrieving data again from a backend DB or EJB 
application. There's a tradeoff.

Hopefully, that's not what he's trying to do.

Chuck
--
Sent via jApache.org

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: AW: Are Vectors in a FormAction set to null after a user has subm itted a form?

2002-02-01 Thread Chuck Cavaness

You are absolutely correct. That was my blurry-eyed mistake at 2am. Here's the code 
that shows that if nothing is defined, it's session scope:

if ("request".equals(mapping.getScope())) {
  request.setAttribute(mapping.getAttribute(), instance);
}else{
  HttpSession session = request.getSession();
  session.setAttribute(mapping.getAttribute(), instance);
}

In the "if" part of the statment, if mapping.getScope() call returns null, then 
ActionForm instance will always be set into the session in the else part of
the statment.

Thanks for the correction,
Chuck
--
Sent via jApache.org

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Are Vectors in a FormAction set to null after a user has submitted a form?

2002-02-01 Thread Chuck Cavaness

That's sort of what I was saying. In the second action, the one that is called after 
the user sees the form data and makes some choices, does the scope equal to request or 
session? If you have both of these actions defined as session scope, then I don't 
believe a new ActionForm would be created during the second action. If the mapping is 
session, then an ActionForm will be looked for in the session, which should have been 
put there on the previous action (along with the Vector data in it still).

However, if the second action is defined as request and the first one is session, then 
yes the user entered data would make it to the new ActionForm and the Vector data 
would be gone because one would be recycled.

Obviously, this is all a guess. I hope it helps somehow.

Chuck
--
Sent via jApache.org

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: about struts

2002-01-31 Thread Chuck Cavaness

Not to be a smart aleck about it, but there's a decent set of installation 
instructions off the Struts main web site. There might be additional steps that you 
need to take based on which version of Tomcat that you're using. Here's the URL:

http://jakarta.apache.org/struts/installation-1.0.html

Chuck
--
Sent via jApache.org

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >