Re: DB Access using struts

2003-05-28 Thread Erik Price


Sinclair, Mark wrote:
Hi All,  

Please help I am relatively new to java and even more recently to struts.  I
basically want to know what is the best way (best coding practice & J2EE)to
connect to and use a DB with struts framework?  The approaches that I have
considered (using my limited experience) are:
1.  I can specify DB in  in struts-config and get connection
etc in Actions to work and e.g. check logon id in LogonAction.  However, is
this the best place for the DB interaction to be coded?   All example
applications that I have seen take this simple approach.  This way the DB
configuration is central and easily managed.
I think that the reason that sample applications use this approach is 
often because the model is not the focus of the sample application (it 
has the least to do with Struts out of the three sections of the MVC). 
There are two schools of thought that I have heard in my short time 
learning about Struts:

1. Okay to put model (data access) in the Action
2. Not okay to do it
Much easier to put all your model in the Action, and if you never move 
away from Struts, maybe it's worth your while.  But by doing so you 
don't really get a "clean separation" of the model from the controller 
so you will get a lot of responses saying "don't do this!".  Again, it's 
something you have to evaluate for yourself (i.e., are you making a 
semi-personal site, a small-business online storefront, or a hospital's 
patient-tracking system?).

2. Using a DataServices or DataAccess Layer where the connection to DB and
all DB interaction is handled.  A previous framework that we used had a
BusinessObject containing a DataObject and called the DataService from the
BusinessObject.  We can do something similar with struts, however each
DataService e.g. to validate logon ID and password use the UserDS which has
the connection string inside it.  This defeats using struts to centrally
manage the datasource.  Also using this approach cannot read the
 from struts-config as no access to the ServletContext outside
of the Action?  Is this correct?
I think this is why many web containers (including Tomcat) let you 
specify JNDI name mappings in their web.xml, because by doing so you do 
not need a reference to the ServletContext.  You can access the JNDI 
service using InitialContext and then supplying the JNDI names.

By all means, someone should speak up if I am wrong about this.

Is it OK to make the connection in the Action and pass it to a parameter to
the BusinessObject/Bean?
Possibly, depending on whether you want that BusinessObject/Bean to work 
outside of the context where this data could be fetched... kind of an 
open ended question.  Perhaps you might want to create a Singleton that 
is instantiated by a ContextListener?  This can be a roll-your-own 
alternative to JNDI, by the way.

If you have any example code with DB connections etc it would save us
re-inventing the wheel... :-). 
If you're ready to take an hour to absorb the code base, there is a 
pretty good example application that uses the Data Access Object 
pattern.  The pattern is described at



and the sample application, "Adventure Builder", can be found at



Be sure to follow the links to the actual source code so you can see it 
in action.  I especially like this particular sample because it shows 
how to implement a J2EE application that doesn't use EJBs.  (Nearly 
every other sample out there seems to do so.)  Yet the DAO pattern lets 
you sub in EJBs if you decide you want them.

Apologies if these are stupid/simple questions!
I don't think they are either, the problem is that some of them you'll 
still have to answer for yourself.



Erik

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


RE: Possible Validator Bug

2003-05-28 Thread Raible, Matt
Try changing methodparams to methodParams...

-Original Message-
From: Brown, Melonie S. - Contractor
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 7:46 AM
To: '[EMAIL PROTECTED]'
Subject: Possible Validator Bug


I created a custom validator and thought that I had everything configured
properly, but couldn't get it to work.  Since I was using an "older" version
of Struts (December/January), I downloaded the latest nightly build. 

I then started getting the following error:
ERROR Date = 2003-05-28 09:35:46,489 [Thread-5]
org.apache.commons.validator.Validator Line = 471 - reflection:
foo.SecurePasswordValidator.validateComplexPassword()
 java.lang.NoSuchMethodException:
foo.SecurePasswordValidator.validateComplexPassword()
at java.lang.Class.getMethod0(Class.java:1756)
at java.lang.Class.getMethod(Class.java:963)
at
org.apache.commons.validator.Validator.executeValidationMethod(Validator.jav
a:448)
at
org.apache.commons.validator.Validator.validateFieldForRule(Validator.java:3
71)
at
org.apache.commons.validator.Validator.validateField(Validator.java:616)
at
org.apache.commons.validator.Validator.validate(Validator.java:696)
at
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)


It is correct that I do not have a validateComplexPassword() - 

I have validateComplexPassword(Object bean,
ValidatorAction va,
Field field,
ActionErrors errors,
HttpServletRequest request)

In my validator rules, I specified the following.  


 

I added a method with no parameters for test purposes, and that's the method
that gets called during validation.

Why would the method with no parameters be called when I specifically set
parameters?  Is this a bug or feature? 

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



Possible Validator Bug

2003-05-28 Thread Brown, Melonie S. - Contractor
I created a custom validator and thought that I had everything configured
properly, but couldn't get it to work.  Since I was using an "older" version
of Struts (December/January), I downloaded the latest nightly build. 

I then started getting the following error:
ERROR Date = 2003-05-28 09:35:46,489 [Thread-5]
org.apache.commons.validator.Validator Line = 471 - reflection:
foo.SecurePasswordValidator.validateComplexPassword()
 java.lang.NoSuchMethodException:
foo.SecurePasswordValidator.validateComplexPassword()
at java.lang.Class.getMethod0(Class.java:1756)
at java.lang.Class.getMethod(Class.java:963)
at
org.apache.commons.validator.Validator.executeValidationMethod(Validator.jav
a:448)
at
org.apache.commons.validator.Validator.validateFieldForRule(Validator.java:3
71)
at
org.apache.commons.validator.Validator.validateField(Validator.java:616)
at
org.apache.commons.validator.Validator.validate(Validator.java:696)
at
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)


It is correct that I do not have a validateComplexPassword() - 

I have validateComplexPassword(Object bean,
ValidatorAction va,
Field field,
ActionErrors errors,
HttpServletRequest request)

In my validator rules, I specified the following.  


 

I added a method with no parameters for test purposes, and that's the method
that gets called during validation.

Why would the method with no parameters be called when I specifically set
parameters?  Is this a bug or feature? 

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



Re: AW: Container Managed Authentication

2003-05-28 Thread Erik Price


Hirschmann, Bernhard wrote:

Thanks, Erik, but those I already know. 
I'm looking for some hints how you can access or handle the CMA stuff using
Struts. I've seen that you can allow an action only for a speciffic role,
configuring in struts-config.xml. So I thought there may be more support. Do
you know anything about this?
The only way that I can think of is to use the methods in 
HttpServletRequest, but if there are Struts-specific shortcuts that I 
don't know, it's because I'm still getting into Struts myself.

