Re: Date Localization

2003-01-22 Thread Gemes Tibor
2003. január 23. 07:31 dátummal Suresh Addagalla ezt írtad:
> Sorry to repost, but I didn't get any replies so far :(
>
> Hi,
>
> I haven't been able to successfully use the Validator for doing Date
> validations with struts 1.1 b3.
>
> I need to localize the date format. Since Validator would anyway take
> the default locale and the SHORT form of the date from the system, I
> have decided that I will use the short format in all Locales. But I am
> facing the following problems.


You cannot parse the date client side as you don't know the current locale the 
client has choosen and if you knew you couldn't find out the date pattern for 
the locale either. So you do not have pattern to match with.

Remove the javascript section from validator-rules.xml since it works only if 
you specify datePatternStrict. If you remove it, the validation will occur 
server side only. And server-side validation uses the current client locale's 
date format, afaik.

Hth,

Tib

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




RE: Error Loading Application Resources in Struts 1.1

2003-01-22 Thread Micael
Hi, again, James,

I was just trying to move Ted Husted's so that it worked in struts 1.1 and 
so that it had the jsp pages inside the WEB-INF.  I think we may be seeing 
a bug, but am not sure yet.

Micael

At 06:13 PM 1/22/03 -0500, you wrote:
Not sure what app you are working on, but I modified the struts-example
to put the jsp files under WEB-INFis that what you are
doing/testing?

A zip is available for download if you would like to see it:

  http://www.open-tools.org/struts-atlanta/downloads/



--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org/

"The man who does not read good books has no advantage over the man who
cannot read them."
- Mark Twain (1835-1910)







