RE: Struts Productivity Survey

2003-01-10 Thread Manomohan K Kalathil
Greg, 
Agree completely with what Jaaron has to say. Your best bet is to divide up
the work. There could be people who are good at JSPs, taglibraries, HTML. Few
others who have exposure to web development using servlets etc should be
trained indepth on struts and be asked to develop all actions and associated
artefacts. Note however that this approach requires that the lead of the team
should have his/her fingers into all pieces of the pie. In your case you will
need more than one lead and the leads should know and enforce the interfaces
between the web team and the struts team and the business layer folks. I have
been on one such role and believe me it is quite nightmarish for the first
few weeks. But once everyone gets a hang after the first integration. 
Regards
Mano


-Original Message-
From: J Aaron Farr [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 11, 2003 4:55 AM
To: [EMAIL PROTECTED]
Subject: Re: Struts Productivity Survey


Greg,

I had a similar situation recently, although not nearly at the scope you're
currently facing.  I'm not sure if it was an advantage, but I had a handful
of
developers who were completely new to java, object-oriented programming,
everything.  One had some COBOL experience, the rest were database people
(Oracle P/SQL programmers).  Luckily I had the other project leader on my
side
and he agreed Struts was the way to go.

Personally I think Struts is easy to grasp IF you break it down.  My plan was
something like this:

1. Get everyone up to speed on the general idea of MVC and Struts.  Basic
definitions.  Perhaps show an extremely trivial example.

2. Divide up the work.  View people don't need to understand how Actions work
completely.  Likewise Action and Model people don't need to understand Views
or
Taglibs.  As long as you have well defined interfaces and know what needs
passed to what, you can teach people on a need-to-know basis.  For many
developers I think this is easier.  It gives them something to work on.  The
ambitious ones will do their own homework.

3. Develop one part of the application completely to be used as a reference. 
In my case, the application had three main parts to it.  I wrote almost all
of
part one, and then turned it over to the team for parts two and three.  I did
a
complete walk through with them and then after that I was just on support.

We had the whole process moving within a week.  It was a hectic week mind
you,
but it worked and things got done the right way.  I think Struts easily lends
itself to group development and if you have a couple of knowledgeable people
in
charge, the rest can do good work without really understanding everything
about
the framework.

Good Luck!
jaaron

__
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: Session Management

2003-01-10 Thread Phil Steitz
Puneet Agarwal wrote:

Session Management is required to achieve persistence. there are two manner
in which persistence can be achieved.

1. storing the information in HTTP session (possibly in session scope)
2. Storing the information using stateful session beans.


You can also use hidden fields (basically client-side state management), 
or application-managed durable storage (e.g RDBMS).


You have to take the decision based on your application's performance
expectations.

The cleaner approach is to define the scope of form as "session" and storing
everything in formbeans, nowhere else.
some readonly information can be stored in application context also.

Well you may choose to store some information in stateful session beans and
some in formbeans (HTTP session) but I would not suggest to keep the scope
of formbeans as "request" unless the screen is totally stateless.


Or unless the application has to scale to very large volumes, in which 
case you want to be very careful about creating too many session-scoped 
objects.


Regards
Puneet

- Original Message -
From: "JONATHAN PHILIP HOLLOWAY" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 4:10 PM
Subject: Session Management


Hi everyone,

I'm wondering about the ways of managing sessions in Struts and wanted
to know out of these two ways which was the better way of doing things:

1. Storing things within the standard servlet session

2. Using a UserWrapper object and storing that within the session.

Is the second way more preformance intensive or not and which is best
practice?

Many thanks,
Jon Holloway.

*-*
 Jonathan Holloway,
 Dept. Of Computer Science,
 Aberystwyth University,
 Ceredigion,
 West Wales,
 SY23 3DV.

 07968 902140
 http://users.aber.ac.uk/jph8
*-*



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






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




Re: Security Filter and ActionForm

2003-01-10 Thread Max Cooper
You might not want to tell users what was wrong for security reasons. If
they type a username/password and can get a "username invalid" or "password
invalid" error, they will know when they have guessed a good username.
"passwords can only contain letters and digits", etc. also give away
information that you may want to protect. This may not be a major concern,
but it is good to be aware of such issues.

Assuming the info give-away from the specialized error messages is not a
significant concern, you could have a Struts Action as the error page. It
will populate an ActionForm, do validation, etc. It would be a second check
(inefficient) but you wouldn't have to modify (and maintain your
modification to) SecurityFilter to do it.

Perhaps some sort of error type system could be setup in SecurityFilter. It
would require changes/additions to the realm interface, but perhaps it is
worth it for this added functionality. It might be nice to incorporate
support for rules like "you have to change your password every X days", etc.
as well.

-Max

- Original Message -
From: "Curtney Jacobs" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 7:19 AM
Subject: Security Filter and ActionForm