Regards,

Erik

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


Re: LookupDispatchAction and getParameter

2003-05-28 Thread Gregory F. March

On May 28, 2003, "Eric Miles" <[EMAIL PROTECTED]>  wrote:

 |or try getParameter("action") in your execute method.  The URL for the
 |request looks like "http://...?action=doSave"; internally.

Hmm... I printed out request.getParameter("action"), and the value is
always the label of the submit button, i.e. "Save", not "create.save"
(the application resource file looks like "create.save=Save").

However, I also printed out the value of mapping.getParameter() and it
is always null.

Again, any help is greatly appreciated.

Thanks...

/greg


--
Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet

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



Re: Struts Performance - Any Benchmarks?

2003-05-28 Thread Sundar Narasimhan
I've been following this thread w/ interest. Thanks for all the posts.

>Overall, it sounds like your team is likely to succumb to "premature
>optimization" anti-patterns, and totally fail to understand what is really
>important about web application design.  That's pretty tragic when it
>happens, because it's totally needless -- most of the things your team is
>stressing over are TOTALLY IRRELEVANT to the end user's perception of
>performance of your application.  They are worried about the wrong things,
>at the wrong time in the development cycle.

Craig -- I think that would be a bit premature. It has been my
experience that a lot of IT shops would like to know what kind of
hardware to buy etc. (i.e. down to the model number of the load
balancer). Personally speaking a lot of it is pre-mature (in fact I've
even had one IT manager proudly point out how he got a "fixed price
for 90 days" extension from a hardware manufacturer -- firmly
forgetting the fact that if you wait 90 days most such hardware will
go down in price :), but .. people need guidelines because the
lead-cycles organizationally on such architectural decisions tends to
be all over the map.  

>One possible approach would be to build a prototype using Struts, and
>exactly the same functionality using whatever design approach your team
>thinks will work better.  It's pretty much a waste of effort, but some
>people won't be convinced any other way.

I think it would be great if people could post their experiences
wrt. performance. i.e. at what point did splitting servers, more
advanced containers make sense etc.

Personally speaking, I'm going through a major struts based project
myself. Things seem to be working well so far, but I must admit that
now the load is going from the tens to the hundreds of simultaneous
users.. and the latency of some of the accesses are from far away
(separated by multiple routers) I'm wondering what our next steps
ought to be -- if customers start complaining :) Thus far we've been
able to get away with apache + tomcat instances.

(The critical piece of our application is one where users sort some
pretty large datasets.. which can also be modified by other
users.. right now the design reads the db. upon each significant
re-sort operation, but paging thru and editing is done entirely w/ the
data set cached in session).

Benchmarks to me are not only about tee-ing off against
alternatives. Benchmarks often tell me what combinations of
hardware/software people ended up using, and I often find that useful.

My $.02 cents.


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



Re: LookupDispatchAction and getParameter

2003-05-28 Thread Gregory F. March

On May 28, 2003, "Eric Miles" <[EMAIL PROTECTED]>  wrote:

 |Don't override the execute method, the LookupDispatchAction will call
 |'doSave' automatically.  Simply comment out your execute method.

Eric,

I was originally doing exactly what you say, but I was getting an
exception.  I searched the web and came across this snippet of code
where the parameter was checked in the overridden execute method
calling the super's execute only if something was there.  This is when
I realized it was never being set.  And since I guess there is no
default action, I was getting an exception.

Thanks,

/greg


--
Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet

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



RE: [OT] RE: [ANN] Barracuda 1.2.0 Released!

2003-05-28 Thread Chappell, Simon P
Yeah, I do that. I have to learn to chill out, lighten up and crack a joke once in a 
while.

Simon