> -Original Message-
> From: Micael [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 6:03 PM
> To: Struts Users Mailing List
> Subject: RE: Error Loading Application Resources in Struts 1.1
>
>
> Thanks, James,
>
> It is there.  I am starting to think that the message
> resources part of the
> struts-config is not the problem.  The whole configuration is
> below.  You
> see any other troubles?
>
> Micael mac Grene
>
> 
> "-//Apache Software Foundation//DTD Struts
> Configuration 1.1//EN"
>
> "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
>
> 
>
> 
>
>  
>
>name="logonForm"
>  type="app.LogonForm"/>
>
>  
>
> 
>
>  
>name="logoff"
>  path="/logoff.do"/>
>name="logon"
>  path="/logon.do"/>
>  
>
> 
>
>  
>
>path=/logon"
>  type="org.apache.struts.actions.ActionForward"
>  parameter="/WEB-INF/jsp/logon/logon.jsp"/>
>
>path="/logonSubmit"
>  type="com.michaelmcgrady.page.action.LogonAction"
>  name="logonForm"
>  scope="request"
>  validate="true"
>  input="/WEB-INF/jsp/logon/logon.jsp">
>name="success"
>  path="/WEB-INF/jsp/welcome/welcome.jsp"/>
>  
>
>path="/logoff"
>  type="com.michaelmcgrady.page.action.LogoffAction">
>name="success"
>  path="/WEB-INF/jsp/welcome/welcome.jsp"/>
>  
>
> 
>
>   debug="3"
>  locale="true"
>  nocache="true"
>
> processorClass="org.apache.struts.action.RequestProcessor"/>
>
> 
>
>  null="false"/>
>  parameter="resources.images"
> null="false"/>
>
>
> 
>
> 
> value="/WEB-INF/validator-rules.xml,/WEB-INF/xml/validation.xml"/>
> 
> 
>
> At 05:49 PM 1/22/03 -0500, you wrote:
>
> >Check the .war file to see if the file is actually there.
> >Make sure your build process is actually copying the files
> to be war'd.
> >
> >It has happened in the past that my build script was not doing this.
> >
> >--
> >James Mitchell
> >Software Engineer/Struts Evangelist
> >http://www.open-tools.org/
> >
> >"The man who does not read good books has no advantage over
> the man who
> >cannot read them."
> > - Mark Twain (1835-1910)
> >
> >
> >
> >
> >
> >
> >
> > > -Original Message-
> > > From: Micael [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, January 22, 2003 5:46 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: Error Loading Application Resources in Struts 1.1
> > >
> > >
> > > Thanks for catching that, Wendy, but that was just a
> typo.  The site
> > > actually does not have that mistake.  Any other ideas?
> > >
> > > Micael
> > >
> > > At 03:37 PM 1/22/03 -0700, you wrote:
> > > > > I have the application resources in a file called
> > > application.properties
> > > > > and that is in the following directory structure:
> > > > > [x]/WEB-INF/classes/resources/application.properties.  I
> > > have put that in
> > > > > the struts config as:
> > > > >  
> > > >
> > > >You have 'resource.application' as the parameter, but your
> > > directory name is
> > > >plural: resources.  Fix one or the other so they match.
> > > >
> > > >--
> > > >Wendy Smoak
> > > >Applications Systems Analyst, Sr.
> > > >Arizona State University PA Information Resources Management
> > >
> > >
> > >
> > > LEGAL NOTICE
> > >
> > > 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 transmi

My IE, Tomcat, or Struts problem?

2003-01-22 Thread joni santoso
Hi,

I created a folder in my webapps for playing with struts. 
I have put a Context entry in my Tomcat's server.xml 
stating that that folder is reloadable = true.

Now, I sometimes add new entry/edit an entry to the 
application resources file. When I refresh my IE, it 
doesn't show the new entry/new value. However, if I keep 
refreshing it works.

So, what is the problem?

===
Meriahkan Tahun Baru Imlek dengan mengirimkan Kartu Elektronik PlasaCom kepada kerabat dan teman Anda
KSI PlasaCom - Reuni Alumni STTTelkom http://www.plasa.com/belajar/reuni.html 
===

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



Re: The tag library

2003-01-22 Thread V. Cekvenich
+1

It's a nice library.

Vic



Matt Raible wrote:

Below is a proposal I posted on my website tonight
(http://tinyurl.com/4s3j):


If you need a slick JSP Tag Library for sorting and paging data, the
display tag library is a great library to use. However, it's got issues
- just like any piece of software. I've fixed a couple on my own, but it
definitely needs some work - and integration with Struts (i.e. for
getting messages, or referencing forwards) would be awesome.

The problem is that Ed Hill doesn't seem to be working on it anymore -
and there hasn't been a release since May 2002! Since I do have the
source it wouldn't be hard to create a project at SourceForge for it. It
would be great to get some input from Ed though. Last year, I think he
even did a presentation on JSP Taglibs at Java One! I know there's lots
of Struts developers that use the  tag - are any of you
interested in continuing development on this project? 

Thanks,

Matt



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




RE: Value of Struts?

2003-01-22 Thread J Aaron Farr
Personally I think one of the advantages of Struts is that it's a fairly
lightweight framework.  What I mean is that, as you pointed out, all it
does is Model 2.  It's not a full portal framework like jetspeed and it
doesn't even have a full model framework like Turbine's torque.  That's
nothing against these projects (I love and use them both), but sometimes
you don't need all those extras and Struts gives you just enough to get
the job done.  

Sometimes the greatest feature is that fact that the "drudgery" of
writing the framework is done for you.  You can simply just get to work
on what makes your application unique.

jaaron

> -Original Message-
> From: Gene Campbell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 23, 2003 9:07 AM
> To: [EMAIL PROTECTED]
> Subject: Value of Struts?
> 
> 
> I've been using Struts (1.0) for a few months now, and
> I'm not seeing a big advantage to using it other than
> that it does Model 2 (which is very very wise) and
> hides some of the heavy lifting.  
> 
> ActionForms get you server side form validation and
> HTTP parameters->bean mapping.  
> 
> The taglibs get you reduced scriplet code and hooks to
> the form bean.
> 
> Actions get you a clean place to write controller code
> and a way to easily forward to presentation jsps.
> 
> Is that all Struts does?  Or are there features I'm
> missing?  Is it just a framework abstracting away the
> easy stuff into easier stuff?
> 
> I'm not trying to start a war - I'm sorry if I'm
> coming of antagonistic.  I'm not intending any ill
> will.  I'm just having a hard time figuring out why
> Struts is so popular.  
> 
> thanks - gene

-- 
  jaaron<[EMAIL PROTECTED]>


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




Re: DynaBeans, Struts, OR mapping tools and code generators

2003-01-22 Thread Craig R. McClanahan


On Wed, 22 Jan 2003, Tony Baity wrote:

>
> I am looking forward to see what the SUN Faces product will do and how
> Struts and JSTL relates to or is incorporated into that but I do not
> know easy it will be to map database fields to a "face".
>

If you've seen the early access version of JavaServer Faces that is
currently available, you know that the linkage between UI components and
model tier JavaBeans is expressed via a "model reference expression" that
is associated with each component.  In the next EA release, you'll see
that the syntax used for model reference expressions has been enhanced to
be exactly like a variable reference in the expression language (EL) used
by the JSP Standard Tag Library (JSTL)  -- indeed, the reference
implementation of JavaServer Faces uses the exact same expression
evaluator code.  So, anything you can address through a JSTL expression
today can be the source or destination of model tier data for a JavaServer
Faces component.

> -Tony

Craig


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




Re: data types on the travel between DB and view -- best to makeeverything Strings?

2003-01-22 Thread Craig R. McClanahan


On Wed, 22 Jan 2003, Trevor Morris wrote:

> Date: Wed, 22 Jan 2003 21:40:56 -0500
> From: Trevor Morris <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: data types on the travel between DB and view -- best to make
> everything Strings?
>
> Where and when do you do data conversion between the DB, Business, and View
> levels?  When you grab data out of the DB and set them in your VOs, do you
> set dates as Dates, ints as ints, etc?  Or is it easier to just leave
> everything as Strings and pass them around.  The majority of data in web
> apps is only used for display.  Little data has any logic performed against
> it.  If it does, you can just cast the String to the appropriate type when
> needed.
>
> String number1;
> String number2;
>
> e.g.  if (Integer.parseInt(number1) < Integer.parseInt(number2) {}
>
> What purpose really is there in keeping the data in their native types?  If
> you do, you have so much work to do in the transfer between the view and
> business layers.
>

If you convert dates to some string-based format in your VOs, how do *you*
know that you've selected the one-and-only format that all your users will
ever want to display dates in?  What happens when you want to support
international users that want to select their own date formats, based on
the Locale setting for that user?

My advice is to keep your VOs using native (locale-independent) data
types, and let the tags (if you're using JSP) or other conversion
mechanism do the appropriate locale-sensitive formatting.

Form beans, on the other hand, should generally use Strings for things
that are going to be represented as HTML input fields -- for reasons that
have been discussed hundreds of times before in the STRUTS-USER archives.

> Thanks for any advice.
>
> Trevor

Craig


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




Re: Creating an Action inside an Action

2003-01-22 Thread Craig R. McClanahan


On Thu, 23 Jan 2003, Peter A. Pilgrim wrote:

>
> Actually, Craig, what I am looking for is:
>
> (1) How to find all the action mappings registered for a Struts application?
>  I would like to programmatically find out from inside `Action.execute()'.

*If* you are a good boy :-) and route all your incoming requests through
the controller servlet (as opposed to linking directly to a JSP page),
then the controller servlet will have stored the ModuleConfig object for
the selected application module as a request attribute under the key
represented by Globals.APPLICATION_KEY
("org.apache.struts.action.MODULE").  From the ModuleConfig you can get
everything you want to know that came from struts-config.xml for that
module.

>
> (2) How to programmatically instantiate and then invoke an Action?
>  I guess this is really is Action chaining, isn't.
>  I would prefer to call it `transitioning' as in giving up the
>  responsibility to process a http request to secondary action.
>

Set up an ActionForward that has a request URL mapped to another Action,
and return it from the first Action.

Be aware that I'm *not* a believer in Action chaining -- too many people
get surprised by the interactions with form beans when you do this.
Instead, I advocate that the one-and-only Action that you submit to should
delegate to all the individual pieces of business logic it needs to (in
separate classes), and that you should reuse these business logic classes
as needed in multiple actions.

If we want a real "chain of responsibility" pattern (which is what action
chaining is really about), we should set that up as a first class notion.
That's one of the ideas I'm looking at for Struts 2.x.  In the mean time,
though, I consider action chaining to be a misuse of the current
architecture -- although other Struts committers may disagree.

> In another earlier note, I found a way to forward dispatch using request
> attributes and local action forwards. I did it this way in Struts 1.0.2
> seven or eight months ago.
>
> --
> Peter Pilgrim

Craig


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




The tag library

2003-01-22 Thread Matt Raible
Below is a proposal I posted on my website tonight
(http://tinyurl.com/4s3j):


If you need a slick JSP Tag Library for sorting and paging data, the
display tag library is a great library to use. However, it's got issues
- just like any piece of software. I've fixed a couple on my own, but it
definitely needs some work - and integration with Struts (i.e. for
getting messages, or referencing forwards) would be awesome.

The problem is that Ed Hill doesn't seem to be working on it anymore -
and there hasn't been a release since May 2002! Since I do have the
source it wouldn't be hard to create a project at SourceForge for it. It
would be great to get some input from Ed though. Last year, I think he
even did a presentation on JSP Taglibs at Java One! I know there's lots
of Struts developers that use the  tag - are any of you
interested in continuing development on this project? 

Thanks,

Matt



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




html multibox tag-- order of checked items in array

2003-01-22 Thread Weibert, Jason (NBC)
Does the html multibox tag guarantee that the array of "checked" items will
be populated in the same order that they occur in on the JSP page (i.e. top
to bottom) after a submit?  I need to make sure that the value from the
first checkbox selected is in the zero position of the array and so on...


Because e-mail can be altered electronically, 
the integrity of this communication cannot be guaranteed.

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




Re: data types on the travel between DB and view -- best to make everything Strings?

2003-01-22 Thread V. Cekvenich
How would you do date + 30 days, or compute a 15% increase to salary, or 
keep a sequence #, or incrment a count on each login?
.V

Trevor Morris wrote:
Where and when do you do data conversion between the DB, Business, and View
levels?  When you grab data out of the DB and set them in your VOs, do you
set dates as Dates, ints as ints, etc?  Or is it easier to just leave
everything as Strings and pass them around.  The majority of data in web
apps is only used for display.  Little data has any logic performed against
it.  If it does, you can just cast the String to the appropriate type when
needed.

String number1;
String number2;

e.g.  if (Integer.parseInt(number1) < Integer.parseInt(number2) {}

What purpose really is there in keeping the data in their native types?  If
you do, you have so much work to do in the transfer between the view and
business layers.

Thanks for any advice.

Trevor




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




Re: AW: easy struts

2003-01-22 Thread Wayne Fuller
Softwareentwicklung Hauschel wrote:

I've a problem creating forms with the plugin,
i cannot change the "webapp folder" for forms, it's always "defaultroot".

take a look at the attached screenshot !

anny idea ?

best regards
Fred Robert Hauschel



Use the Lomboz J2EE plugin, since then I haven't had a problem.  It 
appears to be a bug using EasyStruts with the Tomcat plugin.



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



RE: Value of Struts?

2003-01-22 Thread Carl Fyffe
On top of all of the comments that have been presented, I would like to
say this:

I was given a task to create a site, I had 1 month to make it happen.
Luckily I had great requirements, and a great DBA by my side to help
with the model portion.  I went through the requirements, came up with a
specification, and started estimating the number of hours it was going
to take to make it happen.  2 months.  Long story short, I got it done
in one month.  Time to implement new modules went from 8 hours per
module to 2. Needless to say, my team came out looking like stars.

Is it just a framework abstracting away the easy stuff into easier
stuff?  I think the abstracted parts are the more complicated parts.
It's a framework!!  Think about a house and what it looks like before
the bricks are laid and the shingles tacked on.  After you have the
framework up, the rest is just repetition.

Some of the things that are in 1.1 but not 1.0: Nested tags, Tiles,
Validation, File Upload, various html, logic and bean tags and Dyna
Forms.

For those who are having trouble finding good editors, Macromedia MX has
extensions to work with Struts.  Intellij's IDEA works really well with
Struts if you are a code junkie.

Throw in the cost for the product ( $0 ) and add in support ( $0 )
documentation ( $0 )  and then factor in the number of hours you put
into creating it all ( 0 ).  I would have to say that Struts delivers a
pretty huge bang for the buck.

Oh yeah, did I mention that it is EASY too?

Thanks Craig, Ted, Arron, Cedric, David, David, Martin and the rest of
the Contributors for providing such an awesome product.

Carl

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 22, 2003 9:12 PM
To: [EMAIL PROTECTED]
Subject: Re: Value of Struts?


Struts' main functionality is in the C of MVC.  There are integrated
pieces 
to make the V much easier (Tiles and custom tags).  The M is up to you.

What do you expect Struts to do, make your coffee ;-)?

You need to consider the thousands of hours that highly paid engineers
have 
put into this project.  If you really want to know the "value of
struts", 
just guess an average salary and multiply by number of hours.  If you
guess 
appropriately, the number should stagger you.

Also consider you're using a very old version of Struts.  I encourage
you to 
check out 1.1; the version numbering is *very* modest.

David






>From: Gene Campbell <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Value of Struts?
>Date: Wed, 22 Jan 2003 15:07:04 -0800 (PST)
>
>I've been using Struts (1.0) for a few months now, and
>I'm not seeing a big advantage to using it other than
>that it does Model 2 (which is very very wise) and
>hides some of the heavy lifting.
>
>ActionForms get you server side form validation and
>HTTP parameters->bean mapping.
>
>The taglibs get you reduced scriplet code and hooks to
>the form bean.
>
>Actions get you a clean place to write controller code
>and a way to easily forward to presentation jsps.
>
>Is that all Struts does?  Or are there features I'm
>missing?  Is it just a framework abstracting away the
>easy stuff into easier stuff?
>
>I'm not trying to start a war - I'm sorry if I'm
>coming of antagonistic.  I'm not intending any ill
>will.  I'm just having a hard time figuring out why
>Struts is so popular.
>
>thanks - gene
>
>__
>Do you Yahoo!?
>Yahoo! Mail Plus - Powerful. Affordable. Sign up now. 
>http://mailplus.yahoo.com
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail:
>


_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




DynaBeans, Struts, OR mapping tools and code generators

2003-01-22 Thread Tony Baity

Has anyone seen any effort afoot to make a drag-N-drop between a GUI like the one in 
MiddleGen and an ActionForm so that you can build your pages using point and click and 
have all the code generation for the action classes, DTOs/VOs, EJBs/DAOs done behind 
the scenes xdoclet style. I know the propriatary nature of some databases and app 
servers makes this a little difficult but it looks like a lot of pieces for this are 
starting to fall in place. Especially with the new commons-beanutils with features 
such as  RowSetDynaClass (as recently mentioned by Craig)

I don't mind coding all this stuff by hand... Not!... and don't mind trying out 
various popular OR mapping tools and code generators (free ones that is). But it seems 
like someone might be looking at assembling into a single tool many of the loosely 
coupled projects not only at Apache but also sourceforge.

I am looking forward to see what the SUN Faces product will do and how Struts and JSTL 
relates to or is incorporated into that but I do not know easy it will be to map 
database fields to a "face".

But for my next scheduled development with Stuts 1.1 and the new commons code, this 
looks like still a lot of hand coding or hand configuring of code generators... 

I suppose I'll need to ask each of the current tool's user lists to see if they are 
planning to support some of the new features and integration with Struts. 

:) But I wanted poll the great Struts masses first :)

-Tony

 

 



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


RE: Any Struts-based calendar examples out there?

2003-01-22 Thread James Mitchell
This should give you a few ideas.although it requires javascript:

 http://javascript.internet.com/calendars/



--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org/

"The man who does not read good books has no advantage over the man who
cannot read them."
- Mark Twain (1835-1910)







> -Original Message-
> From: Trevor Morris [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, January 22, 2003 9:34 PM
> To: [EMAIL PROTECTED]
> Subject: Any Struts-based calendar examples out there?
> 
> 
> I have to create a calendar page to display meetings, etc.  
> As you know,
> anything date-related is not the easiest task in the world.  
> I have found a
> JSP-based calendar, but it would require some extensive 
> rework to get rid
> of all the scriplet code.  
> 
> Short deadline + overworked programmer = trying to steal code 
> instead of
> reinventing the wheel ;)
> 
> Anyone seen anything in any struts example code out there?
> 
> Trevor
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 


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




data types on the travel between DB and view -- best to makeeverything Strings?

2003-01-22 Thread Trevor Morris
Where and when do you do data conversion between the DB, Business, and View
levels?  When you grab data out of the DB and set them in your VOs, do you
set dates as Dates, ints as ints, etc?  Or is it easier to just leave
everything as Strings and pass them around.  The majority of data in web
apps is only used for display.  Little data has any logic performed against
it.  If it does, you can just cast the String to the appropriate type when
needed.

String number1;
String number2;

e.g.  if (Integer.parseInt(number1) < Integer.parseInt(number2) {}

What purpose really is there in keeping the data in their native types?  If
you do, you have so much work to do in the transfer between the view and
business layers.

Thanks for any advice.

Trevor

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




Re: Multiple rows from a result set.

2003-01-22 Thread Peng Tuck Kwok
Thanks ed, was thinking in that direction, but was a bit uncertain about 
it.

Ed Robbins wrote:
Create a bean representing each row returned, put them in a collection
in the form bean and then use the  tag to populate the
page.


Ed
On Wed, 2003-01-22 at 20:56, Peng Tuck Kwok wrote:


How do I present multiple rows from a sql query in struts ? Let's say I 
have a list of customers from that table and I want to display it on the 
page. Does the action form have to return a collection of beans for this ?


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



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




Any Struts-based calendar examples out there?

2003-01-22 Thread Trevor Morris
I have to create a calendar page to display meetings, etc.  As you know,
anything date-related is not the easiest task in the world.  I have found a
JSP-based calendar, but it would require some extensive rework to get rid
of all the scriplet code.  

Short deadline + overworked programmer = trying to steal code instead of
reinventing the wheel ;)

Anyone seen anything in any struts example code out there?

Trevor

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




Re: Multiple rows from a result set.

2003-01-22 Thread Ed Robbins
Create a bean representing each row returned, put them in a collection
in the form bean and then use the  tag to populate the
page.


Ed
On Wed, 2003-01-22 at 20:56, Peng Tuck Kwok wrote:
> How do I present multiple rows from a sql query in struts ? Let's say I 
> have a list of customers from that table and I want to display it on the 
> page. Does the action form have to return a collection of beans for this ?
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
-- 
Ed Robbins <[EMAIL PROTECTED]>


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




Re: struts application and skins

2003-01-22 Thread David Graham
You could setup a filter that checked the requested domain name and set the 
root path to your resources into a ServletContext attribute accordingly.  
You could use that variable in your jsps to generate urls to your skins.

David






From: "AJ Scarbrough" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: struts application and skins
Date: Wed, 22 Jan 2003 18:56:01 -0500

I want to create an application that changes the "skin" of the application
based on the url the application is accessed from.  For example, if a user
accesses the appliation from www.foo.com then i want to use foo.css the CSS
and /image/foo/ for all images on the page.  If a user accesses the
application from www.bar.com then i want to use bar.css for the cSS and
/images/bar/ for all images on the page.  I am fairly new with struts and
haven't had a whole lot of luck coming up with a good design of how to
accomplish this.  Has anyone tried to do something similar?  What would be
the best/a good way of going about this?

Thanks.

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 



_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


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



Re: Value of Struts?

2003-01-22 Thread David Graham
Struts' main functionality is in the C of MVC.  There are integrated pieces 
to make the V much easier (Tiles and custom tags).  The M is up to you.  
What do you expect Struts to do, make your coffee ;-)?

You need to consider the thousands of hours that highly paid engineers have 
put into this project.  If you really want to know the "value of struts", 
just guess an average salary and multiply by number of hours.  If you guess 
appropriately, the number should stagger you.

Also consider you're using a very old version of Struts.  I encourage you to 
check out 1.1; the version numbering is *very* modest.

David






From: Gene Campbell <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Value of Struts?
Date: Wed, 22 Jan 2003 15:07:04 -0800 (PST)

I've been using Struts (1.0) for a few months now, and
I'm not seeing a big advantage to using it other than
that it does Model 2 (which is very very wise) and
hides some of the heavy lifting.

ActionForms get you server side form validation and
HTTP parameters->bean mapping.

The taglibs get you reduced scriplet code and hooks to
the form bean.

Actions get you a clean place to write controller code
and a way to easily forward to presentation jsps.

Is that all Struts does?  Or are there features I'm
missing?  Is it just a framework abstracting away the
easy stuff into easier stuff?

I'm not trying to start a war - I'm sorry if I'm
coming of antagonistic.  I'm not intending any ill
will.  I'm just having a hard time figuring out why
Struts is so popular.

thanks - gene

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 



_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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



Multiple rows from a result set.

2003-01-22 Thread Peng Tuck Kwok
How do I present multiple rows from a sql query in struts ? Let's say I 
have a list of customers from that table and I want to display it on the 
page. Does the action form have to return a collection of beans for this ?


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



Re: perform method deprecated??

2003-01-22 Thread Tony Baity

If you really like having the perform method separate from the execute, just keep it. 
But extend the Action class to create a new base class. That way, if perform is ever 
permanantly removed, your code will still work.
For instance, I created a base class that extended Action and called it 
CounselorAction ( for all the actions applicable to the business rules for counselors 
- whoever they are) and then packed a lot of common code before/after the call to the 
perform method inside the execute method. This way, all the action classes for 
"counselors" inherit all the common functionality. I ignore the deprecated warning in 
this case since I know what it is.
An alternative that I have seen is to create a second command pattern with is own base 
class and child classes for the business logic and execute those from the execute 
method in the child Action class but then the number classes that you have  to write 
is doubled for each action.
-Tony
 julian green <[EMAIL PROTECTED]> wrote:
Andrew Hill wrote:

>Your upgrading from 1.02
>
Yes, and until the next non beta release is made that is where I will be 
staying. Just wanted to know what I am in for when I upgrade.

>
>In 1.1 you use the execute() method.
>
Thankyou.

Julian

>
>
>-Original Message-
>From: julian green [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, 22 January 2003 20:23
>To: Struts Users Mailing List
>Subject: perform method deprecated??
>
>
>Ive downloaded struts 1.1b3 and im being told that all the perform
>methods I developed are deprecated. What is the new method?
>
>Ive got alot of code to refactor.
>
>Julian
>
>
>--
>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: 



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Re: Creating an Action inside an Action

2003-01-22 Thread Peter A. Pilgrim
Craig R. McClanahan wrote:


On Wed, 22 Jan 2003, PILGRIM, Peter, FM wrote:



Date: Wed, 22 Jan 2003 13:44:03 -
From: "PILGRIM, Peter, FM" <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
To: "Struts Users Mailing List (E-mail)" <[EMAIL PROTECTED]>
Subject: Creating an Action inside an Action

In the current API 1.1 beta3 which has changed.

I have an Action `Preloader' but I what to create or get another a reference
to Action `Activate'. What is the best way to do this.

public class Preloader extends DispatchAction {
	public void execute( ... ) {

		ActionServlet servlet = getServlet();
		RequestProcessor processor = servlet.getRequestProcessor();

		Action activateAction = processor.createActionCreate();

	}
}

Unfortunately the `ActionServlet.getRequestProcessor' call is protected.
What I was to do is prepopulate the action form that is
associated with `Activate' action mapping ?

		ActivateForm = magic_api.getActionForm( "/activate" );
		activateForm.setSymbol("alpha");

Then I can dispatch forward to the activate mapping.

This is sort of like action chaining but difference.

Any ideas on the new best practice?




The simplest thing to do is declare a form bean name in the 
element for Preloader -- then, Struts will precreate the bean for you and
pass it as the ActionForm parameter, ready for you to populate.  If you
use this technique, you'll probably also want to say validate="false" on
the preloader action, since the newly created form bean won't be able to
pass your validation checks.

For programmatic form bean creation, check out
RequestUtils.createActionForm().



Actually, Craig, what I am looking for is:

(1) How to find all the action mappings registered for a Struts application?
I would like to programmatically find out from inside `Action.execute()'.

(2) How to programmatically instantiate and then invoke an Action?
I guess this is really is Action chaining, isn't.
I would prefer to call it `transitioning' as in giving up the
responsibility to process a http request to secondary action.

In another earlier note, I found a way to forward dispatch using request
attributes and local action forwards. I did it this way in Struts 1.0.2
seven or eight months ago.

--
Peter Pilgrim
   __ _ _ _
  / //__  // ___// ___/   +  Serverside Java
 / /___/ // /__ / /__ +  Struts
/ // ___// ___// ___/ +  Expresso Committer
 __/ // /__ / /__ / /__   +  Independent Contractor
/___///////   +  Intrinsic Motivation
On Line Resume
   ||
   \\===>  `` http://www.xenonsoft.demon.co.uk/no-it-striker.html ''


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




Re: Newbie question

2003-01-22 Thread Max Cooper
Your lazy (smart!) way #1 is correct. Let Struts instantiate your
ActionForms.

-Max

- Original Message -
From: "Fred Lamuette" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 4:17 PM
Subject: Newbie question


> For editing an article, i use this action, and of course i don't come from
a
> submitted form :
>
> type="com.xxx.ArticleAction"
> name="articleForm"
> scope="request"
> validate="false">
> 
> 
>
> And i use the folowing attributes
> (name="articleForm",scope="request",validate="false") only for not
> instanciating myself an articleForm in my ArticleAction, then i can
populate
> it and render it with article.vm.
> My question is : what is the best practice ?
> 1/ My lazzy way to get an instance of articleForm
> 2/ Put this code before populating the form bean ?
>   if (form == null) {
> form = new ArticleForm();
> if ("request".equals(mapping.getScope()))
> request.setAttribute(mapping.getAttribute(), form);
> else
> session.setAttribute(mapping.getAttribute(), form);
> }
>
> Thank you
> Richard.
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



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




Newbie question

2003-01-22 Thread Fred Lamuette
For editing an article, i use this action, and of course i don't come from a
submitted form :





And i use the folowing attributes
(name="articleForm",scope="request",validate="false") only for not
instanciating myself an articleForm in my ArticleAction, then i can populate
it and render it with article.vm.
My question is : what is the best practice ?
1/ My lazzy way to get an instance of articleForm
2/ Put this code before populating the form bean ?
if (form == null) {
form = new ArticleForm();
if ("request".equals(mapping.getScope()))
request.setAttribute(mapping.getAttribute(), form);
else
session.setAttribute(mapping.getAttribute(), form);
}

Thank you
Richard.


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




Re: Value of Struts?

2003-01-22 Thread Max Cooper
One of the important values I have found is that it makes your app somewhat
"regular" in the sense that you know where to look for things no matter who
wrote the page. Without Struts, you would have to spend time writing and
describing how to use your own MVC framework, or simply let everyone on the
team do whatever they want (and deal with the resulting mess). With Struts,
the basic MVC architecture is already defined and stable, the points of
configuration are well defined and well known, etc.

-Max

- Original Message -
From: "Gene Campbell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 3:07 PM
Subject: Value of Struts?


> I've been using Struts (1.0) for a few months now, and
> I'm not seeing a big advantage to using it other than
> that it does Model 2 (which is very very wise) and
> hides some of the heavy lifting.
>
> ActionForms get you server side form validation and
> HTTP parameters->bean mapping.
>
> The taglibs get you reduced scriplet code and hooks to
> the form bean.
>
> Actions get you a clean place to write controller code
> and a way to easily forward to presentation jsps.
>
> Is that all Struts does?  Or are there features I'm
> missing?  Is it just a framework abstracting away the
> easy stuff into easier stuff?
>
> I'm not trying to start a war - I'm sorry if I'm
> coming of antagonistic.  I'm not intending any ill
> will.  I'm just having a hard time figuring out why
> Struts is so popular.
>
> thanks - gene
>
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



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




struts application and skins

2003-01-22 Thread AJ Scarbrough
I want to create an application that changes the "skin" of the application
based on the url the application is accessed from.  For example, if a user
accesses the appliation from www.foo.com then i want to use foo.css the CSS
and /image/foo/ for all images on the page.  If a user accesses the
application from www.bar.com then i want to use bar.css for the cSS and
/images/bar/ for all images on the page.  I am fairly new with struts and
haven't had a whole lot of luck coming up with a good design of how to
accomplish this.  Has anyone tried to do something similar?  What would be
the best/a good way of going about this?

Thanks.

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




Re: Value of Struts?

2003-01-22 Thread V. Cekvenich
"Democracy is the worst kind of government there is, except for 
everything else out there".
I think W. Churchill.

Think of Struts as kindergarten: "We put our coasts here, we put our 
books here, etc."
It also has best productivity if you do it right. 2 ti 3 CRUD M/D muli 
row modules per day is easy.
Decorative validation, declarative action mapping security, declarative 
layouts w/tiles, easy for IDE to generate beans getters/setters, it can 
use standard tag lib.
You can go from portyotpe in html to ren *.html *.jsp, add actions and 
pick a nice light persistance layer and you are so done.

But:
Struts does not make your project successful, that would be requirements.
It does not enforce an iterative development process, etc.
You can have a good tool and point it in your head and pull the trigger.
Ex: is OO, java is OO capable, but you can be object disoriented and 
code very slow.

.V

Gene Campbell wrote:
I've been using Struts (1.0) for a few months now, and
I'm not seeing a big advantage to using it other than
that it does Model 2 (which is very very wise) and
hides some of the heavy lifting.  

ActionForms get you server side form validation and
HTTP parameters->bean mapping.  

The taglibs get you reduced scriplet code and hooks to
the form bean.

Actions get you a clean place to write controller code
and a way to easily forward to presentation jsps.

Is that all Struts does?  Or are there features I'm
missing?  Is it just a framework abstracting away the
easy stuff into easier stuff?

I'm not trying to start a war - I'm sorry if I'm
coming of antagonistic.  I'm not intending any ill
will.  I'm just having a hard time figuring out why
Struts is so popular.  

thanks - gene

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



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




Re: Value of Struts?

2003-01-22 Thread Dennis Muhlestein
You also mention that you are on 1.0
1.1 has many more features that further reduce coding time.  Play around
with DynaValidatorForm for instance...


On Wed, 2003-01-22 at 16:07, Gene Campbell wrote:
> I've been using Struts (1.0) for a few months now, and
> I'm not seeing a big advantage to using it other than
> that it does Model 2 (which is very very wise) and
> hides some of the heavy lifting.  
> 
> ActionForms get you server side form validation and
> HTTP parameters->bean mapping.  
> 
> The taglibs get you reduced scriplet code and hooks to
> the form bean.
> 
> Actions get you a clean place to write controller code
> and a way to easily forward to presentation jsps.
> 
> Is that all Struts does?  Or are there features I'm
> missing?  Is it just a framework abstracting away the
> easy stuff into easier stuff?
> 
> I'm not trying to start a war - I'm sorry if I'm
> coming of antagonistic.  I'm not intending any ill
> will.  I'm just having a hard time figuring out why
> Struts is so popular.  
> 
> thanks - gene
> 
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
-- 
Dennis Muhlestein <[EMAIL PROTECTED]>
ZServe Corporation


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




RE: Value of Struts?

2003-01-22 Thread Miller, Jason
There's also the indirect value of the components struts has conjured into
being - the digester, the collections, the beanutils, and so on.  These have
made my life easier for a number of tasks.

> -Original Message-
> From: Gene Campbell [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 6:07 PM
> To: [EMAIL PROTECTED]
> Subject: Value of Struts?
> 
> 
> I've been using Struts ...
> something something something
> I'm just having a hard time figuring out why
> Struts is so popular.  
> 
> thanks - gene



Tiles useAttribute

2003-01-22 Thread Max Kremer
Hi I'm new to Tiles and I'm trying get some basic stuff working but I'm having a 
problem passing attributes.
My definition XML file looks like this:


  
   
   
   
   
  


Now I'm trying to get the value of the "Section" attribute in the inc_Footer.jsp but I 
get the following error:

[ServletException in:/includes/inc_Footer.jsp] Error - tag useAttribute: attribute 
'Section' not found in context. Check tag syntax'=20

What am I doing wrong?

Thanks
Max



RE: Value of Struts?

2003-01-22 Thread Todd Pierce
You say you don't see a big advantage except for MVC, form validation, bean
mapping, reduced scriptlet code. Well, they're pretty good things to get for
FREE doncha think?
>From my perspective you can add to it applicationresources.properties, which
allows for i18n (for free) and standardisation of phraseology across the
presentation layer (for free). Tiles is pretty sharp too, promoting reuse in
the presentation layer, especially since it's free!

: )

-Original Message-
From: Gene Campbell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 23 January 2003 10:07 AM
To: [EMAIL PROTECTED]
Subject: Value of Struts?


I've been using Struts (1.0) for a few months now, and
I'm not seeing a big advantage to using it other than
that it does Model 2 (which is very very wise) and
hides some of the heavy lifting.  

ActionForms get you server side form validation and
HTTP parameters->bean mapping.  

The taglibs get you reduced scriplet code and hooks to
the form bean.

Actions get you a clean place to write controller code
and a way to easily forward to presentation jsps.

Is that all Struts does?  Or are there features I'm
missing?  Is it just a framework abstracting away the
easy stuff into easier stuff?

I'm not trying to start a war - I'm sorry if I'm
coming of antagonistic.  I'm not intending any ill
will.  I'm just having a hard time figuring out why
Struts is so popular.  

thanks - gene

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




RE: Value of Struts?

2003-01-22 Thread Chappell, Simon P
Just be glad that Mark doesn't seem to be active on the list today!

The short answer is that it does help with a number of things that you have mentioned 
yourself. It's a framework, so by definition it does have a rigidity to it.

You are more than welcome to not use it. I use it because I want to work on web 
applications in one, best practice kind of way and Struts gives me that. There are 
other valid ways that I could code web applications, but I like having one less thing 
to worry about. I prefer the back end coding anyway, so having something give me lots 
of help with the front end is my idea of a very good thing.

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


>-Original Message-
>From: Gene Campbell [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, January 22, 2003 5:07 PM
>To: [EMAIL PROTECTED]
>Subject: Value of Struts?
>
>
>I've been using Struts (1.0) for a few months now, and
>I'm not seeing a big advantage to using it other than
>that it does Model 2 (which is very very wise) and
>hides some of the heavy lifting.  
>
>ActionForms get you server side form validation and
>HTTP parameters->bean mapping.  
>
>The taglibs get you reduced scriplet code and hooks to
>the form bean.
>
>Actions get you a clean place to write controller code
>and a way to easily forward to presentation jsps.
>
>Is that all Struts does?  Or are there features I'm
>missing?  Is it just a framework abstracting away the
>easy stuff into easier stuff?
>
>I'm not trying to start a war - I'm sorry if I'm
>coming of antagonistic.  I'm not intending any ill
>will.  I'm just having a hard time figuring out why
>Struts is so popular.  
>
>thanks - gene
>
>__
>Do you Yahoo!?
>Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
>http://mailplus.yahoo.com
>
>--
>To unsubscribe, e-mail:   

For additional commands, e-mail: 


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




Re: DynaValidatorForm and multipage forms

2003-01-22 Thread Dennis Muhlestein
Did you figure anything out with this problem?  I have the exact same
problem.  I'd like to make a multipage form with DynaValidatorForm
instead of extending ValidatorForm

Thanks 
-- 
Dennis Muhlestein <[EMAIL PROTECTED]>
ZServe Corporation

On Tue, 2003-01-21 at 12:44, [EMAIL PROTECTED] wrote:
> Is it even possible to use the DynaValidatorForm with multipage forms?
> Because BeanUtils.setProperty() ignores any property that hasn't been
> declared in struts-config.xml, there seems to be no way to set the page
> number.   doesn't work for dyna
> forms.  If this isn't possible, is there a reason other than that no one has
> gotten around to implementing it?
>  
> thanks
>  
> john gregg
> Wells Fargo Services Company
> Minneapolis, MN



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




RE: Value of Struts?

2003-01-22 Thread Wendy Cameron
Actually I have a hard time justifying using it because it is also very stringent in 
its implementation of Model 2 and doesnt reduce code time significantly whilst 
introducing loads of tags not supported by leading HTML editors.

Regards Wendy

> -Original Message-
> From: Gene Campbell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 23, 2003 9:07 AM
> To: [EMAIL PROTECTED]
> Subject: Value of Struts?
> 
> 
> I've been using Struts (1.0) for a few months now, and
> I'm not seeing a big advantage to using it other than
> that it does Model 2 (which is very very wise) and
> hides some of the heavy lifting.  
> 
> ActionForms get you server side form validation and
> HTTP parameters->bean mapping.  
> 
> The taglibs get you reduced scriplet code and hooks to
> the form bean.
> 
> Actions get you a clean place to write controller code
> and a way to easily forward to presentation jsps.
> 
> Is that all Struts does?  Or are there features I'm
> missing?  Is it just a framework abstracting away the
> easy stuff into easier stuff?
> 
> I'm not trying to start a war - I'm sorry if I'm
> coming of antagonistic.  I'm not intending any ill
> will.  I'm just having a hard time figuring out why
> Struts is so popular.  
> 
> thanks - gene
> 
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

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




RE: Error Loading Application Resources in Struts 1.1

2003-01-22 Thread James Mitchell
Not sure what app you are working on, but I modified the struts-example
to put the jsp files under WEB-INFis that what you are
doing/testing?

A zip is available for download if you would like to see it:

  http://www.open-tools.org/struts-atlanta/downloads/



--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org/

"The man who does not read good books has no advantage over the man who
cannot read them."
- Mark Twain (1835-1910)







> -Original Message-
> From: Micael [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, January 22, 2003 6:03 PM
> To: Struts Users Mailing List
> Subject: RE: Error Loading Application Resources in Struts 1.1
> 
> 
> Thanks, James,
> 
> It is there.  I am starting to think that the message 
> resources part of the 
> struts-config is not the problem.  The whole configuration is 
> below.  You 
> see any other troubles?
> 
> Micael mac Grene
> 
> 
> "-//Apache Software Foundation//DTD Struts 
> Configuration 1.1//EN"
>
> "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
> 
> 
> 
> 
> 
>  
> 
>name="logonForm"
>  type="app.LogonForm"/>
> 
>  
> 
> 
> 
>  
>name="logoff"
>  path="/logoff.do"/>
>name="logon"
>  path="/logon.do"/>
>  
> 
> 
> 
>  
> 
>path=/logon"
>  type="org.apache.struts.actions.ActionForward"
>  parameter="/WEB-INF/jsp/logon/logon.jsp"/>
> 
>path="/logonSubmit"
>  type="com.michaelmcgrady.page.action.LogonAction"
>  name="logonForm"
>  scope="request"
>  validate="true"
>  input="/WEB-INF/jsp/logon/logon.jsp">
>name="success"
>  path="/WEB-INF/jsp/welcome/welcome.jsp"/>
>  
> 
>path="/logoff"
>  type="com.michaelmcgrady.page.action.LogoffAction">
>name="success"
>  path="/WEB-INF/jsp/welcome/welcome.jsp"/>
>  
> 
> 
> 
>   debug="3"
>  locale="true"
>  nocache="true"
>  
> processorClass="org.apache.struts.action.RequestProcessor"/>
> 
> 
> 
>  null="false"/>
>  parameter="resources.images"
> null="false"/>
> 
> 
> 
> 
> 
> value="/WEB-INF/validator-rules.xml,/WEB-INF/xml/validation.xml"/>
> 
> 
> 
> At 05:49 PM 1/22/03 -0500, you wrote:
> 
> >Check the .war file to see if the file is actually there.
> >Make sure your build process is actually copying the files 
> to be war'd.
> >
> >It has happened in the past that my build script was not doing this.
> >
> >--
> >James Mitchell
> >Software Engineer/Struts Evangelist
> >http://www.open-tools.org/
> >
> >"The man who does not read good books has no advantage over 
> the man who
> >cannot read them."
> > - Mark Twain (1835-1910)
> >
> >
> >
> >
> >
> >
> >
> > > -Original Message-
> > > From: Micael [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, January 22, 2003 5:46 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: Error Loading Application Resources in Struts 1.1
> > >
> > >
> > > Thanks for catching that, Wendy, but that was just a 
> typo.  The site
> > > actually does not have that mistake.  Any other ideas?
> > >
> > > Micael
> > >
> > > At 03:37 PM 1/22/03 -0700, you wrote:
> > > > > I have the application resources in a file called
> > > application.properties
> > > > > and that is in the following directory structure:
> > > > > [x]/WEB-INF/classes/resources/application.properties.  I
> > > have put that in
> > > > > the struts config as:
> > > > >  
> > > >
> > > >You have 'resource.application' as the parameter, but your
> > > directory name is
> > > >plural: resources.  Fix one or the other so they match.
> > > >
> > > >--
> > > >Wendy Smoak
> > > >Applications Systems Analyst, Sr.
> > > >Arizona State University PA Information Resources Management
> > >
> > >
> > >
> > > LEGAL NOTICE
> > >
> > > 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:
> > >  [EMAIL PROTECTED]>
> > > For
> > >

Value of Struts?

2003-01-22 Thread Gene Campbell
I've been using Struts (1.0) for a few months now, and
I'm not seeing a big advantage to using it other than
that it does Model 2 (which is very very wise) and
hides some of the heavy lifting.  

ActionForms get you server side form validation and
HTTP parameters->bean mapping.  

The taglibs get you reduced scriplet code and hooks to
the form bean.

Actions get you a clean place to write controller code
and a way to easily forward to presentation jsps.

Is that all Struts does?  Or are there features I'm
missing?  Is it just a framework abstracting away the
easy stuff into easier stuff?

I'm not trying to start a war - I'm sorry if I'm
coming of antagonistic.  I'm not intending any ill
will.  I'm just having a hard time figuring out why
Struts is so popular.  

thanks - gene

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




RE: Error Loading Application Resources in Struts 1.1

2003-01-22 Thread Micael
After the startup, when I try to run the application, I get the following 
error in the browser:


javax.servlet.ServletException: Cannot find global ActionForward for name logon
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:530)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:59)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

in
At 05:49 PM 1/22/03 -0500, you wrote:

Check the .war file to see if the file is actually there.
Make sure your build process is actually copying the files to be war'd.

It has happened in the past that my build script was not doing this.

--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org/

"The man who does not read good books has no advantage over the man who
cannot read them."
- Mark Twain (1835-1910)







> -Original Message-
> From: Micael [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 5:46 PM
> To: Struts Users Mailing List
> Subject: RE: Error Loading Application Resources in Struts 1.1
>
>
> Thanks for catching that, Wendy, but that was just a typo.  The site
> actually does not have that mistake.  Any other ideas?
>
> Micael
>
> At 03:37 PM 1/22/03 -0700, you wrote:
> > > I have the application resources in a file called
> application.properties
> > > and that is in the following directory structure:
> > > [x]/WEB-INF/classes/resources/application.properties.  I
> have put that in
> > > the struts config as:
> > >  
> >
> >You have 'resource.application' as the parameter, but your
> directory name is
> >plural: resources.  Fix one or the other so they match.
> >
> >--
> >Wendy Smoak
> >Applications Systems Analyst, Sr.
> >Arizona State University PA Information Resources Management
>
>
>
> LEGAL NOTICE
>
> 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:
>  [EMAIL PROTECTED]>
> For
> additional commands,
> e-mail: 
>
>


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




LEGAL NOTICE

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:   
For additional commands, e-mail: 



RE: Error Loading Application Resources in Struts 1.1

2003-01-22 Thread Micael
Thanks, James,

It is there.  I am starting to think that the message resources part of the 
struts-config is not the problem.  The whole configuration is below.  You 
see any other troubles?

Micael mac Grene



  "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
  "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>








name="logonForm"
type="app.LogonForm"/>







name="logoff"
path="/logoff.do"/>

name="logon"
path="/logon.do"/>







path=/logon"
type="org.apache.struts.actions.ActionForward"
parameter="/WEB-INF/jsp/logon/logon.jsp"/>


path="/logonSubmit"
type="com.michaelmcgrady.page.action.LogonAction"
name="logonForm"
scope="request"
validate="true"
input="/WEB-INF/jsp/logon/logon.jsp">

name="success"
path="/WEB-INF/jsp/welcome/welcome.jsp"/>



path="/logoff"
type="com.michaelmcgrady.page.action.LogoffAction">

name="success"
path="/WEB-INF/jsp/welcome/welcome.jsp"/>





debug="3"
locale="true"
nocache="true"
processorClass="org.apache.struts.action.RequestProcessor"/>




   null="false"/>

   parameter="resources.images"
   null="false"/>





  



At 05:49 PM 1/22/03 -0500, you wrote:

Check the .war file to see if the file is actually there.
Make sure your build process is actually copying the files to be war'd.

It has happened in the past that my build script was not doing this.

--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org/

"The man who does not read good books has no advantage over the man who
cannot read them."
- Mark Twain (1835-1910)







> -Original Message-
> From: Micael [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 5:46 PM
> To: Struts Users Mailing List
> Subject: RE: Error Loading Application Resources in Struts 1.1
>
>
> Thanks for catching that, Wendy, but that was just a typo.  The site
> actually does not have that mistake.  Any other ideas?
>
> Micael
>
> At 03:37 PM 1/22/03 -0700, you wrote:
> > > I have the application resources in a file called
> application.properties
> > > and that is in the following directory structure:
> > > [x]/WEB-INF/classes/resources/application.properties.  I
> have put that in
> > > the struts config as:
> > >  
> >
> >You have 'resource.application' as the parameter, but your
> directory name is
> >plural: resources.  Fix one or the other so they match.
> >
> >--
> >Wendy Smoak
> >Applications Systems Analyst, Sr.
> >Arizona State University PA Information Resources Management
>
>
>
> LEGAL NOTICE
>
> 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:
>  [EMAIL PROTECTED]>
> For
> additional commands,
> e-mail: 
>
>


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




LEGAL NOTICE

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:   
For additional commands, e-mail: 



RE: Error Loading Application Resources in Struts 1.1

2003-01-22 Thread Micael
Doesn't the error look like it has something to do with my action 
mappings?  It is:


2003-01-22 14:49:16 StandardWrapper[/michaelmcgrady:action]: Marking 
servlet action as unavailable
2003-01-22 14:49:16 StandardContext[/michaelmcgrady]: Servlet 
/michaelmcgrady threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource path
at 
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:952)
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:934)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
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)

My entire struts-config file is:









name="logonForm"
type="app.LogonForm"/>







name="logoff"
path="/logoff.do"/>

name="logon"
path="/logon.do"/>







path=/logon"
type="org.apache.struts.actions.ActionForward"
parameter="/WEB-INF/jsp/logon/logon.jsp"/>


path="/logonSubmit"
type="app.LogonAction"
name="logonForm"
scope="request"
validate="true"
input="/WEB-INF/jsp/logon/logon.jsp">

name="success"
path="/WEB-INF/jsp/welcome/welcome.jsp"/>



path="/logoff"
type="app.LogoffAction">

name="success"
path="/WEB-INF/jsp/welcome/welcome.jsp"/>





debug="3"
locale="true"
nocache="true"
processorClass="org.apache.struts.action.RequestProcessor"/>




   null="false"/>

   parameter="resources.images"
   null="false"/>





  



At 11:33 AM 1/23/03 +1300, you wrote:

If your resouce file is in /WEB-INF/classes/resources/ then you have to
have

in your struts-config.xml
Glenn

-Original Message-
From: Micael [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 11:14 AM
To: Struts Users Mailing List
Subject: RE: Error Loading Application Resources in Struts 1.1


Hi, Glenn,

I have the application resources in a file called application.properties

and that is in the following directory structure:
[x]/WEB-INF/classes/resources/application.properties.  I have put that
in
the struts config as:

 

That is not right?  That is exactly what Ted Husted does with artimus
1.1
using struts 1.1.

What am I missing?  You have classes in your suggestion, but Ted
doesn't.  I don't mean to be argumentative, but are you sure you are
right?  I have check other examples, and I seem to be following them
correctly?  Thanks for any help.

Micael



At 10:27 AM 1/23/03 +1300, you wrote:

>You have to specify the application resources in the struts-config.xml.

>Thusly -
>
>
>
> 
> 
> 
>
> 
> 
> 
>
>parameter="classes.ApplicationResources"/>
>
>
>
>-Original Message-
>From: Micael [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, January 23, 2003 10:21 AM
>To: Struts Users Mailing List
>Subject: Re: Error Loading Application Resources in Struts 1.1
>
>
>Thanks, Craig,
>
>Can you tell what it is that is wrong in general terms, or even
>specifically?  I am rather new at this aspect.  The error, again, was:
>
>C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\struts.jar
>2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding random
>number generator class java.security.SecureRandom
>2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding of random
>number generator has been completed
>2003-01-22 11:47:06 StandardWrapper[/michaelmcgrady:default]: Loading
>container servlet default
>2003-01-22 11:47:07 StandardWrapper[/michaelmcgrady:action]: Marking
>servlet action as unavailable
>2003-01-22 11:47:07 StandardContext[/michaelmcgrady]: Servlet
>/michaelmcgrady threw load() exception
>javax.servlet.UnavailableException: Parsing error processing resource
>path
>  at
>org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.j
a
>va:952)
>  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.ja
v
>a

modules use questions

2003-01-22 Thread Kirby Vandivort
Hello,

I'm new to modules and have a few questions about how to use them
most effectively.

my web app the general look and feel of having an html menu bar along
the left side of the screen and a "work" area that takes up the rest.
The "work" area can be handled by modules.  This is a pretty straight
forward thing.

All the different modules would then need to share the same left menu
bar.  From what I'm seeing about modules, they are really totally self
contained.  Where would I put the information (jsp's, beans, etc) that
service the left menu bar so that it isn't specific to a particular
module?

(I'm also thinking I should be using tiles here, but to be frank, I'm
having trouble seeing what makes tiles all that much more useful than
doing includes in the jsp files)

On a related note, all of the web app depends on the user being
identified as a user.  How does this relate to modules?  Can all of the
modules access common code somewhere to accomplish things like user
authentication?

Thanks in advance for the help on what are undoubtably dumb questions.

-- 

Kirby Vandivort  Theoretical and Computational Biophysics 
Email: [EMAIL PROTECTED]  3051 Beckman Institute
http://www.ks.uiuc.edu/~kvandivo/University of Illinois
Phone: (217) 244-5711405 N. Mathews Ave
Fax  : (217) 244-6078Urbana, IL  61801, USA

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




RE: Error Loading Application Resources in Struts 1.1

2003-01-22 Thread James Mitchell

Check the .war file to see if the file is actually there.
Make sure your build process is actually copying the files to be war'd.

It has happened in the past that my build script was not doing this.

--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org/

"The man who does not read good books has no advantage over the man who
cannot read them."
- Mark Twain (1835-1910)







> -Original Message-
> From: Micael [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, January 22, 2003 5:46 PM
> To: Struts Users Mailing List
> Subject: RE: Error Loading Application Resources in Struts 1.1
> 
> 
> Thanks for catching that, Wendy, but that was just a typo.  The site 
> actually does not have that mistake.  Any other ideas?
> 
> Micael
> 
> At 03:37 PM 1/22/03 -0700, you wrote:
> > > I have the application resources in a file called 
> application.properties
> > > and that is in the following directory structure:
> > > [x]/WEB-INF/classes/resources/application.properties.  I 
> have put that in
> > > the struts config as:
> > >  
> >
> >You have 'resource.application' as the parameter, but your 
> directory name is
> >plural: resources.  Fix one or the other so they match.
> >
> >--
> >Wendy Smoak
> >Applications Systems Analyst, Sr.
> >Arizona State University PA Information Resources Management
> 
> 
> 
> LEGAL NOTICE
> 
> 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:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 


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




RE: Error Loading Application Resources in Struts 1.1

2003-01-22 Thread Micael
Hi, Glenn,

That is what I have.  Do you see anything else wrong?

Micael

At 11:33 AM 1/23/03 +1300, you wrote:


If your resouce file is in /WEB-INF/classes/resources/ then you have to
have

in your struts-config.xml
Glenn

-Original Message-
From: Micael [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 11:14 AM
To: Struts Users Mailing List
Subject: RE: Error Loading Application Resources in Struts 1.1


Hi, Glenn,

I have the application resources in a file called application.properties

and that is in the following directory structure:
[x]/WEB-INF/classes/resources/application.properties.  I have put that
in
the struts config as:

 

That is not right?  That is exactly what Ted Husted does with artimus
1.1
using struts 1.1.

What am I missing?  You have classes in your suggestion, but Ted
doesn't.  I don't mean to be argumentative, but are you sure you are
right?  I have check other examples, and I seem to be following them
correctly?  Thanks for any help.

Micael



At 10:27 AM 1/23/03 +1300, you wrote:

>You have to specify the application resources in the struts-config.xml.

>Thusly -
>
>
>
> 
> 
> 
>
> 
> 
> 
>
>parameter="classes.ApplicationResources"/>
>
>
>
>-Original Message-
>From: Micael [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, January 23, 2003 10:21 AM
>To: Struts Users Mailing List
>Subject: Re: Error Loading Application Resources in Struts 1.1
>
>
>Thanks, Craig,
>
>Can you tell what it is that is wrong in general terms, or even
>specifically?  I am rather new at this aspect.  The error, again, was:
>
>C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\struts.jar
>2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding random
>number generator class java.security.SecureRandom
>2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding of random
>number generator has been completed
>2003-01-22 11:47:06 StandardWrapper[/michaelmcgrady:default]: Loading
>container servlet default
>2003-01-22 11:47:07 StandardWrapper[/michaelmcgrady:action]: Marking
>servlet action as unavailable
>2003-01-22 11:47:07 StandardContext[/michaelmcgrady]: Servlet
>/michaelmcgrady threw load() exception
>javax.servlet.UnavailableException: Parsing error processing resource
>path
>  at
>org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.j
a
>va:952)
>  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.ja
v
>a:934)
>  at
>org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
>  at
>org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.
j
>ava:3420)
>  at
>org.apache.catalina.core.StandardContext.start(StandardContext.java:360
8
>)
>  at
>org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.j
a
>va: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(StandardHostDeplo
y
>er.java:257)
>  at
>org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
>  at
>org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.jav
a
>: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:3
6
>8)
>  at
>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS
u
>pport.java:166)
>  at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
>  at
>org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
>
>Thanks for any assistance,
>
>Micael
>
>At 12:20 PM 1/22/03 -0800, you wrote:
> >It's actually complaining about your struts-config.xml file, not your

> >application resources.
> >
> >Craig
> >
> >On Wed, 22 Jan 2003, Micael wrote:
> >
> > > Date: Wed, 22 Jan 2003 11:52:28 -0800
> > > From: Micael <[EMAIL PROTECTED]>
> > > Reply-To: Struts Users Mailing List
> > > <[EMAIL PROTECTED]>
> > > To: [EMAIL PROTECTED]
> > > Subject: Error Loading Application Resources in Struts 1.1
> > >
> > > I am getting the error shown below when, apparently, the Tomcat
> > > container
> > > (4.1.18) cannot load the Struts 1.1 application resources.  I have
>the
> > > following entry in the web.xml:
> > >
> > >
> > >
> > >
> > >
> > >
> > >  action
> > >
>org.apache.struts.action.ActionServlet
> > >  
> > >application
> > >resources.application
> > >  
> > >  
> > >config
> > >/WEB-INF/struts-config.xml
> > >  
> > >  
> > > 

RE: Error Loading Application Resources in Struts 1.1

2003-01-22 Thread Micael
Thanks for catching that, Wendy, but that was just a typo.  The site 
actually does not have that mistake.  Any other ideas?

Micael

At 03:37 PM 1/22/03 -0700, you wrote:
> I have the application resources in a file called application.properties
> and that is in the following directory structure:
> [x]/WEB-INF/classes/resources/application.properties.  I have put that in
> the struts config as:
>  

You have 'resource.application' as the parameter, but your directory name is
plural: resources.  Fix one or the other so they match.

--
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management




LEGAL NOTICE

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:   
For additional commands, e-mail: 



RE: Error Loading Application Resources in Struts 1.1

2003-01-22 Thread Wendy Smoak
> I have the application resources in a file called application.properties 
> and that is in the following directory structure: 
> [x]/WEB-INF/classes/resources/application.properties.  I have put that in 
> the struts config as:
>  

You have 'resource.application' as the parameter, but your directory name is
plural: resources.  Fix one or the other so they match.

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management



How to: different actions, different form beans (ActionForms), sameJSP

2003-01-22 Thread Eric Rizzo
If this is an "already asked/answered" please forgive and point me to 
the FAQ, tutorial, or previous message that discusses it. I've searched 
jGuru and browsed the tips at husted.com without luck.

I have two actions, each with its own form bean/ActionForm, that both 
need to forward to the same JSP. That content of that JSP can then 
submit to a third action.
Action1, which uses a form bean of type FormBean1 does one kind of 
search. Action2, using FormBean2, does a different kind of search. 
FormBean2 extends FormBean1. There is one JSP that displays the results 
of either type of search (iterates over a result object that is stored 
in FormBean). The JSP also has a form on it that submits to Action3, 
which also uses FormBean1.
How can I set it up so that both of these actions can forward to the 
JSP? Action2 can set the results object and forward to the JSP, but the 
JSP is expecting to use FormBean1, so it doesn't see the data that 
Action2 stored in FormBean2.

Here's what I configured it like, without luck:


type="com.jibe.Action1"
name="form1"
scope="session">

 path="/jsp/results.jsp" />



type="com.jibe.Action2"
name="form2"
scope="session">

 path="/jsp/results.jsp" />



When results.jsp is processing after coming from Action2, it doesn't 
find any results in the bean.

I figure this must be a common scenario, but I can't seem to figure out 
the configuration.

TIA,
	Eric
--
Eric Rizzo
Software Architect
Jibe, Inc.
http://www.jibeinc.com


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



RE: Error Loading Application Resources in Struts 1.1

2003-01-22 Thread Glenn Eisenhut

If your resouce file is in /WEB-INF/classes/resources/ then you have to
have 

in your struts-config.xml
Glenn

-Original Message-
From: Micael [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 11:14 AM
To: Struts Users Mailing List
Subject: RE: Error Loading Application Resources in Struts 1.1


Hi, Glenn,

I have the application resources in a file called application.properties

and that is in the following directory structure: 
[x]/WEB-INF/classes/resources/application.properties.  I have put that
in 
the struts config as:

 

That is not right?  That is exactly what Ted Husted does with artimus
1.1 
using struts 1.1.

What am I missing?  You have classes in your suggestion, but Ted 
doesn't.  I don't mean to be argumentative, but are you sure you are 
right?  I have check other examples, and I seem to be following them 
correctly?  Thanks for any help.

Micael



At 10:27 AM 1/23/03 +1300, you wrote:

>You have to specify the application resources in the struts-config.xml.

>Thusly -
>
>
>
> 
> 
> 
>
> 
> 
> 
>
>parameter="classes.ApplicationResources"/>
>
>
>
>-Original Message-
>From: Micael [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, January 23, 2003 10:21 AM
>To: Struts Users Mailing List
>Subject: Re: Error Loading Application Resources in Struts 1.1
>
>
>Thanks, Craig,
>
>Can you tell what it is that is wrong in general terms, or even 
>specifically?  I am rather new at this aspect.  The error, again, was:
>
>C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\struts.jar
>2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding random 
>number generator class java.security.SecureRandom
>2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding of random
>number generator has been completed
>2003-01-22 11:47:06 StandardWrapper[/michaelmcgrady:default]: Loading
>container servlet default
>2003-01-22 11:47:07 StandardWrapper[/michaelmcgrady:action]: Marking
>servlet action as unavailable
>2003-01-22 11:47:07 StandardContext[/michaelmcgrady]: Servlet
>/michaelmcgrady threw load() exception
>javax.servlet.UnavailableException: Parsing error processing resource
>path
>  at
>org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.j
a
>va:952)
>  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.ja
v
>a:934)
>  at
>org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
>  at
>org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.
j
>ava:3420)
>  at
>org.apache.catalina.core.StandardContext.start(StandardContext.java:360
8
>)
>  at
>org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.j
a
>va: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(StandardHostDeplo
y
>er.java:257)
>  at
>org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
>  at
>org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.jav
a
>: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:3
6
>8)
>  at
>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS
u
>pport.java:166)
>  at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
>  at
>org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
>
>Thanks for any assistance,
>
>Micael
>
>At 12:20 PM 1/22/03 -0800, you wrote:
> >It's actually complaining about your struts-config.xml file, not your

> >application resources.
> >
> >Craig
> >
> >On Wed, 22 Jan 2003, Micael wrote:
> >
> > > Date: Wed, 22 Jan 2003 11:52:28 -0800
> > > From: Micael <[EMAIL PROTECTED]>
> > > Reply-To: Struts Users Mailing List 
> > > <[EMAIL PROTECTED]>
> > > To: [EMAIL PROTECTED]
> > > Subject: Error Loading Application Resources in Struts 1.1
> > >
> > > I am getting the error shown below when, apparently, the Tomcat 
> > > container
> > > (4.1.18) cannot load the Struts 1.1 application resources.  I have
>the
> > > following entry in the web.xml:
> > >
> > >
> > >
> > >
> > >
> > >
> > >  action
> > >
>org.apache.struts.action.ActionServlet
> > >  
> > >application
> > >resources.application
> > >  
> > >  
> > >config
> > >/WEB-INF/struts-config.xml
> > >  
> > >  
> > >debug
> > >2
> > >  
> > >  
> > >detail
> > >2
> > >  
> > >  

RE: Struts Job

2003-01-22 Thread Brandon Goodin
Toronto!? Isn't that where those wacky Raelians live hanging out at the UFO
Barn. :-D

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: Max Kremer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 3:11 PM
To: Struts Users Mailing List
Subject: Re: Struts Job


No. I'm looking for developers in Toronto
- Original Message -
From: "Eric C. Hein" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 4:48 PM
Subject: Re: Struts Job


> Want to move to Toronto?
>
> - Original Message -
> From: "Max Kremer" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 22, 2003 1:37 PM
> Subject: Struts Job
>
>
> Hi,
>
> I've been developing a struts application (http://www.datastay.com) for
> several months and I'm in need of Java programmers.
> If anyone knows any struts users who are looking for work in the Toronto
> area please send them my way.
>
>
>
> Regards,
>
> Max Kremer
> Director of Technology
> Datastay Corp.
>
> office 416.398.1616
> fax416.398.9510
> mobile   416.801.6299
>
>
>
> --
> 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 Job

2003-01-22 Thread jmattucci

Hi max im a java developer in the toronto area



   

  "Max Kremer" 

   <[EMAIL PROTECTED]>   

   cc: 

  01/22/2003 05:11 Subject:  Re: Struts Job

  PM   

  Please respond to

  "Struts Users

  Mailing List"

   

   





No. I'm looking for developers in Toronto
- Original Message -
From: "Eric C. Hein" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 4:48 PM
Subject: Re: Struts Job


> Want to move to Toronto?
>
> - Original Message -
> From: "Max Kremer" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 22, 2003 1:37 PM
> Subject: Struts Job
>
>
> Hi,
>
> I've been developing a struts application (http://www.datastay.com) for
> several months and I'm in need of Java programmers.
> If anyone knows any struts users who are looking for work in the Toronto
> area please send them my way.
>
>
>
> Regards,
>
> Max Kremer
> Director of Technology
> Datastay Corp.
>
> office 416.398.1616
> fax416.398.9510
> mobile   416.801.6299
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
> -
>
>


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




*

This message is intended for the use of the individual or entity to which
it is addressed and may contain information that is confidential and
privileged and exempt from disclosure under applicable law.  If the reader
of this message is not the intended recipient, you are hereby notified that
any dissemination, distribution, or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please contact the sender immediately and delete it from your system.
Thank you
*



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




Re: Struts Job

2003-01-22 Thread Max Kremer
No. I'm looking for developers in Toronto
- Original Message -
From: "Eric C. Hein" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 4:48 PM
Subject: Re: Struts Job


> Want to move to Toronto?
>
> - Original Message -
> From: "Max Kremer" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 22, 2003 1:37 PM
> Subject: Struts Job
>
>
> Hi,
>
> I've been developing a struts application (http://www.datastay.com) for
> several months and I'm in need of Java programmers.
> If anyone knows any struts users who are looking for work in the Toronto
> area please send them my way.
>
>
>
> Regards,
>
> Max Kremer
> Director of Technology
> Datastay Corp.
>
> office 416.398.1616
> fax416.398.9510
> mobile   416.801.6299
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
> -
>
>


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




RE: Error Loading Application Resources in Struts 1.1

2003-01-22 Thread Micael
Hi, Glenn,

I have the application resources in a file called application.properties 
and that is in the following directory structure: 
[x]/WEB-INF/classes/resources/application.properties.  I have put that in 
the struts config as:



That is not right?  That is exactly what Ted Husted does with artimus 1.1 
using struts 1.1.

What am I missing?  You have classes in your suggestion, but Ted 
doesn't.  I don't mean to be argumentative, but are you sure you are 
right?  I have check other examples, and I seem to be following them 
correctly?  Thanks for any help.

Micael



At 10:27 AM 1/23/03 +1300, you wrote:

You have to specify the application resources in the struts-config.xml.
Thusly -











  



-Original Message-
From: Micael [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 10:21 AM
To: Struts Users Mailing List
Subject: Re: Error Loading Application Resources in Struts 1.1


Thanks, Craig,

Can you tell what it is that is wrong in general terms, or even
specifically?  I am rather new at this aspect.  The error, again, was:

C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\struts.jar
2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding random
number
generator class java.security.SecureRandom
2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding of random
number generator has been completed
2003-01-22 11:47:06 StandardWrapper[/michaelmcgrady:default]: Loading
container servlet default
2003-01-22 11:47:07 StandardWrapper[/michaelmcgrady:action]: Marking
servlet action as unavailable
2003-01-22 11:47:07 StandardContext[/michaelmcgrady]: Servlet
/michaelmcgrady threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource
path
 at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.ja
va:952)
 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.jav
a:934)
 at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