> Greetings!!
>
> I have a login ActionForm (LogInForm) and a associated login Action class
> (LogInAction). When the form is submitted, the request is intercepted by a
> Security Filter. The Security filter authenticates and perform necessary
> authorization checks on the user via a ldap server.
>
> If the user authentication fails, let say because of an invalid password,
how
> can I use my ActionForm (LogInForm) to indicate this error to the user?
>
> I am aware that the Struts ActionForm and Action  have not even been
> instantiated/intitialize, since the security filter intercepted the
request.
>
> I have thought of setting an attribute in the request scope, for example,
an
> "invalid flag" that the ActionForm validate method can check for. This
will
> then trigger the display of the login form and asociated error message to
the
> user.
>
> I am not sure if the above is good practice :(
>
> Any suggestions or comments will be much appreciated.
>
> Curtney Jacobs
> --
> U-Interface.com
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



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




Re: Too much log info in b3

2003-01-10 Thread Brian Alexander Lee
Thanks for the response. This is what we're doing now. I was just wondering
if there was a better way.

BAL
- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 7:00 PM
Subject: Re: Too much log info in b3


>
>
> On Fri, 10 Jan 2003, Brian Lee wrote:
>
> > Date: Fri, 10 Jan 2003 18:23:37 -0500
> > From: Brian Lee <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Too much log info in b3
> >
> > I just upgraded my app to the latest 1.1b3 release of struts. Now I am
> > getting insane logging regardless of what I set ActionServlet's debug
init
> > param to in the web.xml. I've tried 0 yet I still get tons of debugging.
> >
>
> The debug parameter is ignored in 1.1.
>
> > One possibility is that my app does set up a root hierarchy in log4j
with a
> > DEBUG priority, but I wouldn't think this would affect struts logging.
> >
>
> That would be your cause.  You certainly want to set a higher level than
> DEBUG for the org.apache.struts (Struts core) and org.apache.commons
> (Commons libraries) hierarchies.
>
> > Any ideas?
> >
> > Thanks,
> > BAL
>
> Craig
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>

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




Re: Logic Equals and Interface Constants

2003-01-10 Thread David M. Karr
> "Sean" == Sean Cohan  writes:

Sean> I'd like to somehow use some final static int's defined in an interface
Sean> within  tags.  Something like:

Sean> 

Sean> Can I do this or something like it (e.g., using chars instead of int's)?

You'll have to use expression scriptlets for the attribute value.  In those
expressions, you can produce any Java expression you want.

If you want/need to avoid scriptlets, then you'd have to use a more involved
process, using Struts-EL, along with a class that uses reflection to load
"static final" constants into a HashMap which can be referenced through the EL.

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP; SCWCD




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




Re: Too much log info in b3

2003-01-10 Thread Craig R. McClanahan


On Fri, 10 Jan 2003, Brian Lee wrote:

> Date: Fri, 10 Jan 2003 18:23:37 -0500
> From: Brian Lee <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Too much log info in b3
>
> I just upgraded my app to the latest 1.1b3 release of struts. Now I am
> getting insane logging regardless of what I set ActionServlet's debug init
> param to in the web.xml. I've tried 0 yet I still get tons of debugging.
>

The debug parameter is ignored in 1.1.

> One possibility is that my app does set up a root hierarchy in log4j with a
> DEBUG priority, but I wouldn't think this would affect struts logging.
>

That would be your cause.  You certainly want to set a higher level than
DEBUG for the org.apache.struts (Struts core) and org.apache.commons
(Commons libraries) hierarchies.

> Any ideas?
>
> Thanks,
> BAL

Craig


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




RE: Struts Productivity Survey

2003-01-10 Thread Andreas Mack
On Fri, 2003-01-10 at 16:39, [EMAIL PROTECTED] wrote:
> Ok, so let me pose it a different way.  Put yourself in this position:
> 
> You're a consultant or an architect who has been tasked with building a Struts 
>application with 100 screens.  You're actually migrating an application which was 
>originally written as a fat client app in VB and the server was written in C++.

I haven't work on larger projects, but here is my take: As another
poster mentioned, 50 people are too much just for the Web stuff on one
project IMHO. Second I would never let people get on such a big project
with no experience with the used framework.

My experiences:
I'm currently trying to get somebody who did nothing but PHP to Java and
Struts. He found a tutorial, I gave him also Ted's book,
showed a bit the struts-examples. I also told him to look at our
current smaller (30k loc) project and change some appearance stuff
first, then some small functionality and then go into business layer
things, i.e. database etc. It's going slow. I'm being asked "Why is it
so complicated? Why do I need these 100 files for doing just one
thing??"

Last summer I booted somebody with no programming experience on Java
and Struts, doing it like this: First, get Java in, using the tutorial
on the sun site (not of interest to you). Then the Tomcat examples, Java
beans, HTTP parameters. Then I let him write a small class with a
specific problem (not so easy paging algorithm). Then apply it to
Tomcat/Struts. He learned most stuff from looking at the application
on the go.

I think important though to have a build environment ready (ant, deploy
to tomcat, etc.) so they can try their stuff out quickly. Remember
Struts is a framework, every project has its own way / pattern to
use it. New people can pick this style up and learn much faster.

It depends so much on the people. Some learn so quickly I just tell them
"Take a look at this or that." And they come back ready to use it and/or
apply it. Others I have to explain and they just "don't get it."
 

-- 
Andreas Mack <[EMAIL PROTECTED]>
mediales. GmbH


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




Re: Too much log info in b3

2003-01-10 Thread Hemanth Setty
Struts uses log4j for logging..put these statements in your 
log4j.properties..to increase the logging

log4j.category.org.apache.commons=WARN, dest1, dest2
log4j.category.org.apache.struts=WARN, dest1, dest2

-h

Brian Lee wrote:

I just upgraded my app to the latest 1.1b3 release of struts. Now I am 
getting insane logging regardless of what I set ActionServlet's debug 
init param to in the web.xml. I've tried 0 yet I still get tons of 
debugging.

One possibility is that my app does set up a root hierarchy in log4j 
with a DEBUG priority, but I wouldn't think this would affect struts 
logging.

Any ideas?

Thanks,
BAL





_
The new MSN 8 is here: Try it free* for 2 months 
http://join.msn.com/?page=dept/dialup


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 





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




Too much log info in b3

2003-01-10 Thread Brian Lee
I just upgraded my app to the latest 1.1b3 release of struts. Now I am 
getting insane logging regardless of what I set ActionServlet's debug init 
param to in the web.xml. I've tried 0 yet I still get tons of debugging.

One possibility is that my app does set up a root hierarchy in log4j with a 
DEBUG priority, but I wouldn't think this would affect struts logging.

Any ideas?

Thanks,
BAL





_
The new MSN 8 is here: Try it free* for 2 months 
http://join.msn.com/?page=dept/dialup


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



Security Filter and ActionForm

2003-01-10 Thread Curtney Jacobs
Greetings!!

I have a login ActionForm (LogInForm) and a associated login Action class 
(LogInAction). When the form is submitted, the request is intercepted by a 
Security Filter. The Security filter authenticates and perform necessary 
authorization checks on the user via a ldap server.

If the user authentication fails, let say because of an invalid password, how 
can I use my ActionForm (LogInForm) to indicate this error to the user?

I am aware that the Struts ActionForm and Action  have not even been 
instantiated/intitialize, since the security filter intercepted the request.

I have thought of setting an attribute in the request scope, for example, an 
"invalid flag" that the ActionForm validate method can check for. This will 
then trigger the display of the login form and asociated error message to the 
user.

I am not sure if the above is good practice :(

Any suggestions or comments will be much appreciated.

Curtney Jacobs
-- 
U-Interface.com

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




Re: Struts Productivity Survey

2003-01-10 Thread J Aaron Farr
Greg,

I had a similar situation recently, although not nearly at the scope you're
currently facing.  I'm not sure if it was an advantage, but I had a handful of
developers who were completely new to java, object-oriented programming,
everything.  One had some COBOL experience, the rest were database people
(Oracle P/SQL programmers).  Luckily I had the other project leader on my side
and he agreed Struts was the way to go.

Personally I think Struts is easy to grasp IF you break it down.  My plan was
something like this:

1. Get everyone up to speed on the general idea of MVC and Struts.  Basic
definitions.  Perhaps show an extremely trivial example.

2. Divide up the work.  View people don't need to understand how Actions work
completely.  Likewise Action and Model people don't need to understand Views or
Taglibs.  As long as you have well defined interfaces and know what needs
passed to what, you can teach people on a need-to-know basis.  For many
developers I think this is easier.  It gives them something to work on.  The
ambitious ones will do their own homework.

3. Develop one part of the application completely to be used as a reference. 
In my case, the application had three main parts to it.  I wrote almost all of
part one, and then turned it over to the team for parts two and three.  I did a
complete walk through with them and then after that I was just on support.

We had the whole process moving within a week.  It was a hectic week mind you,
but it worked and things got done the right way.  I think Struts easily lends
itself to group development and if you have a couple of knowledgeable people in
charge, the rest can do good work without really understanding everything about
the framework.

Good Luck!
jaaron

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

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




Logic Equals and Interface Constants

2003-01-10 Thread Cohan, Sean
I'd like to somehow use some final static int's defined in an interface
within  tags.  Something like:



Can I do this or something like it (e.g., using chars instead of int's)?

Thanks.

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




Re: JList

2003-01-10 Thread Eric C. Hein
getItem() should take a String[].


- Original Message -
From: "Gus Delgado" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 2:10 PM
Subject: Re: JList


> will the getItem() in the Form take a Collection as suppose of a String?
>
> Eric C. Hein wrote:
>
> >
> >   >labelProperty="label"/>
> >
> >
> >- Original Message -
> >From: "Gus Delgado" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Sent: Friday, January 10, 2003 12:31 PM
> >Subject: JList
> >
> >
> >
> >
> >>On Struts and jsp tags, what is the alternative to a JList. Where a user
> >>can select multiple items from that list?
> >>
> >>-thanks
> >>Gus
> >>
> >>
> >>
> >>--
> >>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: JList

2003-01-10 Thread Gus Delgado
will the getItem() in the Form take a Collection as suppose of a String?

Eric C. Hein wrote:



 
labelProperty="label"/>


- Original Message -
From: "Gus Delgado" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 12:31 PM
Subject: JList


 

On Struts and jsp tags, what is the alternative to a JList. Where a user
can select multiple items from that list?

-thanks
Gus



--
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 Productivity Survey

2003-01-10 Thread Johan
Greg,
You have a big problem. The hardest thing is not learning new stuff but 
estimating the learning curve for others. Personally it took me about 2 
weeks to grasp the concepts and getting up to speed. Why two weeks, 
because people are banging on my door waiting for me when I have 
finished the product. So I have to. When I try to learn something just 
to learn something it takes months.

What you can do is take a few ( max 4 ) people and ask them to build a 
struts application within 4 weeks max. Changing you should do in small 
steps. And watch their progress. Next you can add another 4 to that 
small team and let them start building the first part. See how it's 
going and you can make a more relaible estimate. Tell your boss that you 
can only estimate by trying in small. If he agree at this point you have 
already 8 people who have used the framework. And since your program 
isn't only about struts, but also on java and more start with those who 
know java. Then those who know C++.

And those who only know VB there is some bad news. For me it took about 
two years of studing the java architecture and language before I was 
comfortable in programming java. And I had only MS Access and some VB 
experience

Hope it's helpfull

Johan

[EMAIL PROTECTED] wrote:
Well, the question was somewhat, but not entirely hypothetical.  The 50 is probably more like 30.  The problem is really another "my framework is better than yours" debate and we're pushing to use a Struts-based framework going forward instead of a home-grown.  One of my tasks is to quantify how long it will take developers to get up to speed on Struts to estimate the cost of moving over.

I learned Java, JSP/Servlets, and Struts pretty much all at the same time, and it clicked easily for me.  But I learn new things easily and am not intimidated by new things.  Others seem to have had varying levels of difficulty picking it up.  The team that I worked on back then had little trouble with it.



-Original Message-
From: Haseltine, Celeste [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 10:04 AM
To: 'Struts Users Mailing List'
Subject: RE: Struts Productivity Survey


Greg, 

Wow, I don't envy your assignment.  There is one thing that I 
have learned
over the years as both a developer and project manager, 
people learn at
different rates, and pick up new skills very differently.

In the case of the people who only know C++, the transition 
to Java will not
be difficult.  If they have had no exposure to HTML and web 
development,
then the transition to JSP's will take them a little longer.  
I've know some
really good low level C++ programmers who just cannot get the 
hang of HTML,
much less the tag library underlying struts.  These guys are 
better suited
for the server side and EJB side of development.

As for the VB programmer, your job is going to much more 
difficult.  Many of
the VB programmers I have meet over the past 2 years have had 
no exposure or
training in Object Oriented Programming (OO).  Many have 
moved to VB from
mainframe jobs that they started back in the 70's and 80's.  
For those on
your staff who have had exposure to C++ in college, the move 
to Java will
probably be easier than for those on your staff you have come from a
mainframe background.

As to Struts, JSP's and the tag libraries.  You are looking 
at training
these people in ALL three of these concepts/technology.  I 
would strongly
suggest that you start out your training class in JSP's using 
the Model 1
concept the first few days, and then introduce Struts and the JSP tag
libraries for the duration of the training course.

In all, my experience in training people in a combination of 
on the job and
classes has been as follows:

For those with heavy C++ experience, moving to 
Java/JSP/Servlets/HMTL took
about month before these people were productive.

For those with some exposure to C++ and OO, but no work 
experience, it took
about 2 months for these people to be productive.

For those with no exposure to C++ and OO (mainframe 
background), it took
anywhere from 4 months to 9 months before these people were 
really useful
and productive in the work environment.  A lot depended on 
the attitude of
the person, and their willingness to learn new programming 
skills AND new
programming/software concepts, particularly OO.  If you can 
get over the
hurdle of the OO concepts, then you are 2/3 of the way there.

If you add struts and HTML to the equation, I would add an 
extra 2 to 4
weeks, before the staff is really productive and useful in the work
environment.  

Keep in mind again that people learn at different rates, and 
that they learn
in different ways.  The approach you take to exposing and 
training these
people may not work for the entire group, and you may need to 
take extra
time and try different approaches with some in the group.

Good luck, this is one assignment that I don't envy you on.  

Celeste

-Original Message-
From: [EMAIL

RE: context relative image reference in a CSS file

2003-01-10 Thread Joe Barefoot
No problem.  I think the Chinese call it "putting legs on the snake". :)  Happens to 
everybody at some point or the other.

peace,
Joe


> -Original Message-
> From: Dan Payne [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 12:42 PM
> To: Struts Users Mailing List
> Subject: RE: context relative image reference in a CSS file
> 
> 
> Duh. I forget what it's called when you develop an overly 
> complex solution
> to a *very* simple problem but that's exactly what I was 
> doing. Thanks Joe
> and Craig and all others who replied. I was thinking the path would be
> resolved from the file that contained the stylsheet link, not from the
> stylesheet file itself. I threw in the relative reference and 
> it's working
> like a charm.
> 
> Thanks again!
> 
> -Dan
> 
> -Original Message-
> From: Joe Barefoot [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 09, 2003 7:33 PM
> To: Struts Users Mailing List
> Subject: RE: context relative image reference in a CSS file
> 
> 
> Okay, well I couldn't swear that "list-style-image:" works like
> "background:" in CSS sheets ('cause I haven't used it), but I 
> would assume
> that it does.  We use something like this all over our CSS:
> 
> background: url(../images/icon_confirm.gif);
> 
> The url reference above is intepreted by the *browser* relative to the
> location of the CSS file itself.  What file(s) the link to 
> your CSS file is
> found in is irrelevant for this interpretation, only the 
> location of the CSS
> file matters.
> 
> peace,
> Joe
> 
> > -Original Message-
> > From: Dan Payne [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 09, 2003 5:10 PM
> > To: Struts Users Mailing List
> > Subject: RE: context relative image reference in a CSS file
> >
> >
> > Well, I can't use a relative reference as I've got over 500 JSPs in
> > many,many folders that are running off of 4 templates. It's
> > in the templates
> > that the CSS link is so a reference would only be valid from
> > the templates
> > folder (or another folder at the same level). The folder
> > structure is much
> > more complex than that. I wish it was that easy.
> >
> > I though of changing the .css file to .jsp and rewriting the
> > URL and I guess
> > I'll go with that option. Does noone recall the name of that
> > sourceforge
> > project? (I knew I should've saved that email...)
> >
> > -Dan
> >
> > -Original Message-
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 09, 2003 6:04 PM
> > To: Struts Users Mailing List
> > Subject: RE: context relative image reference in a CSS file
> >
> >
> >
> >
> > On Thu, 9 Jan 2003, Joe Barefoot wrote:
> >
> > > Date: Thu, 9 Jan 2003 14:46:09 -0800
> > > From: Joe Barefoot <[EMAIL PROTECTED]>
> > > Reply-To: Struts Users Mailing List 
> <[EMAIL PROTECTED]>
> > > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > > Subject: RE: context relative image reference in a CSS file
> > >
> > > The simplest solution is to use a relative path:
> > > ul {
> > >  list-style-image: url(../images/li.gif);
> > > }
> > >
> > > If you have your CSS file in folder 'css' (for instance),
> > with sibling
> > > folder 'images', this will work no matter what the app.
> > context name is,
> > > in Tomcat at least (I assume other web servers resolve 
> the same way
> > > though).
> > >
> >
> > Just a minor note ... servers don't resolve relative URIs --
> > clients do.
> >
> > However, as long as your browser obeys the CSS spec and
> > resolves relative
> > URIs against the absolute URL of the stylesheet (not the
> > source document),
> > then this technique should work fine.
> >
> > > Second option:  If you're using ant to deploy, you could
> > use tokens in
> > > your CSS files and have ant replace them during 
> copy/deploy using a
> > > filter task--you can conditionally use different filter values for
> > > replacement depending on a deploy target property or
> > something.  That's
> > > all I can think of.
> > >
> > > peace,
> > > Joe
> > >
> >
> > Craig
> >
> > > > -Original Message-
> > > > From: Justin Ashworth [mailto:[EMAIL PROTECTED]]
> > > > Sent: Thursday, January 09, 2003 2:38 PM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: context relative image reference in a CSS file
> > > >
> > > >
> > > > Hi Dan,
> > > >
> > > > I just ran into this same issue today, and I hope that
> > > > somebody has a better
> > > > idea than what I ended up doing.  I changed the .css files to
> > > > .jsp and put
> > > > script tags around them and included them as JSPs.  This, of
> > > > course, gave me
> > > > access to taglibs which would let me prepend the context path
> > > > to the image.
> > > >
> > > > Your example would end up looking something like this:
> > > >
> > > > <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
> > > > 
> > > > ul {
> > > > list-style-image: url();
> > > > }
> > > > 
> > > >
> > > > This is all I w

Re: JList

2003-01-10 Thread Gus Delgado
it works fine Thank you
Eric C. Hein wrote:



 
labelProperty="label"/>


- Original Message -
From: "Gus Delgado" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 12:31 PM
Subject: JList


 

On Struts and jsp tags, what is the alternative to a JList. Where a user
can select multiple items from that list?

-thanks
Gus



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

2003-01-10 Thread pqin


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

-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]] 
Sent: January 10, 2003 3:51 PM
To: Struts Users Mailing List
Subject: RE: ActionErrors question

So the bundle that holds the errors depends on the bundle that the keys come
from? Is there any way to separate this so that all errors always go to one
bundle regardless of where the message keys are stored? (that design seems
out-of-line with the rest of Struts which usually has good

-Original Message-
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 15:32
To: 'Struts Users Mailing List'
Subject: RE: ActionErrors question


It sounds to me like the keys that you are using in your action errors are
in the non-default message resource file in your application; the one with
the key defined.

If you don't want to use the bundle attribute in your call to
mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:34 PM
To: Struts Users Mailing List
Subject: ActionErrors question


I have 2 message-resources defined in my webapp (one has a key defined the
other does not). In one action, I am getting messages from the non-default
message-resource (the one with a key defined). In that action I also create
an errors object and add errors to it...

getResource(request, key)
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(key, val1, val2);
saveErrors(request, errors);
mapping.findForward(...);

In the JSP I display the errors...


However, this displays nothing _unless_ I do 

Why are the errors added in the 'key' bundle instead of the default bundle?

This is with Struts 1.1b2.

thx
andy



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

2003-01-10 Thread Alvarado, Juan (c)
I am not aware of any way to do what you propose.  As far as I know all an
ActionError object does is hold the key you want to use. If bundle is not
specified in your JSP, then it defaults to the default resource bundle. In
this case that key has to exist in that bundle. Otherwise you have to
specify in mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:52 PM
To: Struts Users Mailing List
Subject: RE: ActionErrors question


(oops - sloppy fingers on a friday afternoon - ignore that last message)

So the bundle that holds the errors depends on the bundle that the keys come
from? Is there any way to separate this so that all errors always go to one
bundle regardless of where the message keys are stored? (that design seems
out-of-line with the rest of Struts which usually has good separation of
functionality)

thx

-Original Message-
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 15:32
To: 'Struts Users Mailing List'
Subject: RE: ActionErrors question


It sounds to me like the keys that you are using in your action errors are
in the non-default message resource file in your application; the one with
the key defined.

If you don't want to use the bundle attribute in your call to
mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:34 PM
To: Struts Users Mailing List
Subject: ActionErrors question


I have 2 message-resources defined in my webapp (one has a key defined the
other does not). In one action, I am getting messages from the non-default
message-resource (the one with a key defined). In that action I also create
an errors object and add errors to it...

getResource(request, key)
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(key, val1, val2);
saveErrors(request, errors);
mapping.findForward(...);

In the JSP I display the errors...


However, this displays nothing _unless_ I do 

Why are the errors added in the 'key' bundle instead of the default bundle?

This is with Struts 1.1b2.

thx
andy



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

2003-01-10 Thread Eric C. Hein

  


- Original Message -
From: "Gus Delgado" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 12:31 PM
Subject: JList


> On Struts and jsp tags, what is the alternative to a JList. Where a user
> can select multiple items from that list?
>
> -thanks
> Gus
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


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




JList

2003-01-10 Thread Gus Delgado
On Struts and jsp tags, what is the alternative to a JList. Where a user 
can select multiple items from that list?

-thanks
Gus



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



RE: ActionErrors question

2003-01-10 Thread Andy Kriger
(oops - sloppy fingers on a friday afternoon - ignore that last message)

So the bundle that holds the errors depends on the bundle that the keys come
from? Is there any way to separate this so that all errors always go to one
bundle regardless of where the message keys are stored? (that design seems
out-of-line with the rest of Struts which usually has good separation of
functionality)

thx

-Original Message-
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 15:32
To: 'Struts Users Mailing List'
Subject: RE: ActionErrors question


It sounds to me like the keys that you are using in your action errors are
in the non-default message resource file in your application; the one with
the key defined.

If you don't want to use the bundle attribute in your call to
mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:34 PM
To: Struts Users Mailing List
Subject: ActionErrors question


I have 2 message-resources defined in my webapp (one has a key defined the
other does not). In one action, I am getting messages from the non-default
message-resource (the one with a key defined). In that action I also create
an errors object and add errors to it...

getResource(request, key)
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(key, val1, val2);
saveErrors(request, errors);
mapping.findForward(...);

In the JSP I display the errors...


However, this displays nothing _unless_ I do 

Why are the errors added in the 'key' bundle instead of the default bundle?

This is with Struts 1.1b2.

thx
andy



--
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: context relative image reference in a CSS file

2003-01-10 Thread Dan Payne
Duh. I forget what it's called when you develop an overly complex solution
to a *very* simple problem but that's exactly what I was doing. Thanks Joe
and Craig and all others who replied. I was thinking the path would be
resolved from the file that contained the stylsheet link, not from the
stylesheet file itself. I threw in the relative reference and it's working
like a charm.

Thanks again!

-Dan

-Original Message-
From: Joe Barefoot [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 7:33 PM
To: Struts Users Mailing List
Subject: RE: context relative image reference in a CSS file


Okay, well I couldn't swear that "list-style-image:" works like
"background:" in CSS sheets ('cause I haven't used it), but I would assume
that it does.  We use something like this all over our CSS:

background: url(../images/icon_confirm.gif);

The url reference above is intepreted by the *browser* relative to the
location of the CSS file itself.  What file(s) the link to your CSS file is
found in is irrelevant for this interpretation, only the location of the CSS
file matters.

peace,
Joe

> -Original Message-
> From: Dan Payne [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 09, 2003 5:10 PM
> To: Struts Users Mailing List
> Subject: RE: context relative image reference in a CSS file
>
>
> Well, I can't use a relative reference as I've got over 500 JSPs in
> many,many folders that are running off of 4 templates. It's
> in the templates
> that the CSS link is so a reference would only be valid from
> the templates
> folder (or another folder at the same level). The folder
> structure is much
> more complex than that. I wish it was that easy.
>
> I though of changing the .css file to .jsp and rewriting the
> URL and I guess
> I'll go with that option. Does noone recall the name of that
> sourceforge
> project? (I knew I should've saved that email...)
>
> -Dan
>
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 09, 2003 6:04 PM
> To: Struts Users Mailing List
> Subject: RE: context relative image reference in a CSS file
>
>
>
>
> On Thu, 9 Jan 2003, Joe Barefoot wrote:
>
> > Date: Thu, 9 Jan 2003 14:46:09 -0800
> > From: Joe Barefoot <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > Subject: RE: context relative image reference in a CSS file
> >
> > The simplest solution is to use a relative path:
> > ul {
> >  list-style-image: url(../images/li.gif);
> > }
> >
> > If you have your CSS file in folder 'css' (for instance),
> with sibling
> > folder 'images', this will work no matter what the app.
> context name is,
> > in Tomcat at least (I assume other web servers resolve the same way
> > though).
> >
>
> Just a minor note ... servers don't resolve relative URIs --
> clients do.
>
> However, as long as your browser obeys the CSS spec and
> resolves relative
> URIs against the absolute URL of the stylesheet (not the
> source document),
> then this technique should work fine.
>
> > Second option:  If you're using ant to deploy, you could
> use tokens in
> > your CSS files and have ant replace them during copy/deploy using a
> > filter task--you can conditionally use different filter values for
> > replacement depending on a deploy target property or
> something.  That's
> > all I can think of.
> >
> > peace,
> > Joe
> >
>
> Craig
>
> > > -Original Message-
> > > From: Justin Ashworth [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, January 09, 2003 2:38 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: context relative image reference in a CSS file
> > >
> > >
> > > Hi Dan,
> > >
> > > I just ran into this same issue today, and I hope that
> > > somebody has a better
> > > idea than what I ended up doing.  I changed the .css files to
> > > .jsp and put
> > > script tags around them and included them as JSPs.  This, of
> > > course, gave me
> > > access to taglibs which would let me prepend the context path
> > > to the image.
> > >
> > > Your example would end up looking something like this:
> > >
> > > <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
> > > 
> > > ul {
> > > list-style-image: url();
> > > }
> > > 
> > >
> > > This is all I was able to figure out.  Does anybody have any
> > > better ideas?
> > >
> > > Thanks,
> > >
> > > Justin
> > >
> > >
> > > - Original Message -
> > > From: "Dan Payne" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Thursday, January 09, 2003 5:31 PM
> > > Subject: context relative image reference in a CSS file
> > >
> > >
> > > > I recall seeing someone mention a project on sourceforge
> > > that allowed one
> > > to
> > > > make context independent references to images from the
> > > context root within
> > > > CSS files. Anyone? Or perhaps another solution?
> > > >
> > > > I've got this entry in my stylesheet.css file:
> >

RE: ActionErrors question

2003-01-10 Thread Andy Kriger
So the bundle that holds the errors depends on the bundle that the keys come
from? Is there any way to separate this so that all errors always go to one
bundle regardless of where the message keys are stored? (that design seems
out-of-line with the rest of Struts which usually has good

-Original Message-
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 15:32
To: 'Struts Users Mailing List'
Subject: RE: ActionErrors question


It sounds to me like the keys that you are using in your action errors are
in the non-default message resource file in your application; the one with
the key defined.

If you don't want to use the bundle attribute in your call to
mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:34 PM
To: Struts Users Mailing List
Subject: ActionErrors question


I have 2 message-resources defined in my webapp (one has a key defined the
other does not). In one action, I am getting messages from the non-default
message-resource (the one with a key defined). In that action I also create
an errors object and add errors to it...

getResource(request, key)
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(key, val1, val2);
saveErrors(request, errors);
mapping.findForward(...);

In the JSP I display the errors...


However, this displays nothing _unless_ I do 

Why are the errors added in the 'key' bundle instead of the default bundle?

This is with Struts 1.1b2.

thx
andy



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

2003-01-10 Thread Alvarado, Juan (c)
It sounds to me like the keys that you are using in your action errors are
in the non-default message resource file in your application; the one with
the key defined.

If you don't want to use the bundle attribute in your call to
mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:34 PM
To: Struts Users Mailing List
Subject: ActionErrors question


I have 2 message-resources defined in my webapp (one has a key defined the
other does not). In one action, I am getting messages from the non-default
message-resource (the one with a key defined). In that action I also create
an errors object and add errors to it...

getResource(request, key)
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(key, val1, val2);
saveErrors(request, errors);
mapping.findForward(...);

In the JSP I display the errors...


However, this displays nothing _unless_ I do 

Why are the errors added in the 'key' bundle instead of the default bundle?

This is with Struts 1.1b2.

thx
andy



--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




ActionErrors question

2003-01-10 Thread Andy Kriger
I have 2 message-resources defined in my webapp (one has a key defined the
other does not). In one action, I am getting messages from the non-default
message-resource (the one with a key defined). In that action I also create
an errors object and add errors to it...

getResource(request, key)
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(key, val1, val2);
saveErrors(request, errors);
mapping.findForward(...);

In the JSP I display the errors...


However, this displays nothing _unless_ I do 

Why are the errors added in the 'key' bundle instead of the default bundle?

This is with Struts 1.1b2.

thx
andy



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




RE: Validator and LookupDispatchAction

2003-01-10 Thread Alvarado, Juan (c)
What exactly is your problem???

-Original Message-
From: Phase Web and Multimedia [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 1:05 PM
To: Struts User List
Subject: Validator and LookupDispatchAction


Has anyone got Validator to work with LookupDispatchActions? I don't see how
it can be done. Is this possible?

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



--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: Validator and LookupDispatchAction

2003-01-10 Thread René Eigenheer
yes it works, what is the problem?

I have:
public class Action extends LookupDispatchAction
public class Form extends ValidatorForm

> -Original Message-
> From: Phase Web and Multimedia [mailto:[EMAIL PROTECTED]]
> Sent: Freitag, 10. Januar 2003 19:05
> To: Struts User List
> Subject: Validator and LookupDispatchAction
> 
> 
> Has anyone got Validator to work with LookupDispatchActions? 
> I don't see how
> it can be done. Is this possible?
> 
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

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




Re: Session Management

2003-01-10 Thread Puneet Agarwal
Session Management is required to achieve persistence. there are two manner
in which persistence can be achieved.

1. storing the information in HTTP session (possibly in session scope)
2. Storing the information using stateful session beans.

You have to take the decision based on your application's performance
expectations.

The cleaner approach is to define the scope of form as "session" and storing
everything in formbeans, nowhere else.
some readonly information can be stored in application context also.

Well you may choose to store some information in stateful session beans and
some in formbeans (HTTP session) but I would not suggest to keep the scope
of formbeans as "request" unless the screen is totally stateless.

Regards
Puneet

- Original Message -
From: "JONATHAN PHILIP HOLLOWAY" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 4:10 PM
Subject: Session Management


Hi everyone,

I'm wondering about the ways of managing sessions in Struts and wanted
to know out of these two ways which was the better way of doing things:

1. Storing things within the standard servlet session

2. Using a UserWrapper object and storing that within the session.

Is the second way more preformance intensive or not and which is best
practice?

Many thanks,
Jon Holloway.

*-*
 Jonathan Holloway,
 Dept. Of Computer Science,
 Aberystwyth University,
 Ceredigion,
 West Wales,
 SY23 3DV.

 07968 902140
 http://users.aber.ac.uk/jph8
*-*



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




Re: first action

2003-01-10 Thread Yan Zhu
thank you. :)


Emmanuel Bridonneau wrote:


Well, I suppose you do nothing more than what the specs states in most cases. Here's a snippet of such a init webapp definition with two servlets ie. Struts controller and your init servlet.
Your initServlet can cache some app scope parameters or whatever else.
Enjoy.



-Original Message-
From: Yan Zhu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 6:55 PM
To: Emmanuel Bridonneau
Subject: Re: first action



great, thanks. how do you declare it in the web.xml?

Emmanuel Bridonneau wrote:

 

You usually want to do this whilst initializing you app. In this case, simple and pretty much standard would be to write a servlet (generic if you don't want to be tied to http) as part of your web-app. All you do is implement its init() method and declare it in your web.xml. Only once init is done for all your servlets, can the users hit your pages.
Emmanuel

-Original Message-
From: Damm, Gary [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 6:35 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: first action

Sounds more like a PlugIn.  Here are the API docs:
http://jakarta.apache.org/struts/api/org/apache/struts/action/PlugIn.htm
l

You just implement this interface, configure it in your config.xml file
and you're up and running.

Gary

-Original Message-
From: Yan Zhu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 6:26 PM
To: Struts Users Mailing List
Subject: first action

hey guys,

   what is the best way to implement a startup action that always will
be executed first before any jsp is hit?

   thanks

yan

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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


 




   
 controller
		. . . 
   

   
 initWebApp
 
   This servlet produces GIF images that are dynamically generated
   graphs, based on the input parameters included on the request.
   It is generally mapped to a specific request URI like "/graph".
 
 com.mycompany.mypackage.InitServlet
 
   listOrders
   com.mycompany.myactions.ListOrdersAction
 
 
 5
   

   
 controller
 *.do
   

   
 initWebApp
 /init
   



and then in your initWebApp,
//Servlet initialization parameters can be retrieved in a servlet or JSP page by calling:
String value =
 getServletConfig().getInitParameter("saveCustomer");
   ServletContext myWebContext= getServletConfig().getServletContext();
   myWebContext.getAttribute(AttributeKeys.WEB_CACHE) ; get/setAttribute

 



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





RE: first action

2003-01-10 Thread Emmanuel Bridonneau
Well, I suppose you do nothing more than what the specs states in most cases. Here's a 
snippet of such a init webapp definition with two servlets ie. Struts controller and 
your init servlet.
Your initServlet can cache some app scope parameters or whatever else.
Enjoy.



-Original Message-
From: Yan Zhu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 6:55 PM
To: Emmanuel Bridonneau
Subject: Re: first action



great, thanks. how do you declare it in the web.xml?

Emmanuel Bridonneau wrote:

> You usually want to do this whilst initializing you app. In this case, simple and 
>pretty much standard would be to write a servlet (generic if you don't want to be 
>tied to http) as part of your web-app. All you do is implement its init() method and 
>declare it in your web.xml. Only once init is done for all your servlets, can the 
>users hit your pages.
> Emmanuel
>
> -Original Message-
> From: Damm, Gary [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 09, 2003 6:35 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: first action
>
> Sounds more like a PlugIn.  Here are the API docs:
> http://jakarta.apache.org/struts/api/org/apache/struts/action/PlugIn.htm
> l
>
> You just implement this interface, configure it in your config.xml file
> and you're up and running.
>
> Gary
>
> -Original Message-
> From: Yan Zhu [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 09, 2003 6:26 PM
> To: Struts Users Mailing List
> Subject: first action
>
> hey guys,
>
> what is the best way to implement a startup action that always will
> be executed first before any jsp is hit?
>
> thanks
>
> yan
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 




  controller
		. . . 



  initWebApp
  
This servlet produces GIF images that are dynamically generated
graphs, based on the input parameters included on the request.
It is generally mapped to a specific request URI like "/graph".
  
  com.mycompany.mypackage.InitServlet
  
listOrders
com.mycompany.myactions.ListOrdersAction
  
  
  5



  controller
  *.do



  initWebApp
  /init




and then in your initWebApp,
 //Servlet initialization parameters can be retrieved in a servlet or JSP page by calling:
 String value =
  getServletConfig().getInitParameter("saveCustomer");
ServletContext myWebContext= getServletConfig().getServletContext();
myWebContext.getAttribute(AttributeKeys.WEB_CACHE) ; get/setAttribute


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


how do i validate number of check box selected by user in DynaValidatorForm

2003-01-10 Thread Ashish Kulkarni
Hi,

I am using DynaValidatorForm, and i want to validate
number of check boxes selected by the user, 
for example to display details, user must select
atleast one checkbox on the the main page before
clicking display details button,
or user must select only one check box for specific
operation..
How do i define this condition in validation.xml??
Ashish



=
A$HI$H

__
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: turning form parameters into queries

2003-01-10 Thread keithBacon
Below is a class of mine that is a bit primitive but does the job. There's
probably plenty wrong (like using integer constants instead of type safe enum) 
with it as I'm a bit of an amateur. With queries I reckon the usual rules of
MVC go out the window & you design for
1 - performance
2 - minimum lines of code.
3 - simpicity - You can put junior programmers to work on this sort of code.

 ..DL = Data List object. It has no GUI code but needs a method for each
combination of parameters. It has no SQL but uses the data objects created by
classes that have the SQL.

=
I think that once a system has many queries the database design must be stable
so it's not so bad if the GUI is bound to the DB design.  (OO heresy!)

If u have a web only interface an alternative is to build the SQL in your
ActionForm & have a generalised system that runs the SQL & returns a
List/Collection of type you specify. Some such thing must exist. You just put
the collection in the request for the JSP to display.
thanks,
Keith.

package com.biff.biffapp1.db;
import java.util.Iterator;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Collections;
import java.io.Serializable;

import org.apache.log4j.Logger;

import com.biff.utils.Biff1AppException;
import com.biff.utils.ZUtils;
/**
* Data List Object
*
**/
public class UserDL extends Object implements Serializable {
private static final
Logger logger = Logger.getLogger(UserDL.class.getName());

public static final int SELECT_ALL  = 60;
public static final int SELECT_INACTIVE = 61;
public static final int SELECT_ACTIVE   = 62;

public static final int SORT_USER_NAME= 50;
public static final int SORT_ACTIVE_USER_NAME = 51;
public static final int SORT_USER_ID  = 52;
public static final int SORT_ACTIVE_USER_ID   = 53;
public static final int SORT_SIGNON_COUNT = 54;
public static final int SORT_LAST_SIGNON  = 55;
// holds data for  table.
private ArrayList userList = new ArrayList(50);  // what init size?

private int selectionType = 0;
private int sortType = 0;
/*
* Constructor - build date from default query.
*/
public  UserDL() {
this.selectionType = UserDL.SELECT_ALL;
this.sortType  = UserDL.SORT_USER_NAME;
constructorCode();
}
/*
* Constructor -
*/
public  UserDL(int selectionType, int sortType) {
this.selectionType = selectionType;
this.sortType  = sortType;
constructorCode();
}
/*
*/
public  void constructorCode(){
//logger.debug("constructorCode: start. selectionType="+ selectionType
//  +" sortType="+ 
sortType);
Iterator iii = UserDB.getInstance().getArrayList().iterator();
while (iii.hasNext()) {
UserDO ddd = (UserDO)iii.next();

boolean includeIt = false;

switch (selectionType) {
case UserDL.SELECT_ALL :
includeIt = true;
break;
case UserDL.SELECT_INACTIVE :
if (ddd.getRowStatus().equals("D")) includeIt = true;
break;
case UserDL.SELECT_ACTIVE :
if (ddd.getRowStatus().equals("A")) includeIt = true;
break;
default :
throw new Biff1AppException(
   "constructorCode: unknown selectionType: "
 + selectionType);
}
if (includeIt) userList.add(ddd);
}
if (userList.size() == 0) {
logger.warn("constructorCode: no data loaded");
}
Collections.sort(userList, new UserDLComparator(sortType));
//logger.debug("constructorCode: data has been loaded from 
DB");
}
/*
*/
public ArrayList getData() {
return userList;
}
/*
* Make an iterator available for the data.
*/
public Iterator getIterator() {
return userList.iterator();
}

class UserDLComparator implements Comparator {
private int sortType;
private String key1;
private String key2;
private UserDO k1;
private UserDO k2;

UserDLComparator(int sortType) {
this.sortType = sortType;
}
   

Validator and LookupDispatchAction

2003-01-10 Thread Phase Web and Multimedia
Has anyone got Validator to work with LookupDispatchActions? I don't see how
it can be done. Is this possible?

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



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




RE: Struts Productivity Survey

2003-01-10 Thread Greg.Reddin
Well, the question was somewhat, but not entirely hypothetical.  The 50 is probably 
more like 30.  The problem is really another "my framework is better than yours" 
debate and we're pushing to use a Struts-based framework going forward instead of a 
home-grown.  One of my tasks is to quantify how long it will take developers to get up 
to speed on Struts to estimate the cost of moving over.

I learned Java, JSP/Servlets, and Struts pretty much all at the same time, and it 
clicked easily for me.  But I learn new things easily and am not intimidated by new 
things.  Others seem to have had varying levels of difficulty picking it up.  The team 
that I worked on back then had little trouble with it.

> -Original Message-
> From: Haseltine, Celeste [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 10:04 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Struts Productivity Survey
> 
> 
> Greg, 
> 
> Wow, I don't envy your assignment.  There is one thing that I 
> have learned
> over the years as both a developer and project manager, 
> people learn at
> different rates, and pick up new skills very differently.
> 
> In the case of the people who only know C++, the transition 
> to Java will not
> be difficult.  If they have had no exposure to HTML and web 
> development,
> then the transition to JSP's will take them a little longer.  
> I've know some
> really good low level C++ programmers who just cannot get the 
> hang of HTML,
> much less the tag library underlying struts.  These guys are 
> better suited
> for the server side and EJB side of development.
> 
> As for the VB programmer, your job is going to much more 
> difficult.  Many of
> the VB programmers I have meet over the past 2 years have had 
> no exposure or
> training in Object Oriented Programming (OO).  Many have 
> moved to VB from
> mainframe jobs that they started back in the 70's and 80's.  
> For those on
> your staff who have had exposure to C++ in college, the move 
> to Java will
> probably be easier than for those on your staff you have come from a
> mainframe background.
> 
> As to Struts, JSP's and the tag libraries.  You are looking 
> at training
> these people in ALL three of these concepts/technology.  I 
> would strongly
> suggest that you start out your training class in JSP's using 
> the Model 1
> concept the first few days, and then introduce Struts and the JSP tag
> libraries for the duration of the training course.
> 
> In all, my experience in training people in a combination of 
> on the job and
> classes has been as follows:
> 
> For those with heavy C++ experience, moving to 
> Java/JSP/Servlets/HMTL took
> about month before these people were productive.
> 
> For those with some exposure to C++ and OO, but no work 
> experience, it took
> about 2 months for these people to be productive.
> 
> For those with no exposure to C++ and OO (mainframe 
> background), it took
> anywhere from 4 months to 9 months before these people were 
> really useful
> and productive in the work environment.  A lot depended on 
> the attitude of
> the person, and their willingness to learn new programming 
> skills AND new
> programming/software concepts, particularly OO.  If you can 
> get over the
> hurdle of the OO concepts, then you are 2/3 of the way there.
> 
> If you add struts and HTML to the equation, I would add an 
> extra 2 to 4
> weeks, before the staff is really productive and useful in the work
> environment.  
> 
> Keep in mind again that people learn at different rates, and 
> that they learn
> in different ways.  The approach you take to exposing and 
> training these
> people may not work for the entire group, and you may need to 
> take extra
> time and try different approaches with some in the group.
> 
> Good luck, this is one assignment that I don't envy you on.  
> 
> Celeste
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 9:40 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Struts Productivity Survey
> 
> 
> Ok, so let me pose it a different way.  Put yourself in this position:
> 
> You're a consultant or an architect who has been tasked with 
> building a
> Struts application with 100 screens.  You're actually migrating an
> application which was originally written as a fat client app 
> in VB and the
> server was written in C++.
> 
> You have about 50 developers who know VB and C++ pretty well. 
>  Some of them
> know Java/JSP/Servlets very well.  Some of them know it very 
> little.  None
> of them know Struts.
> 
> Your job is to estimate the cost of getting these folks up to speed on
> Struts.  You already have the application design.  THere's 
> going to be a
> thin business layer called by the Action classes that will 
> use EJB session
> beans to provide application functionality.  Fairly simple.  
> You have to
> train these people to use Struts, create actions and pages, 
> and write the
> web-tier business layer.  Somebo

Re: Error in testing a Custom Tag

2003-01-10 Thread CFineman

Hi Elma,

You probably need to give folks more background then this (e.g. we are
running under weblogic). From what I can tell it looks like your
application is not properly deployed. If you are still having problems,
stop by and we can chat about it.

Charles Fineman
Systems Architect
Princeton eCom
609 606 3084



|-+>
| |   EMilitante@prince|
| |   tonecom.com  |
| ||
| |   01/09/2003 10:03 |
| |   PM   |
| |   Please respond to|
| |   "Struts Users|
| |   Mailing List"|
| ||
|-+>
  
>--|
  |
  |
  |   To:   "Struts-User (E-mail)" <[EMAIL PROTECTED]>
  |
  |   cc:  
  |
  |   Subject:  Error in testing a Custom Tag  
  |
  
>--|




I'm not sure if this is related to custom tags, but when I created a TLD
file and it's associated objects(class,jsp and updated web.xml), I get the
following error:

   

It doesn't seem to be related to the xxx.jsp file.

Can someone help with this???


Thanks.

CONFIDENTIAL MATERIAL.  This electronic message contains information from
Princeton eCom Corporation, is confidential and may be privileged.  It is
intended for the use of the addressee only.  If you are not the addressee
indicated in this message (or responsible for delivery of the message to
such person), any disclosure, copy, distribution or use of the contents of
this message is prohibited.  Please destroy this message and notify us
immediately if this is the case by sending a reply to this message or by
sending an e-mail to [EMAIL PROTECTED] and by destroying all
copies of this message and any attachments. Thank you.  For more
information about Princeton eCom Corporation, please visit us at
http://www.princetonecom.com




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





CONFIDENTIAL MATERIAL.  This electronic message contains information from
Princeton eCom Corporation, is confidential and may be privileged.  It is
intended for the use of the addressee only.  If you are not the addressee
indicated in this message (or responsible for delivery of the message to
such person), any disclosure, copy, distribution or use of the contents of
this message is prohibited.  Please destroy this message and notify us
immediately if this is the case by sending a reply to this message or by
sending an e-mail to [EMAIL PROTECTED] and by destroying all
copies of this message and any attachments. Thank you.  For more
information about Princeton eCom Corporation, please visit us at
http://www.princetonecom.com


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




Upload problem: Stream ended unexpectedly

2003-01-10 Thread Peter Severin
Hi,

One of our customers has a problem when trying
to upload a large file. We are using struts1.1-b2 with "Apache 
Tomcat/4.1.12-LE-jdk14" with IIS in front of it. We use 
CommonsMultipartRequestHandler class. The upload works as expected for 
others. Have anyone experienced something like that ?

Stacktrace is below.

Thanks,
Peter.

javax.servlet.ServletException: Processing of multipart/form-data request
failed. Stream ended unexpectedly
	at
org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:245)
	at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:934)
	at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:779)
	at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:246)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(Unknown 
Source)
	at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(Unknown 
Source)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:256)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:361)
	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:563)
	at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:535)
	at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:638)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
	at java.lang.Thread.run(Thread.java:536)

root cause

org.apache.commons.fileupload.FileUploadException: Processing of
multipart/form-data request failed. Stream ended unexpectedly
	at 
org.apache.commons.fileupload.FileUpload.parseRequest(FileUpload.java:462)
	at 
org.apache.commons.fileupload.FileUpload.parseRequest(FileUpload.java:304)
	at
org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:234)
	at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:934)
	at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:779)
	at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:246)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servle

Re: Struts Productivity Survey

2003-01-10 Thread V. Cekvenich
In this case, does the consultant/architect:
a. have previous deployed Struts applications,
b. or does the consultant "know of" Struts?

In case a. one should have an idea of how long it takes to train and 
develop. One opinion for time frame range is newbie developers take 
about a few days per MVC, and experienced programers do a few MVCs per 
day (of an average complexity MVC - bean, dao, view, action. 
JasperReports take about the same. Assuming you have decent 
requirements, use an iterative process and have a good DBA). Also, 50 
developers for 100 screens?

In case of choice b. ... lets see nothing comes to mind.

.V





[EMAIL PROTECTED] wrote:
Ok, so let me pose it a different way.  Put yourself in this position:

You're a consultant or an architect who has been tasked with building a Struts application with 100 screens.  You're actually migrating an application which was originally written as a fat client app in VB and the server was written in C++.

You have about 50 developers who know VB and C++ pretty well.  Some of them know Java/JSP/Servlets very well.  Some of them know it very little.  None of them know Struts.

Your job is to estimate the cost of getting these folks up to speed on Struts.  You already have the application design.  THere's going to be a thin business layer called by the Action classes that will use EJB session beans to provide application functionality.  Fairly simple.  You have to train these people to use Struts, create actions and pages, and write the web-tier business layer.  Somebody else is doing the EJB stuff.

How do you estimate that cost?
How long do you think it will take for these various developers to write their first business function?
How long to do the next one, etc?



-Original Message-
From: Andreas Mack [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 12:34 AM
To: Struts Users Mailing List
Subject: Re: Struts Productivity Survey


On Fri, 2003-01-10 at 07:57, Rick Reumann wrote:



easier. I think it's really going be difficult to get an 

accurate feel


for how long it takes people to get 'up to speed' with 

struts since I


think it's much easier now for new developers to learn 

struts simply due


to the books and better documentation available.


I agree 100%. I looked at Struts for the first time in April 
2001 mainly
for the forms stuff, really wanting to use it. I've read the UserGuide
and said "What is he talking about!?" Half a year later, with a real
project at hand it went much faster, using the /example stuff. Back
then there were no DynaForms, no Tiles, no Nested, all the stuff that
makes things much easier now. The pages that are now the Taglib API
Reference were the best resources back then.

Greets,
Andreas.

--
Andreas Mack <[EMAIL PROTECTED]>
mediales. GmbH


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 







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




repost about problem with Declarative Exception in DispatchAction

2003-01-10 Thread Rick Reumann
Sorry for this repost, but I'm still pretty stuck.
Hope someone could help with this..

If I use a normal Action and declare an exception in the action
configuration in the config file, everything works perfectly if that
Exception is thrown.

However, when normally I like to use DispatchAction and I'm having
trouble getting the declarative Exception handling to work in
DispatchAction methods. Apparently just adding the appropriate throws
clause to the DispatchAction method doesn't work. The log will show
that the exception was thrown but the DispatchAction didn't handle it.

Is there something I need to do differently to configure
DispatchAction methods to handle declaritive exceptions?

Thanks for the help?

-- 

Rick
mailto:[EMAIL PROTECTED]


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




Taglib with Dynaforms

2003-01-10 Thread LT Yield
Hello all,

I just started using DynaValidatorForms for my form
beans instead of the traditional way.  But I am having
problems retrieving the bean elements in
html/bean/logic tags.  Do these tags support the
Dynaforms or do I need to alter the tags on my own to
do the appropriate getters and setters for dynaforms?

Any assistance would be greatly appreciated,
Lionel

__
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: html:link tag

2003-01-10 Thread Damm, Gary
I agree, the Map method isn't very straight forward for simply adding
2-3 params to the link.  The only thing to remember with the traditional
method is to encode the parameters.

Thanks,
Gary

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 10, 2003 12:24 AM
To: [EMAIL PROTECTED]
Subject: RE: html:link tag

Easiest way to pass multiple parameters on a html link.


Use the standard anchor tag.


eg:

"/>&salary
nce="/>">

Here the myForm should have indexed getters for empBean

Clas MyForm(){
List empList = new ArrayList();
getEmp(int index){
while(empList.size< index){
empList.add(new EmpBean());
}
return (EmpBean)empList.get(index);
}
}




Very, very ugly but works just fine!

I think the struts way(using map)is not very easy alwqys...


-Original Message-
From: garyd [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:44 AM
To: struts-user
Cc: garyd
Subject: html:link tag


Anyone know if/how to add multiple query parameters using this tag?

ie: www.myserver.com/foo.jsp?id=1&bar=2...

Thanks,
Gary

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

2003-01-10 Thread Dan Tran
I have not done this but I do believe you can write your own masking rule to
check for this condition.

-Dan

- Original Message -
From: "Siggelkow, Bill" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 5:49 AM
Subject: RE: Validator Question


> Doesn't the 'required' validation rule do this?
>
> -Original Message-
> From: Suresh Addagalla [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 12:37 AM
> To: [EMAIL PROTECTED]
> Subject: Validator Question
>
>
> Hi,
>
> I need to validate that the user does not enter only spaces in a
particular text field. Validator framework doesn't seem to providing any
validation directly to achieve this. Do I need to write custom JavaScript,
or is something already available?
>
> Thanks,
> Suresh
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>

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




Re: Session Management

2003-01-10 Thread Puneet Agarwal
Session Management is required to achieve persistence. there are two manner
in which persistence can be achieved.

1. storing the information in HTTP session (possibly in session scope)
2. Storing the information using stateful session beans.

You have to take the decision based on your application's performance
expectations.

The cleaner approach is to define the scope of form as "session" and storing
everything in formbeans, nowhere else.
some readonly information can be stored in application context also.

Well you may choose to store some information in stateful session beans and
some in formbeans (HTTP session) but I would not suggest to keep the scope
of formbeans as "request" unless the screen is totally stateless.

Regards
Puneet

- Original Message -
From: "JONATHAN PHILIP HOLLOWAY" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 4:10 PM
Subject: Session Management


Hi everyone,

I'm wondering about the ways of managing sessions in Struts and wanted
to know out of these two ways which was the better way of doing things:

1. Storing things within the standard servlet session

2. Using a UserWrapper object and storing that within the session.

Is the second way more preformance intensive or not and which is best
practice?

Many thanks,
Jon Holloway.

*-*
 Jonathan Holloway,
 Dept. Of Computer Science,
 Aberystwyth University,
 Ceredigion,
 West Wales,
 SY23 3DV.

 07968 902140
 http://users.aber.ac.uk/jph8
*-*



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




Re: Session Management

2003-01-10 Thread David Graham
Either way is fine.  It's highly unlikely that choice 2 would have any 
noticable performance problems.

David






From: "JONATHAN PHILIP HOLLOWAY" <[EMAIL PROTECTED]>
Reply-To: "JONATHAN PHILIP HOLLOWAY" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Session Management
Date: Fri, 10 Jan 2003 16:10:26 -

Hi everyone,

I'm wondering about the ways of managing sessions in Struts and wanted
to know out of these two ways which was the better way of doing things:

1. Storing things within the standard servlet session

2. Using a UserWrapper object and storing that within the session.

Is the second way more preformance intensive or not and which is best
practice?

Many thanks,
Jon Holloway.

*-*
 Jonathan Holloway,
 Dept. Of Computer Science,
 Aberystwyth University,
 Ceredigion,
 West Wales,
 SY23 3DV.

 07968 902140
 http://users.aber.ac.uk/jph8
*-*



_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail


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



Re: JSTL in Struts

2003-01-10 Thread Craig R. McClanahan


On Fri, 10 Jan 2003, Mouratidis, Georg wrote:

> Date: Fri, 10 Jan 2003 12:29:50 +0100
> From: "Mouratidis, Georg" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: JSTL in Struts
>
> Hi,
>
> im using JSTL with Struts. And some tags are working and some do not.
> i have no idea.
>
>  works
> 
> but if i use
> 
> or
>
> 
> 
>
> the following error appears:
>
> org.apache.jasper.JasperException: 
>/web/views/shared/Organization/OrganizationData.jsp(241,0) Unable to load class import
>
> or
>
> org.apache.jasper.JasperException: 
>/web/views/shared/Organization/OrganizationData.jsp(241,0) Unable to load class parse
>   at 
>org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
>   at 
>org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:417)
>   at 
>org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:219)
>
> how can some class in 
> can somebody help PLEASE
> thx
>

I'd bet you forgot to add the <%@ taglib %> declaration for the XML
library at the top of your page.  JSTL is made up of several tag
libraries, not just one.

  <%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml"; %>

> george

Craig


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




Where to do the "request.setAttribute"code for iterate, select collectionbean (with correct code)

2003-01-10 Thread Jean-Pierre Romeyer
Hello,

To use the iterate, select, ...   I want to put a collection bean in the 
request scope
so the java code is "request.setAttribute("intArray",intArray);"

OK I make it works, but I've got a newbie architecture question


Accordind to struts philosophy but where to put this java code ???

- in the jsp : not really nice , specially if I have to do somme request 
to build the collection
- in the action form reset method : work the first time when the Form bean 
is created but not during folowing jsp  access
- in the action : but must do in every action doing forward to this form
- other 

Thanks
Jean-Pierre ROMEYER, Hardis
tel: (33) (0)4 76 70 80 50  Cityparc - 34 rue de la tuilerie
fax: (33) (0)4 76 21 49 49  38170 Seyssinet-Pariset (France)

http://www.hardis.com 


RE: Where to do the "request.setAttribute"code for iterate, select collection bean

2003-01-10 Thread Siggelkow, Bill
Actually, "request.getSession().setAttribute("intArray",intArray);" will place the 
object in Session scope, not request scope.

As far as where to load the collection into the request scope -- I would say either do 
in in the Action that forwards to the JSP -- if you have one.   Or use a standard 
jsp:useBean tag in the JSP to make the collection available.

-Original Message-
From: Jean-Pierre Romeyer [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 10:58 AM
To: 'Struts Users Mailing List'
Subject: Where to do the "request.setAttribute"code for iterate, select
collection bean


Hello,

To use the iterate, select, ...   I want to put a collection bean in the 
request scope
so the java code is 
"request.getSession().setAttribute("intArray",intArray);"

OK I make it works, but I've got a newbie architecture question


Accordind to struts philosophy but where to put this java code ???

- in the jsp : not really nice , specially if I have to do somme request 
to build the collection
- in the action form reset method : work the first time when the Form bean 
is created but not during folowing jsp  access
- in the action : but must do in every action doing forward to this form
- other 

Thanks

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

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




RE: Session Management

2003-01-10 Thread Nelson, Laird
> -Original Message-
> From: JONATHAN PHILIP HOLLOWAY [mailto:[EMAIL PROTECTED]]
> 1. Storing things within the standard servlet session
> 
> 2. Using a UserWrapper object and storing that within the session.
> 
> Is the second way more preformance intensive or not and which is best
> practice?

I don't know about the performance implications, but the second way is
helpful if you need to delete whole chunks of the session atomically.

Laird

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




RE: Struts Productivity Survey

2003-01-10 Thread Haseltine, Celeste
Greg, 

Wow, I don't envy your assignment.  There is one thing that I have learned
over the years as both a developer and project manager, people learn at
different rates, and pick up new skills very differently.

In the case of the people who only know C++, the transition to Java will not
be difficult.  If they have had no exposure to HTML and web development,
then the transition to JSP's will take them a little longer.  I've know some
really good low level C++ programmers who just cannot get the hang of HTML,
much less the tag library underlying struts.  These guys are better suited
for the server side and EJB side of development.

As for the VB programmer, your job is going to much more difficult.  Many of
the VB programmers I have meet over the past 2 years have had no exposure or
training in Object Oriented Programming (OO).  Many have moved to VB from
mainframe jobs that they started back in the 70's and 80's.  For those on
your staff who have had exposure to C++ in college, the move to Java will
probably be easier than for those on your staff you have come from a
mainframe background.

As to Struts, JSP's and the tag libraries.  You are looking at training
these people in ALL three of these concepts/technology.  I would strongly
suggest that you start out your training class in JSP's using the Model 1
concept the first few days, and then introduce Struts and the JSP tag
libraries for the duration of the training course.

In all, my experience in training people in a combination of on the job and
classes has been as follows:

For those with heavy C++ experience, moving to Java/JSP/Servlets/HMTL took
about month before these people were productive.

For those with some exposure to C++ and OO, but no work experience, it took
about 2 months for these people to be productive.

For those with no exposure to C++ and OO (mainframe background), it took
anywhere from 4 months to 9 months before these people were really useful
and productive in the work environment.  A lot depended on the attitude of
the person, and their willingness to learn new programming skills AND new
programming/software concepts, particularly OO.  If you can get over the
hurdle of the OO concepts, then you are 2/3 of the way there.

If you add struts and HTML to the equation, I would add an extra 2 to 4
weeks, before the staff is really productive and useful in the work
environment.  

Keep in mind again that people learn at different rates, and that they learn
in different ways.  The approach you take to exposing and training these
people may not work for the entire group, and you may need to take extra
time and try different approaches with some in the group.

Good luck, this is one assignment that I don't envy you on.  

Celeste

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 9:40 AM
To: [EMAIL PROTECTED]
Subject: RE: Struts Productivity Survey


Ok, so let me pose it a different way.  Put yourself in this position:

You're a consultant or an architect who has been tasked with building a
Struts application with 100 screens.  You're actually migrating an
application which was originally written as a fat client app in VB and the
server was written in C++.

You have about 50 developers who know VB and C++ pretty well.  Some of them
know Java/JSP/Servlets very well.  Some of them know it very little.  None
of them know Struts.

Your job is to estimate the cost of getting these folks up to speed on
Struts.  You already have the application design.  THere's going to be a
thin business layer called by the Action classes that will use EJB session
beans to provide application functionality.  Fairly simple.  You have to
train these people to use Struts, create actions and pages, and write the
web-tier business layer.  Somebody else is doing the EJB stuff.

How do you estimate that cost?
How long do you think it will take for these various developers to write
their first business function?
How long to do the next one, etc?

> -Original Message-
> From: Andreas Mack [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 12:34 AM
> To: Struts Users Mailing List
> Subject: Re: Struts Productivity Survey
> 
> 
> On Fri, 2003-01-10 at 07:57, Rick Reumann wrote:
> 
> > easier. I think it's really going be difficult to get an 
> accurate feel
> > for how long it takes people to get 'up to speed' with 
> struts since I
> > think it's much easier now for new developers to learn 
> struts simply due
> > to the books and better documentation available.
> 
> I agree 100%. I looked at Struts for the first time in April 
> 2001 mainly
> for the forms stuff, really wanting to use it. I've read the UserGuide
> and said "What is he talking about!?" Half a year later, with a real
> project at hand it went much faster, using the /example stuff. Back
> then there were no DynaForms, no Tiles, no Nested, all the stuff that
> makes things much easier now. The pages that are now the Taglib API

Session Management

2003-01-10 Thread JONATHAN PHILIP HOLLOWAY
Hi everyone,

I'm wondering about the ways of managing sessions in Struts and wanted
to know out of these two ways which was the better way of doing things:

1. Storing things within the standard servlet session

2. Using a UserWrapper object and storing that within the session.

Is the second way more preformance intensive or not and which is best
practice?

Many thanks,
Jon Holloway.

*-*
 Jonathan Holloway,   
 Dept. Of Computer Science,   
 Aberystwyth University, 
 Ceredigion,  
 West Wales,  
 SY23 3DV.
  
 07968 902140 
 http://users.aber.ac.uk/jph8 
*-*



RE: Getting the full path of the context from within an Action class

2003-01-10 Thread Siggelkow, Bill
In answer to your first question, you do not have to write your own ClassLoader -- the 
Class object will load the resource using its ClassLoader -- in other words in your 
Action you would have ...

InputStream xmlStream = this.getClass().getResourceAsStream("/resources/xyz.xml");

I don't know the answer to the second question -- I guess it depends on how are you 
planning on parsing the XML.  If you are using Digester I suggest starting with 
http://jakarta.apache.org/commons/digester.html - there are links to the API 
documentation as well as a couple of good online articles.

-Original Message-
From: Simon Kelly [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 10:47 AM
To: Struts Users Mailing List
Subject: Re: Getting the full path of the context from within an Action
class


Cool.

Looks like the thing I'm after. But I have a couple of questions.

Will I have to write the ClassLoader for this?  If so, do you know of any
examples I could have a look at?
Will the fact that the .xml file has recursive tags ( ie I can have
) in the structure cause any major headaches in turning this
into a loaded bean?

Cheers

Simon

- Original Message -
From: "Siggelkow, Bill" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 4:29 PM
Subject: RE: Getting the full path of the context from within an Action
class


> Simon,
>You should load this resource using the Class object.  Take a look at
the following:
>
>
http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Class.html#getResourceAsSt
ream(java.lang.String)
>
> -Original Message-
> From: Simon Kelly [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 10:19 AM
> To: Struts Users Mailing List
> Subject: Re: Getting the full path of the context from within an Action
> class
>
>
> Thanks Geir,  that was quite useful to know.
>
> What I am trying to do is read in a .xml file from the classes/resources
> directory in an Action class and then to load a bean with it's contents.
I
> have had a look at the ResourceBundle class, but I can't see if that would
> be of any use to me.
>
> Any thoughts??
>
> Cheers, and thanks again,
>
> Simon.
>
> - Original Message -
> From: "Arnesen, Geir" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, January 10, 2003 3:44 PM
> Subject: SV: Getting the full path of the context from within an Action
> class
>
>
> If you ned the path for the WEB-INF, - use a servlet, - which is loaded
> before the struts, by configuring it in the WEB.XML.
>
> In the servlet you execute...
> public static String directory =
> getServletContext().getRealPath("conf");
>
> This returns the physical location of the WEB-INF. You get the location
> from the action classes by accessing the servlet' static variable.
>
> Geir
>
>
>
> -Opprinnelig melding-
> Fra: Simon Kelly [mailto:[EMAIL PROTECTED]]
> Sendt: 10. januar 2003 15:24
> Til: Struts Users Mailing List
> Emne: Getting the full path of the context from within an Action class
>
>
> Hi,
>
> Which would be the better and more portable solution for getting the
> actual path of the API context from within a
> org.apache.struts.action.Action class?
>
> I am looking at either using
> mapping.getPath()
> or
> request.getContextPath()
>
> Are either of these going to give me an absolute (ie
> C:\xxx\yyy\WEB-INF\) path to the context on the local machine?  Or will
> it be a relative URL?
>
> Cheers
>
> Simon
>
> Institut fuer
> Prozessdatenverarbeitung
> und Elektronik,
> Forschungszentrum Karlsruhe GmbH,
> Postfach 3640,
> D-76021 Karlsruhe,
> Germany.
>
> Tel: (+49)/7247 82-4042
> E-mail : [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:

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




Where to do the "request.setAttribute"code for iterate, select collectionbean

2003-01-10 Thread Jean-Pierre Romeyer
Hello,

To use the iterate, select, ...   I want to put a collection bean in the 
request scope
so the java code is 
"request.getSession().setAttribute("intArray",intArray);"

OK I make it works, but I've got a newbie architecture question


Accordind to struts philosophy but where to put this java code ???

- in the jsp : not really nice , specially if I have to do somme request 
to build the collection
- in the action form reset method : work the first time when the Form bean 
is created but not during folowing jsp  access
- in the action : but must do in every action doing forward to this form
- other 

Thanks

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




RE: Struts Productivity Survey

2003-01-10 Thread Jarnot Voytek Contr AU HQ/SC
Holy smokes!  You've got 50 people just to do the web layer???  There's 2.5
of us (only one - me - with Java experience) doing a ~75 screens migration
(all layers - but under the constraint to keep the database unchanged as
much as possible) from a 4GL.

Two weeks to get up to speed on struts, then each developer gets 4 weeks to
develop/test 2 screens.  Add documentation and other misc. and you've got
two months - should be more than enough, I'm being conservative - especially
since you're not worried about the EJB tier.
You could cut this down considerably, if you already are a productive struts
developer just implement a few vertical slices and tell the others to copy
what you've done - you just act as 'tech-support' and they'll learn
on-the-fly.

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


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 9:40 AM
To: [EMAIL PROTECTED]
Subject: RE: Struts Productivity Survey


Ok, so let me pose it a different way.  Put yourself in this position:

You're a consultant or an architect who has been tasked with building a
Struts application with 100 screens.  You're actually migrating an
application which was originally written as a fat client app in VB and the
server was written in C++.

You have about 50 developers who know VB and C++ pretty well.  Some of them
know Java/JSP/Servlets very well.  Some of them know it very little.  None
of them know Struts.

Your job is to estimate the cost of getting these folks up to speed on
Struts.  You already have the application design.  THere's going to be a
thin business layer called by the Action classes that will use EJB session
beans to provide application functionality.  Fairly simple.  You have to
train these people to use Struts, create actions and pages, and write the
web-tier business layer.  Somebody else is doing the EJB stuff.

How do you estimate that cost?
How long do you think it will take for these various developers to write
their first business function?
How long to do the next one, etc?

> -Original Message-
> From: Andreas Mack [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 12:34 AM
> To: Struts Users Mailing List
> Subject: Re: Struts Productivity Survey
> 
> 
> On Fri, 2003-01-10 at 07:57, Rick Reumann wrote:
> 
> > easier. I think it's really going be difficult to get an 
> accurate feel
> > for how long it takes people to get 'up to speed' with 
> struts since I
> > think it's much easier now for new developers to learn 
> struts simply due
> > to the books and better documentation available.
> 
> I agree 100%. I looked at Struts for the first time in April 
> 2001 mainly
> for the forms stuff, really wanting to use it. I've read the UserGuide
> and said "What is he talking about!?" Half a year later, with a real
> project at hand it went much faster, using the /example stuff. Back
> then there were no DynaForms, no Tiles, no Nested, all the stuff that
> makes things much easier now. The pages that are now the Taglib API
> Reference were the best resources back then.
> 
> Greets,
> Andreas.
> 
> -- 
> Andreas Mack <[EMAIL PROTECTED]>
> mediales. GmbH
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Re: Getting the full path of the context from within an Action class

2003-01-10 Thread Simon Kelly
Cool.

Looks like the thing I'm after. But I have a couple of questions.

Will I have to write the ClassLoader for this?  If so, do you know of any
examples I could have a look at?
Will the fact that the .xml file has recursive tags ( ie I can have
) in the structure cause any major headaches in turning this
into a loaded bean?

Cheers

Simon

- Original Message -
From: "Siggelkow, Bill" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 4:29 PM
Subject: RE: Getting the full path of the context from within an Action
class


> Simon,
>You should load this resource using the Class object.  Take a look at
the following:
>
>
http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Class.html#getResourceAsSt
ream(java.lang.String)
>
> -Original Message-
> From: Simon Kelly [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 10:19 AM
> To: Struts Users Mailing List
> Subject: Re: Getting the full path of the context from within an Action
> class
>
>
> Thanks Geir,  that was quite useful to know.
>
> What I am trying to do is read in a .xml file from the classes/resources
> directory in an Action class and then to load a bean with it's contents.
I
> have had a look at the ResourceBundle class, but I can't see if that would
> be of any use to me.
>
> Any thoughts??
>
> Cheers, and thanks again,
>
> Simon.
>
> - Original Message -
> From: "Arnesen, Geir" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, January 10, 2003 3:44 PM
> Subject: SV: Getting the full path of the context from within an Action
> class
>
>
> If you ned the path for the WEB-INF, - use a servlet, - which is loaded
> before the struts, by configuring it in the WEB.XML.
>
> In the servlet you execute...
> public static String directory =
> getServletContext().getRealPath("conf");
>
> This returns the physical location of the WEB-INF. You get the location
> from the action classes by accessing the servlet' static variable.
>
> Geir
>
>
>
> -Opprinnelig melding-
> Fra: Simon Kelly [mailto:[EMAIL PROTECTED]]
> Sendt: 10. januar 2003 15:24
> Til: Struts Users Mailing List
> Emne: Getting the full path of the context from within an Action class
>
>
> Hi,
>
> Which would be the better and more portable solution for getting the
> actual path of the API context from within a
> org.apache.struts.action.Action class?
>
> I am looking at either using
> mapping.getPath()
> or
> request.getContextPath()
>
> Are either of these going to give me an absolute (ie
> C:\xxx\yyy\WEB-INF\) path to the context on the local machine?  Or will
> it be a relative URL?
>
> Cheers
>
> Simon
>
> Institut fuer
> Prozessdatenverarbeitung
> und Elektronik,
> Forschungszentrum Karlsruhe GmbH,
> Postfach 3640,
> D-76021 Karlsruhe,
> Germany.
>
> Tel: (+49)/7247 82-4042
> E-mail : [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:

>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




RE: Struts Productivity Survey

2003-01-10 Thread Greg.Reddin
Ok, so let me pose it a different way.  Put yourself in this position:

You're a consultant or an architect who has been tasked with building a Struts 
application with 100 screens.  You're actually migrating an application which was 
originally written as a fat client app in VB and the server was written in C++.

You have about 50 developers who know VB and C++ pretty well.  Some of them know 
Java/JSP/Servlets very well.  Some of them know it very little.  None of them know 
Struts.

Your job is to estimate the cost of getting these folks up to speed on Struts.  You 
already have the application design.  THere's going to be a thin business layer called 
by the Action classes that will use EJB session beans to provide application 
functionality.  Fairly simple.  You have to train these people to use Struts, create 
actions and pages, and write the web-tier business layer.  Somebody else is doing the 
EJB stuff.

How do you estimate that cost?
How long do you think it will take for these various developers to write their first 
business function?
How long to do the next one, etc?

> -Original Message-
> From: Andreas Mack [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 12:34 AM
> To: Struts Users Mailing List
> Subject: Re: Struts Productivity Survey
> 
> 
> On Fri, 2003-01-10 at 07:57, Rick Reumann wrote:
> 
> > easier. I think it's really going be difficult to get an 
> accurate feel
> > for how long it takes people to get 'up to speed' with 
> struts since I
> > think it's much easier now for new developers to learn 
> struts simply due
> > to the books and better documentation available.
> 
> I agree 100%. I looked at Struts for the first time in April 
> 2001 mainly
> for the forms stuff, really wanting to use it. I've read the UserGuide
> and said "What is he talking about!?" Half a year later, with a real
> project at hand it went much faster, using the /example stuff. Back
> then there were no DynaForms, no Tiles, no Nested, all the stuff that
> makes things much easier now. The pages that are now the Taglib API
> Reference were the best resources back then.
> 
> Greets,
> Andreas.
> 
> -- 
> Andreas Mack <[EMAIL PROTECTED]>
> mediales. GmbH
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

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




RE: Struts Productivity Survey

2003-01-10 Thread Greg.Reddin
Good point.  I agree.

> -Original Message-
> From: Rick Reumann [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 12:58 AM
> To: Struts Users Mailing List
> Subject: Re: Struts Productivity Survey
> 
> 
> The problem with this survey is that the results you would 
> get would not
> be accurate for assessing the time it would take new 
> developers to catch
> on to using Struts at the present time. There is now a lot more
> documentation and examples out there to learn from than there was just
> six months ago. My biggest frustration in the beginning was 
> the lack of
> examples and cohesive documentation of how all the different 
> pieces fit
> together. Most of the learning took place by digging into the examples
> that come with struts and those on Ted's site and then asking 
> questions.
> Now, however, there are several great books out there( Chucks, Ted's,
> etc.) and had I had them when I first started life would have 
> been much
> easier. I think it's really going be difficult to get an accurate feel
> for how long it takes people to get 'up to speed' with struts since I
> think it's much easier now for new developers to learn struts 
> simply due
> to the books and better documentation available.
> 
>  On Thu, 9 Jan 2003 21:20:00 -0600 <[EMAIL PROTECTED]> wrote:
> 
> > I am conducting an informal survey to determine how difficult it is
> > for new developers with differing skills becomve productive with
> > Struts.  This really only applies to those using 1.1x.  
> Anyone who is
> > willing, please answer the following questions:
> >  
> > 1.  How long did it take you to get the Struts Framework up and
> > running for the first time? 2.  How long did it take you to get your
> > first business component going in the Struts Framework 
> (this involves
> > Action class, page, business objects, etc. from start to 
> completion.)
> > 3.  Would you describe your Software Development experience as a)
> > novice, b) advanced, or c) expert? 4.  Would you describe your Java
> > competencies as a) novice, b) advanced, or c) expert? 5.  Would you
> > describe your J2EE/servlet/JSP competencies as a) novice, 
> b) advanced,
> > or c) expert? 6.  What was the hardest part about learning 
> Struts for
> > you?
> >  
> > Thanks.  If the response is interesting I'll compile it and post it
> > back to the list. Greg
> 
> 
> -- 
> Rick
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail: 


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




RE: Getting the full path of the context from within an Action class

2003-01-10 Thread Siggelkow, Bill
Simon,
   You should load this resource using the Class object.  Take a look at the following:

http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Class.html#getResourceAsStream(java.lang.String)

-Original Message-
From: Simon Kelly [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 10:19 AM
To: Struts Users Mailing List
Subject: Re: Getting the full path of the context from within an Action
class


Thanks Geir,  that was quite useful to know.

What I am trying to do is read in a .xml file from the classes/resources
directory in an Action class and then to load a bean with it's contents.  I
have had a look at the ResourceBundle class, but I can't see if that would
be of any use to me.

Any thoughts??

Cheers, and thanks again,

Simon.

- Original Message -
From: "Arnesen, Geir" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 3:44 PM
Subject: SV: Getting the full path of the context from within an Action
class


If you ned the path for the WEB-INF, - use a servlet, - which is loaded
before the struts, by configuring it in the WEB.XML.

In the servlet you execute...
public static String directory =
getServletContext().getRealPath("conf");

This returns the physical location of the WEB-INF. You get the location
from the action classes by accessing the servlet' static variable.

Geir



-Opprinnelig melding-
Fra: Simon Kelly [mailto:[EMAIL PROTECTED]]
Sendt: 10. januar 2003 15:24
Til: Struts Users Mailing List
Emne: Getting the full path of the context from within an Action class


Hi,

Which would be the better and more portable solution for getting the
actual path of the API context from within a
org.apache.struts.action.Action class?

I am looking at either using
mapping.getPath()
or
request.getContextPath()

Are either of these going to give me an absolute (ie
C:\xxx\yyy\WEB-INF\) path to the context on the local machine?  Or will
it be a relative URL?

Cheers

Simon

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [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: 

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




Re: Getting the full path of the context from within an Action class

2003-01-10 Thread Simon Kelly
Thanks Geir,  that was quite useful to know.

What I am trying to do is read in a .xml file from the classes/resources
directory in an Action class and then to load a bean with it's contents.  I
have had a look at the ResourceBundle class, but I can't see if that would
be of any use to me.

Any thoughts??

Cheers, and thanks again,

Simon.

- Original Message -
From: "Arnesen, Geir" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 3:44 PM
Subject: SV: Getting the full path of the context from within an Action
class


If you ned the path for the WEB-INF, - use a servlet, - which is loaded
before the struts, by configuring it in the WEB.XML.

In the servlet you execute...
public static String directory =
getServletContext().getRealPath("conf");

This returns the physical location of the WEB-INF. You get the location
from the action classes by accessing the servlet' static variable.

Geir



-Opprinnelig melding-
Fra: Simon Kelly [mailto:[EMAIL PROTECTED]]
Sendt: 10. januar 2003 15:24
Til: Struts Users Mailing List
Emne: Getting the full path of the context from within an Action class


Hi,

Which would be the better and more portable solution for getting the
actual path of the API context from within a
org.apache.struts.action.Action class?

I am looking at either using
mapping.getPath()
or
request.getContextPath()

Are either of these going to give me an absolute (ie
C:\xxx\yyy\WEB-INF\) path to the context on the local machine?  Or will
it be a relative URL?

Cheers

Simon

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [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: Checking for the existence of errors

2003-01-10 Thread Justin Ashworth
Thank you so much Kris and Bill - the answer was right under my nose.

Thanks,

Justin

- Original Message -
From: "Kris Schneider" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 9:42 AM
Subject: Re: Checking for the existence of errors


>
http://jakarta.apache.org/struts/userGuide/struts-logic.html#messagesPresent
>
> Quoting Justin Ashworth <[EMAIL PROTECTED]>:
>
> > Hi all,
> >
> > Is there an elegant way using Struts / JSTL tags to tell if any errors
are
> > stored in the ActionErrors object before calling  or even
> > ?  If  is going to
> > display
> > something, then I want to put a special header on it.  The default
> > errors.header is insufficient for what I'm doing.
> >
> > I could write my own tag, but before doing so I just want to make sure
I'm
> > not reinventing the wheel.
> >
> > Thanks,
> >
> > Justin
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
>
>
> --
> Kris Schneider 
> D.O.Tech   
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


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




SV: Getting the full path of the context from within an Action class

2003-01-10 Thread Arnesen, Geir
If you ned the path for the WEB-INF, - use a servlet, - which is loaded
before the struts, by configuring it in the WEB.XML.

In the servlet you execute...
public static String directory =
getServletContext().getRealPath("conf");

This returns the physical location of the WEB-INF. You get the location
from the action classes by accessing the servlet' static variable.

Geir



-Opprinnelig melding-
Fra: Simon Kelly [mailto:[EMAIL PROTECTED]] 
Sendt: 10. januar 2003 15:24
Til: Struts Users Mailing List
Emne: Getting the full path of the context from within an Action class


Hi,

Which would be the better and more portable solution for getting the
actual path of the API context from within a
org.apache.struts.action.Action class?

I am looking at either using
mapping.getPath()
or
request.getContextPath()

Are either of these going to give me an absolute (ie
C:\xxx\yyy\WEB-INF\) path to the context on the local machine?  Or will
it be a relative URL?

Cheers

Simon

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [EMAIL PROTECTED]


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Re: Checking for the existence of errors

2003-01-10 Thread Kris Schneider
http://jakarta.apache.org/struts/userGuide/struts-logic.html#messagesPresent

Quoting Justin Ashworth <[EMAIL PROTECTED]>:

> Hi all,
> 
> Is there an elegant way using Struts / JSTL tags to tell if any errors are
> stored in the ActionErrors object before calling  or even
> ?  If  is going to
> display
> something, then I want to put a special header on it.  The default
> errors.header is insufficient for what I'm doing.
> 
> I could write my own tag, but before doing so I just want to make sure I'm
> not reinventing the wheel.
> 
> Thanks,
> 
> Justin
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


-- 
Kris Schneider 
D.O.Tech   

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




RE: Struts application on jboss/jetty

2003-01-10 Thread Siggelkow, Bill
It looks like JBoss has already loaded an old Digester or you have an old copy of 
Commons in your WEB-INF.

-Original Message-
From: Danilo Luiz Rheinheimer [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 10:26 AM
To: Struts Users Mailing List
Subject: Struts application on jboss/jetty


Hello,

  I have a struts working fine on tomcat standalone.
  But when I try to deploy it to JBoss 3.2 with integrated Jetty it
fails.
  This is the error log :

2003-01-10 12:17:43,595 ERROR [org.apache.struts.action.ActionServlet] Parsing error 
processing resource path /WEB-INF/struts-config.xml
java.lang.NoSuchMethodError: org.apache.commons.digester.Rule: method ()V not 
found
at 
org.apache.struts.config.AddDataSourcePropertyRule.(ConfigRuleSet.java:286)
at 
org.apache.struts.config.ConfigRuleSet.addRuleInstances(ConfigRuleSet.java:113)
at org.apache.commons.digester.Digester.addRuleSet(Digester.java:1250)
at 
org.apache.struts.action.ActionServlet.initConfigDigester(ActionServlet.java:1211)
at 
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:923)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219)
at 
org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:422)
at 
org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:142)
at 
org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:490)
at 
org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.java:85)
at org.jboss.jetty.Jetty.deploy(Jetty.java:368)
at org.jboss.jetty.JettyService.performDeploy(JettyService.java:243)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:636)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:600)
at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy7.deploy(Unknown Source)
at 
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:400)
at 
org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:619)
at 
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:472)
at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:195)
at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:206)
at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:185)
2003-01-10 12:17:43,605 INFO  [org.jboss.jbossweb] Stopped 
WebApplicationContext[/SigeaWeb,jar:file:/C:/prg/jboss/server/default/tmp/deploy/server/default/deploy/SigeaWeb.war/46.SigeaWeb.war!/]
2003-01-10 12:17:43,605 INFO  [org.jboss.jbossweb] Deregister 
jboss.web:Jetty=0,JBossWebApplicationContext=2,context=/SigeaWeb
2003-01-10 12:17:43,605 INFO  [org.jboss.jbossweb] Successfully undeployed 
file:/C:/prg/jboss/server/default/tmp/deploy/server/default/deploy/SigeaWeb.war/46.SigeaWeb.war
2003-01-10 12:17:43,605 DEBUG [org.jboss.util.NestedThrowable] 
org.jboss.util.NestedThrowable.parentTraceEnabled=true
2003-01-10 12:17:43,605 DEBUG [org.jboss.util.NestedThrowable] 
org.jboss.util.NestedThrowable.nestedTraceEnabled=false
2003-01-10 12:17:43,605 DEBUG [org.jboss.util.NestedThrowable] 
org.jboss.util.NestedThrowable.detectDuplicateNesting=true
2003-01-10 12:17:43,605 ERROR [org.jboss.deployment.MainDeployer] could not start 
deployment: file:/C:/prg/jboss/server/default/deploy/SigeaWeb.war
org.jboss.deployment.DeploymentException: Parsing error processing resource path 
/WEB-INF/struts-config.xml; - nested throwable: (javax.servlet.UnavailableException: 
Parsing error processing resource path /WEB-INF/struts-config.xml)
at org.jboss.jetty.Jetty.deploy(Jetty.java:390)
at org.jboss.jetty.JettyService.performDeploy(JettyService.java:243)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
at org.jboss.deployment.MainDeployer.deploy(MainDepl

RE: Checking for the existence of errors

2003-01-10 Thread Siggelkow, Bill
If you are Struts 1.1 you can use the  tag.

-Original Message-
From: Justin Ashworth [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 9:37 AM
To: Struts Users Mailing List
Subject: Checking for the existence of errors


Hi all,

Is there an elegant way using Struts / JSTL tags to tell if any errors are
stored in the ActionErrors object before calling  or even
?  If  is going to display
something, then I want to put a special header on it.  The default
errors.header is insufficient for what I'm doing.

I could write my own tag, but before doing so I just want to make sure I'm
not reinventing the wheel.

Thanks,

Justin


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

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




Checking for the existence of errors

2003-01-10 Thread Justin Ashworth
Hi all,

Is there an elegant way using Struts / JSTL tags to tell if any errors are
stored in the ActionErrors object before calling  or even
?  If  is going to display
something, then I want to put a special header on it.  The default
errors.header is insufficient for what I'm doing.

I could write my own tag, but before doing so I just want to make sure I'm
not reinventing the wheel.

Thanks,

Justin


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




RE: turning form parameters into queries

2003-01-10 Thread Siggelkow, Bill
Heather,
In my opinion, the approach you are taking is not separating out your logic 
appropriately.  In fact, it sounds like your are binding your persistence layer 
(database columns) all the way up to the presentation layer (your action forms).  A 
better approach is to separate the model (data) from the view (presentation).  Let 
your action classes (controller) marshall data from the database to the action forms.  
The BeanUtils classes can ease this activity.

Typically what I have are the following:

ActionForms (or DynaActionForms) that represent the form fields
Actions that get the forms and then create business objects from these forms.
At this point I may pass that business object to a Service layer (like a Manager 
object)
The manager object interacts with a DAO (data access object) that performs the actual 
JDBC stuff.

It really is a question of appropriate assigment of responsibilities.

I suggest you read throught the Struts User Guide as well as check out some of the new 
Struts books that are available. 

-Original Message-
From: Heather Buch [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 4:24 AM
To: [EMAIL PROTECTED]
Subject: turning form parameters into queries


Hi all,

Finding a good method to create SQL queries out of html form parameters 
is something I've struggled with for some time now. Is there a good or 
recommended way of doing this? For that matter, is there a "best 
practice" for making SQL queries in struts?

I use a mysql database backend for my struts application. In the 
browser, the user selects some choices from an html form. My Action 
classes collect the information that the user has chosen out of my form 
bean, pretty standard.

The Action class then sends that info back to a corresponding 
BusinessLogic class (BusinessLogic classes reside in a package that does 
not know about struts or servlets, but correspond roughly one 
BusinessLogic class to one Action class).

The BusinessLogic class needs to take those form parameters and create a 
list of "QueryParam" objects, which are then sent to a "SQLMaker" class 
where they are used to build constraints (the stuff after "WHERE" in the 
query) for SQL queries.

In my BusinessLogic classes, I have this method which gets called by my 
Action class:

public void setQueryParams(String querytype, String fieldname, List 
parameters)


The "QueryParam" class is basically just a bean that I iterate through 
when I build the constraint part of the query. It contains these fields:

protected List _values = null;
protected int _datatype = -1;
protected String _colname = null;
protected String _tablename = null;
protected String _singlevalue = null;

xThere are a couple of problems with this.

First, every BusinessLogic class (and there are many because they 
correspond to Action classes) has the information about the form fields, 
and the database struture info that maps to it, hard-coded. Instead of 
being able to create this method once and for all in a superclass of my 
BusinessLogic classes, I have to rewrite this method for every 
BusinessLogic class, because the subclassed BusinessLogic class knows 
about the Action class that calls its "setQueryParams", and therefore 
what html form fields that Action class will use and how they will be 
mapped. That also means that every time I change a form field name, I 
have to make the change in my BusinessLogic class as well.

Which classes should know what? It seems that either my form bean needs 
to know enough to be able to name form fields after database columns, or 
my business logic classes need to know the name of the html form fields, 
and how they map to database column information, to make the constraints.

Would it make sense to cache a copy of the database struture in the 
struts application, and add all the form field mappings to that? Or is 
there a rule for writing html form fields to go into a database (like, 
"html form fields must be named after database columns").

Somewhere the mapping from form field to database column name, and then 
the addition of other information needed to make the QueryParam (and 
therefore the query), needs to be done, (and it would be nice if the 
method could only appear once in the application), but I'm not sure I 
know where.


Thanks,

Heather M. Buch




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

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




Struts application on jboss/jetty

2003-01-10 Thread Danilo Luiz Rheinheimer
Hello,

  I have a struts working fine on tomcat standalone.
  But when I try to deploy it to JBoss 3.2 with integrated Jetty it
fails.
  This is the error log :

2003-01-10 12:17:43,595 ERROR [org.apache.struts.action.ActionServlet] Parsing error 
processing resource path /WEB-INF/struts-config.xml
java.lang.NoSuchMethodError: org.apache.commons.digester.Rule: method ()V not 
found
at 
org.apache.struts.config.AddDataSourcePropertyRule.(ConfigRuleSet.java:286)
at 
org.apache.struts.config.ConfigRuleSet.addRuleInstances(ConfigRuleSet.java:113)
at org.apache.commons.digester.Digester.addRuleSet(Digester.java:1250)
at 
org.apache.struts.action.ActionServlet.initConfigDigester(ActionServlet.java:1211)
at 
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:923)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219)
at 
org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:422)
at 
org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:142)
at 
org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:490)
at 
org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.java:85)
at org.jboss.jetty.Jetty.deploy(Jetty.java:368)
at org.jboss.jetty.JettyService.performDeploy(JettyService.java:243)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:636)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:600)
at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy7.deploy(Unknown Source)
at 
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:400)
at 
org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:619)
at 
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:472)
at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:195)
at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:206)
at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:185)
2003-01-10 12:17:43,605 INFO  [org.jboss.jbossweb] Stopped 
WebApplicationContext[/SigeaWeb,jar:file:/C:/prg/jboss/server/default/tmp/deploy/server/default/deploy/SigeaWeb.war/46.SigeaWeb.war!/]
2003-01-10 12:17:43,605 INFO  [org.jboss.jbossweb] Deregister 
jboss.web:Jetty=0,JBossWebApplicationContext=2,context=/SigeaWeb
2003-01-10 12:17:43,605 INFO  [org.jboss.jbossweb] Successfully undeployed 
file:/C:/prg/jboss/server/default/tmp/deploy/server/default/deploy/SigeaWeb.war/46.SigeaWeb.war
2003-01-10 12:17:43,605 DEBUG [org.jboss.util.NestedThrowable] 
org.jboss.util.NestedThrowable.parentTraceEnabled=true
2003-01-10 12:17:43,605 DEBUG [org.jboss.util.NestedThrowable] 
org.jboss.util.NestedThrowable.nestedTraceEnabled=false
2003-01-10 12:17:43,605 DEBUG [org.jboss.util.NestedThrowable] 
org.jboss.util.NestedThrowable.detectDuplicateNesting=true
2003-01-10 12:17:43,605 ERROR [org.jboss.deployment.MainDeployer] could not start 
deployment: file:/C:/prg/jboss/server/default/deploy/SigeaWeb.war
org.jboss.deployment.DeploymentException: Parsing error processing resource path 
/WEB-INF/struts-config.xml; - nested throwable: (javax.servlet.UnavailableException: 
Parsing error processing resource path /WEB-INF/struts-config.xml)
at org.jboss.jetty.Jetty.deploy(Jetty.java:390)
at org.jboss.jetty.JettyService.performDeploy(JettyService.java:243)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:636)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:600)
at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Metho