>-Original Message-
>From: Mark Galbreath [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, May 28, 2003 7:05 AM
>To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
>Subject: RE: [OT] RE: [ANN] Barracuda 1.2.0 Released!
>
>
>Some people take themselves entirely too seriously without 
>realizing few
>others do.
>
>-Original Message-
>From: Andrew Hill [mailto:[EMAIL PROTECTED] 
>Sent: Wednesday, May 28, 2003 1:36 AM
>To: Struts Users Mailing List
>Subject: RE: [OT] RE: [ANN] Barracuda 1.2.0 Released!
>
>
>Well yeh, but surely the fact that it comes from Mark should 
>be sufficient
>to 'mark' it as such ;->
>
>-Original Message-
>From: Daniel Joshua [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, 28 May 2003 13:20
>To: 'Struts Users Mailing List'
>Subject: [OT] RE: [ANN] Barracuda 1.2.0 Released!
>
>
>>IMO, people interested in Barracuda developments should subscribe to 
>>whatever mailing list you publish.  This really has nothing 
>to do with 
>>Struts and, at best, should be posted as [OT].
>
>Now the below is what you call an off-topic post...
>
>Regards,
>Daniel
>
>
>-Original Message-
>From: Mark Galbreath [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, 28 May, 2003 1:05 PM
>To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
>Subject: RE: [ANN] Barracuda 1.2.0 Released!
>
>
>What the hell are you doing at keyboard at what must be 0600 
>London time?
>
>:-)
>
>-Original Message-
>From: Andrew Hill [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, May 28, 2003 1:02 AM
>To: Struts Users Mailing List
>Subject: RE: [ANN] Barracuda 1.2.0 Released!
>
>
>+1
>
>-Original Message-
>From: Daniel Joshua [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, 28 May 2003 12:05
>To: 'Struts Users Mailing List'
>Subject: RE: [ANN] Barracuda 1.2.0 Released!
>
>
>I think you are being too strict... give him a break.
>
>His title is clear, just delete it if you are not interested...
>
>Regards,
>Daniel
>
>
>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, 28 May, 2003 1:09 AM
>To: [EMAIL PROTECTED]
>Subject: Re: [ANN] Barracuda 1.2.0 Released!
>
>
>>I normally wouldn't post this type of info to the Struts list, but 
>>since a number of you have asked to be kept abreast of Barracuda 
>>develpments, I figured I would let you know that the long awaited 
>>stable release of Barracuda 1.2.0 is finally here!
>
>IMO, people interested in Barracuda developments should subscribe to
>whatever mailing list you publish.  This really has nothing to do with
>Struts and, at best, should be posted as [OT].
>
>Thanks,
>David
>
>
>>
>>You can download it at:
>>http://barracudamvc.org/downloads/
>>
>>A lot has changed since the 1.1.1 release.  Barracuda moved to 
>>http://www.barracudamvc.org , the source has been refactored, 
>there now 
>>exist two contrib packages with reusable code and example webapps to 
>>show off their functionality, numerous bugs have been fixed, quite a 
>>few new features have been added and many features improved, and 
>>deployment of Barracuda and BarracudaDiscRack is now incredibly 
>>simplified.
>>
>>See the most important changes here... 
>>http://barracudamvc.org/Barracuda/docs/changes.html#1_2_0_Rele
>ase_Notes
>>and here... 
>http://barracudamvc.org/BarracudaDiscRack/docs/changes.html
>>
>>For a more detailed explanation of the changes, see 
>>http://barracudamvc.org/Barracuda/javadocs/org/enhydra/barracu
>da/A_Chan
>>ges_
>H
>>istory.html
>>
>>For information on building and deploying Barracuda, see... 
>>http://barracudamvc.org/Barracuda/docs/build_deploy.html
>>
>>And, of course, don't forget to try out the new contrib apps.  See... 
>>http://barracudamvc.org/Barracuda/docs/contrib_package.html
>>
>>All this information, and more, is available at: 
>>http://barracudamvc.org/Barracuda/index.html
>>and here... http://barracudamvc.org/BarracudaDiscRack/docs/index.html
>>
>>
>>Thanks to everyone on the BarraucdaMVC team for all your hard 
>work and 
>>thanks to all the users who continue to utilize this great 
>project! Oh, 
>>and special thanks to those who donated hosting, time, money, and 
>>effort to make barracudamvc.org possible.
>>http://www.visi.com/~hoju/barracuda/donations.html
>>
>>Enjoy!
>>
>>Christian
>>--
>>Christian Cryder [EMAIL PROTECTED]
>>Internet Architect, ATMReports.com
>>Barracuda - http://barracudamvc.org
>>--
>>"Coffee? I could quit anytime, just not today"
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>_
>Tired of spam? Get advanced junk mail protection with MSN 8.
>http://join.msn.com/?page=features/junkmail
>
>
>-

[OT] RE: [ANN] Barracuda 1.2.0 Released!

2003-05-28 Thread Josh Rayls
I don't suppose it was Kurtz Shiraz from the Barossa Valley, was it?
(Although McCrea is pretty good as well!) That is most certainly one of my
favorite Aussie wines.

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 1:38 AM
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: [ANN] Barracuda 1.2.0 Released!


I thought you were pulling a gig in London - you are in Sydney?  whatever,
I've noticed over the past year you and me seem to be to only ones working
late nights and weekends (those slackers!).  Anyway, I just ran into a bug I
cannot solve after so many hours and a bottle of good Aussie wine (a quite
tasty Shiraz).  So good-night (morning?) to all, and to all, a day without
bugs.

I am close to comatoseall I see is 



l8r d00ds
mark

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 28, 2003 1:19 AM
To: Struts
Subject: RE: [ANN] Barracuda 1.2.0 Released!


Hehe, the only way you would ever catch me awake at such an ungodly hour is
if I hadnt gone home the night before.

Its 1pm here mate, and for once Ive had a decent rest having had to take a
sicky yesterday and having taken the weekend off too. (Sure beats the
previous weekend where I did 26 hours straight at the office)

Reckon I might even be sneaking off home early (8pm) today. :-)

So... what times it over there? Guess you would have done what? 18 , 19
hours straight so far?

;-)

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 28 May 2003 13:05
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: [ANN] Barracuda 1.2.0 Released!


What the hell are you doing at keyboard at what must be 0600 London time?

:-)

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 1:02 AM
To: Struts Users Mailing List
Subject: RE: [ANN] Barracuda 1.2.0 Released!


+1

-Original Message-
From: Daniel Joshua [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 28 May 2003 12:05
To: 'Struts Users Mailing List'
Subject: RE: [ANN] Barracuda 1.2.0 Released!


I think you are being too strict... give him a break.

His title is clear, just delete it if you are not interested...

Regards,
Daniel


-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 28 May, 2003 1:09 AM
To: [EMAIL PROTECTED]
Subject: Re: [ANN] Barracuda 1.2.0 Released!


>I normally wouldn't post this type of info to the Struts list, but 
>since a number of you have asked to be kept abreast of Barracuda 
>develpments, I figured I would let you know that the long awaited 
>stable release of Barracuda 1.2.0 is finally here!

IMO, people interested in Barracuda developments should subscribe to
whatever mailing list you publish.  This really has nothing to do with
Struts and, at best, should be posted as [OT].

Thanks,
David


>
>You can download it at:
>http://barracudamvc.org/downloads/
>
>A lot has changed since the 1.1.1 release.  Barracuda moved to 
>http://www.barracudamvc.org , the source has been refactored, there now 
>exist two contrib packages with reusable code and example webapps to 
>show off their functionality, numerous bugs have been fixed, quite a 
>few new features have been added and many features improved, and 
>deployment of Barracuda and BarracudaDiscRack is now incredibly 
>simplified.
>
>See the most important changes here... 
>http://barracudamvc.org/Barracuda/docs/changes.html#1_2_0_Release_Notes
>and here... http://barracudamvc.org/BarracudaDiscRack/docs/changes.html
>
>For a more detailed explanation of the changes, see 
>http://barracudamvc.org/Barracuda/javadocs/org/enhydra/barracuda/A_Chan
>ges_
H
>istory.html
>
>For information on building and deploying Barracuda, see... 
>http://barracudamvc.org/Barracuda/docs/build_deploy.html
>
>And, of course, don't forget to try out the new contrib apps.  See... 
>http://barracudamvc.org/Barracuda/docs/contrib_package.html
>
>All this information, and more, is available at: 
>http://barracudamvc.org/Barracuda/index.html
>and here... http://barracudamvc.org/BarracudaDiscRack/docs/index.html
>
>
>Thanks to everyone on the BarraucdaMVC team for all your hard work and 
>thanks to all the users who continue to utilize this great project! Oh, 
>and special thanks to those who donated hosting, time, money, and 
>effort to make barracudamvc.org possible.
>http://www.visi.com/~hoju/barracuda/donations.html
>
>Enjoy!
>
>Christian
>--
>Christian Cryder [EMAIL PROTECTED]
>Internet Architect, ATMReports.com
>Barracuda - http://barracudamvc.org
>--
>"Coffee? I could quit anytime, just not today"
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_

RE: [OT] RE: [ANN] Barracuda 1.2.0 Released!

2003-05-28 Thread Mark Galbreath
Some people take themselves entirely too seriously without realizing few
others do.

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 28, 2003 1:36 AM
To: Struts Users Mailing List
Subject: RE: [OT] RE: [ANN] Barracuda 1.2.0 Released!


Well yeh, but surely the fact that it comes from Mark should be sufficient
to 'mark' it as such ;->

-Original Message-
From: Daniel Joshua [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 28 May 2003 13:20
To: 'Struts Users Mailing List'
Subject: [OT] RE: [ANN] Barracuda 1.2.0 Released!


>IMO, people interested in Barracuda developments should subscribe to 
>whatever mailing list you publish.  This really has nothing to do with 
>Struts and, at best, should be posted as [OT].

Now the below is what you call an off-topic post...

Regards,
Daniel


-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 28 May, 2003 1:05 PM
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: [ANN] Barracuda 1.2.0 Released!


What the hell are you doing at keyboard at what must be 0600 London time?

:-)

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 1:02 AM
To: Struts Users Mailing List
Subject: RE: [ANN] Barracuda 1.2.0 Released!


+1

-Original Message-
From: Daniel Joshua [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 28 May 2003 12:05
To: 'Struts Users Mailing List'
Subject: RE: [ANN] Barracuda 1.2.0 Released!


I think you are being too strict... give him a break.

His title is clear, just delete it if you are not interested...

Regards,
Daniel


-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 28 May, 2003 1:09 AM
To: [EMAIL PROTECTED]
Subject: Re: [ANN] Barracuda 1.2.0 Released!


>I normally wouldn't post this type of info to the Struts list, but 
>since a number of you have asked to be kept abreast of Barracuda 
>develpments, I figured I would let you know that the long awaited 
>stable release of Barracuda 1.2.0 is finally here!

IMO, people interested in Barracuda developments should subscribe to
whatever mailing list you publish.  This really has nothing to do with
Struts and, at best, should be posted as [OT].

Thanks,
David


>
>You can download it at:
>http://barracudamvc.org/downloads/
>
>A lot has changed since the 1.1.1 release.  Barracuda moved to 
>http://www.barracudamvc.org , the source has been refactored, there now 
>exist two contrib packages with reusable code and example webapps to 
>show off their functionality, numerous bugs have been fixed, quite a 
>few new features have been added and many features improved, and 
>deployment of Barracuda and BarracudaDiscRack is now incredibly 
>simplified.
>
>See the most important changes here... 
>http://barracudamvc.org/Barracuda/docs/changes.html#1_2_0_Release_Notes
>and here... http://barracudamvc.org/BarracudaDiscRack/docs/changes.html
>
>For a more detailed explanation of the changes, see 
>http://barracudamvc.org/Barracuda/javadocs/org/enhydra/barracuda/A_Chan
>ges_
H
>istory.html
>
>For information on building and deploying Barracuda, see... 
>http://barracudamvc.org/Barracuda/docs/build_deploy.html
>
>And, of course, don't forget to try out the new contrib apps.  See... 
>http://barracudamvc.org/Barracuda/docs/contrib_package.html
>
>All this information, and more, is available at: 
>http://barracudamvc.org/Barracuda/index.html
>and here... http://barracudamvc.org/BarracudaDiscRack/docs/index.html
>
>
>Thanks to everyone on the BarraucdaMVC team for all your hard work and 
>thanks to all the users who continue to utilize this great project! Oh, 
>and special thanks to those who donated hosting, time, money, and 
>effort to make barracudamvc.org possible.
>http://www.visi.com/~hoju/barracuda/donations.html
>
>Enjoy!
>
>Christian
>--
>Christian Cryder [EMAIL PROTECTED]
>Internet Architect, ATMReports.com
>Barracuda - http://barracudamvc.org
>--
>"Coffee? I could quit anytime, just not today"
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_
Tired of spam? Get advanced junk mail protection with MSN 8.
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]




-

RE: can a tile def be used as an action input ?

2003-05-28 Thread shirishchandra.sakhare
I think you can definately do So.Because the tiles def can be used as the action 
forward..And the action forward works the same way as the action input...Both the urls 
are used by struts to decide the url to forward to...So there is no reason why 
defination can not be input.. 

-Original Message-
From: Ionel Gardais [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 1:42 PM
To: Struts Users Mailing List
Subject: can a tile def be used as an action input ?


Hi,

The question is in the subject.

I have a tile def that defines a vue with a form-input in it.
The form calls an Action set with input="/input/form.jsp".

The problem is that when an error is detected via the form's validate method, it 
redisplays only the /input/form.jsp instead of the whole vue using tiles.


Can I define input=".create" (with .create the definition of a vue in tiles-def.xml) ?

thanks,
ionel



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



can a tile def be used as an action input ?

2003-05-28 Thread Ionel Gardais
Hi,

The question is in the subject.

I have a tile def that defines a vue with a form-input in it.
The form calls an Action set with input="/input/form.jsp".
The problem is that when an error is detected via the form's validate method, it redisplays only the /input/form.jsp instead of the whole vue using tiles.

Can I define input=".create" (with .create the definition of a vue in tiles-def.xml) ?

thanks,
ionel


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


Re: Expression Language question

2003-05-28 Thread Kris Schneider
Doing it all in a JSP:







Outputs "xyzzy". If you're trying to use a scripting variable with JSTL, it
won't work (unless you're using the RT versions of the tags). The EL versions of
the tags only deal with scoped attributes. So, it would work if you did:

request.setAttribute("indexStr", "bar");

Quoting Matthew Van Horn <[EMAIL PROTECTED]>:

> 
> How do you write an index variable in an expression, where the index is 
> also variable.
> i.e.
> Given:
> HashMap foo = new HashMap();
> foo.put("bar", "xyzzy");
> foo.put("baz", "plugh");
> 
> String indexStr = "bar";
> 
> 
> this doesn't seem to work.
> 
> I think it is doing foo.get("indexStr") instead of foo.get("bar");
> 
> 
> How can I do this the right way?
> 
> Thanks,
> Matt


-- 
Kris Schneider 
D.O.Tech   

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



Howto forward bean from one action to another in the request scope?

2003-05-28 Thread Iain Sanderson
 I have a  struts app in which I use an action (say action A) to pass a 
bean (Bean A) containing data from the Model  as an attribute  in the 
request scope to a View ( JSP A).
JSP A contains a Form that initiates Action B ( simply a Submit button) 
and thus  on to View B(JSP B) after some more interaction with the Model.
What I would like to do is re-use Bean A in Action B, as it contains data 
pertinent to Action B, and I don't want to query the model again for the 
same data.
How can I do this keeping the data bean A in the request scope? I know I 
can achieve this by placing Bean A in  the session scope, but this will 
accumulate memory and cause potential synchronization problems accross 
multiple users.

The real life scenario is this- Action A is selecting Patient cases from a 
database corresponding to a date range, and displaying the Case list  data 
(Bean A) in a table (JSP A) . The next task is to display all the pharmacy 
bills for the set of cases defined in Bean A and shown in JSP A.  So I 
would like to pass Bean A to the next Action B, which would forward the 
caselist  to a helper bean,  which in turn  would query the Model for all 
the drugs used for all the patients defined in Bean A. The end result is a 
list of pharmacy Bills (View B) which would print out  as all the bills 
for patients in a date range defined by the selection started by Action A.

Any help gratefully received.

Re: AW: Container Managed Authentication

2003-05-28 Thread Mark Lowe
you could look at the admin admin webapp in tomcat 4.1..

I think its what you're after.

cheers mark

On Wednesday, May 28, 2003, at 08:03 Europe/London, Hirschmann,  
Bernhard wrote:


Is there a documentation or a how-to around for CMA support in  
Struts?

I found this to be helpful, although it is not struts-specific:

If you are not using Tomcat, here is a more general explanation from  
the
JWSDP tutorial that should apply to most web containers:


Erik


Thanks, Erik, but those I already know.
I'm looking for some hints how you can access or handle the CMA stuff  
using
Struts. I've seen that you can allow an action only for a speciffic  
role,
configuring in struts-config.xml. So I thought there may be more  
support. Do
you know anything about this?

How can I access role information from a action or logout a user and  
so on?

Bernhard

-
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: AW: Container Managed Authentication

2003-05-28 Thread Gemes Tibor
Hirschmann, Bernhard írta:

How can I access role information from a action or logout a user and so on?
 

With basic auth method you cannot really log out a user. The 
session.invalidate() is useful in each auth method.

request.getUserPrincipal() and request.isUserInRole(String) are good 
starting points.

Tib



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


Re: StrutsTag

2003-05-28 Thread Gemes Tibor
V. írta:

Hi,
 Could someone be more specific at what times we use the 
  struts-bean.tld
 struts-logic.tld

Could you be more specific at what documentations have you read? A few 
docs worth of reading:
http://jakarta.apache.org/struts/userGuide/dev_html.html
http://jakarta.apache.org/struts/userGuide/dev_logic.html
http://jakarta.apache.org/struts/userGuide/dev_bean.html

The "taglib api reference" links on these pages are quite good docs as well.

Tib



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


Re: validator plugin gives "java.net.UnknownHostException: jakarta.apache.org" whenloading validator-rules.xml

2003-05-28 Thread ashwani . kalra

Thanks Nicolas
Is there any stable release of 1.1.  or Nightly build will be ok ? I am
learnigs strus as of now.

Please send the urls for any of them.







   
  
"Nicolas De
  
Loof"  To: "Struts Users Mailing List" <[EMAIL 
PROTECTED]>  
 Subject: Re: validator plugin gives 
  
   "java.net.UnknownHostException: 
jakarta.apache.org"  when loading 
05/28/2003 validator-rules.xml 
  
01:50 PM   
  
Please respond 
  
to "Struts 
  
Users Mailing  
  
List"  
  
   
  
   
  





This is a known RC1 bug, use a nightly build that ionclud the needed DTD.

Nico.

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 28, 2003 10:07 AM
Subject: validator plugin gives "java.net.UnknownHostException:
jakarta.apache.org" when loading validator-rules.xml


> hi,
>
> I get the following error when it my application boots up. Does it really
> tries to  get to the jakarta.apache.org. I  think no?
> Then what might be the problem ?
>
>
>
> [INFO] ValidatorPlugIn - -Loading validation rules file from
> 'WEB-INF/validator-rules.xml'
> [ERROR] ValidatorPlugIn - -jakarta.apache.org
>  jakarta.apache.org>java.net.UnknownHostException: jakarta.apache.org
>  at java.net.InetAddress.getAllByName0(InetAddress.java:566)
>  at java.net.InetAddress.getAllByName0(InetAddress.java:535)
>  at java.net.InetAddress.getByName(InetAddress.java:444)
>  at java.net.Socket.(Socket.java:95)
>  at sun.net.NetworkClient.doConnect(NetworkClient.java:45)
>  at sun.net.www.http.HttpClient.openServer(HttpClient.java:334)
>  at sun.net.www.http.HttpClient.openServer(HttpClient.java:520)
>  at sun.net.www.http.HttpClient.(HttpClient.java:270)
>  at sun.net.www.http.HttpClient.(HttpClient.java:280)
>  at sun.net.www.http.HttpClient.New(HttpClient.java:292)
>  at
>
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:417)

>  at
>
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:510)