ava:3420)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3608
)
 at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va: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(StandardHostDeploy
er.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:36
8)
 at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:166)
 at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
 at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)

Thanks for any assistance,

Micael

At 12:20 PM 1/22/03 -0800, you wrote:
>It's actually complaining about your struts-config.xml file, not your
>application resources.
>
>Craig
>
>On Wed, 22 Jan 2003, Micael wrote:
>
> > Date: Wed, 22 Jan 2003 11:52:28 -0800
> > From: Micael <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Error Loading Application Resources in Struts 1.1
> >
> > I am getting the error shown below when, apparently, the Tomcat
> > container
> > (4.1.18) cannot load the Struts 1.1 application resources.  I have
the
> > following entry in the web.xml:
> >
> >
> >
> >
> >
> >
> >  action
> >
org.apache.struts.action.ActionServlet
> >  
> >application
> >resources.application
> >  
> >  
> >config
> >/WEB-INF/struts-config.xml
> >  
> >  
> >debug
> >2
> >  
> >  
> >detail
> >2
> >  
> >  2
> >
> >
> > My file, application.properties is at
> > WEB-INF/classes/resources/application.properties.  What's up?  The
> > error message is:
> >
> > 2003-01-22 11:47:05 HostConfig[localhost]: Deploying web application

> > directory michaelmcgrady 2003-01-22 11:47:05
> > StandardHost[localhost]: Installing web application at context path
> > /michaelmcgrady from URL
> > file:C:\michaelmcgrady\tomcat\webapps\michaelmcgrady
> > 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploying class
> > repositories to work directory
> > C:\michaelmcgrady\tomcat\work\Standalone\loca