Getting the full path of the context from within an Action class

2003-01-10 Thread Simon Kelly
Hi,

Which would be the better and more portable solution for getting the actual
path of the API context from within a org.apache.struts.action.Action class?

I am looking at either using
mapping.getPath()
or
request.getContextPath()

Are either of these going to give me an absolute (ie C:\xxx\yyy\WEB-INF\)
path to the context on the local machine?  Or will it be a relative URL?

Cheers

Simon

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [EMAIL PROTECTED]


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




Re: can we have only one tiles_def.xml?

2003-01-10 Thread dmz

That's great, because that way only one file needs to be sent for translation.
 Cedric Dumoulin <[EMAIL PROTECTED]> wrote:
Hi,

Yes, it is possible. In your tiles-config.xml file, you use the 
property keys:



and in your jsp pages you use the key to retrieve the property from the 
application.properties file:




or :



Check tiles tags syntax to know more about 
(http://jakarta.apache.org/struts/userGuide/struts-tiles.html)

Cedric

dmz wrote:

>We are thinking about using only one tiles_def.xml for all languages by using a 
>message key for the displaying texts int tiles_def.xml. This way perhaps the 
>displaying texts can be put in the application.properties file. Is this possible?
>
>Thank you. 
>
>
>
>-
>Do you Yahoo!?
>Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> 
>


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



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


RE: Accessing .properties resources from within an action class.

2003-01-10 Thread Siggelkow, Bill
Can you give more details on what you are trying to do and why?  Java classes can 
certainly read in property files during runtime.  Read the JavaDocs on the 
java.util.Properties class for details on how to load properties.

-Original Message-
From: Simon Kelly [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:05 AM
To: Struts Users Mailing List
Subject: Accessing .properties resources from within an action class.


Hi,

I have had a look through as much of the examples as I can find on the web
but I have not seen anywhere where the information for a bean is kept in a
resource file and then loaded in using an action class.

Is it possible within struts to do this, or is there another better method,
and does anyone know of an example I could look at?

Regards

Simon

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [EMAIL PROTECTED]


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

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




RE: first action

2003-01-10 Thread Sangeetha Nagarjunan


Am not able to resolve this error - could anyone pls help me thru:
No Action Instance  for path / could be created

The entry in Struts - config.xml is:









Please respond...
Sangeetha Nagarjunan
IT Solutions India Pvt. Ltd.
Bangalore
080 - 6655122 X 2119



   

"Mouratidis,   

Georg"   To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>  
   Subject: RE: first action 

   

01/10/03 04:24 

PM 

Please respond 

to "Struts 

Users Mailing  

List"  

   

   





to extend the RequestProcessor class

something like this:

public class PcxRequestProcessor extends RequestProcessor
{

  protected void processLocale(HttpServletRequest request,
HttpServletResponse response)

you have to have processLocale method.

i use this way to log the acitvities for every request.

hope could help you.

-Original Message-
From: Damm, Gary [mailto:[EMAIL PROTECTED]]
Sent: Freitag, 10. Januar 2003 03:35
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: first action


Sounds more like a PlugIn.  Here are the API docs:
http://jakarta.apache.org/struts/api/org/apache/struts/action/PlugIn.htm
l

You just implement this interface, configure it in your config.xml file
and you're up and running.

Gary

-Original Message-
From: Yan Zhu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 6:26 PM
To: Struts Users Mailing List
Subject: first action



hey guys,

what is the best way to implement a startup action that always will
be executed first before any jsp is hit?

thanks

yan


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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


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






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




RE: Dynamic Forms Problem

2003-01-10 Thread Siggelkow, Bill
Use square brackets '[' instead of parenthesis when you build the 'name' like:

<% for (int i=0; i<10; i++) {
String name = "value(" + i + ")";
%>

<%
}
%>

-Original Message-
From: ashokd [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 5:37 PM
To: Struts Users Mailing List
Subject: Dynamic Forms Problem


MessageHi,

In my application the form fields are dynamic.
For this functionlity in FormAction class I defined the following code:

private final List values = new ArrayList();

public void setValue(int key, Object value) {
values.set(key, value);
}

public Object getValue(int key) {
return values.get(key);
}


How to define these controls in JSP page?


I defined like below:

<% for (int i=0; i<10; i++) {
String name = "value(" + i + ")";
%>

<%
}
%>


But it is throwing exception:

No getter method for property value(0) of bean 
org.apache.struts.taglib.html.BEAN: javax.servlet.jsp.JspException: No getter method 
for property value(0) of bean org.apache.struts.taglib.html.BEAN

Can any one help on this (How to set in JSP page)

Thanks in Advace,

Ashok.D


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




RE: Validator Question

2003-01-10 Thread Siggelkow, Bill
Doesn't the 'required' validation rule do this?

-Original Message-
From: Suresh Addagalla [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 12:37 AM
To: [EMAIL PROTECTED]
Subject: Validator Question


Hi,
 
I need to validate that the user does not enter only spaces in a particular text 
field. Validator framework doesn't seem to providing any validation directly to 
achieve this. Do I need to write custom JavaScript, or is something already available?
 
Thanks,
Suresh


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




RE: Struts forwards requests as http when jsp page was invoked as https

2003-01-10 Thread pantichd

Steve,

I did see that in my search for a solution to my problem. However, I
haven't been able to find any documentation and examples on how to use it.
I've poked around the site and downloaded the sslext-struts1.0-src.zip file
(I'm using struts 1.0). It has source code but no examples or documentation

Do you know where I can find examples and/or documentation?






   
   
  "Steve Vanspall" 
   
   <[EMAIL PROTECTED]>   
   
   cc: 
   
  01/09/2003 06:48 Subject:  RE: Struts forwards requests 
as http 
  PMwhen jsp page was invoked as https 
   
  Please respond to
   
  "Struts Users
   
  Mailing List"
   
   
   
   
   




Hi there,

Have you tried using the SSLext extension for Struts.

I've found it works quite well.

Took a little tweaking but you can use a new type of form called sslext
form. It work like html:form but set the action field to go through the
correct https port.

http://struts.ditlinger.com/

But the main advantage is that you can set action security in
struts-config.

Regards

Steve Vanspall



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, 10 January 2003 10:03 AM
To: [EMAIL PROTECTED]
Subject: Struts forwards requests as http when jsp page was invoked as
https


Hello,

I need help figuring out how to make my struts application work with ssl.
I'll try to give a brief overview of what I'm doing:

I invoke the mai.jsp file using https protocol. No problem there. Links off
that page work fine because they are built as "https://somelink...";.

The problem is that when I click on any of the buttons defined inside a
struts form it pops up a dialog box telling me that I'm about to be
redirected to a connection that is not secure.

If I click yes it goes to that page but the url is now
"http://host:443/somelink...";.

I'm sure there is a way to get struts to build the url using the protocol I
came into the application with but I can't figure it out.

Any help would be greatly appreciated!!

Here are some snippets of the main.jsp, struts-config.xml and java files.


Code snippet from main.jsp file:

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

...

...

...


Snippet from struts-config.xml file:


  
...

...


Snippet from perform method of myAction class:

...
ActionForward forward = mapping.findForward("addDetail");
...
return forward;
...




--
To unsubscribe, e-mail:

For additional commands, e-mail:



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






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




RE: Help:: Indexed properties and form

2003-01-10 Thread shirishchandra . sakhare
just change u r indexed method getPermissionLanguage as follows...

public PermissionLanguageData getPermissionLanguage(int index) {
   while(index >=records().size() ){
this.records.add(new PermissionLanguageData());
}
  return (PermissionLanguageData) records.get(index);
   }

regards,
Shirish
-Original Message-
From: jot [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 12:29 PM
To: struts-user
Cc: jot
Subject: Help:: Indexed properties and form


Hi,

I have successfully created a JSP to output a collection that looks like
this:

   
   
  










%%%
Which will in turn generate:



Italiano










English








%%%
and my form class looks something like:

public final class PermissionForm extends ValidatorForm {

/**
 * The Collection to hold all of the PermissionLanguageData objects
 */
private ArrayList records = null;


/**
 * Standard constructor.
 */
public PermissionForm() {
}


   /**
* Get a specific row from the records  ArrayList, based on index
*
* @param   index The index of the row to retrieve
*/
   public PermissionLanguageData getPermissionLanguage(int index) {
   // a a bit of test code
   System.out.println("index = " + index);
   System.out.println("records.size() = " + records.size());
  return (PermissionLanguageData) records.get(index);
   }

/**
 * Copies the data from the EJB into the form.
 *
 * @param value The Collection of PermissionLanguageData
 */
public void copyFrom( Collection value ) {
records = new ArrayList(value);
this.permission = ((PermissionLanguageData)
records.get(1)).getPermission();
}

/**
 * Returns a Collection of PermissionLanguageData
 *
 * @return The Collection of PermissionLanguageData object
 */
public Collection getPermissionLanguageData() {
return this.records;
}
}

%%%
This part is just what I wanted as it "should" allow me to edit my
recordHowever, I thought that this would work without a problem but I now
have the problem that when I submit my form, the Collection (it's an
ArrayList) that I am trying to populate/edit is empty. How do I ensure that
the ArrayList in my form class that I am submitting to contains the
Collection of objects that I am trying to edit? I am not sure how this would
be done because the form class gets called before the action class. All I
can think of is to add a couple of lines to add a new row into the ArrayList
in the getPermissionLanguage() method.

The error that I am getting is caused by a
java.lang.IndexOutOfBoundsException

Any suggestions that anyone may have would be greatly appreciated as I have
been stuffing around with this for some time now.

thanks

Jordan

p.s. here is the whole stack trace


%
javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1099)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
ava:798)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipe

RE: Detailed error log - Urgent

2003-01-10 Thread Krishnakumar N
Never mind.

The answer is that we test it without tiles, so that the stack trace is
available on the console, sort out the errors and then change the action
path to a tiles definition.

This particular error was a NoClassDefFoundError, actually.

Cheers,
Krishna

-Original Message-
From: Krishnakumar N [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 5:10 PM
To: Struts Users Mailing List (E-mail)
Subject: Detailed error log - Urgent


I am using Struts, tiles and JSTL in our web layer. Whenever there is an
error in the jsp component, the error message is usually very cryptic, for
example, 

"[ServletException in:/JSPcode/directory/viewDirectoryEntry.jsp]
javax/servlet/jsp/jstl/core/Config'"

How can I get detailed error information?



Cheers,
Krishna

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




DynaActionForm.reset and booleans

2003-01-10 Thread Gemes Tibor
I am hesitating updating to beta3

I see in beta3 changelog that the reset behaviour has changed. I extended the 
DynaActionBean to choose which bean properties should be reseted (with the 
help os set-property tag in struts-config).

Afaik the boolean properties (assigned to a checkbox) should be reseted to 
false. This was the main reson for extending it and not just simply write an 
empty reset. 

What is the preferred way of resetting boolean properties  in the new beta 
release?

Tia,

Tib


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




Declarative Exception Handling

2003-01-10 Thread Suresh Addagalla
Title: Message



Hi,
 
If I 
am using Declarative exception handling, is it possible to extract some 
information from the exception object and display the same on the browser? Or is 
it that I need to use programmatic exception handling if I have such 
requirements?
 
Thanks,
Suresh
**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***


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


Detailed error log - Urgent

2003-01-10 Thread Krishnakumar N
I am using Struts, tiles and JSTL in our web layer. Whenever there is an
error in the jsp component, the error message is usually very cryptic, for
example, 

"[ServletException in:/JSPcode/directory/viewDirectoryEntry.jsp]
javax/servlet/jsp/jstl/core/Config'"

How can I get detailed error information?



Cheers,
Krishna

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




JSTL in Struts

2003-01-10 Thread Mouratidis, Georg
Hi,

im using JSTL with Struts. And some tags are working and some do not.
i have no idea.

 works



the following error appears:

org.apache.jasper.JasperException: 
/web/views/shared/Organization/OrganizationData.jsp(241,0) Unable to load class import

or

org.apache.jasper.JasperException: 
/web/views/shared/Organization/OrganizationData.jsp(241,0) Unable to load class parse
at 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
at 
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:417)
at 
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:219)

how can some class in mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 




Help:: Indexed properties and form

2003-01-10 Thread Jordan Thomas
Hi,

I have successfully created a JSP to output a collection that looks like
this:

   
   
  










%%%
Which will in turn generate:



Italiano










English








%%%
and my form class looks something like:

public final class PermissionForm extends ValidatorForm {

/**
 * The Collection to hold all of the PermissionLanguageData objects
 */
private ArrayList records = null;


/**
 * Standard constructor.
 */
public PermissionForm() {
}


   /**
* Get a specific row from the records  ArrayList, based on index
*
* @param   index The index of the row to retrieve
*/
   public PermissionLanguageData getPermissionLanguage(int index) {
   // a a bit of test code
   System.out.println("index = " + index);
   System.out.println("records.size() = " + records.size());
  return (PermissionLanguageData) records.get(index);
   }

/**
 * Copies the data from the EJB into the form.
 *
 * @param value The Collection of PermissionLanguageData
 */
public void copyFrom( Collection value ) {
records = new ArrayList(value);
this.permission = ((PermissionLanguageData)
records.get(1)).getPermission();
}

/**
 * Returns a Collection of PermissionLanguageData
 *
 * @return The Collection of PermissionLanguageData object
 */
public Collection getPermissionLanguageData() {
return this.records;
}
}

%%%
This part is just what I wanted as it "should" allow me to edit my
recordHowever, I thought that this would work without a problem but I now
have the problem that when I submit my form, the Collection (it's an
ArrayList) that I am trying to populate/edit is empty. How do I ensure that
the ArrayList in my form class that I am submitting to contains the
Collection of objects that I am trying to edit? I am not sure how this would
be done because the form class gets called before the action class. All I
can think of is to add a couple of lines to add a new row into the ArrayList
in the getPermissionLanguage() method.

The error that I am getting is caused by a
java.lang.IndexOutOfBoundsException

Any suggestions that anyone may have would be greatly appreciated as I have
been stuffing around with this for some time now.

thanks

Jordan

p.s. here is the whole stack trace


%
javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1099)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
ava:798)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(Standard

[FRIDAY][OT] Driving on the wrong side of the road...

2003-01-10 Thread Andrew Hill
While looking for some info on i18n I came across this. Quite an amusing
distraction. Ive always wondered why Americans drive on the wrong side of
the road. Now I know... ;-)

http://www.i18nguy.com/driver-side.html

(This is part of the i18nGuy website at http://www.i18nguy.com/ )


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




Multiple apps and class loaders

2003-01-10 Thread Kevin A. Palfreyman


Hi folks,

I have been having some problems developing multiple similar applications with regards 
to classloaders.

I'm using Tomcat 4.1.18, and struts 1.1b3 (b2 was the same).

What I have discovered is that everything is fine if I package all of the struts Jars 
in each of my applications, but that there are problems if I put the struts jars in 
the tomcat $CATALINA_HOME/shared/lib.

I have two (actually multiple) applications (app1 and app2) that are extremely similar 
and happen to define Form classes which have the same class name (say "FormA").  These 
form classes are used as fields of a DynaActionForm.  

When the struts jars are shared I get classloader issues with symptoms such as:
"Object of type FormA cannot be assigned to variable of type FormA"

Now if I'm following correctly, this is because the first application that tomcat 
discovers is initialised and it's struts-config is read.  The dyna-form is created in 
the parent (shared) class loader, and is using the class definition for FormA as found 
by the child classloader for app1.  Afterwards, app1 can be used successfully.  As 
tomcat continues the initialisation, it reads the config for app2 and attempts to init 
a dyna-form, but finds it already has one so uses that (?).  When I attempt to use 
app2 I get the above error because although the two FormA classes are byte for byte 
identical, they were loaded by different child classloaders.

Is there any way around this problem, other than by including all of the struts jars 
in each of my applications?  What are the minimum jars I could get away with?

Packaged without struts each of my little apps is around 120KB.
Packaged with struts each of my little apps is around 1.5MB.

I know disk space is cheap these days, but I was trying to keep things as lightweight 
as possible for each new application we add to the server.

(thankfully I seem to be able to share my 4MB jacorb corba library rather than 
packaging that with each web-app!)

Is there a way to share the struts libraries so that what I am trying to do will work?

Thanks,

Kev

---
Dr. Kevin Palfreyman  
Apama (UK) Ltd,  Cambridge, UK




RE: first action

2003-01-10 Thread Mouratidis, Georg
to extend the RequestProcessor class

something like this:

public class PcxRequestProcessor extends RequestProcessor
{
  
  protected void processLocale(HttpServletRequest request,
HttpServletResponse response)

you have to have processLocale method.

i use this way to log the acitvities for every request.

hope could help you.

-Original Message-
From: Damm, Gary [mailto:[EMAIL PROTECTED]]
Sent: Freitag, 10. Januar 2003 03:35
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: first action


Sounds more like a PlugIn.  Here are the API docs:
http://jakarta.apache.org/struts/api/org/apache/struts/action/PlugIn.htm
l

You just implement this interface, configure it in your config.xml file
and you're up and running.

Gary

-Original Message-
From: Yan Zhu [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 09, 2003 6:26 PM
To: Struts Users Mailing List
Subject: first action



hey guys,

what is the best way to implement a startup action that always will
be executed first before any jsp is hit?

thanks

yan


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

2003-01-10 Thread Cedric Dumoulin


 Hi,

 The "Cannot find bean org.apache.struts.taglib.html.BEAN in any scope' 
error is usually caused by a struts tag which doesn't find its needed 
bean. For example it can be caused by a  tag. Do you have 
such tag in "c_search_form.jsp" ? I suppose the answer is yes.
 The beans needed by struts tags are set in appropriate context by the 
struts RequestProcessor, which is called automatically when you hit an 
struts action address (*.do).
 To be short, to use a struts html tag, you need to go throw a struts 
action. So, if your "c_search_form.jsp" page have such tag, you need to 
access it throw an associated struts action which then forward to the jsp.
 Then, you specify the action URL in the tiles definition instead of 
the jsp url.

   Cedric


Juri Smarschevski wrote:

hi all,

have a problem with tile's scopes. (struts-1.1-b2)

my simple tiles structure looks as follows:
[tiles-defs.xml]

 
 
 
 
 
 



 



 path="/WEB-INF/tiles/layout_search_alb_body.jsp">
 
 



[layout_search_alb_body.jsp]
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>


[c_search_form.jsp]
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
hi from search form

the called jsp-page is [alb_search.jsp]
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>


and the c_search_form.jsp throws the exception
[ServletException in:/WEB-INF/contents/c_search_form.jsp] Cannot find
bean org.apache.struts.taglib.html.BEAN in any scope'
cause by the line
<%@ taglib uri="/tags/struts-html" prefix="html" %>

Any ideas why ? Have I (can I) to define a scope in the tiles
definitions ?
The http://jakarta.apache.org/struts/userGuide/struts-tiles.htm
did not help me at this point. Any RTFM-links are welcome ;-)

thx in advance and regards,
juri







--
To unsubscribe, e-mail:   

For additional commands, e-mail: 





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




tiles scope

2003-01-10 Thread Juri Smarschevski
hi all,

have a problem with tile's scopes. (struts-1.1-b2)

my simple tiles structure looks as follows:
[tiles-defs.xml]

 
 
 
 
 
 



 



 
 



[layout_search_alb_body.jsp]
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>


[c_search_form.jsp]
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
hi from search form

the called jsp-page is [alb_search.jsp]
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>


and the c_search_form.jsp throws the exception
[ServletException in:/WEB-INF/contents/c_search_form.jsp] Cannot find
bean org.apache.struts.taglib.html.BEAN in any scope'
cause by the line
<%@ taglib uri="/tags/struts-html" prefix="html" %>

Any ideas why ? Have I (can I) to define a scope in the tiles
definitions ?
The http://jakarta.apache.org/struts/userGuide/struts-tiles.htm
did not help me at this point. Any RTFM-links are welcome ;-)

thx in advance and regards,
juri







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




turning form parameters into queries

2003-01-10 Thread Heather Buch
Hi all,

Finding a good method to create SQL queries out of html form parameters 
is something I've struggled with for some time now. Is there a good or 
recommended way of doing this? For that matter, is there a "best 
practice" for making SQL queries in struts?

I use a mysql database backend for my struts application. In the 
browser, the user selects some choices from an html form. My Action 
classes collect the information that the user has chosen out of my form 
bean, pretty standard.

The Action class then sends that info back to a corresponding 
BusinessLogic class (BusinessLogic classes reside in a package that does 
not know about struts or servlets, but correspond roughly one 
BusinessLogic class to one Action class).

The BusinessLogic class needs to take those form parameters and create a 
list of "QueryParam" objects, which are then sent to a "SQLMaker" class 
where they are used to build constraints (the stuff after "WHERE" in the 
query) for SQL queries.

In my BusinessLogic classes, I have this method which gets called by my 
Action class:

public void setQueryParams(String querytype, String fieldname, List 
parameters)


The "QueryParam" class is basically just a bean that I iterate through 
when I build the constraint part of the query. It contains these fields:

protected List _values = null;
protected int _datatype = -1;
protected String _colname = null;
protected String _tablename = null;
protected String _singlevalue = null;

xThere are a couple of problems with this.

First, every BusinessLogic class (and there are many because they 
correspond to Action classes) has the information about the form fields, 
and the database struture info that maps to it, hard-coded. Instead of 
being able to create this method once and for all in a superclass of my 
BusinessLogic classes, I have to rewrite this method for every 
BusinessLogic class, because the subclassed BusinessLogic class knows 
about the Action class that calls its "setQueryParams", and therefore 
what html form fields that Action class will use and how they will be 
mapped. That also means that every time I change a form field name, I 
have to make the change in my BusinessLogic class as well.

Which classes should know what? It seems that either my form bean needs 
to know enough to be able to name form fields after database columns, or 
my business logic classes need to know the name of the html form fields, 
and how they map to database column information, to make the constraints.

Would it make sense to cache a copy of the database struture in the 
struts application, and add all the form field mappings to that? Or is 
there a rule for writing html form fields to go into a database (like, 
"html form fields must be named after database columns").

Somewhere the mapping from form field to database column name, and then 
the addition of other information needed to make the QueryParam (and 
therefore the query), needs to be done, (and it would be nice if the 
method could only appear once in the application), but I'm not sure I 
know where.


Thanks,

Heather M. Buch




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



Re: Tiles and tab like style

2003-01-10 Thread Cedric Dumoulin

 Hi,

 It is possible to use action URLs in the tiles tabs. Simply specify 
the action url as link. Your action's forward should NOT do a redirect.
 If this doesn't work, you have to modify the tabsLayout.jsp. Open 
tabsLayout.jsp and locate the following lines:

 String href = request.getRequestURI() + "?"+parameterName + "=" + index;
   // Don't add request URI prefix , but let the client compute the 
original URL
   // This allows to use a Struts action as page URL, and perform a 
forward.
   // Bug reported by Don Peterkofsky
 //String href = "" + "?"+parameterName + "=" + index;

 Comment the first one and uncomment the latest one. You tabsLayout 
should now work with actions, but no more with jsp or html URL ;-(
  We have to found a better solution for this problem.  If someone as a 
proposal ...

   Cedric

Jim Theodoridis wrote:

Hi!

In the tiles-doc there is an example with tabs. On the tiles-example-def.xml defines the pages that displayed when choose a tab. I want to substitute those pages with Actions is it possible?
.

 
 

   
 
  
  
 

  
 


   
 
link="/index.jsp" />


Can I substitute index.jsp whith showList.do ?
I' ve try but I comfused very much. Is there an example with actions?

ThAnx

Jim Theodoridis

 



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




Re: can we have only one tiles_def.xml?

2003-01-10 Thread Cedric Dumoulin

 Hi,

 Yes, it is possible. In your tiles-config.xml file, you use the 
property keys:

and in your jsp pages you use the key to retrieve the property from the 
application.properties file:

 
 

or :
 
 

 Check tiles tags syntax to know more about  
(http://jakarta.apache.org/struts/userGuide/struts-tiles.html)

  Cedric

dmz wrote:

We are thinking about using only one tiles_def.xml for all languages by using a message key for the displaying texts int tiles_def.xml. This way perhaps the displaying texts can be put in the application.properties file. Is this possible?

Thank you. 



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



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




RE: value="" question

2003-01-10 Thread Mouratidis, Georg

>property="section.name"/>.

>But this code doesn't work:
>
>
>property="section.name"/>" />

of course not.
 writes an output in the http-stream.

but you want to give the attribute value a value.
so you can define with  a variable and use this variable
to assign to the value-attribut.

i dont know another way, sorry.


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




RE: html:link tag

2003-01-10 Thread shirishchandra . sakhare
Easiest way to pass multiple parameters on a html link.


Use the standard anchor tag.


eg:

"/>&salary
nce="/>">

Here the myForm should have indexed getters for empBean

Clas MyForm(){
List empList = new ArrayList();
getEmp(int index){
while(empList.size< index){
empList.add(new EmpBean());
}
return (EmpBean)empList.get(index);
}
}




Very, very ugly but works just fine!

I think the struts way(using map)is not very easy alwqys...


-Original Message-
From: garyd [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:44 AM
To: struts-user
Cc: garyd
Subject: html:link tag


Anyone know if/how to add multiple query parameters using this tag?

ie: www.myserver.com/foo.jsp?id=1&bar=2...

Thanks,
Gary

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



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




[info] Ignore mail : Accessing .properties resources from within an action class.

2003-01-10 Thread Simon Kelly
Hi all,

Sorry about the last mail.  It's too early in the morning.  Got a bit
confused with the question I wanted to ask, I actually had the example code
infront of my face while writing the mail.

I hang my head in shame.

Cheers

Simon

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [EMAIL PROTECTED]


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




Accessing .properties resources from within an action class.

2003-01-10 Thread Simon Kelly
Hi,

I have had a look through as much of the examples as I can find on the web
but I have not seen anywhere where the information for a bean is kept in a
resource file and then loaded in using an action class.

Is it possible within struts to do this, or is there another better method,
and does anyone know of an example I could look at?

Regards

Simon

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [EMAIL PROTECTED]


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