>  at java.net.URL.openStream(URL.java:793)
>  at
>
org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:796)

>  at
>
org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:756)

>  at
>
org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:267)

>  at
>
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:826)

>  at
>
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)

>  at
>
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
>  at
>
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
>  at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
>  at
>
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)

>  at org.apache.commons.digester.Digester.parse(Digester.java:1562)
>  at
>
org.apache.commons.validator.ValidatorResourcesInitializer.initialize(ValidatorResourcesInitializer.java:256)

>  at
>
org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:224)

>  at
>
org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:167)
>  at
>
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1105)

>  at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
>  at javax.servlet.GenericServlet.init(GenericServlet.java:256)
>  at
>
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:924)

>  at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
>  at
>
org.apache.catalina.core.StandardContext.loadOnStartup(S

Re: Struts Performance - Any Benchmarks?

2003-05-28 Thread Ted Husted
Craig R. McClanahan wrote:
The other evidence is that Struts gets many thousands of downloads every
single day ... and support for it is built in (or easily plugged in) to a
wide variety of popular application development tools ... SOMEBODY must
think it makes a pretty reasonable platform for building web applications.
:-)
In other words, "You don't get fired for choosing S-T-R-U-T-S."

:>

-T.



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


Re: cancel button problem

2003-05-28 Thread Affan Qureshi
I have seen this one before as well. But I dont think it is possible in
plain HTML. So the best you could do in HTML is to place the default button
as the first Submit button on the form.
Or if you want ot use JavaScript then u might want to make use of new
key-capture events of JS. But i think you will then have to make all your
submissions thru links.