[OT] Struts Users in Calgary Alberta CANADA ?

2003-01-22 Thread Mike Deegan
Are you a Struts user in Calgary Alberta CANADA ??

I've just moved to Calgary Alberta and was wondering if there are other list 
subscribers here in Calgary.

Please email me off list !!

I'd like to know what STRUTS development is ongoing in Calgary (if any).

Is there a STRUTS users group in Calgary ?

Thanks in advance,
Mike

[EMAIL PROTECTED]


putList in a tiles definition

2003-01-22 Thread Justin Ashworth
Hi All,

Is there any way to make a list available to a certain tile in a definition?
In effect, I want to do something like this...









...where "thinglist" would be iterated over in some_tile.jsp.

The problem is that the tiles-config DTD doesn't allow  elements to
come before  elements.  If I move the  after the , then
thinglist isn't defined by the time some_tile.jsp is loaded.  All
documentation I find for putList only mentions using the tag within the
context of a , not within a definition.  How can I define a
list in my definition and iterate over it in a tile?

Thanks,

Justin


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




Re: Allow user to change password using CMS

2003-01-22 Thread Max Cooper
Don't throw out the baby with the bathwater! ;-) It is still useful to have
the container manage the security in a standard, time-tested,
essentially-free-to-implement way.

It just means that the spec doesn't provide any help in changing your
password. However, you just need to access the same data that the container
is using to determine access and make the change yourself. If it is an
RDBMS, it will be just like making any other change in a data-driven app.

In a Portal situation, perhaps it would be useful to have a "password
change" app, or integrate this functionality into an existing "user profile
/ settings management" utility app.

-Max

- Original Message -
From: "Dan Tran" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 12:49 PM
Subject: Re: Allow user to change password using CMS


> So I guess , using container manage security is not recommended  for my
> situation  which I think most of portal app require
>
> -D
>
>
> - Original Message -
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 22, 2003 12:18 PM
> Subject: Re: Allow user to change password using CMS
>
>
> >
> >
> > On Wed, 22 Jan 2003, Dan Tran wrote:
> >
> > > Date: Wed, 22 Jan 2003 11:54:09 -0800
> > > From: Dan Tran <[EMAIL PROTECTED]>
> > > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > > Subject: Allow user to change password using CMS
> > >
> > > Hi, My application uses CMS to manage user/role security.
> > >
> > > How do I interface with CMS to allow user to change his/her own
> password?
> > >
> > > Any spec on this?
> > >
> >
> > There is no spec on this ... it's going to be up to each container to
> > provide appropriate mechanisms, and any code you write that relies on
this
> > will (of course) be container specific.
> >
> > > Advice is greatly appreciated
> > >
> > > -D
> >
> > Craig
> >
> >
> >
> > --
> > 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: Is there a List navigater Tag to use with struts ?

2003-01-22 Thread Brian . O'Hare

Thanks to ALL who posted replys on this one.
I came into work this morning (different timezone to most of you!) to find
some useful stuff.
Thanks again,
Brian.



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




RE:[OT] Allow user to change password using CMS

2003-01-22 Thread Jarnot Voytek Contr AU HQ/SC
It would only be useful if you were using OC4J, and not very useful even
then - as it's pretty specific to our situation.

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.


> -Original Message-
> From: Dan Tran [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 3:40 PM
> To: Struts Users Mailing List
> Subject: Re: Allow user to change password using CMS
> 
> 
> I am using tomcat 4.1.18 using tomcat-users.xml to store user/role
> information.
> 
> I can write a UserManagerFactory to handle container specific 
> implemention.
> But If you have one implemented already I would love to use it
> 
> -Dan
> 
> 
> - Original Message -
> From: "Jarnot Voytek Contr AU HQ/SC" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 22, 2003 1:20 PM
> Subject: RE: Allow user to change password using CMS
> 
> 
> > I use CMS, and wrote a custom UserManager (container specific) which
> > authenticates users against a  database.  To change 
> passwords, etc. users
> > simply access a regular page (Struts driven, of course) 
> which allows them
> to
> > modify the password that's in the database.
> >
> > What kind of CMS were you planning to use - a default 
> implementation which
> > stores the user/password/etc data in principles.xml?  Not 
> very robust or
> > secure.  Regardless of container, you'll end up storing 
> passwords in a DB
> or
> > LDAP - just write code to modify the password in the datastore.
> >
> > --
> > Voytek Jarnot
> > Quidquid latine dictum sit, altum viditur.
> >
> >
> > > -Original Message-
> > > From: Dan Tran [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, January 22, 2003 2:49 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: Allow user to change password using CMS
> > >
> > >
> > > So I guess , using container manage security is not
> > > recommended  for my
> > > situation  which I think most of portal app require
> > >
> > > -D
> > >
> > >
> > > - Original Message -
> > > From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > Sent: Wednesday, January 22, 2003 12:18 PM
> > > Subject: Re: Allow user to change password using CMS
> > >
> > >
> > > >
> > > >
> > > > On Wed, 22 Jan 2003, Dan Tran wrote:
> > > >
> > > > > Date: Wed, 22 Jan 2003 11:54:09 -0800
> > > > > From: Dan Tran <[EMAIL PROTECTED]>
> > > > > Reply-To: Struts Users Mailing List
> > > <[EMAIL PROTECTED]>
> > > > > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > > > > Subject: Allow user to change password using CMS
> > > > >
> > > > > Hi, My application uses CMS to manage user/role security.
> > > > >
> > > > > How do I interface with CMS to allow user to change 
> his/her own
> > > password?
> > > > >
> > > > > Any spec on this?
> > > > >
> > > >
> > > > There is no spec on this ... it's going to be up to each
> > > container to
> > > > provide appropriate mechanisms, and any code you write that
> > > relies on this
> > > > will (of course) be container specific.
> > > >
> > > > > Advice is greatly appreciated
> > > > >
> > > > > -D
> > > >
> > > > Craig
> > > >
> > > >
> > > >
> > > > --
> > > > 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: Why is the reset method called when I submit the form?

2003-01-22 Thread pqin
I guess struts calls reset in order to save all your input and then does the
validation

Regards,
 
 
PQ
 
"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-Original Message-
From: Jeremy Cavagnolo [mailto:[EMAIL PROTECTED]] 
Sent: January 22, 2003 2:53 PM
To: [EMAIL PROTECTED]
Subject: Why is the reset method called when I submit the form?

It seems that when I submit my form, the reset method is called before
the validate method.  I am using struts 1.0.2.  

Any insight?

-Jeremy




--
To unsubscribe, e-mail:

For additional commands, e-mail:




Re: Struts Job

2003-01-22 Thread Eric C. Hein
Want to move to Toronto?

- Original Message -
From: "Max Kremer" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 1:37 PM
Subject: Struts Job


Hi,

I've been developing a struts application (http://www.datastay.com) for
several months and I'm in need of Java programmers.
If anyone knows any struts users who are looking for work in the Toronto
area please send them my way.



Regards,

Max Kremer
Director of Technology
Datastay Corp.

office 416.398.1616
fax416.398.9510
mobile   416.801.6299



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




Struts Job

2003-01-22 Thread Max Kremer
Hi,

I've been developing a struts application (http://www.datastay.com) for several months 
and I'm in need of Java programmers. 
If anyone knows any struts users who are looking for work in the Toronto area please 
send them my way.



Regards,

Max Kremer
Director of Technology
Datastay Corp.

office 416.398.1616
fax416.398.9510
mobile   416.801.6299



Re: Allow user to change password using CMS

2003-01-22 Thread Dan Tran
I am using tomcat 4.1.18 using tomcat-users.xml to store user/role
information.

I can write a UserManagerFactory to handle container specific implemention.
But If you have one implemented already I would love to use it

-Dan


- Original Message -
From: "Jarnot Voytek Contr AU HQ/SC" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 1:20 PM
Subject: RE: Allow user to change password using CMS


> I use CMS, and wrote a custom UserManager (container specific) which
> authenticates users against a  database.  To change passwords, etc. users
> simply access a regular page (Struts driven, of course) which allows them
to
> modify the password that's in the database.
>
> What kind of CMS were you planning to use - a default implementation which
> stores the user/password/etc data in principles.xml?  Not very robust or
> secure.  Regardless of container, you'll end up storing passwords in a DB
or
> LDAP - just write code to modify the password in the datastore.
>
> --
> Voytek Jarnot
> Quidquid latine dictum sit, altum viditur.
>
>
> > -Original Message-
> > From: Dan Tran [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 22, 2003 2:49 PM
> > To: Struts Users Mailing List
> > Subject: Re: Allow user to change password using CMS
> >
> >
> > So I guess , using container manage security is not
> > recommended  for my
> > situation  which I think most of portal app require
> >
> > -D
> >
> >
> > - Original Message -
> > From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, January 22, 2003 12:18 PM
> > Subject: Re: Allow user to change password using CMS
> >
> >
> > >
> > >
> > > On Wed, 22 Jan 2003, Dan Tran wrote:
> > >
> > > > Date: Wed, 22 Jan 2003 11:54:09 -0800
> > > > From: Dan Tran <[EMAIL PROTECTED]>
> > > > Reply-To: Struts Users Mailing List
> > <[EMAIL PROTECTED]>
> > > > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > > > Subject: Allow user to change password using CMS
> > > >
> > > > Hi, My application uses CMS to manage user/role security.
> > > >
> > > > How do I interface with CMS to allow user to change his/her own
> > password?
> > > >
> > > > Any spec on this?
> > > >
> > >
> > > There is no spec on this ... it's going to be up to each
> > container to
> > > provide appropriate mechanisms, and any code you write that
> > relies on this
> > > will (of course) be container specific.
> > >
> > > > Advice is greatly appreciated
> > > >
> > > > -D
> > >
> > > Craig
> > >
> > >
> > >
> > > --
> > > 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 Loading Application Resources in Struts 1.1

2003-01-22 Thread Glenn Eisenhut

You have to specify the application resources in the struts-config.xml.
Thusly - 






 




  



-Original Message-
From: Micael [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 10:21 AM
To: Struts Users Mailing List
Subject: Re: Error Loading Application Resources in Struts 1.1


Thanks, Craig,

Can you tell what it is that is wrong in general terms, or even 
specifically?  I am rather new at this aspect.  The error, again, was:

C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\struts.jar
2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding random
number 
generator class java.security.SecureRandom
2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding of random 
number generator has been completed
2003-01-22 11:47:06 StandardWrapper[/michaelmcgrady:default]: Loading 
container servlet default
2003-01-22 11:47:07 StandardWrapper[/michaelmcgrady:action]: Marking 
servlet action as unavailable
2003-01-22 11:47:07 StandardContext[/michaelmcgrady]: Servlet 
/michaelmcgrady threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource
path
 at 
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.ja
va:952)
 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.jav
a:934)
 at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
 at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
ava:3420)
 at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3608
)
 at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va: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(StandardHostDeploy
er.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:36
8)
 at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:166)
 at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
 at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)

Thanks for any assistance,

Micael

At 12:20 PM 1/22/03 -0800, you wrote:
>It's actually complaining about your struts-config.xml file, not your 
>application resources.
>
>Craig
>
>On Wed, 22 Jan 2003, Micael wrote:
>
> > Date: Wed, 22 Jan 2003 11:52:28 -0800
> > From: Micael <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Error Loading Application Resources in Struts 1.1
> >
> > I am getting the error shown below when, apparently, the Tomcat 
> > container
> > (4.1.18) cannot load the Struts 1.1 application resources.  I have
the
> > following entry in the web.xml:
> >
> >
> >
> >
> >
> >
> >  action
> >
org.apache.struts.action.ActionServlet
> >  
> >application
> >resources.application
> >  
> >  
> >config
> >/WEB-INF/struts-config.xml
> >  
> >  
> >debug
> >2
> >  
> >  
> >detail
> >2
> >  
> >  2
> >
> >
> > My file, application.properties is at 
> > WEB-INF/classes/resources/application.properties.  What's up?  The 
> > error message is:
> >
> > 2003-01-22 11:47:05 HostConfig[localhost]: Deploying web application

> > directory michaelmcgrady 2003-01-22 11:47:05 
> > StandardHost[localhost]: Installing web application at context path 
> > /michaelmcgrady from URL 
> > file:C:\michaelmcgrady\tomcat\webapps\michaelmcgrady
> > 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploying class 
> > repositories to work directory 
> > C:\michaelmcgrady\tomcat\work\Standalone\localhost\michaelmcgrady
> > 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy class 
> > files /WEB-INF/classes to 
> > C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\classes
> > 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR 
> > /WEB-INF/lib/commons-beanutils.jar to
> > 
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-be
> anutils.jar
> > 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR 
> > /WEB-INF/lib/commons-collections.jar to
> > 
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-co
> llections

RE: Allow user to change password using CMS

2003-01-22 Thread Jarnot Voytek Contr AU HQ/SC
I use CMS, and wrote a custom UserManager (container specific) which
authenticates users against a  database.  To change passwords, etc. users
simply access a regular page (Struts driven, of course) which allows them to
modify the password that's in the database.

What kind of CMS were you planning to use - a default implementation which
stores the user/password/etc data in principles.xml?  Not very robust or
secure.  Regardless of container, you'll end up storing passwords in a DB or
LDAP - just write code to modify the password in the datastore.

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.


> -Original Message-
> From: Dan Tran [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 2:49 PM
> To: Struts Users Mailing List
> Subject: Re: Allow user to change password using CMS
> 
> 
> So I guess , using container manage security is not 
> recommended  for my
> situation  which I think most of portal app require
> 
> -D
> 
> 
> - Original Message -
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 22, 2003 12:18 PM
> Subject: Re: Allow user to change password using CMS
> 
> 
> >
> >
> > On Wed, 22 Jan 2003, Dan Tran wrote:
> >
> > > Date: Wed, 22 Jan 2003 11:54:09 -0800
> > > From: Dan Tran <[EMAIL PROTECTED]>
> > > Reply-To: Struts Users Mailing List 
> <[EMAIL PROTECTED]>
> > > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > > Subject: Allow user to change password using CMS
> > >
> > > Hi, My application uses CMS to manage user/role security.
> > >
> > > How do I interface with CMS to allow user to change his/her own
> password?
> > >
> > > Any spec on this?
> > >
> >
> > There is no spec on this ... it's going to be up to each 
> container to
> > provide appropriate mechanisms, and any code you write that 
> relies on this
> > will (of course) be container specific.
> >
> > > Advice is greatly appreciated
> > >
> > > -D
> >
> > Craig
> >
> >
> >
> > --
> > 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 Loading Application Resources in Struts 1.1

2003-01-22 Thread Micael
Thanks, Craig,

Can you tell what it is that is wrong in general terms, or even 
specifically?  I am rather new at this aspect.  The error, again, was:

C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\struts.jar
2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding random number 
generator class java.security.SecureRandom
2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding of random 
number generator has been completed
2003-01-22 11:47:06 StandardWrapper[/michaelmcgrady:default]: Loading 
container servlet default
2003-01-22 11:47:07 StandardWrapper[/michaelmcgrady:action]: Marking 
servlet action as unavailable
2003-01-22 11:47:07 StandardContext[/michaelmcgrady]: Servlet 
/michaelmcgrady threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource path
at 
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:952)
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:934)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
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)

Thanks for any assistance,

Micael

At 12:20 PM 1/22/03 -0800, you wrote:
It's actually complaining about your struts-config.xml file, not your
application resources.

Craig

On Wed, 22 Jan 2003, Micael wrote:

> Date: Wed, 22 Jan 2003 11:52:28 -0800
> From: Micael <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Error Loading Application Resources in Struts 1.1
>
> I am getting the error shown below when, apparently, the Tomcat container
> (4.1.18) cannot load the Struts 1.1 application resources.  I have the
> following entry in the web.xml:
>
>
>
>
>
>
>  action
>  org.apache.struts.action.ActionServlet
>  
>application
>resources.application
>  
>  
>config
>/WEB-INF/struts-config.xml
>  
>  
>debug
>2
>  
>  
>detail
>2
>  
>  2
>
>
> My file, application.properties is at
> WEB-INF/classes/resources/application.properties.  What's up?  The error
> message is:
>
> 2003-01-22 11:47:05 HostConfig[localhost]: Deploying web application
> directory michaelmcgrady
> 2003-01-22 11:47:05 StandardHost[localhost]: Installing web application at
> context path /michaelmcgrady from URL
> file:C:\michaelmcgrady\tomcat\webapps\michaelmcgrady
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploying class
> repositories to work directory
> C:\michaelmcgrady\tomcat\work\Standalone\localhost\michaelmcgrady
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy class files
> /WEB-INF/classes to
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\classes
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/commons-beanutils.jar to
> 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-beanutils.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/commons-collections.jar to
> 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-collections.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/commons-dbcp.jar to
> 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-dbcp.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/commons-digester.jar to
> 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-digester.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/commons-fileupload.jar to
> 
C:\michaelmcgrady\tomca

RE: pageContext beans

2003-01-22 Thread Craig R. McClanahan


On Wed, 22 Jan 2003, Pani, Gourav wrote:

> Date: Wed, 22 Jan 2003 15:35:00 -0500
> From: "Pani, Gourav" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: pageContext beans
>
> Anybody???  Craig???  Help???
>

Calling pageContext.getServletContext() will get you the ServletContext
instance, although that won't help you get the context path.  For that you
need:

  HttpServletRequest request =
(HttpServletRequest) pageContext.getRequest();
  String contextPath = request.getContextPath();

Craig

> -Original Message-
> From: Pani, Gourav [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 1:13 PM
> To: 'Struts Users Mailing List'
> Subject: RE: pageContext beans
>
>
> Ok, here's what my current tag looks like.
>
> 
>
> The HTML it gives is
> onClick="window.open('/secure/Catalog.do?value=Foo.Bar', '','toolbar=0,
> width=500,height=500,directories=0,status=0,scrollbars=1,
>
> resizeable=1,menubar=0,location=0,copyhistory=1,fullscreen=0')">
> Foo.Bar
>   
>
>
> What I want it to give is a url of /foo/secure/Catalog.do?value=Foo.Bar.
>
>
> In my Tag Java class, I am doing the following.
>
>   StringBuffer buf = new StringBuffer("   buf.append(" onClick=\"window.open(");
>   buf.append("'/" +  + this.url + this.value +"', '',");
>   buf.append("'toolbar=" + this.toolbar + ",");
>   buf.append("width=" + this.width + ",");
>   buf.append("height=" + this.height + ",");
>   buf.append("directories=" + this.directories + ",");
>   buf.append("status=" + this.status + ",");
>   buf.append("scrollbars=" + this.scrollbars + ",");
>   buf.append("resizeable=" + this.resizeable + ",");
>   buf.append("menubar=" + this.menubar + ",");
>   buf.append("location=" + this.location + ",");
>   buf.append("copyhistory=" + this.copyhistory + ",");
>   buf.append("fullscreen=" + this.fullscreen + "'");
>   buf.append(")\">");
>   buf.append(this.value);
>
>
> If I could get the servletContext() I could probably append it before
> this.url and it would solve my problem.  Of course, if anyone has any other
> suggestions, that would be great too.
>
> -Original Message-
> From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 1:05 PM
> To: 'Struts Users Mailing List'
> Subject: RE: pageContext beans
>
>
>
> I think this will do what you want:
> 
>
> I use it to put the context name in front of links, like this:
> name='stylesheet'/>" type="text/css">
>
> Which produces:
>
> in the HTML source on the client.
>
> HTH,
>
> --
> Wendy Smoak
> Applications Systems Analyst, Sr.
> Arizona State University PA Information Resources Management
>
> -Original Message-
> From: Pani, Gourav [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 11:00 AM
> To: 'Struts Users Mailing List'
> Subject: RE: pageContext beans
>
>
> Along the same lines, I have a custom tag that I am writing which opens a
> popup window to describe Glossary Items.  However, the popup does not get
> the application root in the URL automatically.
>
> For example, if my application root is foo, when I pass in the url
> /secure/Glossary.do, instead of opening up /foo/secure/Glossary.do it tries
> to go to /secure/Glossary.do.
>
> I have been going through JavaDocs related to the BaseTagSupport but to no
> avail.  I think getting the servletContext() and appending it in front of
> the URL so that I don't have to add it to the URL path would be the desired
> solution.  Does anyone have any ideas as to how I can go about doing that?
> I am ready to face the RTFM inquisition if necessary.  :)
>
> --
> 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: null references in ActionForms

2003-01-22 Thread Craig R. McClanahan


On Wed, 22 Jan 2003 [EMAIL PROTECTED] wrote:

> Date: Wed, 22 Jan 2003 14:26:08 -0600
> From: [EMAIL PROTECTED]
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: null references in ActionForms
>
> Hi all,
>
> I'm curious about why forms don't like null references.  Let's say I have a
> form with a ref to a domain class that I wrote.  That class has a name
> attribute.  Struts complains when it tries to reference
> someForm.someClass.name if someClass is null.  In the case of displaying an
> entry page for the first time, if someForm.someClass is null, Struts I think
> should either ignore it, as it would if someForm.someClass.name were null,
> or it should call the default constructor and go from there.  Why does it
> not do this?  Can it be configured to do so?  Is there an alternative?  I
> see FormPropertyConfig but it only applies to DynaForms.  For now I've
> tweaked my getters to return a new instance if the ref is null, but I'm
> uncomfortable with this.
>

There are lots of opinions on how evaluation of something like this should
happen :-).  JSTL, for example, chose a path somewhat more like what you
suggest -- it returns a zero-length string for situations like this.  For
the target audience of JSTL (page authors), that probably makes sense,
because the ultimate destination is usually the output page where you need
Strings.  It doesn't make *quite* as much sense for general purpose
property manipulation in a Java program.