Affan

- Original Message -
From: "Vivian, Nigel (N.)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 28, 2003 2:08 PM
Subject: cancel button problem


> Hi all
>
> I've got a webapp working with struts 1.0.2 and tiles, but there is now a
requirement to make the enter button on the keyboard work.
>
> My problem is that my pages have the following code on them which creates
two submit button objects.  The user types an entry into some text fields on
the form and then presses enter.  The behaviour at the moment is that either
nothing happens or the first button defined on the form in this case the
cancel button is activated.
>
> My question is how can I make the Enter button be the default on an enter
keyboard press?  So far I have tried adding tabindex="0" to the code for the
cancel button with no success.
>
> 
>    
>    
>    
> 
>
> which generates the following HTML in the browser
>
> 
>    
>    
>  
> 
>
> Thanks
>
> Nigel Vivian
>
> -
> 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]



AW: cancel button problem

2003-05-28 Thread Roland Berger
Is it an option to swap cancel and enter button? Then you would have the
behaviour you like.
Roland

-Ursprüngliche Nachricht-
Von: Vivian, Nigel (N.) [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 28. Mai 2003 11:09
An: '[EMAIL PROTECTED]'
Betreff: cancel button problem


Hi all

I've got a webapp working with struts 1.0.2 and tiles, but there is now a
requirement to make the enter button on the keyboard work.

My problem is that my pages have the following code on them which creates
two submit button objects.  The user types an entry into some text fields on
the form and then presses enter.  The behaviour at the moment is that either
nothing happens or the first button defined on the form in this case the
cancel button is activated.

My question is how can I make the Enter button be the default on an enter
keyboard press?  So far I have tried adding tabindex="0" to the code for the
cancel button with no success.


   
   
   


which generates the following HTML in the browser


   
   
 


Thanks

Nigel Vivian

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



cancel button problem

2003-05-28 Thread Vivian, Nigel (N.)
Hi all

I've got a webapp working with struts 1.0.2 and tiles, but there is now a requirement 
to make the enter button on the keyboard work.

My problem is that my pages have the following code on them which creates two submit 
button objects.  The user types an entry into some text fields on the form and then 
presses enter.  The behaviour at the moment is that either nothing happens or the 
first button defined on the form in this case the cancel button is activated.

My question is how can I make the Enter button be the default on an enter keyboard 
press?  So far I have tried adding tabindex="0" to the code for the cancel button with 
no success.

 
   
   
   


which generates the following HTML in the browser

 
   
   
 


Thanks

Nigel Vivian

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



Re: role - tiles definition?

2003-05-28 Thread Cedric Dumoulin
 Hi,

 There is a simple example of usage in tiles-documentation.war under 
test/testRole. In brief, when you specify a role, the insert is 
performed only if the user is in requested role. Otherwise the tag is 
skipped.

  You can refer  to the documentation of   tag 
(http://jakarta.apache.org/struts/userGuide/struts-tiles.html), and 
experiment.
 What you should know: the role attribute work in definitions with 
, but not in the  tags of a 
definition. ,Furthermore the role attribute only accept one role.
 An alternative is to use the logic tags of struts to check roles.

  Cedric

José Fortunato H. Tomás wrote:

Hi!

I read the tilesAdvancedFeatures.pdf in some fast way.
At end I see (9.2) a reference to role for tiles definition. I look 
backwords in the document I could find any mension of how it works, or 
how it should be used.

Any one has a reference or could tell how this role works, or how I 
should use it?

Thanks.



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


Re: tiles:initComponentDefinitions and NullPointerException

2003-05-28 Thread Cedric Dumoulin
 This will not work with this tag because it checks for the factory 
existence.

 You can use the special action 
o.a.s.tiles.actions.ReloadDefinitionsAction.java to reload the factory.

   Cedric



Bastian Zapf wrote:

Salut Cedric and everybody else,

can you also use  to re-initialize the
factory? We're working here with a Websphere App. Server and would like to
do that without restarting the server/whole application.
Thanks,
bas & marco.
Dienstag, 27. Mai 2003 15:51
To: Struts Users Mailing List <[EMAIL PROTECTED]>
cc:
From: Cedric Dumoulin <[EMAIL PROTECTED]>
Subject: Re: tiles:initComponentDefinitions and NullPointerException


 Hi,

 The   tag can be used to
 initialize the tiles factory without Struts. However, the preferred way
 to initialize Tiles without Struts is to use an initialization servlet,
 like the TilesServlet.
 A blank war file initializing a Tiles factory without Struts can be
 found in the bin dist from http://www.lifl.fr/~dumoulin/tiles/. Locate
 the file tiles-blank.war.
 Cedric

Umit VARDAR wrote:

 

Hello all,

I am trying to replace jsp pages of an application with tiles. All I do:
1. added  tags to web.xml
2. created tiles-defs.xml under the WEB-INF
3. added  as the
   

first
 

tiles tag into the index.jsp

I am getting the following error, when I acces index.jsp:

java.lang.NullPointerException
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:140)
   at
   

org.apache.struts.tiles.TilesUtilImpl.applicationClass(TilesUtilImpl.java:
 

238)
...
the rest is in the error.txt file.

What could be the reason? Can you help me please.

Best regards
Umit VARDAR
PS. error.txt, index.jsp and tiles-defs.xml are attached.



java.lang.NullPointerException
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:140)
   at
   