In order to do something "smarter" than that, though, you've got to figure
out how to instantiate the "someClass" variable.  A default constructor
might work, IF there is one, and IF you know what class you're talking
about (you won't if someForm is actually a Map).  And, for some people,
the preference would be to configure some sort of a factory for such
objects.  And then you have to configure the mess ...

In practical terms, it's too late in a 1.1 time frame to change this, and
it would undoubtedly cause backwards compatibility problems as well, so
implementing a change this radical in any 1.x release seems problematic.

My personal preference is going to be to encourage folks to move towards
using JSTL expressions (which are also getting built in to JSP 2.0 so you
can use them everywhere in your page).  As a transition tool, the
struts-el libraries are included in 1.1 (in the "contrib" directory) --
they are variations on existing Struts tags, but accept the standard EL
syntax (and therefore behave the way that JSTL tags do with respect to
null values like this).


> thanks
>
> john
>

Craig McClanahan


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




RE: db connection pool question

2003-01-22 Thread Raible, Matt
Furthermore, Tomcat 4.1.x makes this even easier by allowing you to put a
context.xml file into the webapps directory, rather than putting a context
entry in servlet.xml.  This makes it even easier to setup your app on a new
server.  I have an ant task called "setup-tomcat" that copies my jdbc-driver
to $CATALINA_HOME/common/lib and my-app.xml to $CATALINA_HOME/webapps and
tomcat is ready to go!

Matt

> -Original Message-
> From: mech [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 1:33 PM
> To: 'Struts Users Mailing List'
> Subject: RE: db connection pool question
> 
> 
> It's not really conform to the idea that the deploying administrator
> shouldn't have to touch the webapp to make it run. In case you want to
> configure your .war packed webapp you would have to unpack, edit
> struts-config.xml and so on.
> One idea behind J2EE was "write once, run everywhere, as long 
> as you can
> deploy it" ;-)
> And thus the deployment should be independent from the webapp 
> internals.
> 
> So server.xml is the cleaner solution even if it won't make a big
> difference in many cases.
> 
> Development must be non-container specific (specs), deployment is
> container specific and shouldn't be webapp specific.
> 
> Michael
> 
> > -Original Message-
> > From: David Graham [mailto:[EMAIL PROTECTED]] 
> > Sent: Mittwoch, 22. Januar 2003 20:40
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: RE: db connection pool question
> > 
> > 
> > What is tricky about setting up a datasource in struts-config for 
> > deployment?  The advantage is that you don't need to worry 
> > about container 
> > specific datasource setup.
> > 
> > David
> > 
> > 
> > 
> > 
> > 
> > 
> > >From: "mech" <[EMAIL PROTECTED]>
> > >Reply-To: <[EMAIL PROTECTED]>
> > >To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > >Subject: RE: db connection pool question
> > >Date: Wed, 22 Jan 2003 20:09:55 +0100
> > >
> > >I can't tell for Oracle, but for MySQL and the Struts 
> > Connection Pool 
> > >you have to set some kind of "autoReconnect=true" for your 
> > connection 
> > >url setup. Otherwise your connection pool will contain only stale 
> > >connections after a certain timeout. MySQL kicked me out 
> > after 8 hours 
> > >of inactivity. Without autoreconnect you will just pick a "dead" 
> > >connection out of this pool, get an exception, most likely 
> > even close 
> > >the broken connection in your finally-block and put it 
> back into the 
> > >pool. Next time you grab another dead connection and so on 
> and forth.
> > >
> > >By the way... Are the certain pro and cons for the struts 
> connection 
> > >pool vs. the tomcat datasource connection pool? As far as 
> I know the 
> > >tomcat connection pool works only via jndi setup whereas struts 
> > >utilized the "oldfashioned" way. And moreover you have to 
> > set it up in 
> > >struts-config.xml which is a bit tricky for deployment.
> > >
> > >Michael
> > >
> > > > -Original Message-
> > > > From: Raible, Matt [mailto:[EMAIL PROTECTED]]
> > > > Sent: Mittwoch, 22. Januar 2003 17:18
> > > > To: 'Struts Users Mailing List'
> > > > Subject: RE: db connection pool question
> > > >
> > > >
> > > > After waiting 24 hours, I'm still experiencing the same 
> > problem with 
> > > > Oracle and a connection pool (DBCP) in Tomcat. I guess I'll try 
> > > > configuring Oracle's connection pool??
> > > >
> > > > Matt
> > > >
> > > > > -Original Message-
> > > > > From: Raible, Matt
> > > > > Sent: Tuesday, January 21, 2003 8:22 AM
> > > > > To: 'Struts Users Mailing List'
> > > > > Subject: RE: db connection pool question
> > > > >
> > > > >
> > > > > Actually, the solution that I had only works for MySQL.  I'm 
> > > > > having the same problem with Oracle.  Funny - I just posted a 
> > > > > message to the commons-user group asking this same 
> > question. I'll 
> > > > > try adding the validationQuery parameter:
> > > > >
> > > > > 
> > > > >validationQuery
> > > > >SELECT 'CRAP' FROM DUAL 
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Matt
> > > > >
> > > > > > -Original Message-
> > > > > > From: Pani, Gourav [mailto:[EMAIL PROTECTED]]
> > > > > > Sent: Tuesday, January 21, 2003 7:58 AM
> > > > > > To: 'Struts Users Mailing List'
> > > > > > Subject: RE: db connection pool question
> > > > > >
> > > > > >
> > > > > > please look at the thread with subject "Problem with JDBC
> > > > & Struts
> > > > > > Connection Pool (possible to recon nect?)".  Matt 
> > Raible had a 
> > > > > > solution to that by setting autoReconnect=true
> > > > > >
> > > > > > -Original Message-
> > > > > > From: david chan [mailto:[EMAIL PROTECTED]]
> > > > > > Sent: Tuesday, January 21, 2003 9:56 AM
> > > > > > To: Struts Users Mailing List
> > > > > > Subject: db connection pool question
> > > > > >
> > > > > >
> > > > > > Hi,
> > > > > >  I am using a connection pool from 
> > > > > > org.apache.commons.dbcp.BasicDataSourceF

Centura JDBC Driver

2003-01-22 Thread David Bolsover
Has anyone used the Centura JDBC driver in a  ?

Environment: Tomcat 4.1.18

For exceptions thrown see attached.

A mysql datasource in the same struts-config.xml works fine.

Any ideas?

db 
SEVERE: Initializing application data source centura

java.sql.SQLException: Cannot create JDBC driver of class 
'com.centurasoft.java.sqlbase.SqlbaseDriver' for connect URL 
'jdbc:sqlbase://localhost:2155/VMFG'

at 
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:541)

at 
org.apache.commons.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:381)

at 
org.apache.struts.util.GenericDataSource.setLogWriter(GenericDataSource.java:345)

at 
org.apache.struts.action.ActionServlet.initApplicationDataSources(ActionServlet.java:942)

at org.apache.struts.action.ActionServlet.init(ActionServlet.java:457)

at javax.servlet.GenericServlet.init(GenericServlet.java:256)

at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)

at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)

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.addChild(StandardHostDeployer.java:529)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:228)

at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)

at org.apache.commons.digester.Digester.endElement(Digester.java:1036)

at 
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:585)

at 
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:222)

at 
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:595)

at 
org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:748)

at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:747)

at 
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(XMLDocumentScannerImpl.java:957)

at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1544)

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

at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)

at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)

at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)

at 
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)

at org.apache.commons.digester.Digester.parse(Digester.java:1514)

at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:335)

at org.apache.catalina.core.StandardHost.install(StandardHost.java:803)

at 
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:452)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:409)

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:512)

at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)

at org.apache.catalina.startup.Catalina.process(Catalina.java:180)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at 
sun.reflec

Re: Allow user to change password using CMS

2003-01-22 Thread Dan Tran
So I guess , using container manage security is not recommended  for my
situation  which I think most of portal app require

-D


- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 12:18 PM
Subject: Re: Allow user to change password using CMS


>
>
> On Wed, 22 Jan 2003, Dan Tran wrote:
>
> > Date: Wed, 22 Jan 2003 11:54:09 -0800
> > From: Dan Tran <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > Subject: Allow user to change password using CMS
> >
> > Hi, My application uses CMS to manage user/role security.
> >
> > How do I interface with CMS to allow user to change his/her own
password?
> >
> > Any spec on this?
> >
>
> There is no spec on this ... it's going to be up to each container to
> provide appropriate mechanisms, and any code you write that relies on this
> will (of course) be container specific.
>
> > Advice is greatly appreciated
> >
> > -D
>
> Craig
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>

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




RE: multibox and DynaValidatorForm

2003-01-22 Thread Durham David Cntr 805CSS/SCBE
Yah, that's it.  Thanks.

Dave

> -Original Message-
> From: Robert Taylor [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 1:27 PM
> To: Struts Users Mailing List
> Subject: RE: multibox and DynaValidatorForm
> 
> 
> 
>   type="java.lang.String[]"
>  initial="{}"/>
> 
> robert
> 
> > -Original Message-
> > From: Durham David Cntr 805CSS/SCBE 
> [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 22, 2003 2:00 PM
> > To: [EMAIL PROTECTED]
> > Subject: multibox and DynaValidatorForm
> > 
> > 
> > What type should/can I associate with multibox inputs in the 
> > form-bean declaration?
> > 
> > The docs say that the multibox property should be an Array, so I 
> > tried using java.lang.reflect.Array for the type.  This didn't 
> > work and neither java.util.Vector.  So what type should I use?  
> > It is possible to use a multibox with DynaActionForm right?
> > 
> > Also, I'm read about some kind of problem with multiboxes that 
> > requires you implement the reset method and set the array to 
> > length 0 to clear values.  I'm assuming that I would need to 
> > extend DynaValidatorForm and override reset() to do this.  Is 
> > there a better way to do this?
> > 
> > Thanks,
> > 
> > 
> > David Durham
> > NCI Information Systems
> > Scott AFB, AMC SCBE
> > 618.256.5264
> > 
> > --
> > 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: Using taglibs-log.tld for logging

2003-01-22 Thread Pani, Gourav
Any suggestions???

-Original Message-
From: Pani, Gourav [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 2:15 PM
To: '[EMAIL PROTECTED]'
Subject: Using taglibs-log.tld for logging


I have been struggling with the implementation of taglibs-log.tld with my
struts project.  

The following line is included in web.xml.  



The file taglibs-log.tld is present under /WEB-INF
The file taglibs-log.jar is present under /WEB-INF/lib
The file log4j.properties is present under /WEB-INF/classes and is loading
successfully as my blank FileAppenders are being created successfully in the
log destination directory.

The following line is present in my JSP to include the taglib.

<%@ taglib uri="/WEB-INF/taglibs-log.tld" prefix="log" %>

The following line is used in my JSP to create a log entry.



I am skeptical whether my use of category is correct or not.  I have been
scouring the web and going through both Log4J documentation as well as
Taglibs-Log documentation (which is really limited due to its recent
release) but have been unable to figure out how the category maps to log4j.
I am including a section of my log4j.properties file in case that would
help.


# Servlet Error Logger
log4j.appender.FilterError=org.apache.log4j.FileAppender
log4j.appender.FilterError.Threshold=ERROR
log4j.appender.FilterError.file=/resin/webapps/bpo/WEB-INF/logs/FilterError.
log
log4j.appender.FilterError.layout=org.apache.log4j.PatternLayout
log4j.appender.FilterError.layout.ConversionPattern=%d{DATE} [Thread %5t]
%-5p [%c] - %m%n

# Servlet Warn Logger
log4j.appender.FilterWarn=org.apache.log4j.FileAppender
log4j.appender.FilterWarn.Threshold=WARN
log4j.appender.FilterWarn.file=/resin/webapps/bpo/WEB-INF/logs/FilterWarn.lo
g
log4j.appender.FilterWarn.layout=org.apache.log4j.PatternLayout
log4j.appender.FilterWarn.layout.ConversionPattern=%d{DATE} [Thread %5t]
%-5p [%c] - %m%n

# Servlet Debug  Logger
log4j.appender.FilterDebug=org.apache.log4j.FileAppender
log4j.appender.FilterDebug.Threshold=DEBUG
log4j.appender.FilterDebug.file=/resin/webapps/bpo/WEB-INF/logs/FilterDebug.
log
log4j.appender.FilterDebug.layout=org.apache.log4j.PatternLayout
log4j.appender.FilterDebug.layout.ConversionPattern=%d{DATE} [Thread %5t]
%-5p [%c] - %m%n


Any help is greatly appreciated.  

Lost in Log-land.

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Can Action Forward be used to open a new brower window?

2003-01-22 Thread Michael Cardon
Thanks Max,

The links work fine if I'm going straight to a jsp page, but I hit the
Action class before the jsp is rendered and that's why I have this problem.

I was hoping there was a parameter I could include in the forward tag of the
struts-conf.xml file that would open the page in a new browser window, but
such is not the case.



It was just some wishful thinking on part of something I was trying to do.


-Original Message-
From: Max Cooper [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 11:58 AM
To: Struts Users Mailing List
Subject: Re: Can Action Forward be used to open a new brower window?


Forwards happen on the server, so there is no simple way to have a forward
pop up in a new window. If the browser makes a request for /showItToMe.do,
you can forward it 1,000 times on the server and it is still just one
request to the browser. And it is going to display the response in whatever
browser window made the request.

However, you can make the action pop up in a new window by changing the
links to that action. This is probably what you want to do. On the page that
has the link to your action, have it render HTML like this:

Click me

instead of just:

Click me

(Obviously, this is a very simple example. You'll probably want to use
html:link and perhaps even some JavaScript to control the pop-up window's
properties. I am sure there are many resources with details about creating
pop-up windows available on the web.)

I imagine you could also do some kind of response that had both some page
content for the main window, plus a JavaScript to open a new window and
request the other action. But, that would be messy and many people have this
kind of browser functionality disabled to avoid unwanted pop-ups. This is
probably not a good idea.

-Max

- Original Message -
From: "Michael Cardon" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 10:40 AM
Subject: Can Action Forward be used to open a new brower window?


> I am using struts 1.1 beta 2
>
> I use the DispatchAction object using a display method in the class:
>
> public class AssessmentAnalysisAction extends DispatchAction {
>
> public ActionForward display(ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response) {
>
>HttpSession session = request.getSession();
> AssessmentAnalysisForm aaf = (AssessmentAnalysisForm)form;
> ActionErrors errors = new ActionErrors();
> int debugLevel = servlet.getDebug();
>
> ... code 
>
> // Load the form displaying the report data
>return mapping.findForward("success");
> }
> }
>
> I have mapped the 'success' key to the jsp page in struts-conf.xml
>
> type="com.mim.struts.reports.AssessmentAnalysisAction"
>name="assessmentAnalysisForm"
>   scope="request"
>   parameter="dispatch">
>   
> 
>
>
> Is what I would really like, is to have the jsp page open in a new brower
> window. Is this possible? Thanks.
>
> Michael Cardon
> [EMAIL PROTECTED]
>
>
> --
> 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: pageContext beans

2003-01-22 Thread Pani, Gourav
Anybody???  Craig???  Help???

-Original Message-
From: Pani, Gourav [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 1:13 PM
To: 'Struts Users Mailing List'
Subject: RE: pageContext beans


Ok, here's what my current tag looks like.



The HTML it gives is
  
Foo.Bar
  


What I want it to give is a url of /foo/secure/Catalog.do?value=Foo.Bar.


In my Tag Java class, I am doing the following.  

  StringBuffer buf = new StringBuffer("");
  buf.append(this.value);


If I could get the servletContext() I could probably append it before
this.url and it would solve my problem.  Of course, if anyone has any other
suggestions, that would be great too.

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 1:05 PM
To: 'Struts Users Mailing List'
Subject: RE: pageContext beans



I think this will do what you want:


I use it to put the context name in front of links, like this:
   " type="text/css">

Which produces:
   
in the HTML source on the client.

HTH,

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

-Original Message-
From: Pani, Gourav [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 11:00 AM
To: 'Struts Users Mailing List'
Subject: RE: pageContext beans


Along the same lines, I have a custom tag that I am writing which opens a
popup window to describe Glossary Items.  However, the popup does not get
the application root in the URL automatically.  

For example, if my application root is foo, when I pass in the url
/secure/Glossary.do, instead of opening up /foo/secure/Glossary.do it tries
to go to /secure/Glossary.do.  

I have been going through JavaDocs related to the BaseTagSupport but to no
avail.  I think getting the servletContext() and appending it in front of
the URL so that I don't have to add it to the URL path would be the desired
solution.  Does anyone have any ideas as to how I can go about doing that?
I am ready to face the RTFM inquisition if necessary.  :)

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: db connection pool question

2003-01-22 Thread mech
It's not really conform to the idea that the deploying administrator
shouldn't have to touch the webapp to make it run. In case you want to
configure your .war packed webapp you would have to unpack, edit
struts-config.xml and so on.
One idea behind J2EE was "write once, run everywhere, as long as you can
deploy it" ;-)
And thus the deployment should be independent from the webapp internals.

So server.xml is the cleaner solution even if it won't make a big
difference in many cases.

Development must be non-container specific (specs), deployment is
container specific and shouldn't be webapp specific.

Michael

> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED]] 
> Sent: Mittwoch, 22. Januar 2003 20:40
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: db connection pool question
> 
> 
> What is tricky about setting up a datasource in struts-config for 
> deployment?  The advantage is that you don't need to worry 
> about container 
> specific datasource setup.
> 
> David
> 
> 
> 
> 
> 
> 
> >From: "mech" <[EMAIL PROTECTED]>
> >Reply-To: <[EMAIL PROTECTED]>
> >To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> >Subject: RE: db connection pool question
> >Date: Wed, 22 Jan 2003 20:09:55 +0100
> >
> >I can't tell for Oracle, but for MySQL and the Struts 
> Connection Pool 
> >you have to set some kind of "autoReconnect=true" for your 
> connection 
> >url setup. Otherwise your connection pool will contain only stale 
> >connections after a certain timeout. MySQL kicked me out 
> after 8 hours 
> >of inactivity. Without autoreconnect you will just pick a "dead" 
> >connection out of this pool, get an exception, most likely 
> even close 
> >the broken connection in your finally-block and put it back into the 
> >pool. Next time you grab another dead connection and so on and forth.
> >
> >By the way... Are the certain pro and cons for the struts connection 
> >pool vs. the tomcat datasource connection pool? As far as I know the 
> >tomcat connection pool works only via jndi setup whereas struts 
> >utilized the "oldfashioned" way. And moreover you have to 
> set it up in 
> >struts-config.xml which is a bit tricky for deployment.
> >
> >Michael
> >
> > > -Original Message-
> > > From: Raible, Matt [mailto:[EMAIL PROTECTED]]
> > > Sent: Mittwoch, 22. Januar 2003 17:18
> > > To: 'Struts Users Mailing List'
> > > Subject: RE: db connection pool question
> > >
> > >
> > > After waiting 24 hours, I'm still experiencing the same 
> problem with 
> > > Oracle and a connection pool (DBCP) in Tomcat. I guess I'll try 
> > > configuring Oracle's connection pool??
> > >
> > > Matt
> > >
> > > > -Original Message-
> > > > From: Raible, Matt
> > > > Sent: Tuesday, January 21, 2003 8:22 AM
> > > > To: 'Struts Users Mailing List'
> > > > Subject: RE: db connection pool question
> > > >
> > > >
> > > > Actually, the solution that I had only works for MySQL.  I'm 
> > > > having the same problem with Oracle.  Funny - I just posted a 
> > > > message to the commons-user group asking this same 
> question. I'll 
> > > > try adding the validationQuery parameter:
> > > >
> > > > 
> > > >validationQuery
> > > >SELECT 'CRAP' FROM DUAL 
> > > >
> > > > Thanks,
> > > >
> > > > Matt
> > > >
> > > > > -Original Message-
> > > > > From: Pani, Gourav [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Tuesday, January 21, 2003 7:58 AM
> > > > > To: 'Struts Users Mailing List'
> > > > > Subject: RE: db connection pool question
> > > > >
> > > > >
> > > > > please look at the thread with subject "Problem with JDBC
> > > & Struts
> > > > > Connection Pool (possible to recon nect?)".  Matt 
> Raible had a 
> > > > > solution to that by setting autoReconnect=true
> > > > >
> > > > > -Original Message-
> > > > > From: david chan [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Tuesday, January 21, 2003 9:56 AM
> > > > > To: Struts Users Mailing List
> > > > > Subject: db connection pool question
> > > > >
> > > > >
> > > > > Hi,
> > > > >  I am using a connection pool from 
> > > > > org.apache.commons.dbcp.BasicDataSourceFactory and 
> the driver is 
> > > > > oracle.jdbc.driver.OracleDriver. It works great until if
> > > the server
> > > > > idle for a few days, then the connection object seems broken 
> > > > > with this error:  begin error mesg ===
> > > > > java.sql.SQLException: Io exception: Software caused 
> connection 
> > > > > abort: socket wr
> > > > > ite error   at
> > > > > 
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
> > > > >   at
> > > > > 
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
> > > > > at
> > > > > 
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
> > > > >   at
> > > > >
> > > 
> oracle.jdbc.driver.OracleStatement.(OracleStatement.java:417)
> > > > >at
> > > > >
> > > 
> oracle.jdbc.driver.OracleStatement.(OracleStatement.java:432)
> > > > >at
> > > > >
> > >

problems with forward

2003-01-22 Thread Softwareentwicklung Hauschel
Hey,
i've a index.jsp with the title as message: 
on the index.jsp there is a link tp logon.jsp: Login
I can execute the logon.jsp without Problems, if the user press the link to
logon.jsp,
the logon.jsp is shown. If he press submit, the loginAction.class is
executed.
If the user isn't allowed, the action did a forward to index.jsp.






And now theres a problem:
org.apache.jasper.JasperException: Missing message for key index.title
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
48)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

Why is the message missing, the first time it's available ?!?!?!

Can anybody help me ?


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




null references in ActionForms

2003-01-22 Thread John . E . Gregg
Hi all,
 
I'm curious about why forms don't like null references.  Let's say I have a
form with a ref to a domain class that I wrote.  That class has a name
attribute.  Struts complains when it tries to reference
someForm.someClass.name if someClass is null.  In the case of displaying an
entry page for the first time, if someForm.someClass is null, Struts I think
should either ignore it, as it would if someForm.someClass.name were null,
or it should call the default constructor and go from there.  Why does it
not do this?  Can it be configured to do so?  Is there an alternative?  I
see FormPropertyConfig but it only applies to DynaForms.  For now I've
tweaked my getters to return a new instance if the ref is null, but I'm
uncomfortable with this.  
 
thanks
 
john
 
john gregg
Wells Fargo Services Company
Minneapolis, MN
 



Re: Struts-extending classes with static variables shared by webappsin different contexts

2003-01-22 Thread Craig R. McClanahan


On Wed, 22 Jan 2003, Jeff wrote:

> Date: Wed, 22 Jan 2003 10:47:27 -0500
> From: Jeff <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Struts-extending classes with static variables shared by webapps
> in different contexts
>
> SCENARIO:
>
> * one running instance of Tomcat, whose $CATALINA_HOME is c:/tomcat
>
> * multiple Struts-using webapps, each developed separately using
> Netbeans or Forte, autodeployed into that one instance of Tomcat via
> .war files copied to c:/tomcat/webapps.
>
> * ALL classes needed by the webapp and developed by me are in its
> respective WEB-INF/classes or libs directory, and ABSENT from any
> location common to all webapps running under that instance of Tomcat
> ($JAVA_HOME/jre/lib/ext, $CATALINA_HOME/common, $CATALINA_HOME/shared,
> etc)
>
> * Instead of Action, all of the webapps use com.foo.MyAction, which
> extends Action. Each webapp has its own copy of MyAction.class in its
> respective WEB-INF/classes/com/foo directory, as well as its own copy of
> the Struts jarfiles in WEB-INF/libs (which probably gets unwrapped and
> repackaged by Netbeans/Forte when it creates the .warfile)
>

This is all goodness, but with a potential caveat -- Tomcat has copies of
commones-{collections,dbcp,pool} in its common/lib directory, so watch out
for sharing problems on classes from these packages.

> And now, where things potentially get ugly...
>
> * MyAction has a few static class variables that get treated like
> site-wide global constants. It assumes that NO OTHER WEBAPP running in a
> different context path of the same Tomcat instance can/will ever see
> them.

Tomcat's class loader architecture is documented:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

The fact that each webapp has a separate class loader (loading things from
/WEB-INF/classes and /WEB-INF/lib) is portable.  Anything above that in
the diagram is not, although most containers offer something similar.

Static variables are only global to the class loader that loaded the
containing class, plus any class loaders for which this is the parent.
Therefore, a static variable in a class loaded from the webapp class
loader will be global only to that webapp.


> Is this a valid assumption? Do the relevant specs for Servlets, webapps,
> and/or Java classloading GUARANTEE that each context is a sandboxed
> private universe relative to all other webapps running on the machine
> (at least insofar as classes loaded from WEB-INF/classes or WEB-INF/libs
> are concerned),

Yes.

> or would a servlet container and/or JVM be perfectly
> within its rights to examine MyAction.class, determine that two or more
> of the webapps are really using the exact same class, and share a single
> initialized class among ALL of them (with catastrophic results)?

Not allowed.

>
> I'm slightly paranoid, because I vaguely remember having a problem with
> this exact issue last February/March. I don't remember exactly, but I
> was using some 4.0 release of Tomcat 4, 1.4.0_x j2sdk, and the last
> stable daily build (circa mid-January 2002, I believe) of Struts
> available before 1.1b1 officially came out. The good news is that I
> haven't been able to replicate what I think I remember happening with
> Tomcat 4.1.18, j2sdk 1.4.1_03, and Struts 1.1b2, but I'm not sure
> whether that's due to random good luck at the moment, or whether it's
> The Way Things Are Supposed To Work (but Possibly Didn't last year).
> I'll admit that any problem I might have had last year might have been
> due to some other issue entirely (I knew a LOT less about Struts, and
> Tomcat for that matter, than I do now, and might very well have
> misconfigured something else so badly that it caused it instead, or
> badly misinterpreted what I thought I was seeing).
>
> So... is it OK to use static class variables in classes extending
> Struts' Action class as site-wide global constants, or is it a Bad
> Thing, or maybe even Utterly Taboo?

The first problem people have with class loaders are generally related to
trying to share things that should not be shared.  For example, trying to
share struts.jar itself (in 1.0.2) is a total waste of time -- Struts
itself used static variables that should not be shared.  (There are other
problems with this too -- you'll get ClassNotFoundExceptions on classes
that Struts tries to load from the webapp.  (Struts 1.1 has experimental
support for being able to share struts.jar, but it's not a supported
configuration -- you're on your own for figuring out problems.)

The second problem people have with class loaders is they try to put JAR
files in the "system extensions" directory of their JVM
($JAVA_HOME/jre/lib/ext), to avoid having to manipulate the classpath
variable.  In general, this is a very bad idea because it messes up the
class loader that these classes are loaded from.

If you're a editor+Ant developer like me, my advice is to leave CLASSPATH

RE: AW: easy struts

2003-01-22 Thread Craig R. McClanahan


On Wed, 22 Jan 2003, ROSSEL Olivier wrote:

> Date: Wed, 22 Jan 2003 18:01:57 +0100
> From: ROSSEL Olivier <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: AW: easy struts
>
> > > Can anyone tell me if Ant is able to start/stop Tomcat?
> > >
> >
> > Cactus includes some Ant targets that do this, but I've never
> > needed them.
> > I just leave Tomcat running all the time and used the dynamic install,
> > reload, and remove commands that come with Tomcat 4.1.
> >
> > Starting and stopping Tomcat takes *way* too long in a
> > development cycle,
> > on matter how you actually do it.
>
> So your development cycle is:
> stop context, deploy, start context?
> I presume it is more subtle than that.
> Are the "dynamic install" "reload" and "remove" commands available via Ant?

Yes.  My development cycle is:

1) ant install (depends on the compile target, if needed)
2) test
3) fix something
4) ant reload (depends on compile target)
5) go to 2) unless its beer time, then go to 6)
6) ant remove

I restart Tomcat itself only to upgrade versions or install new JAR files.

This is all available with Tomcat 4.1, and documented as well:

  http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html

  http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/

Craig



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




Re: Creating an Action inside an Action

2003-01-22 Thread Craig R. McClanahan


On Wed, 22 Jan 2003, PILGRIM, Peter, FM wrote:

> Date: Wed, 22 Jan 2003 13:44:03 -
> From: "PILGRIM, Peter, FM" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List (E-mail)" <[EMAIL PROTECTED]>
> Subject: Creating an Action inside an Action
>
> In the current API 1.1 beta3 which has changed.
>
> I have an Action `Preloader' but I what to create or get another a reference
> to Action `Activate'. What is the best way to do this.
>
> public class Preloader extends DispatchAction {
>   public void execute( ... ) {
>
>   ActionServlet servlet = getServlet();
>   RequestProcessor processor = servlet.getRequestProcessor();
>
>   Action activateAction = processor.createActionCreate();
>
>   }
> }
>
> Unfortunately the `ActionServlet.getRequestProcessor' call is protected.
> What I was to do is prepopulate the action form that is
> associated with `Activate' action mapping ?
>
>   ActivateForm = magic_api.getActionForm( "/activate" );
>   activateForm.setSymbol("alpha");
>
> Then I can dispatch forward to the activate mapping.
>
> This is sort of like action chaining but difference.
>
> Any ideas on the new best practice?
>

The simplest thing to do is declare a form bean name in the 
element for Preloader -- then, Struts will precreate the bean for you and
pass it as the ActionForm parameter, ready for you to populate.  If you
use this technique, you'll probably also want to say validate="false" on
the preloader action, since the newly created form bean won't be able to
pass your validation checks.

For programmatic form bean creation, check out
RequestUtils.createActionForm().

> --
> Peter Pilgrim,

Craig



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




RE: perform method deprecated??

2003-01-22 Thread Craig R. McClanahan


On Wed, 22 Jan 2003, Andrew Hill wrote:

> Date: Wed, 22 Jan 2003 20:13:06 +0800
> From: Andrew Hill <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED]
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: RE: perform method deprecated??
>
> Your upgrading from 1.02?
>
> In 1.1 you use the execute() method.

You actually *can* continue to use perform(), but should plan on a
transition to execute() at some point.

The reason for the method change is that execute() includes "throws
Exception" in its method signature, which was required to enable the new
declarative exception processing feature.  In 1.1, the default execute()
method just calls perform, though, so your existing Actions will still
work.

Craig



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




Re: Use case and UML for Digester.

2003-01-22 Thread Craig R. McClanahan


On Wed, 22 Jan 2003, Simon Kelly wrote:

> Date: Wed, 22 Jan 2003 13:04:02 +0100
> From: Simon Kelly <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Use case and UML for Digester.
>
> Hi all,
>
> I know this is a bit of a long shot, but I can't seem to keep track of
> exactly what is happening in struts when it digests the struts-conf file.
> Is there any way of getting my hands on the original use-cases and uml
> diagrams for this package.
>

There never were any UML diagrams for this, but if you go study how SAX
parsing works (lots of references on Google), you'll get the basic idea.

The easiest way to understand what Digester is doing is to turn up the
debugging detail level for the "org.apache.commons.digester" logger.
Then, Digester will happily spit out a megabyte or so of very detailed
trace messages as it parses a complex struts-config.xml file.

> Cheers
>
> Simon.

Craig



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




RE: stuts 1.1 final rel

2003-01-22 Thread Craig R. McClanahan


On Wed, 22 Jan 2003, Arik  Levin ( Tikal ) wrote:

This is about the fifth time this question has been asked (and answered)
in the last two weeks.  Mail archives are your friend :-).

Betas of Struts are built with the HEAD branch of Struts itself, and the
HEAD branch of all the commons libraries, on the day that it was built.

The final release of Struts 1.1 will include released versions of the
commons libraries only (for example, commons-beanutils just released 1.6,
and -- barring bugs -- that will be the one that is used).

Craig



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




Re: Error Loading Application Resources in Struts 1.1

2003-01-22 Thread Craig R. McClanahan
It's actually complaining about your struts-config.xml file, not your
application resources.

Craig

On Wed, 22 Jan 2003, Micael wrote:

> Date: Wed, 22 Jan 2003 11:52:28 -0800
> From: Micael <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Error Loading Application Resources in Struts 1.1
>
> I am getting the error shown below when, apparently, the Tomcat container
> (4.1.18) cannot load the Struts 1.1 application resources.  I have the
> following entry in the web.xml:
>
>
>
>
>
>
>  action
>  org.apache.struts.action.ActionServlet
>  
>application
>resources.application
>  
>  
>config
>/WEB-INF/struts-config.xml
>  
>  
>debug
>2
>  
>  
>detail
>2
>  
>  2
>
>
> My file, application.properties is at
> WEB-INF/classes/resources/application.properties.  What's up?  The error
> message is:
>
> 2003-01-22 11:47:05 HostConfig[localhost]: Deploying web application
> directory michaelmcgrady
> 2003-01-22 11:47:05 StandardHost[localhost]: Installing web application at
> context path /michaelmcgrady from URL
> file:C:\michaelmcgrady\tomcat\webapps\michaelmcgrady
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploying class
> repositories to work directory
> C:\michaelmcgrady\tomcat\work\Standalone\localhost\michaelmcgrady
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy class files
> /WEB-INF/classes to
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\classes
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/commons-beanutils.jar to
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-beanutils.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/commons-collections.jar to
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-collections.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/commons-dbcp.jar to
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-dbcp.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/commons-digester.jar to
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-digester.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/commons-fileupload.jar to
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-fileupload.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/commons-lang.jar to
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-lang.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/commons-logging.jar to
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-logging.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/commons-pool.jar to
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-pool.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/commons-resources.jar to
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-resources.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/commons-validator.jar to
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-validator.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/jakarta-oro.jar to
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\jakarta-oro.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/jdbc2_0-stdext.jar to
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\jdbc2_0-stdext.jar
> 2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR
> /WEB-INF/lib/struts.jar to
> C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\struts.jar
> 2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding random number
> generator class java.security.SecureRandom
> 2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding of random
> number generator has been completed
> 2003-01-22 11:47:06 StandardWrapper[/michaelmcgrady:default]: Loading
> container servlet default
> 2003-01-22 11:47:07 StandardWrapper[/michaelmcgrady:action]: Marking
> servlet action as unavailable
> 2003-01-22 11:47:07 StandardContext[/michaelmcgrady]: Servlet
> /michaelmcgrady threw load() exception
> javax.servlet.UnavailableException: Parsing error processing resource path
>   at
> org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:952)
>   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:934)
>   at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)

Re: Allow user to change password using CMS

2003-01-22 Thread Craig R. McClanahan


On Wed, 22 Jan 2003, Dan Tran wrote:

> Date: Wed, 22 Jan 2003 11:54:09 -0800
> From: Dan Tran <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Allow user to change password using CMS
>
> Hi, My application uses CMS to manage user/role security.
>
> How do I interface with CMS to allow user to change his/her own password?
>
> Any spec on this?
>

There is no spec on this ... it's going to be up to each container to
provide appropriate mechanisms, and any code you write that relies on this
will (of course) be container specific.

> Advice is greatly appreciated
>
> -D

Craig



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




RE: Session Affinity Manager

2003-01-22 Thread Joe Germuska
At 1:36 PM -0600 2003/01/22, Brad Balmer wrote:

Right now we are using the 2.2 servlet spec which, as far as I know,
doesn't support filters.  (Unless there is another way that I'm
missing).



It's a common pattern to extend org.apache.struts.action.Action into 
an abstract base action which handles housekeeping.  Something like 
this:


public abstract class BaseAction extends Action
{

  public ActionForward execute(mapping,form,req,resp) throws Exception
  {
  housekeepingMethod();
  ActionForward result = doExecute(mapping,form,req,resp);
  moreHousekeeping(); // if you need it.
  return result;
  }

  public abstract ActionForward doExecute(mapping,form,req,resp);

}

If you ensure that you only use actions which extend your BaseAction, 
you've got it all covered.  We always extend from a local BaseAction 
even before we know we need this or any other behavior; the local 
BaseAction may be empty for a while but it prepares us for the nearly 
inevitable event that we find some behavior which is convenient to 
share among multiple actions.

Hope this helps,
	Joe



-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 1:32 PM
To: Struts Users Mailing List
Subject: RE: Session Affinity Manager

Why not use a filter?

robert


 -Original Message-
 From: Brad Balmer [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 22, 2003 2:26 PM
 To: 'Struts Users Mailing List'
 Subject: Session Affinity Manager


 We have multiple web applications running (therefore multiple .war
 files) that share a single .jar file of common business logic and
 database call code.

 In order for the .jar code to know anything about the .war code (for
 logging, etc) I wrote a Session Affinity Manager where the .war code

can

 call SAM.getSAM().setSession(HttpSession session) and the .jar code

can

 call SAM.getSAM().getSession() and get to my session object through a
 ThreadLocal variable.

 Anyway, in my application I need to call the setSession() piece each
 time a request is to be sent to the web server.  Now, I can add this
 code to each and every .jsp and to every Action class, but I was
 wondering if there was any other place that I could do this.

 What I need to call, specifically, for each request (thread) is the
 following:
 HttpSession session = request.getSession(false);
 SAM.getSAM().setSession(session);

 Does anyone know a place in Struts where I can do this?  I initially
 thought of the processActionPerform() function inside the
 RequestProcessor class, but would I have to re-write all of the

existing

 code for this function for each of my web applications?

 Thanks.


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



--
--
Joe Germuska  | "Big corporations here now believe we 
will have war.
[EMAIL PROTECTED]  | Believe all would welcome it as relief to 
suspense."
http://blog.germuska.com/ | telegram to President McKinley, 25 March 1898


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



Re: accessing DataSource, webapp design question

2003-01-22 Thread Craig R. McClanahan


On Wed, 22 Jan 2003, Charlie Toohey wrote:

> Date: Wed, 22 Jan 2003 10:31:23 -0800
> From: Charlie Toohey <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: accessing DataSource, webapp design question
>
> This is more of a design question. I am using Struts and Tomcat, and have set
> up a JNDI ref-resource to acquire a DataSource for my database, which works
> fine.  All of my value objects use the same database.
>
> The question is how to give each value object access to this DataSource.
>
> One option would be to lookup the JNDI contexts once, at application init,
> and store the DataSource as an application scope attribute. Then whenever a
> value object needs to do database work, they access this DataSource and do a
> getConnection() / conn.close().
>
> Another option would be to have each value object do the JNDI lookups (say,
> in their constructors) and store the DataSource reference in a private field
> --- then anytime they need to do database work, they use the private field
> DataSource and do a getConnection() / conn.close()
>
> Is there any difference/advantage/disadvantage in having all value objects
> using the same DataSource reference, stored at application scope, vs. all
> value objects having their own reference to the DataSource ?
>
> Or another approach which is superior to these options ?
>

A third pattern is actually the recommended one -- do the lookup in your
value object every time.  It won't matter on Tomcat (which doesn't support
these features), but it allows high-availabity servers to support
transparent reconfiguration of existing connection pools, or even
switching to a backup database, without making you shut down your
application.

Saving a reference to the connection pool you were given earlier makes all
of that kind of support difficult to impossible.

> Thanks,
> Charlie

Craig


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




Re: Can Action Forward be used to open a new brower window?

2003-01-22 Thread Max Cooper
Forwards happen on the server, so there is no simple way to have a forward
pop up in a new window. If the browser makes a request for /showItToMe.do,
you can forward it 1,000 times on the server and it is still just one
request to the browser. And it is going to display the response in whatever
browser window made the request.

However, you can make the action pop up in a new window by changing the
links to that action. This is probably what you want to do. On the page that
has the link to your action, have it render HTML like this:

Click me

instead of just:

Click me

(Obviously, this is a very simple example. You'll probably want to use
html:link and perhaps even some JavaScript to control the pop-up window's
properties. I am sure there are many resources with details about creating
pop-up windows available on the web.)

I imagine you could also do some kind of response that had both some page
content for the main window, plus a JavaScript to open a new window and
request the other action. But, that would be messy and many people have this
kind of browser functionality disabled to avoid unwanted pop-ups. This is
probably not a good idea.

-Max

- Original Message -
From: "Michael Cardon" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 10:40 AM
Subject: Can Action Forward be used to open a new brower window?


> I am using struts 1.1 beta 2
>
> I use the DispatchAction object using a display method in the class:
>
> public class AssessmentAnalysisAction extends DispatchAction {
>
> public ActionForward display(ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response) {
>
>HttpSession session = request.getSession();
> AssessmentAnalysisForm aaf = (AssessmentAnalysisForm)form;
> ActionErrors errors = new ActionErrors();
> int debugLevel = servlet.getDebug();
>
> ... code 
>
> // Load the form displaying the report data
>return mapping.findForward("success");
> }
> }
>
> I have mapped the 'success' key to the jsp page in struts-conf.xml
>
> type="com.mim.struts.reports.AssessmentAnalysisAction"
>name="assessmentAnalysisForm"
>   scope="request"
>   parameter="dispatch">
>   
> 
>
>
> Is what I would really like, is to have the jsp page open in a new brower
> window. Is this possible? Thanks.
>
> Michael Cardon
> [EMAIL PROTECTED]
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



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