org.apache.struts.tiles.TilesUtilImpl.applicationClass(TilesUtilImpl.java:238)
 

   at
   

org.apache.struts.tiles.TilesUtilImpl.createDefinitionFactoryInstance(TilesUtilImpl.java:187)
 

   at
   

org.apache.struts.tiles.TilesUtilImpl.createDefinitionsFactory(TilesUtilImpl.java:166)
 

   at
   

org.apache.struts.tiles.TilesUtil.createDefinitionsFactory(TilesUtil.java:206)
 

   at
   

org.apache.struts.taglib.tiles.InitDefinitionsTag.doStartTag(InitDefinitionsTag.java:127)
 

   at org.apache.jsp.index$jsp._jspService(index$jsp.java:68)
   at
   

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 

   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
   

org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:173)
 

   at
   

org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:246)
 

   at
   

org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
 

   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
   

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
 

   at
   

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 

   at
   

org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:223)
 

   at
   

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
 

   at
   

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 

   at
   

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
 

   at
   

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 

   at
   

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 

   at
   

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 

   at
   

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
 

   at
   

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 

   at
   

org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
 

   at
   

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 

   at
   

org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:142)
 

   at
   

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 

   at
   

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 

   at
   

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 

   at
   

org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
 

   at
   

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
 

   at
   

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 

   at
   

org.apache.catalina.valves.ErrorDispa

Global request parameter filtering

2003-05-28 Thread Mike Whittaker

Say for instance you want to filter for all the ' " \ characters in request
parameters
either removing them, or escaping them.

Either way if you do it before the action form gets them, then on
prepopulation of form fields the user will see these alterations (not
desirable).
If you do it after you decide the form won't be returned then:

a) It becomes difficult because you have just form bean method calls to get
the parameters something like filter(getMyString()) becomes a pain and open
to missing out the filtering with potentially disastorous consequences!

b) If you decided to somehow globally alter a session scoped form then again
you have prepopulation alterations.

I have seen that RequestProcessor may offer hope, I'd like to know the order
that these RP methods are called.

I realise that I could use BeanUtils and make a DynaBean copy of a form
bean, filtering the parameters during the copy.  Just seems overkill, and
yet another object in the request.

Any pointers?
How do you filter your sql sensitive characters?

--
Mike W


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



Re: validator plugin gives "java.net.UnknownHostException: jakarta.apache.org" when loading validator-rules.xml

2003-05-28 Thread Nicolas De Loof
This is a known RC1 bug, use a nightly build that ionclud the needed DTD.

Nico.

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 28, 2003 10:07 AM
Subject: validator plugin gives "java.net.UnknownHostException: jakarta.apache.org" 
when loading validator-rules.xml


> hi,
> 
> I get the following error when it my application boots up. Does it really
> tries to  get to the jakarta.apache.org. I  think no?
> Then what might be the problem ?
> 
> 
> 
> [INFO] ValidatorPlugIn - -Loading validation rules file from
> 'WEB-INF/validator-rules.xml'
> [ERROR] ValidatorPlugIn - -jakarta.apache.org
>  jakarta.apache.org>java.net.UnknownHostException: jakarta.apache.org
>  at java.net.InetAddress.getAllByName0(InetAddress.java:566)
>  at java.net.InetAddress.getAllByName0(InetAddress.java:535)
>  at java.net.InetAddress.getByName(InetAddress.java:444)
>  at java.net.Socket.(Socket.java:95)
>  at sun.net.NetworkClient.doConnect(NetworkClient.java:45)
>  at sun.net.www.http.HttpClient.openServer(HttpClient.java:334)
>  at sun.net.www.http.HttpClient.openServer(HttpClient.java:520)
>  at sun.net.www.http.HttpClient.(HttpClient.java:270)
>  at sun.net.www.http.HttpClient.(HttpClient.java:280)
>  at sun.net.www.http.HttpClient.New(HttpClient.java:292)
>  at
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:417)
>  at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:510)
>  at java.net.URL.openStream(URL.java:793)
>  at
> org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:796)
>  at
> org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:756)
>  at
> org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:267)
>  at
> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:826)
>  at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
>  at
> org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
>  at
> org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
>  at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
>  at
> org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)
>  at org.apache.commons.digester.Digester.parse(Digester.java:1562)
>  at
> org.apache.commons.validator.ValidatorResourcesInitializer.initialize(ValidatorResourcesInitializer.java:256)
>  at
> org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:224)
>  at
> org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:167)
>  at
> org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1105)
>  at org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
>  at javax.servlet.GenericServlet.init(GenericServlet.java:256)
>  at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:924)
>  at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
>  at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3341)
>  at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3534)
>  at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
>  at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
>  at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
>  at
> org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257)
>  at
> org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
>  at
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569)
>  at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411)
>  at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
>  at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
>  at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
>  at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
>  at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
>  at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>  at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
>  at
> org.apache.catalina.core.StandardService.start(StandardService.java:497)
>  at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
>  at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
>  at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
>  at org.apache.catalina.startup.Catalina.process(Catalina.java:180

DB Access using struts

2003-05-28 Thread Sinclair, Mark
Hi All,  

Please help I am relatively new to java and even more recently to struts.  I
basically want to know what is the best way (best coding practice & J2EE)to
connect to and use a DB with struts framework?  The approaches that I have
considered (using my limited experience) are:

1.  I can specify DB in  in struts-config and get connection
etc in Actions to work and e.g. check logon id in LogonAction.  However, is
this the best place for the DB interaction to be coded?   All example
applications that I have seen take this simple approach.  This way the DB
configuration is central and easily managed.

2. Using a DataServices or DataAccess Layer where the connection to DB and
all DB interaction is handled.  A previous framework that we used had a
BusinessObject containing a DataObject and called the DataService from the
BusinessObject.  We can do something similar with struts, however each
DataService e.g. to validate logon ID and password use the UserDS which has
the connection string inside it.  This defeats using struts to centrally
manage the datasource.  Also using this approach cannot read the
 from struts-config as no access to the ServletContext outside
of the Action?  Is this correct?
Is it OK to make the connection in the Action and pass it to a parameter to
the BusinessObject/Bean?

What methods do people use?  
If you have any example code with DB connections etc it would save us
re-inventing the wheel... :-). 
 
Also, is there any potential problems with connections using the above
approaches if I only open and close them as needed?

Apologies if these are stupid/simple questions!

Thanks,
Mark


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



validator plugin gives "java.net.UnknownHostException: jakarta.apache.org" whenloading validator-rules.xml

2003-05-28 Thread ashwani . kalra
hi,

I get the following error when it my application boots up. Does it really
tries to  get to the jakarta.apache.org. I  think no?
Then what might be the problem ?



[INFO] ValidatorPlugIn - -Loading validation rules file from
'WEB-INF/validator-rules.xml'
[ERROR] ValidatorPlugIn - -jakarta.apache.org
java.net.UnknownHostException: jakarta.apache.org
 at java.net.InetAddress.getAllByName0(InetAddress.java:566)
 at java.net.InetAddress.getAllByName0(InetAddress.java:535)
 at java.net.InetAddress.getByName(InetAddress.java:444)
 at java.net.Socket.(Socket.java:95)
 at sun.net.NetworkClient.doConnect(NetworkClient.java:45)
 at sun.net.www.http.HttpClient.openServer(HttpClient.java:334)
 at sun.net.www.http.HttpClient.openServer(HttpClient.java:520)
 at sun.net.www.http.HttpClient.(HttpClient.java:270)
 at sun.net.www.http.HttpClient.(HttpClient.java:280)
 at sun.net.www.http.HttpClient.New(HttpClient.java:292)
 at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:417)
 at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:510)
 at java.net.URL.openStream(URL.java:793)
 at
org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:796)
 at
org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:756)
 at
org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:267)
 at
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:826)
 at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
 at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
 at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
 at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
 at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)
 at org.apache.commons.digester.Digester.parse(Digester.java:1562)
 at
org.apache.commons.validator.ValidatorResourcesInitializer.initialize(ValidatorResourcesInitializer.java:256)
 at
org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:224)
 at