RE: SSL

2003-01-22 Thread Gemes Tibor
accidentally sent via direct mail. sorry

- Forwarded mail -

> From: Gemes Tibor <[EMAIL PROTECTED]>
> To: "McRobb, John" <[EMAIL PROTECTED]>
> Subject: RE: SSL
> Date: 22 Jan 2003 18:00:03 +0100
> 
> 2003-01-22, sze keltezéssel McRobb, John ezt írta:
> > I guess what I am saying is how do I make the change from http to https and
> > back again. With normal jsps I can do this in the web.xml or I can do it by
> > explicitly hardcode a link, is there any way of doing this dynamically ie
> > via a config file?
> 
> In a struts based app you can assign roles to actions in the
> struts-config.xml. 
> 
> Let's suppose you have an action, which has 2 forwards. You  secure one
> of them accidentally. How could this be handled?
> 
> there is a roles attribute of action, which is a comma-separated list of
> roles that can access that action.
> 
> Hth,
> 
> Tib



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




Error Loading Application Resources in Struts 1.1

2003-01-22 Thread Micael
I am getting the error shown below when, apparently, the Tomcat container 
(4.1.18) cannot load the Struts 1.1 application resources.  I have the 
following entry in the web.xml:




  
  
action
org.apache.struts.action.ActionServlet

  application
  resources.application


  config
  /WEB-INF/struts-config.xml


  debug
  2


  detail
  2

2
  

My file, application.properties is at 
WEB-INF/classes/resources/application.properties.  What's up?  The error 
message is:

2003-01-22 11:47:05 HostConfig[localhost]: Deploying web application 
directory michaelmcgrady
2003-01-22 11:47:05 StandardHost[localhost]: Installing web application at 
context path /michaelmcgrady from URL 
file:C:\michaelmcgrady\tomcat\webapps\michaelmcgrady
2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploying class 
repositories to work directory 
C:\michaelmcgrady\tomcat\work\Standalone\localhost\michaelmcgrady
2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy class files 
/WEB-INF/classes to 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\classes
2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR 
/WEB-INF/lib/commons-beanutils.jar to 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-beanutils.jar
2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR 
/WEB-INF/lib/commons-collections.jar to 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-collections.jar
2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR 
/WEB-INF/lib/commons-dbcp.jar to 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-dbcp.jar
2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR 
/WEB-INF/lib/commons-digester.jar to 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-digester.jar
2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR 
/WEB-INF/lib/commons-fileupload.jar to 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-fileupload.jar
2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR 
/WEB-INF/lib/commons-lang.jar to 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-lang.jar
2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR 
/WEB-INF/lib/commons-logging.jar to 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-logging.jar
2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR 
/WEB-INF/lib/commons-pool.jar to 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-pool.jar
2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR 
/WEB-INF/lib/commons-resources.jar to 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-resources.jar
2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR 
/WEB-INF/lib/commons-validator.jar to 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\commons-validator.jar
2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR 
/WEB-INF/lib/jakarta-oro.jar to 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\jakarta-oro.jar
2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR 
/WEB-INF/lib/jdbc2_0-stdext.jar to 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\jdbc2_0-stdext.jar
2003-01-22 11:47:05 WebappLoader[/michaelmcgrady]: Deploy JAR 
/WEB-INF/lib/struts.jar to 
C:\michaelmcgrady\tomcat\webapps\michaelmcgrady\WEB-INF\lib\struts.jar
2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding random number 
generator class java.security.SecureRandom
2003-01-22 11:47:06 StandardManager[/michaelmcgrady]: Seeding of random 
number generator has been completed
2003-01-22 11:47:06 StandardWrapper[/michaelmcgrady:default]: Loading 
container servlet default
2003-01-22 11:47:07 StandardWrapper[/michaelmcgrady:action]: Marking 
servlet action as unavailable
2003-01-22 11:47:07 StandardContext[/michaelmcgrady]: Servlet 
/michaelmcgrady threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource path
	at 
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:952)
	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:934)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
	at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
	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

Allow user to change password using CMS

2003-01-22 Thread Dan Tran
Hi, My application uses CMS to manage user/role security.

How do I interface with CMS to allow user to change his/her own password?

Any spec on this?

Advice is greatly appreciated

-D


RE: db connection pool question

2003-01-22 Thread David Graham
What is tricky about setting up a datasource in struts-config for 
deployment?  The advantage is that you don't need to worry about container 
specific datasource setup.

David






From: "mech" <[EMAIL PROTECTED]>
Reply-To: <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: db connection pool question
Date: Wed, 22 Jan 2003 20:09:55 +0100

I can't tell for Oracle, but for MySQL and the Struts Connection Pool
you have to set some kind of "autoReconnect=true" for your connection
url setup. Otherwise your connection pool will contain only stale
connections after a certain timeout.
MySQL kicked me out after 8 hours of inactivity.
Without autoreconnect you will just pick a "dead" connection out of this
pool, get an exception, most likely even close the broken connection in
your finally-block and put it back into the pool. Next time you grab
another dead connection and so on and forth.

By the way... Are the certain pro and cons for the struts connection
pool vs. the tomcat datasource connection pool?
As far as I know the tomcat connection pool works only via jndi setup
whereas struts utilized the "oldfashioned" way. And moreover you have to
set it up in struts-config.xml which is a bit tricky for deployment.

Michael

> -Original Message-
> From: Raible, Matt [mailto:[EMAIL PROTECTED]]
> Sent: Mittwoch, 22. Januar 2003 17:18
> To: 'Struts Users Mailing List'
> Subject: RE: db connection pool question
>
>
> After waiting 24 hours, I'm still experiencing the same
> problem with Oracle and a connection pool (DBCP) in Tomcat.
> I guess I'll try configuring Oracle's connection pool??
>
> Matt
>
> > -Original Message-
> > From: Raible, Matt
> > Sent: Tuesday, January 21, 2003 8:22 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: db connection pool question
> >
> >
> > Actually, the solution that I had only works for MySQL.  I'm
> > having the same problem with Oracle.  Funny - I just posted a
> > message to the commons-user group asking this same question.
> > I'll try adding the validationQuery parameter:
> >
> > 
> >validationQuery
> >SELECT 'CRAP' FROM DUAL 
> >
> > Thanks,
> >
> > Matt
> >
> > > -Original Message-
> > > From: Pani, Gourav [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, January 21, 2003 7:58 AM
> > > To: 'Struts Users Mailing List'
> > > Subject: RE: db connection pool question
> > >
> > >
> > > please look at the thread with subject "Problem with JDBC
> & Struts
> > > Connection Pool (possible to recon nect?)".  Matt Raible had a
> > > solution to that by setting autoReconnect=true
> > >
> > > -Original Message-
> > > From: david chan [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, January 21, 2003 9:56 AM
> > > To: Struts Users Mailing List
> > > Subject: db connection pool question
> > >
> > >
> > > Hi,
> > >  I am using a connection pool from
> > > org.apache.commons.dbcp.BasicDataSourceFactory and the driver is
> > > oracle.jdbc.driver.OracleDriver. It works great until if
> the server
> > > idle for a few days, then the connection object seems broken with
> > > this error:  begin error mesg ===
> > > java.sql.SQLException: Io exception: Software caused
> > > connection abort: socket wr
> > > ite error   at
> > > oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
> > >   at
> > > oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
> > > at
> > > oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
> > >   at
> > >
> oracle.jdbc.driver.OracleStatement.(OracleStatement.java:417)
> > >at
> > >
> oracle.jdbc.driver.OracleStatement.(OracleStatement.java:432)
> > >at
> > >
> >
> oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedState
> > > ment.java:182)   at
> > >
> >
> oracle.jdbc.driver.OracleConnection.privatePrepareStatement(OracleCon
> > > nection.java:602)at
> > >
> >
> oracle.jdbc.driver.OracleConnection.prepareStatement(OracleConnection
> > > .java:538)at
> > > org.apache.commons.dbcp.DelegatingConnection.prepareStatement(
> > > DelegatingConn
> > > ection.java:197)
> > > ...
> > > =  end of error mesg 
> > >
> > > What happen and how can I prevent this?
> > > Thanks.
> > > David
> > >
> > >
> > >
> > > __
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > > http://mailplus.yahoo.com
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > 
> > > For additional commands, e-mail:
> > > 
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> 
>
>
> --
> To unsubscribe, e-mail:
>  [EMAIL PROTECTED]>
> For
> additional commands,
> e-mail: 
>


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 


[OT] [Digester] Mapping Children to Parent Object

2003-01-22 Thread Jacob Hookom
This is a best-practices question.  I'm nearing the completion of a caching
framework and I'm now writing the configuration package with Digester.












Cache-Config nodes create a CacheController which is a wrapper for a Map of
Caches.  I would like to avoid adding a "name" property to my Cache object,
but still have that value passed to the parent (CacheController) for mapping
purposes.

Does anyone have any pointers as to how to best accomplish this without
modifying my framework code just for Digester?

Best Regards,
Jacob Hookom


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




Why is the reset method called when I submit the form?

2003-01-22 Thread Jeremy Cavagnolo
It seems that when I submit my form, the reset method is called before
the validate method.  I am using struts 1.0.2.  

Any insight?

-Jeremy




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




RE: Session Affinity Manager

2003-01-22 Thread Brad Balmer
Right now we are using the 2.2 servlet spec which, as far as I know,
doesn't support filters.  (Unless there is another way that I'm
missing).

-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 22, 2003 1:32 PM
To: Struts Users Mailing List
Subject: RE: Session Affinity Manager

Why not use a filter?

robert

> -Original Message-
> From: Brad Balmer [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 2:26 PM
> To: 'Struts Users Mailing List'
> Subject: Session Affinity Manager
> 
> 
> We have multiple web applications running (therefore multiple .war
> files) that share a single .jar file of common business logic and
> database call code.
> 
> In order for the .jar code to know anything about the .war code (for
> logging, etc) I wrote a Session Affinity Manager where the .war code
can
> call SAM.getSAM().setSession(HttpSession session) and the .jar code
can
> call SAM.getSAM().getSession() and get to my session object through a
> ThreadLocal variable.
> 
> Anyway, in my application I need to call the setSession() piece each
> time a request is to be sent to the web server.  Now, I can add this
> code to each and every .jsp and to every Action class, but I was
> wondering if there was any other place that I could do this.
> 
> What I need to call, specifically, for each request (thread) is the
> following:
> HttpSession session = request.getSession(false);
> SAM.getSAM().setSession(session);
> 
> Does anyone know a place in Struts where I can do this?  I initially
> thought of the processActionPerform() function inside the
> RequestProcessor class, but would I have to re-write all of the
existing
> code for this function for each of my web applications?
> 
> Thanks.
> 
> 
> --
> 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: Session Affinity Manager

2003-01-22 Thread Jarnot Voytek Contr AU HQ/SC
> -Original Message-
> From: Brad Balmer [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 1:26 PM
> To: 'Struts Users Mailing List'
> Subject: Session Affinity Manager
 
[SNIP] 
 
> Does anyone know a place in Struts where I can do this?  I initially
> thought of the processActionPerform() function inside the
> RequestProcessor class, but would I have to re-write all of 
> the existing
> code for this function for each of my web applications?
> 
> Thanks.
> 

Why not extend RequestProcessor and override process(...), make your calls
and then call super.process(...)?  Am I missing something obvious?

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.

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




RE: Session Affinity Manager

2003-01-22 Thread Robert Taylor
Why not use a filter?

robert

> -Original Message-
> From: Brad Balmer [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 2:26 PM
> To: 'Struts Users Mailing List'
> Subject: Session Affinity Manager
> 
> 
> We have multiple web applications running (therefore multiple .war
> files) that share a single .jar file of common business logic and
> database call code.
> 
> In order for the .jar code to know anything about the .war code (for
> logging, etc) I wrote a Session Affinity Manager where the .war code can
> call SAM.getSAM().setSession(HttpSession session) and the .jar code can
> call SAM.getSAM().getSession() and get to my session object through a
> ThreadLocal variable.
> 
> Anyway, in my application I need to call the setSession() piece each
> time a request is to be sent to the web server.  Now, I can add this
> code to each and every .jsp and to every Action class, but I was
> wondering if there was any other place that I could do this.
> 
> What I need to call, specifically, for each request (thread) is the
> following:
> HttpSession session = request.getSession(false);
> SAM.getSAM().setSession(session);
> 
> Does anyone know a place in Struts where I can do this?  I initially
> thought of the processActionPerform() function inside the
> RequestProcessor class, but would I have to re-write all of the existing
> code for this function for each of my web applications?
> 
> Thanks.
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 



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




RE: multibox and DynaValidatorForm

2003-01-22 Thread Robert Taylor



robert

> -Original Message-
> From: Durham David Cntr 805CSS/SCBE [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 2:00 PM
> To: [EMAIL PROTECTED]
> Subject: multibox and DynaValidatorForm
> 
> 
> What type should/can I associate with multibox inputs in the 
> form-bean declaration?
> 
> The docs say that the multibox property should be an Array, so I 
> tried using java.lang.reflect.Array for the type.  This didn't 
> work and neither java.util.Vector.  So what type should I use?  
> It is possible to use a multibox with DynaActionForm right?
> 
> Also, I'm read about some kind of problem with multiboxes that 
> requires you implement the reset method and set the array to 
> length 0 to clear values.  I'm assuming that I would need to 
> extend DynaValidatorForm and override reset() to do this.  Is 
> there a better way to do this?
> 
> Thanks,
> 
> 
> David Durham
> NCI Information Systems
> Scott AFB, AMC SCBE
> 618.256.5264
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

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




Session Affinity Manager

2003-01-22 Thread Brad Balmer
We have multiple web applications running (therefore multiple .war
files) that share a single .jar file of common business logic and
database call code.

In order for the .jar code to know anything about the .war code (for
logging, etc) I wrote a Session Affinity Manager where the .war code can
call SAM.getSAM().setSession(HttpSession session) and the .jar code can
call SAM.getSAM().getSession() and get to my session object through a
ThreadLocal variable.

Anyway, in my application I need to call the setSession() piece each
time a request is to be sent to the web server.  Now, I can add this
code to each and every .jsp and to every Action class, but I was
wondering if there was any other place that I could do this.

What I need to call, specifically, for each request (thread) is the
following:
HttpSession session = request.getSession(false);
SAM.getSAM().setSession(session);

Does anyone know a place in Struts where I can do this?  I initially
thought of the processActionPerform() function inside the
RequestProcessor class, but would I have to re-write all of the existing
code for this function for each of my web applications?

Thanks.


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




RE: db connection pool question

2003-01-22 Thread mech
I can't tell for Oracle, but for MySQL and the Struts Connection Pool
you have to set some kind of "autoReconnect=true" for your connection
url setup. Otherwise your connection pool will contain only stale
connections after a certain timeout. 
MySQL kicked me out after 8 hours of inactivity. 
Without autoreconnect you will just pick a "dead" connection out of this
pool, get an exception, most likely even close the broken connection in
your finally-block and put it back into the pool. Next time you grab
another dead connection and so on and forth.

By the way... Are the certain pro and cons for the struts connection
pool vs. the tomcat datasource connection pool?
As far as I know the tomcat connection pool works only via jndi setup
whereas struts utilized the "oldfashioned" way. And moreover you have to
set it up in struts-config.xml which is a bit tricky for deployment.

Michael

> -Original Message-
> From: Raible, Matt [mailto:[EMAIL PROTECTED]] 
> Sent: Mittwoch, 22. Januar 2003 17:18
> To: 'Struts Users Mailing List'
> Subject: RE: db connection pool question
> 
> 
> After waiting 24 hours, I'm still experiencing the same 
> problem with Oracle and a connection pool (DBCP) in Tomcat.  
> I guess I'll try configuring Oracle's connection pool??
> 
> Matt
> 
> > -Original Message-
> > From: Raible, Matt
> > Sent: Tuesday, January 21, 2003 8:22 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: db connection pool question
> > 
> > 
> > Actually, the solution that I had only works for MySQL.  I'm
> > having the same problem with Oracle.  Funny - I just posted a 
> > message to the commons-user group asking this same question.  
> > I'll try adding the validationQuery parameter:
> > 
> > 
> >validationQuery
> >SELECT 'CRAP' FROM DUAL 
> > 
> > Thanks,
> > 
> > Matt
> > 
> > > -Original Message-
> > > From: Pani, Gourav [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, January 21, 2003 7:58 AM
> > > To: 'Struts Users Mailing List'
> > > Subject: RE: db connection pool question
> > > 
> > > 
> > > please look at the thread with subject "Problem with JDBC 
> & Struts 
> > > Connection Pool (possible to recon nect?)".  Matt Raible had a 
> > > solution to that by setting autoReconnect=true
> > > 
> > > -Original Message-
> > > From: david chan [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, January 21, 2003 9:56 AM
> > > To: Struts Users Mailing List
> > > Subject: db connection pool question
> > > 
> > > 
> > > Hi,
> > >  I am using a connection pool from 
> > > org.apache.commons.dbcp.BasicDataSourceFactory and the driver is 
> > > oracle.jdbc.driver.OracleDriver. It works great until if 
> the server 
> > > idle for a few days, then the connection object seems broken with 
> > > this error:  begin error mesg ===
> > > java.sql.SQLException: Io exception: Software caused
> > > connection abort: socket wr
> > > ite error   at
> > > oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
> > >   at
> > > oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
> > > at
> > > oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
> > >   at
> > > 
> oracle.jdbc.driver.OracleStatement.(OracleStatement.java:417)
> > >at
> > > 
> oracle.jdbc.driver.OracleStatement.(OracleStatement.java:432)
> > >at
> > > 
> > 
> oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedState
> > > ment.java:182)   at
> > > 
> > 
> oracle.jdbc.driver.OracleConnection.privatePrepareStatement(OracleCon
> > > nection.java:602)at
> > > 
> > 
> oracle.jdbc.driver.OracleConnection.prepareStatement(OracleConnection
> > > .java:538)at
> > > org.apache.commons.dbcp.DelegatingConnection.prepareStatement(
> > > DelegatingConn
> > > ection.java:197)
> > > ...
> > > =  end of error mesg 
> > > 
> > > What happen and how can I prevent this?
> > > Thanks.
> > > David
> > > 
> > > 
> > > 
> > > __
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. 
> > > http://mailplus.yahoo.com
> > > 
> > > --
> > > To unsubscribe, e-mail: 
> > > 
> > > For additional commands, e-mail: 
> > > 
> > > 
> > > --
> > > To unsubscribe, e-mail:   
> > 
> > For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 


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




multibox and DynaValidatorForm

2003-01-22 Thread Durham David Cntr 805CSS/SCBE
What type should/can I associate with multibox inputs in the form-bean declaration?

The docs say that the multibox property should be an Array, so I tried using 
java.lang.reflect.Array for the type.  This didn't work and neither java.util.Vector.  
So what type should I use?  It is possible to use a multibox with DynaActionForm right?

Also, I'm read about some kind of problem with multiboxes that requires you implement 
the reset method and set the array to length 0 to clear values.  I'm assuming that I 
would need to extend DynaValidatorForm and override reset() to do this.  Is there a 
better way to do this?

Thanks,


David Durham
NCI Information Systems
Scott AFB, AMC SCBE
618.256.5264

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




  1   2   3   >