org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:167)
 at
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1105)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
 at javax.servlet.GenericServlet.init(GenericServlet.java:256)
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:924)
 at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3341)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3534)
 at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
 at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
 at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
 at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257)
 at
org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
 at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569)
 at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
 at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
 at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
 at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
 at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
 at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
 at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
 at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
 at java.lang.reflect.Method.invoke(Native Method)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)


TIA
Ashwani
http://www.gecities.com/ashwani_kalra/



This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclos

Validator Framework

2003-05-28 Thread Roland Berger
Hi all

I'd like to use the Validation Framework outside of struts but I'm facing
some problems how to find out if the validation has faild or not after
calling the validate method of the Validator Class.
I tried to look how struts does it but did not succeed.

Does anybody know what to do after calling validate()? Below you can see how
I do it right know. But I have the feeling that I do things the validate
method already does.

Thanks a lot

Roland


Code snippet how I find out if any of the validation has vaild.

  protected ValidatorResults validate ( String validationFormName, Object
bean ) throws ValidatorException {
ValidatorResults tValidatorResults = null;
Validator validator = new Validator ( getValidatorResources (),
validationFormName );
validator.addResource ( Validator.BEAN_KEY, bean );
tValidatorResults = validator.validate ();

boolean result = true;
Iterator tIterResultValueMap = tValidatorResults.get();
while ( tIterResultValueMap.hasNext() ){
  String tPropertieName = (String)tIterResultValueMap.next();
  Iterator tIterActionMap =
tValidatorResults.getValidatorResult(tPropertieName).getActionMap().keySet()
.iterator();
  while (tIterActionMap.hasNext()){
String tValidatorActionName = ( String ) tIterActionMap.next();
boolean tIsValid =
tValidatorResults.getValidatorResult(tPropertieName).isValid(tValidatorActio
nName);
result = result && tIsValid;
  }
}
.
.
return tValidatorResults;
  }


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



Re: Tiles .. Should what level should one Drill down

2003-05-28 Thread Cedric Dumoulin


Nimish Chourey , Tidel Park - Chennai wrote:

Hi All ,
	Looking at the examples of Tiles , I could make out that if you see
a pattern in your JSP's then they could be easily factored into templates or
what you can also called as tiles . For eg . you can divide your page in
terms of Menu , Header , footer and body . Now my question is till what
level can we define tiles or templates ??
Say I have a form with say 4 tables . These tables are similar . I mean I
could easily make a template for these tabels .
And these type of tables are used in all my JSP's .
Should I make a tile for this type of table . 

 You can make a Tile for your tables, and for any part of a page that 
is often used. This will improve reuse and reduce maintenance.

The point to note here is
these all tables are in a single form .
 You can insert tiles inside a form. What you should care about is that 
the open and close tag of the form should be in the same tile. There is 
an  example  in  tiles-documentation.war under /tutorial/invoice showing 
the possible use of a form with reusable tiles.

   Cedric

If I go ahead with this , what type of problems can I face ? Or the tiles
should  really be used at very high level ie say at Menu Footer Header level
??
Hope I have made my question clear .
Comments are welcome ..
Nimish

 



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


RE: URL missing .do

2003-05-28 Thread Marcel Overdijk
Steve,

Could this also be the same for my problem:
I have developed a webapp on Tomcat 4.0.3 and works fine.
After deploying it at my provider (also Tomcat 4.0.3) my
 aren't working

 

Or
 

www.myhost.org/trends.do
Or
www.myhost.org/test.do
Wont'work A Page Not Found error.

But at my pc I use http://localhost:8080/myapp/test.do and the action
mappings works fine




Met vriendelijke groet,


Marcel Overdijk



-Original Message-
From: Steve Raeburn [mailto:[EMAIL PROTECTED] 
Sent: dinsdag 27 mei 2003 18:26
To: Struts Users Mailing List
Subject: RE: URL missing .do


> -Original Message-
> From: Marcel Overdijk [mailto:[EMAIL PROTECTED]
> Sent: May 27, 2003 12:12 AM
>
> I have developed a webapp on Tomcat 4.0.3 and works fine. After 
> deploying it at my provider (Tomcat also 4.0.3) my  
> aren't working

If your web host is using Apache, it needs to be configured to send
certain requests to Tomcat. During your local testing you probably
access Tomcat directly (http://localhost:8080 ?), so you don't need this
mapping.

It is likely that your services provider has only set-up mappings for
/servlet/* and *.jsp

Ask your provider to add the following to your configuration. JkMount
/*.jsp ajp13 JkMount /servlet/* ajp13 JkMount /*.do ajp13

This tells Apache to send all requests for /*.do to Tomcat (using the
AJP13 connector). You still need your *.do mapping in WEB.XML that tells
Tomcat to send *.do requests to the ActionServlet.

The first two lines are probably already configured. Note that the exact
configuration required will depend on the connector they have installed
but if you ask them to add a the directives and tell them why, they
should be able to figure out what's needed for their particular set-up.

Good luck

Steve




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



RE: not working

2003-05-28 Thread Marcel Overdijk
Yes, the app is restarted. Other configurations set in the struts-config
file are working correct. For example the the Tiles plug-in and the
tiles-definitions file.





Met vriendelijke groet,


Marcel Overdijk





-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED] 
Sent: dinsdag 27 mei 2003 16:47
To: Struts Users Mailing List
Subject: Re:  not working


Did you restart the app (touch web.xml) after you uploaded it?


--
James Mitchell
Software Developer/Struts Evangelist http://www.struts-atlanta.org



- Original Message - 
From: "Marcel Overdijk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 10:38 AM
Subject:  not working


I have developed a webapp on Tomcat 4.0.3 and works fine.
After deploying it at my provider (also Tomcat 4.0.3) my
 aren't working

 

Or
 

www.myhost.org/trends.do
Or
www.myhost.org/test.do
Wont'work A Page Not Found error.

But at my pc I use http://localhost:8080/myapp/test.do and the action
mappings works fine

Anybody any suggestion ?


Marcel Overdijk


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



AW: Container Managed Authentication

2003-05-28 Thread Hirschmann, Bernhard

>> Is there a documentation or a how-to around for CMA support in Struts?

> I found this to be helpful, although it is not struts-specific:
> 
> If you are not using Tomcat, here is a more general explanation from the 
> JWSDP tutorial that should apply to most web containers:
>

>
> Erik


Thanks, Erik, but those I already know. 
I'm looking for some hints how you can access or handle the CMA stuff using
Struts. I've seen that you can allow an action only for a speciffic role,
configuring in struts-config.xml. So I thought there may be more support. Do
you know anything about this?

How can I access role information from a action or logout a user and so on?

Bernhard

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