Doing a sendRedirect from an Action

2002-07-09 Thread James Turner

Question of the morning:

I'm in an Action, and I decide that I need to redirect off the current 
application (say to cnn.com)  I can't do it with a forward because they 
only work inside the current application.

My initial instinct is to do a response.sendRedirect inside the Action, but 
this brings up the question of what to return?  null?

James


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




RE: Doing a sendRedirect from an Action

2002-07-09 Thread James Turner

Never mind, good case of RTFJ (read the friendly Javadoc).  You know, 
there's nothing like writing a book to really make you probe all the nooks 
and crannies of a technology...

 From Action.perform:

Process the specified HTTP request, and create the corresponding HTTP 
response (or forward to another web component that will create it). Return 
an ActionForward instance describing where and how control should be 
forwarded, or null if the response has already been completed.

James


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




Re: [ARTICLE] Using JAAS and Struts

2002-07-09 Thread @Basebeans.com

Subject: Re: [ARTICLE] Using JAAS and Struts
From: "Sebastian Millies" <[EMAIL PROTECTED]>
 ===
You're right that there is as yet no standard and portable way of
integrating JAAS with container-based security. Different vendors
approach this problem differently. So it's either

1) select a container vendor who offers a solution and stick with it
(e.g. JBoss)
or
2) roll your own JAAS-based security, even if it means not using
much of the container-based mechanisms.

Again, I am sure that this will be addressed in a future J2EE spec.

-- Sebastian

"Phase Web and Multimedia" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]...
> This all sounds great if you are running only one app on Tomcat. I don't
see
> where it addresses having webapp level control of url mappings. It sounds
to
> me like JAAS serves well on a container level/single app level. But in a
> shared hosting environment where you need to have specific webapps with
> their own set of permissions and their own user info database/ldap/etc...
it
> wont' suffice. Am I wrong? Because if I am I need to be using this for my
> Struts apps. I saw a spec that seems to address this better (I think).
>
> Here is the link:
> Java Authorization Contract for Containers:
>
ftp://ftp.java.sun.com/pub/spec/java_authorization_contract/POqt9333BB/jacc-
> 1_0-prd-spec.pdf
>
> 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: Doing a sendRedirect from an Action

2002-07-09 Thread @Basebeans.com

Subject: Re: Doing a sendRedirect from an Action
From: "Sebastian Millies" <[EMAIL PROTECTED]>
 ===
yep. -- Sebastian

"James Turner" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]...
> Question of the morning:
>
> I'm in an Action, and I decide that I need to redirect off the current
> application (say to cnn.com)  I can't do it with a forward because they
> only work inside the current application.
>
> My initial instinct is to do a response.sendRedirect inside the Action,
but
> this brings up the question of what to return?  null?
>
> James
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>



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




shouldn't html taglib support _ALL_ HTML 4.x default attributes?

2002-07-09 Thread @Basebeans.com

Subject: shouldn't html taglib support _ALL_ HTML 4.x default attributes?
From: Serge Shikov <[EMAIL PROTECTED]>
 ===
Hello,

I mean - id, lang, class, and many other attributes, defined in HTML 4.x 
specs? Why I coudn't specify id or class in  to do some DHTML 
tricks later?


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




ActionError() question

2002-07-09 Thread r2d2onsteroids

Hello,

I have a question regarding the ActionError method.

When I have a form used for creating a new user, I can use the 
ActionErrors method in the UserForm class for validating the inserted 
values for this new user. The UserAction class then actually creates 
a new user with the values specified, and creates a new User bean 
(this bean does not exist at the time the values for this new user 
are entered). This works flawlessly.
However, when I want to edit the values for an existing user, I have 
a form with input fields populated by a User bean. When I want to 
validate the values entered for this existing user, I can validate 
these values, and on error it returns to my jsp form page. But at 
this time, no User bean has been instantiated:

   javax.servlet.ServletException: Cannot find bean User in scope null

I can understand this message since the validation takes place in the 
UserForm class opposed to the UserAction class, and no User bean has 
been instantiated yet. 
Am I something missing here or am I taking the wrong approach?

Any help would be greatly appreciated!

With kind regards,

Robin van het Hof
Netherlands Board of Tourism


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




problem with error messages

2002-07-09 Thread Jonathan Corbin

Hello,

I am getting the following error message on one of my
jsps:

javax.servlet.ServletException: Exception creating
bean of class com.valleyrec.toteboard.beans.Toteboard:
{1}

I know from browsing the struts source that the {1}
should be the forward.forward property from
org.apache.struts.taglib.logic.LocalProperties.properties.
 That message is:

Exception forwarding for name {0}: {1}

with the {0} and {1} replaced by parameters.  I've had
this problem across multiple versions of struts
(including today's cvs and a few daily builds from
last week).  Does anyone know why I'm not getting the
correct error messages?  Could this be a bug, or do I
have some sort of configuration error?

Jonboy Corbin

__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




container managed security

2002-07-09 Thread Jürgen Weber



Hello,

I am into evaluating Struts.

The struts-example.war does authentication for its users programmatically.

Why doesn't it use container managed security?

Wouldn't it be simpler (not having to reenvent the wheel), safer (the 
container will do it better)
and standards compliant (servlet specification chap. 12) ?
Especially for enterprise applications that often use LDAP to authenticate 
users
container managed security is very powerful if an application server 
supports an LDAP realm.

Instead the Newbie FAQ (http://jakarta.apache.org/struts/newbie.html) links 
to 
(http://www.mail-archive.com/struts-user@jakarta.apache.org/msg24504.html) 
three other ways,
that do not use the standard features of the container.

The downpart of container managed security mentioned in 
[htttp://www.jguru.com/faq/view.jsp?EID=471952]

"The only downside to this approach is that there is not yet a standardized 
API for portably accessing and maintaining a "database" of users and roles 
("database" is in quotes because the actual implementation could be 
anything, including static text files or directory servers)."

is not a downside, because security is a sub-modul of the container and does 
not have/need a standard API to the web application.

Thank you,
Juergen


_
Testen Sie MSN Messenger für Ihren Online-Chat mit Freunden: 
http://messenger.msn.de


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




RE: More that one application resource file

2002-07-09 Thread Rajeshwar Rao V

yes..you can do it.
But u have to extend Struts framework for that
u need to write MultiBundleActionservlet which extends Action Servlet...
and need to override protected void initApplication () of Action Servlet.
write meta properties file..which contains properties for property files...


if u want i can send out source...

enjoy!

raj

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 08, 2002 11:13 PM
To: Struts Users Mailing List
Subject: Re: More that one application resource file




On Mon, 8 Jul 2002, Struts Newsgroup wrote:

> Date: Mon, 8 Jul 2002 10:40:03 -0700
> From: Struts Newsgroup <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: More that one application resource file
>
> Subject: More that one application resource file
> From: Davor Cengija <[EMAIL PROTECTED]>
>  ===
> Is it possible, and if yes, how, to have more than one application
resource
> file in a single application?
>
> I'm working on a project where diffrerent people at different levels
> maintain a set of messages and translations and it's became very
> complicated to have all the jsp's and application resources in sync. What
> I'd like to have is appRes1.properties, appRes2.properties (and with
locale
> extensions) and to use them just as they were merged into one
> appRes.properties file.
>

Can't you do the merging as part of your build process?  Using "cat"
(Unix) or "copy" (Windows) in a build script would seem like an easy
solution to this.

> --
> Davor Cengija
> [EMAIL PROTECTED]
> =
> "Nicht in die Augen bringen!"

Craig


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Validation downfalls?

2002-07-09 Thread brockheinz

Hello Everyone,

Forgive me if this topic has been previousy posted, and please point me to
the appropriate posts.  I have been working with the Struts validation
framework, and so far I like what I see.  I've also dug into the
struts-validator.war project and I have a good idea of what is going on
there.  In my project, I will be working with a pretty standard form (name,
address, credit card field, etc), but the functionality may be extended at
a later time.  I am curious... are there any limitations that anyone has
come across when using the framework?  And if so, have there been any posts
to common problems.  Thanks in advance

Brock




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




RE: DynaActionForm Advantages

2002-07-09 Thread Eddie McGreggor

But are DynaActionForm's compatible with JSTL?

A discussion on taglibs-user made me think not:
http://marc.theaimsgroup.com/?l=taglibs-user&m=102433015725228&w=2

Eddie

>On Mon, 8 Jul 2002 [EMAIL PROTECTED] wrote:
>
>>
>> Tell me again why I should use the standard form beans?
>>
>>
>> I'm trying to understand because it seems to add complexity having two
>> different ways of doing Form Beans. Why not polish up the Dyna bean stuff
>> and then dump (er, deprecate) normal Form Beans?
>>
>
>If DynaActionForm had been around from the very beginning, I doubt we
>would have ever invented the standard ActionForm bean approach.  At the
>same time, I can't necessarily justify deprecating something that 100% of
>existing 1.0 applications are required to use, especially when the rest of
>Struts doesn't care at all which way you do things -- and you can even
>make your Actions not care if you use PropertyUtils methods to get and set
>the property values.
>
>> One advantage I will give the normal Form Beans is that they are easier for
>> a newbie to pick up and learn. They shorten the learning curve to get
>> productive with Struts initially. But if DynaBeans were made to be very
>> easy, then this advantage may disappear as well.
>>
>
>It's also a little premature to conclude that DynaActionForm beans are
>good replacements for all scenarios where standard ActionForm beans are
>currently used - at least in a 1.1 time frame.  We need more real world
>experience with them to validate this first.
>
>>
>>
>> Kevin
>>
>
>Craig


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


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




Re: DynaActionFormBean Advantages -- Complicates JSTL usage?

2002-07-09 Thread Stuart Robertson

This is really a question, since I'm not familiar with the details of how 
DynaBretheren pull off their magic.

To what extent does reliance on DynaActionForm beans tie the view impl to using Struts 
tags?  Does using DynaStuff require that tags use the commons introspection utils?  
Specifically, would a JSTL-based set of tags see Dyna properties as regular properties?

If DynaActionForms don't trick the regular introspection mechanisms into thinking they 
have javabean properties, then I would consider that a major disadvantage.  JSTL is 
compelling...


Regarding cool tag developments, if Craig is reading this, is there any info you can 
share about JSR 127?  I know your team's working hard on it now.  One question I have 
in particular (if I may :-) is that it seems a framework using Faces would have 
controller logic interacting with these gui components/widgets.  Given that none of 
the servlet frameworks were built with Faces in mind, upon its release will any of our 
favorite frameworks be able to use it without major refactoring?  ...ok, I have lots 
of other questions, but will go back to pretending to wait paitiently like everybody 
else.




Tomcat 4 cross ServletContext attributes and standalone server

2002-07-09 Thread dbt1

I curently have 2 issues and hope someone may quickly point me to the right
solutions.
Environment: Tomcat 4.03, Struts 1.1

Issue 1: Tomcat standalone to serve other file types such as .pdf .ppt .doc
Previously I use Apache as a web server connected to Tomcat 3.3 for jsp
pages. URLs to the above file types work fine. Changing to Tomcat 4
standalone, everything is great with jsp, but Tomcat web server does not
recognize and serve the other file types. I expect appropriate setting of
file types would sold this problem so Tomcat Standalone will be appropriate
for mostly dynamic jsp site without using Apache and connectors.

Issue 2: Using ServletContext attributes as global variables accross web
applications within the same virtual host and across different virtual
hosts. My arrangement is as follows:

VirtualHost1/ROOT/mainApp
   /sub1/subApp1
VirtualHost2/ etc.

ServletContext attributes set in subApp1 are alive and available to subApp1.
>From mainApp, I need to get attributes in subApp1. From mainApp, I access
Struts 1.1 ActionServlet and get to its ServletContext
(getServlet().getServletContext()). From mainApp ServletContext, I get to
subApp1 ServletContext with getContext("/subApp1") and to get the required
attributes of subApp1, which I know they are there and not null as tested
from subApp1 ServletContext. The whole code  is:

(MyPlugIn) myPlugIn = (MyPlugIn)
((getServlet().getServletContext()).getContext("/subApp1")).getAttribute(myP
lugIn);

This line of code gives null value from both mainApp and subApp1
ServletContext. I did explicitly set appropriate docBase and
crossContext="true" for both mainApp and subApp1 in tomcat4 server.xml

The question are:
1) How do I get global variables across web applications within 1
virtual host and across virtual hosts using Tomcat 4 container?
2) Is there a better method for sharing global variables across web
applications within the same virtual host, and across virtual hosts in the
same server?
3) What is the best approach to scale from the above scenario to
distributed environment?
4) If Ldap is used for global variable distributed environment, what is
the best design for mostly read and few updates of JavaBeans to Ldap, both
for performance and security.

Any help is greatly appreciated. Thanks.


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




AW: To Manfred Wolff < Struts + EJB ? >

2002-07-09 Thread Manfred Wolff

Hi Boney.

We use in our project:

Struts 1.1b (Release not nightly build)
Tomcat 4.0.3
JBoss  3.0 (we use also the bundle with Jetty) The Tomcat bundle may have
some problems with SSL
PostgreSQL 7.1.2
hsqldb ?? Part from JBOSS
XDoclet 1.1.2
Ant 1.4.1
Log4J 1.2.3
Junit 3.7

We have two configuration:

First development all on one computer:

Tomcat Standalone
JBoss
hsqldb

Second production separate application server and database server:
JBoss bundled with jetty
postgreSQL

Manfred

-Ursprungliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Im
Auftrag von Boney Sze
Gesendet: Montag, 8. Juli 2002 19:13
An: Struts Users Mailing List
Betreff: To Manfred Wolff < Struts + EJB ? >



>>> I use Struts, Tomcat, JBoss, XDoclett, PostgreSQL,
>>> Ant, Log4J in a 5 "person year" project (not large
>>> but not small also) and it works really fine.

hello manfred, thanks for the reply.

may i know what versions of Struts, Tomcat, Jboss,
XDoclett, PostgreSQL, Ant, Log4J you are using ?

Thanks.


Boney

__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:




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




[ARTICLE] Issues in Struts Adoption

2002-07-09 Thread John Yu

A new article "Issues in Struts Adoption" is available at:

 http://www.scioworks.net/servlets/Redirect?pid=13

ABSTRACT: This article discusses issues in Struts adoption, covering both 
technical considerations and business issues like total cost of ownership, 
maintenance, future direction and long term viability of the Apache Struts 
Framework.

-- 
John Yu   Scioworks Technologies
e: [EMAIL PROTECTED] w: +(65) 873 5989
w: http://www.scioworks.com   m: +(65) 9782 9610


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




Tomcat crashes on too many custom tags in a jsp

2002-07-09 Thread Karthikeyan A

Hi,

I am working with tomcat 4.0.1  We have our own custom tag library. We
display all the data using custom tags.
We have noticed that when the number of custom tags for a jsp page is too
large, our tomcat crashes. Our JSP has more than 125 
tag apart from other custom tags. If we comment out some of the custom tags,
tomcat does not crash.

We hunted for the solution in mailing lists. We found a suggestion. As per
suggestion, we should split the JSP into multiple JSPs and include the
pieces by using  directive. We have split the JSPs but the
problem persists. 

Can anybody suggest a work around?

Thanks and Regards
Karthik


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




RE: Tomcat crashes on too many custom tags in a jsp

2002-07-09 Thread Amol

Hi karthik,
the problem is because of the size of the try catch block. When
the JSP is precompiled the number of lines of the try catch block should
be restricted to around 3000 line or less. There is no link about this
info. But this is what defines the max size a server can handle.
Weblogic handles JSP up to a size of 70 Kb.
Explore on these lines and maybe you could come up with
something.
Amol


-Original Message-
From: Karthikeyan A [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, July 09, 2002 3:52 PM
To: [EMAIL PROTECTED]
Subject: Tomcat crashes on too many custom tags in a jsp 


Hi,

I am working with tomcat 4.0.1  We have our own custom tag library. We
display all the data using custom tags. We have noticed that when the
number of custom tags for a jsp page is too large, our tomcat crashes.
Our JSP has more than 125  tag apart from other
custom tags. If we comment out some of the custom tags, tomcat does not
crash.

We hunted for the solution in mailing lists. We found a suggestion. As
per suggestion, we should split the JSP into multiple JSPs and include
the pieces by using  directive. We have split the JSPs but
the problem persists. 

Can anybody suggest a work around?

Thanks and Regards
Karthik


--
To unsubscribe, e-mail:

For additional commands, e-mail:




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


html:text initial value

2002-07-09 Thread Sann, Stephan

Hello all,

is there a way to give an initial value to a -tag that is not shown again 
in an error-case?

Here is an example:



I put the initial value "00.00." into this text-field to show the user the format 
for the field.

Now there is a user who forgets the last Digit of the year:

> 18.04.197 <

Struts returns the User to the HTML-form where the birthday-field is filled with:

> 00.00. <

again. I want it to be filled with

> 18.04.197 <

again, so the user can fullfill his year.


I found a solution with a scriptlet, but scriptlets are not allowed any more in our 
applications.


Thanx for any hints, tips, RTFM(with URL)

Stephan

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




RE: squeaky wheel with struts experience needs a job

2002-07-09 Thread Mark Nichols

I have wondered about the possibility of there being an "announcement"
mailing list for Struts, and this posting gives me an opportunity to ask my
question. In a previous development lifetime I used Forte TOOL and was
active with the Forte mail list. There was the primary questions list and a
separate announce list for job postings, availability postings, and product
release notices. What are the chances of having such a list for Struts?




> -Original Message-
> From: Dominique Plante [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 08, 2002 6:52 PM
> To: [EMAIL PROTECTED]
> Subject: OT: squeaky wheel with struts experience needs a job
>
>
> I have recently heard the saying: "The squeaky wheel gets the grease",
> so I thought I would take a minute to be a "squeaky wheel".
>
> I am familiar bunch of technologies and projects in addition to Struts,
> including JSP, Java, and HTML, ANT, cactus, and Tomcat.  I am also very
> interested and have experience with refactoring, design patterns, and
> performance optimization.
>
> Please contact me at [EMAIL PROTECTED] to send me details about a
> potential opportunity.
> I am in the East San Francisco Bay area.
>
> Now I wait for the grease ;)
>
> Sorry about the off topic post.
>
> Dominique
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
>


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




Re: html:text initial value

2002-07-09 Thread SATISH.T

set the value of the textbox property of the form in ur action class 
before u throw it and also remove the value="" from the tag if u want  
to retain the value if an error is thrown.
satish

- Original Message -
From: "Sann, Stephan" <[EMAIL PROTECTED]>
Date: Tuesday, July 9, 2002 4:05 pm
Subject: html:text initial value

> Hello all,
> 
> is there a way to give an initial value to a -tag that 
> is not shown again in an error-case?
> 
> Here is an example:
> 
> 
> 
> I put the initial value "00.00." into this text-field to show 
> the user the format for the field.
> 
> Now there is a user who forgets the last Digit of the year:
> 
> > 18.04.197 <
> 
> Struts returns the User to the HTML-form where the birthday-field 
> is filled with:
> 
> > 00.00. <
> 
> again. I want it to be filled with
> 
> > 18.04.197 <
> 
> again, so the user can fullfill his year.
> 
> 
> I found a solution with a scriptlet, but scriptlets are not 
> allowed any more in our applications.
> 
> 
> Thanx for any hints, tips, RTFM(with URL)
> 
> Stephan
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>For additional commands, e-mail: 
> 
> 
> 


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


WebWork vs. Struts

2002-07-09 Thread Dave Johnson

I wrote the editor/admin GUI portions of the Roller Weblogger using 
Struts.  Now, it is been suggested that I look at WebWorks as an 
alternative to Struts.  I've been looking for comparisons of WebWorks 
vs. Struts, general comments about WebWorks, and anything else.  I've 
summarized what I have found so far here:

   http://www.rollerweblogger.org/page/roller/20020708

There is also a nice little write-up on WebWork here:

   http://radio.weblogs.com/0107789/stories/2002/07/09/whyILikeWebwork.html

Anybody want to offer up their experiences or links regarding Struts vs. 
WebWork?

- Dave





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




Announcement List - WAS: RE: squeaky wheel with struts experience needs a job

2002-07-09 Thread James Holmes

This is something Ted Husted proposed on the dev list
awhile back.  I think it makes sense and would help
"partition" the messages.

Ted, what do we have to do to get this rolling?

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/


--- Mark Nichols <[EMAIL PROTECTED]> wrote:
> I have wondered about the possibility of there being
> an "announcement"
> mailing list for Struts, and this posting gives me
> an opportunity to ask my
> question. In a previous development lifetime I used
> Forte TOOL and was
> active with the Forte mail list. There was the
> primary questions list and a
> separate announce list for job postings,
> availability postings, and product
> release notices. What are the chances of having such
> a list for Struts?
> 
> 
> 
> 
> > -Original Message-
> > From: Dominique Plante
> [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, July 08, 2002 6:52 PM
> > To: [EMAIL PROTECTED]
> > Subject: OT: squeaky wheel with struts experience
> needs a job
> >
> >
> > I have recently heard the saying: "The squeaky
> wheel gets the grease",
> > so I thought I would take a minute to be a
> "squeaky wheel".
> >
> > I am familiar bunch of technologies and projects
> in addition to Struts,
> > including JSP, Java, and HTML, ANT, cactus, and
> Tomcat.  I am also very
> > interested and have experience with refactoring,
> design patterns, and
> > performance optimization.
> >
> > Please contact me at [EMAIL PROTECTED] to send
> me details about a
> > potential opportunity.
> > I am in the East San Francisco Bay area.
> >
> > Now I wait for the grease ;)
> >
> > Sorry about the off topic post.
> >
> > Dominique
> >
> >
> > --
> > To unsubscribe, e-mail:
> >
> 
> > For additional commands, e-mail:
> > 
> >
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




Re: shouldn't html taglib support _ALL_ HTML 4.x default attributes?

2002-07-09 Thread @Basebeans.com

Subject: Re: shouldn't html taglib support _ALL_ HTML 4.x default attributes?
From: "Matt Raible" <[EMAIL PROTECTED]>
 ===
I've never heard of a "lang" attribute on a form.  The documentation states:

http://jakarta.apache.org/struts/userGuide/struts-html.html#form

That you can use styleClass and styleId attributes to render "class=" and
"id=" respectively.

HTH,

Matt

"Serge Shikov" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hello,
>
> I mean - id, lang, class, and many other attributes, defined in HTML 4.x
> specs? Why I coudn't specify id or class in  to do some DHTML
> tricks later?
>



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




AW: html:text initial value

2002-07-09 Thread Sann, Stephan

Hello Satish,

> set the value of the textbox property of the form in ur action class 
> before u throw it and also remove the value="" from the tag if u want  
> to retain the value if an error is thrown.

thanx a lot for your answer.

I tried it this way:




but it didn't worked out for me :-(


How can I put your tip into practice?

Thanx
Stephan


- Original Message -
From: "Sann, Stephan" <[EMAIL PROTECTED]>
Date: Tuesday, July 9, 2002 4:05 pm
Subject: html:text initial value

> Hello all,
> 
> is there a way to give an initial value to a -tag that 
> is not shown again in an error-case?
> 
> Here is an example:
> 
> 
> 
> I put the initial value "00.00." into this text-field to show 
> the user the format for the field.
> 
> Now there is a user who forgets the last Digit of the year:
> 
> > 18.04.197 <
> 
> Struts returns the User to the HTML-form where the birthday-field 
> is filled with:
> 
> > 00.00. <
> 
> again. I want it to be filled with
> 
> > 18.04.197 <
> 
> again, so the user can fullfill his year.
> 
> 
> I found a solution with a scriptlet, but scriptlets are not 
> allowed any more in our applications.
> 
> 
> Thanx for any hints, tips, RTFM(with URL)
> 
> Stephan
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>For additional commands, e-mail: 
> 
> 
> 

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




RE: DynaActionForm Advantages

2002-07-09 Thread Jerry Jalenak

Java 1.4.x provides a very nice implementation of regexp.

Jerry

-Original Message-
From: Jacob Hookom [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 08, 2002 10:52 PM
To: 'Struts Users Mailing List'
Subject: RE: DynaActionForm Advantages


I agree with James on the extra level aspect.  I've been finding that
the finer the granularity in my struts application, the easier it is to
maintain [for each action, a specialized form/bean].

I did opt though for the validator, since it brought regexp validation
to the table which is invaluable and fairly easy to setup in an
afternoon.

Jake

-Original Message-
From: James Turner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, July 08, 2002 10:37 PM
To: [EMAIL PROTECTED]
Subject: RE: DynaActionForm Advantages 

My two cents on the topic.

As mentioned, once you move to a good Java IDE like JBuilder, writing 
getters and setters is no longer nearly the pain it used to be.

What bothers me about the DynaBean approach is that it's *yet another* 
file, and *yet another* level of indirection that obscure what's really 
going on.  I can look at an ActionForm, see all the properties, look at
the 
validation, all in one step.  Making it a DynaBean form means having to 
maintain another file with the XML, always having to remember where it
is, etc.

I think the decision to use one or the other is a matter of programming 
style, but I don't think either one is dogmatically a best practice.

James


--
To unsubscribe, e-mail:

For additional commands, e-mail:


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.373 / Virus Database: 208 - Release Date: 7/1/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.373 / Virus Database: 208 - Release Date: 7/1/2002
 


--
To unsubscribe, e-mail:

For additional commands, e-mail:



This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at (800)388-4675.



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




Re: AW: html:text initial value

2002-07-09 Thread SATISH.T

hi i meant do a form.setTextBoxPropertyName(value); in ur action class 
and 
in the jsp remove the value="" from the tag. should work.
satish

- Original Message -
From: "Sann, Stephan" <[EMAIL PROTECTED]>
Date: Tuesday, July 9, 2002 6:32 pm
Subject: AW: html:text initial value

> Hello Satish,
> 
> > set the value of the textbox property of the form in ur action 
> class 
> > before u throw it and also remove the value="" from the tag if u 
> want  
> > to retain the value if an error is thrown.
> 
> thanx a lot for your answer.
> 
> I tried it this way:
> 
> 
> 
> 
> but it didn't worked out for me :-(
> 
> 
> How can I put your tip into practice?
> 
> Thanx
> Stephan
> 
> 
> - Original Message -
> From: "Sann, Stephan" <[EMAIL PROTECTED]>
> Date: Tuesday, July 9, 2002 4:05 pm
> Subject: html:text initial value
> 
> > Hello all,
> > 
> > is there a way to give an initial value to a -tag 
> that 
> > is not shown again in an error-case?
> > 
> > Here is an example:
> > 
> > 
> > 
> > I put the initial value "00.00." into this text-field to 
> show 
> > the user the format for the field.
> > 
> > Now there is a user who forgets the last Digit of the year:
> > 
> > > 18.04.197 <
> > 
> > Struts returns the User to the HTML-form where the birthday-
> field 
> > is filled with:
> > 
> > > 00.00. <
> > 
> > again. I want it to be filled with
> > 
> > > 18.04.197 <
> > 
> > again, so the user can fullfill his year.
> > 
> > 
> > I found a solution with a scriptlet, but scriptlets are not 
> > allowed any more in our applications.
> > 
> > 
> > Thanx for any hints, tips, RTFM(with URL)
> > 
> > Stephan
> > 
> > --
> > To unsubscribe, e-mail:    > [EMAIL PROTECTED]>For additional commands, e-mail: 
> > 
> > 
> > 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>For additional commands, e-mail: 
> 
> 
> 


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


RE: AW: html:text initial value

2002-07-09 Thread Rahul Kumar Saxena

Satish is quite right, you just call
setTextBoxPropertyName("00.00."); method in the action class which
forwards to your JSP. This will take care of displaying the default
value.So you need not set 00.00. in the value attribute of text
tag.Becuase this always sets the value to 00.00. irrespective to the
value present in the form object. 
For the case of errors, you need not worry at all, Struts will populate
your form properly. 

 


is same as



Only difference is that in the first, you are exposing 00.00. value
as geburtsdatum variable.

Rahul.

-Original Message-
From: SATISH.T [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, July 09, 2002 6:39 PM
To: Struts Users Mailing List
Subject: Re: AW: html:text initial value


hi i meant do a form.setTextBoxPropertyName(value); in ur action class 
and 
in the jsp remove the value="" from the tag. should work. satish

- Original Message -
From: "Sann, Stephan" <[EMAIL PROTECTED]>
Date: Tuesday, July 9, 2002 6:32 pm
Subject: AW: html:text initial value

> Hello Satish,
> 
> > set the value of the textbox property of the form in ur action
> class
> > before u throw it and also remove the value="" from the tag if u
> want
> > to retain the value if an error is thrown.
> 
> thanx a lot for your answer.
> 
> I tried it this way:
> 
>   property="geburtsdatum" maxlength="30" />
> 
> but it didn't worked out for me :-(
> 
> 
> How can I put your tip into practice?
> 
> Thanx
> Stephan
> 
> 
> - Original Message -
> From: "Sann, Stephan" <[EMAIL PROTECTED]>
> Date: Tuesday, July 9, 2002 4:05 pm
> Subject: html:text initial value
> 
> > Hello all,
> > 
> > is there a way to give an initial value to a -tag
> that
> > is not shown again in an error-case?
> > 
> > Here is an example:
> > 
> > 
> > 
> > I put the initial value "00.00." into this text-field to
> show
> > the user the format for the field.
> > 
> > Now there is a user who forgets the last Digit of the year:
> > 
> > > 18.04.197 <
> > 
> > Struts returns the User to the HTML-form where the birthday-
> field
> > is filled with:
> > 
> > > 00.00. <
> > 
> > again. I want it to be filled with
> > 
> > > 18.04.197 <
> > 
> > again, so the user can fullfill his year.
> > 
> > 
> > I found a solution with a scriptlet, but scriptlets are not
> > allowed any more in our applications.
> > 
> > 
> > Thanx for any hints, tips, RTFM(with URL)
> > 
> > Stephan
> > 
> > --
> > To unsubscribe, e-mail:    > [EMAIL PROTECTED]>For additional commands, e-mail:
> > 
> > 
> > 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>For additional commands, e-mail:
> 
> 
> 



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


Re: html:text initial value

2002-07-09 Thread @Basebeans.com

Subject: Re: html:text initial value
From: "Sebastian Millies" <[EMAIL PROTECTED]>
 ===
How about




and you set the initial value of the form property to "00.00." in the
forms
constructor.

Please let me know if this actually works.
-- Sebastian

"Sann, Stephan" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]...
> Hello Satish,
>
> > set the value of the textbox property of the form in ur action class
> > before u throw it and also remove the value="" from the tag if u want
> > to retain the value if an error is thrown.
>
> thanx a lot for your answer.
>
> I tried it this way:
>
> 
> 
>
> but it didn't worked out for me :-(
>
>
> How can I put your tip into practice?
>
> Thanx
> Stephan
>
>
> - Original Message -
> From: "Sann, Stephan" <[EMAIL PROTECTED]>
> Date: Tuesday, July 9, 2002 4:05 pm
> Subject: html:text initial value
>
> > Hello all,
> >
> > is there a way to give an initial value to a -tag that
> > is not shown again in an error-case?
> >
> > Here is an example:
> >
> > 
> >
> > I put the initial value "00.00." into this text-field to show
> > the user the format for the field.
> >
> > Now there is a user who forgets the last Digit of the year:
> >
> > > 18.04.197 <
> >
> > Struts returns the User to the HTML-form where the birthday-field
> > is filled with:
> >
> > > 00.00. <
> >
> > again. I want it to be filled with
> >
> > > 18.04.197 <
> >
> > again, so the user can fullfill his year.
> >
> >
> > I found a solution with a scriptlet, but scriptlets are not
> > allowed any more in our applications.
> >
> >
> > Thanx for any hints, tips, RTFM(with URL)
> >
> > Stephan
> >
> > --
> > To unsubscribe, e-mail:    > [EMAIL PROTECTED]>For additional commands, e-mail:
> > 
> >
> >
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>



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




Re: html:text initial value

2002-07-09 Thread @Basebeans.com

Subject: Re: html:text initial value
From: "Sebastian Millies" <[EMAIL PROTECTED]>
 ===
Come to think of it, Satish was exactly right: Simply



should be enough, provided you set the initial value of the
 form property to "00.00." in the form constructor,
or in the action class from which you forward to the JSP.

-- Sebastian



"Sebastian Millies" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:ageo2m$hki$[EMAIL PROTECTED]...
> How about
>
> 
>  />
>
> and you set the initial value of the form property to "00.00." in the
> forms
> constructor.
>
> Please let me know if this actually works.
> -- Sebastian
>
> "Sann, Stephan" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> news:[EMAIL PROTECTED]...
> > Hello Satish,
> >
> > > set the value of the textbox property of the form in ur action class
> > > before u throw it and also remove the value="" from the tag if u want
> > > to retain the value if an error is thrown.
> >
> > thanx a lot for your answer.
> >
> > I tried it this way:
> >
> > 
> > 
> >
> > but it didn't worked out for me :-(
> >
> >
> > How can I put your tip into practice?
> >
> > Thanx
> > Stephan
> >
> >
> > - Original Message -
> > From: "Sann, Stephan" <[EMAIL PROTECTED]>
> > Date: Tuesday, July 9, 2002 4:05 pm
> > Subject: html:text initial value
> >
> > > Hello all,
> > >
> > > is there a way to give an initial value to a -tag that
> > > is not shown again in an error-case?
> > >
> > > Here is an example:
> > >
> > > 
> > >
> > > I put the initial value "00.00." into this text-field to show
> > > the user the format for the field.
> > >
> > > Now there is a user who forgets the last Digit of the year:
> > >
> > > > 18.04.197 <
> > >
> > > Struts returns the User to the HTML-form where the birthday-field
> > > is filled with:
> > >
> > > > 00.00. <
> > >
> > > again. I want it to be filled with
> > >
> > > > 18.04.197 <
> > >
> > > again, so the user can fullfill his year.
> > >
> > >
> > > I found a solution with a scriptlet, but scriptlets are not
> > > allowed any more in our applications.
> > >
> > >
> > > Thanx for any hints, tips, RTFM(with URL)
> > >
> > > Stephan
> > >
> > > --
> > > To unsubscribe, e-mail:    > > [EMAIL PROTECTED]>For additional commands, e-mail:
> > > 
> > >
> > >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
>
>



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




Re: More that one application resource file

2002-07-09 Thread Davor Cengija

> yes..you can do it.
> But u have to extend Struts framework for that
> u need to write MultiBundleActionservlet which extends Action Servlet...
> and need to override protected void initApplication () of Action Servlet.
> write meta properties file..which contains properties for property
files...
>
>
> if u want i can send out source...
>

Please do, or even better, post it somewhere and have the Struts webmaster
put the link on the Struts web page.

Thanks


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




preview view of a form

2002-07-09 Thread rainer jünger

Hi,

after filling in the form I want to present the user a preview of what she/he entered. 
Pushing save will make data persistance, pushing edit brings back the form with the 
data in the form fields.

How can I realize this with struts?
When I send the control back to the form it always is empty! All data are lost. the 
scope of the action is session.

Rainer



IllegalStateException on action chaining

2002-07-09 Thread Garg, Sanjay

Hi,

I am using Struts 1.1b1 with Websphere 4.02.

In one of my action I am forwarding to another action which in turn forwards
to the final JSP.

I always get the error pasted below. This does not cause any harm, other
then cluttering up the log file.
I have read that the workaround is to use redirect instead of forward for
the intermediary action.
But I would prefer to use forward and also avoid this error message.

I would appreciate any help.
Thanks,
Sanjay
 Error message --

[7/8/02 17:04:04:906 EDT] 3ce2be0b WebGroup  X Servlet Error: ERROR:
Cannot forward. Response already committed.:
java.lang.IllegalStateException: ERROR: Cannot forward. Response already
committed.
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
ispatcher.java:92)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:97
2)
at
org.apache.struts.action.RequestProcessor.processActionForward(RequestProces
sor.java:408)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:452)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
.java:827)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
eServlet.java:167)
at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
t.java:297)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
Servlet.java:110)
at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:47
2)
at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
ager.java:1012)
at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
er.java:913)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W
ebAppRequestDispatcher.java:523)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest
Dispatcher.java:282)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
ispatcher.java:112)
at
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
java:184)
at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
vocation.java:67)
at
com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheabl
eInvocationContext.java:106)
at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
estProcessor.java:125)
at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
.java:315)
at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.ja
va:60)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)

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




Re: container managed security

2002-07-09 Thread Joe Germuska

At 5:48 PM +0200 2002/07/08, Jürgen Weber wrote:
>Hello,
>
>I am into evaluating Struts.
>
>The struts-example.war does authentication for its users programmatically.
>
>Why doesn't it use container managed security?

I would assume simply because that's easier for an example.  There's
nothing preventing anyone from using container managed security for
Struts.

Do you see ways in which the Struts framework can do anything useful
to make it easier to implement container managed security?  I can
imagine perhaps having a SecureActionMapping subclass of
ActionMapping that might allow declarative access control based on a
user role or something -- but I haven't needed that kind of security
in an app yet, so I haven't really learned all the details.

If you need it, maybe you can build it, and then contribute it back
to the project?  That's how these things grow after all...

Joe

--
--
* Joe Germuska{ [EMAIL PROTECTED] }
"It's pitiful, sometimes, if they've got it bad. Their eyes get
glazed, they go white, their hands tremble As I watch them I
often feel that a dope peddler is a gentleman compared with the man
who sells records."
--Sam Goody, 1956
tune in posse radio: 

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




struts-config deployment descriptor file syntax

2002-07-09 Thread Heligon Sandra


Hi,

I am searching a description of struts-config.xml descriptor
deployment syntax (version1.1). 
The DTD format is not easy to read, I would like to have a
description
in a word or pdf document.
If someone has a such document, thanks to send it.

Sandra

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




Re: struts-config deployment descriptor file syntax

2002-07-09 Thread James Holmes

At this point in time there is not something like you
mention that I know of.  However, Ted Husted has
recently updated the DTD and User Guide a bit.

http://jakarta.apache.org/struts/userGuide/building_controller.html

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/


--- Heligon Sandra <[EMAIL PROTECTED]> wrote:
> 
>   Hi,
> 
>   I am searching a description of struts-config.xml
> descriptor
> deployment syntax (version1.1). 
>   The DTD format is not easy to read, I would like to
> have a
> description
>   in a word or pdf document.
>   If someone has a such document, thanks to send it.
> 
>   Sandra
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




Re: DynaActionForm Advantages

2002-07-09 Thread Glen Mazza

> Fecha: Mon, 08 Jul 2002 23:37:03 -0400
> A: [EMAIL PROTECTED]
> De: James Turner <[EMAIL PROTECTED]>
> Asunto: RE: DynaActionForm Advantages 
> 
> My two cents on the topic.
> 
> As mentioned, once you move to a good Java IDE like
> JBuilder, writing 
> getters and setters is no longer nearly the pain it
> used to be.
> 

Correct--the ActionForm follows the standard JavaBeans
approach--reduced learning curve for newcomers, and
already generated by most IDE's.


> What bothers me about the DynaBean approach is that
> it's *yet another* 
> file, and *yet another* level of indirection that
> obscure what's really 
> going on.  I can look at an ActionForm, see all the
> properties, look at the 
> validation, all in one step.  Making it a DynaBean
> form means having to 
> maintain another file with the XML, always having to
> remember where it is, etc.
> 

Mostly agree.  It's not "yet another" file, because
DAF's were (I believe) originally designed to reduce
the number of ActionForms you'd have to implement. 
I.e., if you don't have any special validation to do,
don't bother subclassing an ActionForm--just put the
variables in the struts-config and you're done.  Very
nice design.

The problem was that the DAF class was not made final.
 Allowing it to be subclassed is creating the mess you
describe--the variables in the XML file and actions on
them in the DAF subclass.  (Another was writing about
putting member variable initializations in the
validate() function--the DAF subclass may also start
encouraging other messier programming habits.)

As for those who don't like getter/setters and want to
use the common-beanutils "get" functions described by
Craig:  Might it have been better, in addition to
making the DAF class final, to just have ActionForms
implement "get"'s interface? Just newbie thinking...

Glen


_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

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




DynaActionForm and JSTL (was RE: DynaActionForm Advantages)

2002-07-09 Thread Jennings, Christofer J.

Looking at the JSTL 1.0 specification, section 3.3, leads me to believe that
DynaActionForm "properties" can be accessed through the JSTL EL but with a
different syntax than a regular JavaBean property.

Example:
Regular JavaBean (e.g., ActionForm) EL syntax:


Map (e.g., DynaActionForm) EL syntax:



If anyone has done this sort of thing I'd sure like to know how it works.
Especially how/if accessing "aSubProperty".

I'm stuck using a container that can't support JSTL and I'm also not using
Struts 1.1 yet either so I can't confirm any of this. 

,
boz

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 08, 2002 6:19 PM
To: [EMAIL PROTECTED]
Subject: RE: DynaActionForm Advantages


But are DynaActionForm's compatible with JSTL?

A discussion on taglibs-user made me think not:
http://marc.theaimsgroup.com/?l=taglibs-user&m=102433015725228&w=2

Eddie



RE: struts-config deployment descriptor file syntax

2002-07-09 Thread Heligon Sandra

Thanks,

what a pity! 
http://edocs.bea.com/wls/docs61/webapp/web_xml.html gives the elements of
a web.xml deployment descriptor, it is easier than web-app_2_2.dtd file.
I hope that in the future a such format will exist for struts-config 
file.

Sandra

-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED]]
Sent: 09 July 2002 16:50
To: Struts Users Mailing List
Subject: Re: struts-config deployment descriptor file syntax


At this point in time there is not something like you
mention that I know of.  However, Ted Husted has
recently updated the DTD and User Guide a bit.

http://jakarta.apache.org/struts/userGuide/building_controller.html

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/


--- Heligon Sandra <[EMAIL PROTECTED]> wrote:
> 
>   Hi,
> 
>   I am searching a description of struts-config.xml
> descriptor
> deployment syntax (version1.1). 
>   The DTD format is not easy to read, I would like to
> have a
> description
>   in a word or pdf document.
>   If someone has a such document, thanks to send it.
> 
>   Sandra
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Re: DynaActionForm and JSTL (was RE: DynaActionForm Advantages)

2002-07-09 Thread @Basebeans.com

Subject: Re: DynaActionForm and JSTL (was RE: DynaActionForm Advantages)
From: "Vic C." <[EMAIL PROTECTED]>
 ===
This works for me to use JSTL:

Vic

Jennings, Christofer J. wrote:
> Looking at the JSTL 1.0 specification, section 3.3, leads me to believe that
> DynaActionForm "properties" can be accessed through the JSTL EL but with a
> different syntax than a regular JavaBean property.
> 
> Example:
>   Regular JavaBean (e.g., ActionForm) EL syntax:
>   
>   
>   Map (e.g., DynaActionForm) EL syntax:
>   
>   
> 
> If anyone has done this sort of thing I'd sure like to know how it works.
> Especially how/if accessing "aSubProperty".
> 
> I'm stuck using a container that can't support JSTL and I'm also not using
> Struts 1.1 yet either so I can't confirm any of this. 
> 
> ,
> boz
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 08, 2002 6:19 PM
> To: [EMAIL PROTECTED]
> Subject: RE: DynaActionForm Advantages
> 
> 
> But are DynaActionForm's compatible with JSTL?
> 
> A discussion on taglibs-user made me think not:
> http://marc.theaimsgroup.com/?l=taglibs-user&m=102433015725228&w=2
> 
> Eddie
> 


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




RE: Re: More that one application resource file

2002-07-09 Thread wbchmura


Maybe I am misunderstanding the post, but why not just concat during 
the build process?  I know you mentioned some sort of internal 
purtubations or something...  Can you be more specific?



I have the same thing going, and just have an ant task that does it...  
No changes to struts or anything at all...




-Original Message-
From: dcengija [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, July 09, 2002 6:17 AM
To: struts-user
Cc: dcengija
Subject: Re: More that one application resource file


> yes..you can do it.
> But u have to extend Struts framework for that
> u need to write MultiBundleActionservlet which extends Action 
> Servlet... and need to override protected void initApplication () of 
> Action Servlet. write meta properties file..which contains properties 
> for property
files...
>
>
> if u want i can send out source...
>

Please do, or even better, post it somewhere and have the Struts 
webmaster put the link on the Struts web page.

Thanks


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 




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




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

2002-07-09 Thread chuckcavaness

Chapter 11 "Using the Struts Validator " has been 
posted on theserverside.com. 

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

Chapters 8 and 20 will also be posted this week.

As always, I look forward to the feedback.

Chuck

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




help! Exception

2002-07-09 Thread Lana M. Stillwell-Soller

I get the following exception when I submit my form using Struts html
tag multibox.  I cannot figure it out.  Please help if you can.

javax.servlet.ServletException: BeanUtils.populate
 at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:774)


--
--/-National Center for Atmospheric Research---
Lana M. Stillwell-Soller   Phone:  303-497-1244
Software Engineer/Group Head   Fax:303-497-1804
Infrastructure Applications Group  Mobile: 303-882-0213
--/-PO Box 3000, Boulder, CO  80305-3000---



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




Re: DynaActionForm and JSTL (was RE: DynaActionForm Advantages)

2002-07-09 Thread Joe Germuska

This would only work if ${form} implemented the Map interface.

Making the DynaBean interface extend the Map interface seems like a 
lot of overkill considering the number of places people might want to 
use it that have nothing to do with the JSTL...

Maybe you could make a case for having DynaActionForm implement Map, 
with a bunch of unsupported operations and delegating to the values 
hash otherwise.  It's still kind of cluttered, but at least it's off 
in Struts serving a specific need, instead of in beanutils.

Joe


At 8:19 AM -0700 2002/07/09, Jennings, Christofer J. wrote:
>Looking at the JSTL 1.0 specification, section 3.3, leads me to believe that
>DynaActionForm "properties" can be accessed through the JSTL EL but with a
>different syntax than a regular JavaBean property.
>
>Example:
>   Regular JavaBean (e.g., ActionForm) EL syntax:
>   
>   
>   Map (e.g., DynaActionForm) EL syntax:
>   
>   
>
>If anyone has done this sort of thing I'd sure like to know how it works.
>Especially how/if accessing "aSubProperty".
>
>I'm stuck using a container that can't support JSTL and I'm also not using
>Struts 1.1 yet either so I can't confirm any of this.
>
>,
>boz
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Monday, July 08, 2002 6:19 PM
>To: [EMAIL PROTECTED]
>Subject: RE: DynaActionForm Advantages
>
>
>But are DynaActionForm's compatible with JSTL?
>
>A discussion on taglibs-user made me think not:
>http://marc.theaimsgroup.com/?l=taglibs-user&m=102433015725228&w=2
>
>Eddie


-- 
--
* Joe Germuska{ [EMAIL PROTECTED] }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
--Sam Goody, 1956
tune in posse radio: 

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




RE: struts-config deployment descriptor file syntax

2002-07-09 Thread Joe Germuska

At 5:26 PM +0200 2002/07/09, Heligon Sandra wrote:
>what a pity!
>http://edocs.bea.com/wls/docs61/webapp/web_xml.html gives the elements of
>a web.xml deployment descriptor, it is easier than web-app_2_2.dtd file.
>I hope that in the future a such format will exist for struts-config
>file.

Many of the best parts of open source projects were developed by 
users seeing an omission and taking the initiative to correct it 
themselves.  Perhaps you'd consider producing just the document you 
wish to see -- it could be a great way to get to know the DTD more 
closely.

Don't even worry if you're not expert -- you can still submit a draft 
for review.  Then other people can suggest changes, or even 
contribute changes (patches) of their own... pretty soon, one of the 
best documented open source projects around (Struts, that is) has 
another helpful piece of documentation!

Joe

-- 
--
* Joe Germuska{ [EMAIL PROTECTED] }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
--Sam Goody, 1956
tune in posse radio: 

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




RE: struts-config deployment descriptor file syntax

2002-07-09 Thread chuckcavaness

Sandra,

  Chapter 4 of my O'Reilly Struts book covers both the 
neccessary web.xml modifications that you have to do for 
Struts as well as complete coverage of the 1.1 struts 
config file.

  Give it a read and feel free to provide feedback to 
me. You can get Chapter 4 here:

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

Chuck
> Thanks,
> 
> what a pity! 
> http://edocs.bea.com/wls/docs61/webapp/web_xml.html gives the elements of
> a web.xml deployment descriptor, it is easier than web-app_2_2.dtd file.
> I hope that in the future a such format will exist for struts-config 
> file.
> 
> Sandra
> 
> -Original Message-
> From: James Holmes [mailto:[EMAIL PROTECTED]]
> Sent: 09 July 2002 16:50
> To: Struts Users Mailing List
> Subject: Re: struts-config deployment descriptor file syntax
> 
> 
> At this point in time there is not something like you
> mention that I know of.  However, Ted Husted has
> recently updated the DTD and User Guide a bit.
> 
> http://jakarta.apache.org/struts/userGuide/building_controller.html
> 
> -james
> [EMAIL PROTECTED]
> http://www.jamesholmes.com/struts/
> 
> 
> --- Heligon Sandra <[EMAIL PROTECTED]> wrote:
> > 
> > Hi,
> > 
> > I am searching a description of struts-config.xml
> > descriptor
> > deployment syntax (version1.1). 
> > The DTD format is not easy to read, I would like to
> > have a
> > description
> > in a word or pdf document.
> > If someone has a such document, thanks to send it.
> > 
> > Sandra
> > 
> > --
> > To unsubscribe, e-mail:  
> > 
> > For additional commands, e-mail:
> > 
> > 
> 
> 
> __
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 

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




Re: Validation downfalls?

2002-07-09 Thread Joe Germuska

At 1:55 PM -0500 2002/07/08, [EMAIL PROTECTED] wrote:
>Hello Everyone,
>
>Forgive me if this topic has been previousy posted, and please point me to
>the appropriate posts.  I have been working with the Struts validation
>framework, and so far I like what I see.  I've also dug into the
>struts-validator.war project and I have a good idea of what is going on
>there.  In my project, I will be working with a pretty standard form (name,
>address, credit card field, etc), but the functionality may be extended at
>a later time.  I am curious... are there any limitations that anyone has
>come across when using the framework?  And if so, have there been any posts
>to common problems.  Thanks in advance

There are rather a few bugs to do with the validation posted in 
Bugzilla -- that's a good way to get an overview of any issues you 
might face before facing them yourself.  Some of them have associated 
patches which haven't yet been comitted to the CVS repository, but 
you can apply them yourself so that you can continue to use the 
software.  Maybe along the way you'll get the urge to fix one or two 
of the bugs yourself and post a patch?

Joe

Apache Bug Database: 
-- 
--
* Joe Germuska{ [EMAIL PROTECTED] }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
--Sam Goody, 1956
tune in posse radio: 

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




Re: container managed security

2002-07-09 Thread Craig R. McClanahan



On Mon, 8 Jul 2002, Jürgen Weber wrote:

> Date: Mon, 08 Jul 2002 17:48:29 +0200
> From: Jürgen Weber <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: container managed security
>
>
>
> Hello,
>
> I am into evaluating Struts.
>
> The struts-example.war does authentication for its users programmatically.
>
> Why doesn't it use container managed security?
>

The example app rolls its own for one and only one reason -- one of the
purposes of this webapp is to detect whether you have Struts installed and
working on your container correctly.  The less configuration tinkering you
have to do for a "hello, world" application to work, the better.

In general, I believe that apps should use container managed security
rather than rolling their own.

> Wouldn't it be simpler (not having to reenvent the wheel), safer (the
> container will do it better)
> and standards compliant (servlet specification chap. 12) ?
> Especially for enterprise applications that often use LDAP to authenticate
> users
> container managed security is very powerful if an application server
> supports an LDAP realm.
>
> Instead the Newbie FAQ (http://jakarta.apache.org/struts/newbie.html) links
> to
> (http://www.mail-archive.com/struts-user@jakarta.apache.org/msg24504.html)
> three other ways,
> that do not use the standard features of the container.
>
> The downpart of container managed security mentioned in
> [htttp://www.jguru.com/faq/view.jsp?EID=471952]
>
> "The only downside to this approach is that there is not yet a standardized
> API for portably accessing and maintaining a "database" of users and roles
> ("database" is in quotes because the actual implementation could be
> anything, including static text files or directory servers)."
>
> is not a downside, because security is a sub-modul of the container and does
> not have/need a standard API to the web application.
>

This is *definitely* a downside for application portability in some
circumstances.

Consider that you are writing a portal application, with the usual self
registration facilities.  It is trivially simple to make the portal app
itself portable across containers, if you just stick to standard servlet
and JSP facilities.  But the notion of "add a new user" is not portable,
and requires integration with each container's own user database update
mechanisms (for example, using a particular Realm in Tomcat).  There is no
way to write the functionality for this in a portable way.

That being said, I think it's still worth the extra effort to build such
integration links for the app servers you care about.  Quite often, that
will simply be a matter of updating whatever database or directory server
your app server is talking to, and not require any deep API-level
connections.  But this is still a hindrance to the usual write-once
run-anywhere feature normally associated with webapps.

> Thank you,
> Juergen

Craig


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




Off-Topic: JMS Design Question...

2002-07-09 Thread Ajay Chitre

Hello,
 
This is kind of off-topic, so I apologize in advance.  We do have some
J2EE gurus on this mailing list so I decided to ask it here.  (Is there
any other *active* mailing list where I can post JMS related questions?)
 
Anyway, I need some help to develop a JMS based solution. Here's what we
are trying to accomplish;
 
We need to send XML messages (as well as other types of messages) back &
forth between two Application Servers. In other words, a Web Application
created by us will send a message to the application server of our
client and vice versa. 
 
This is what I was thinking of doing;
 
1) When it's time to send a message on our side, we will write it to a
Topic in our App Server.
2) A MDB on our side will retrieve the message and send it to the Topic
of our client.
 
The same logic will apply for incoming messages;
1) Client will write a message to our Topic.
2) A MDB on our side will then pick up this message and process it.
 
If this sounds okay, then I am wondering how I can handle Exception
conditions.  For example;
 
1)  If Client's App Server is down, then our MDB should keep resending
till the message is sent successfully.  How can I do this in JMS?
2)  If our JMS Server is down (shouldn't happen, but let's say it does)
what should the Web App do?  Would "Durable Subscriptions" help in this
case?
 
I would greatly appreciate any input in this matter. Thanks (a lot) for
your time.
 
- Ajay






Re: XML based application resources?

2002-07-09 Thread Craig R. McClanahan

There were some messages on this topic over the last few days -- please
check the mailing list archives.

Craig


On Mon, 8 Jul 2002, Struts Newsgroup wrote:

> Date: Mon, 8 Jul 2002 10:40:03 -0700
> From: Struts Newsgroup <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: XML based application resources?
>
> Subject: XML based application resources?
> From: Davor Cengija <[EMAIL PROTECTED]>
>  ===
> Is there an extension or maybe some trick in Struts which would allow me to
> have xml-based application resource files? It is very complicated to
> maintain 4 or even more .properties files in different languages. What I'd
> like to have is a single xml file with all the translations in it,
> something like this:
>
> 
>   
> Color
> Farbe
> Boja
>   
>   
> 
>
> Thanks
> --
> Davor Cengija
> [EMAIL PROTECTED]
> =
> "Nicht in die Augen bringen!"
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>
>


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




RE: DynaActionForm Advantages

2002-07-09 Thread Craig R. McClanahan



On Mon, 8 Jul 2002, Eddie McGreggor wrote:

> Date: Mon, 08 Jul 2002 21:18:54 -0400
> From: Eddie McGreggor <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: RE: DynaActionForm Advantages
>
> But are DynaActionForm's compatible with JSTL?
>

Do you mean with the expression language stuff for getting and setting
properties?  No, they are not.  However, it would be feasible for Struts
tags to implement their own support for the expression language, and to
make that support work with DynaBeans in general.

> A discussion on taglibs-user made me think not:
> http://marc.theaimsgroup.com/?l=taglibs-user&m=102433015725228&w=2
>
> Eddie
>

Craig


> >On Mon, 8 Jul 2002 [EMAIL PROTECTED] wrote:
> >
> >>
> >> Tell me again why I should use the standard form beans?
> >>
> >>
> >> I'm trying to understand because it seems to add complexity having two
> >> different ways of doing Form Beans. Why not polish up the Dyna bean stuff
> >> and then dump (er, deprecate) normal Form Beans?
> >>
> >
> >If DynaActionForm had been around from the very beginning, I doubt we
> >would have ever invented the standard ActionForm bean approach.  At the
> >same time, I can't necessarily justify deprecating something that 100% of
> >existing 1.0 applications are required to use, especially when the rest of
> >Struts doesn't care at all which way you do things -- and you can even
> >make your Actions not care if you use PropertyUtils methods to get and set
> >the property values.
> >
> >> One advantage I will give the normal Form Beans is that they are easier for
> >> a newbie to pick up and learn. They shorten the learning curve to get
> >> productive with Struts initially. But if DynaBeans were made to be very
> >> easy, then this advantage may disappear as well.
> >>
> >
> >It's also a little premature to conclude that DynaActionForm beans are
> >good replacements for all scenarios where standard ActionForm beans are
> >currently used - at least in a 1.1 time frame.  We need more real world
> >experience with them to validate this first.
> >
> >>
> >>
> >> Kevin
> >>
> >
> >Craig
>
>
> __
> Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
>convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/
>
> Get your own FREE, personal Netscape Mail account today at 
>http://webmail.netscape.com/
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>
>


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




Re: With Struts tag, Size of ArrayList

2002-07-09 Thread Daniel Jaffa

Thank u very much, i do not know how i messed that but i did.  This will be
very helpfull

dan
- Original Message -
From: "Struts Newsgroup" <@[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 08, 2002 6:55 PM
Subject: Re: With Struts tag, Size of ArrayList


> Subject: Re: With Struts tag, Size of ArrayList
> From: "Senén de Diego" <[EMAIL PROTECTED]>
>  ===
> You can use:
>
> 
> 
> ..
> 
>
> For a description of bean-size:
> http://jakarta.apache.org/struts/struts-bean#size
>
> Senén
>
> "Daniel Jaffa" <[EMAIL PROTECTED]> escribió en el mensaje
> news:[EMAIL PROTECTED]...
> > Did a little research and could not find an elegant way to find out if
an
> > arraylist that i send over is populated or not.  Currently I send the
size
> > of the array list.  But would like to do something like
> > 
> >
> > 
> >
> > --
> > 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: Off-Topic: JMS Design Question...

2002-07-09 Thread Rathore, Pavan

Yes, Durable Subscriptions would be useful in that case.

Pavan

-Original Message-
From: Ajay Chitre [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 9:15 AM
To: [EMAIL PROTECTED]
Subject: Off-Topic: JMS Design Question...


Hello,
 
This is kind of off-topic, so I apologize in advance.  We do have some
J2EE gurus on this mailing list so I decided to ask it here.  (Is there
any other *active* mailing list where I can post JMS related questions?)
 
Anyway, I need some help to develop a JMS based solution. Here's what we
are trying to accomplish;
 
We need to send XML messages (as well as other types of messages) back &
forth between two Application Servers. In other words, a Web Application
created by us will send a message to the application server of our
client and vice versa. 
 
This is what I was thinking of doing;
 
1) When it's time to send a message on our side, we will write it to a
Topic in our App Server.
2) A MDB on our side will retrieve the message and send it to the Topic
of our client.
 
The same logic will apply for incoming messages;
1) Client will write a message to our Topic.
2) A MDB on our side will then pick up this message and process it.
 
If this sounds okay, then I am wondering how I can handle Exception
conditions.  For example;
 
1)  If Client's App Server is down, then our MDB should keep resending
till the message is sent successfully.  How can I do this in JMS?
2)  If our JMS Server is down (shouldn't happen, but let's say it does)
what should the Web App do?  Would "Durable Subscriptions" help in this
case?
 
I would greatly appreciate any input in this matter. Thanks (a lot) for
your time.
 
- Ajay




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




Re: DynaActionForm Advantages

2002-07-09 Thread Craig R. McClanahan



On Tue, 9 Jul 2002, Glen Mazza wrote:

> Date: Tue, 9 Jul 2002 09:58:29 -0500 (CDT)
> From: Glen Mazza <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re:  DynaActionForm Advantages
>
> > Fecha: Mon, 08 Jul 2002 23:37:03 -0400
> > A: [EMAIL PROTECTED]
> > De: James Turner <[EMAIL PROTECTED]>
> > Asunto: RE: DynaActionForm Advantages
> >
> > My two cents on the topic.
> >
> > As mentioned, once you move to a good Java IDE like
> > JBuilder, writing
> > getters and setters is no longer nearly the pain it
> > used to be.
> >
>
> Correct--the ActionForm follows the standard JavaBeans
> approach--reduced learning curve for newcomers, and
> already generated by most IDE's.
>
>
> > What bothers me about the DynaBean approach is that
> > it's *yet another*
> > file, and *yet another* level of indirection that
> > obscure what's really
> > going on.  I can look at an ActionForm, see all the
> > properties, look at the
> > validation, all in one step.  Making it a DynaBean
> > form means having to
> > maintain another file with the XML, always having to
> > remember where it is, etc.
> >
>
> Mostly agree.  It's not "yet another" file, because
> DAF's were (I believe) originally designed to reduce
> the number of ActionForms you'd have to implement.
> I.e., if you don't have any special validation to do,
> don't bother subclassing an ActionForm--just put the
> variables in the struts-config and you're done.  Very
> nice design.
>
> The problem was that the DAF class was not made final.
>  Allowing it to be subclassed is creating the mess you
> describe--the variables in the XML file and actions on
> them in the DAF subclass.  (Another was writing about
> putting member variable initializations in the
> validate() function--the DAF subclass may also start
> encouraging other messier programming habits.)
>
> As for those who don't like getter/setters and want to
> use the common-beanutils "get" functions described by
> Craig:  Might it have been better, in addition to
> making the DAF class final,

Making DAF final would have prevented the use case where you want to
subclass it for custom reset() or validate() methods.  This would have
forced the use of two classes instead of one -- IMHO that would have been
more confusing, not less.

> to just have ActionForms
> implement "get"'s interface? Just newbie thinking...

And the "set" methods also, I presume?  That's an interesting idea -- then
users of the form beans could always use get()/set() and not care whether
it was actually a DynaActionForm or not ...

>
> Glen
>

Craig


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




RE: container managed security

2002-07-09 Thread Jason Rosen

I implemented a Struts controlled authentication mechanism because I needed
a custom authentication routine not
already available via any servlet container.  In addition, because there is
no standard for implementing custom
container-based authentication (different API's in every container) and I
want to guarantee portability of my 
web app, I opted for writing a set of custom Struts actions and subclassing
the Struts 1.1 RequestProcessor to
implement my custom authentication and authorization.  The RequestProcessor
has some good pre-defined hotspots 
for adding in authentication and authorization:

  1. I created a custom ActionMapping that has accessors and mutators
for 
 .  This allows
me to declaritively define in 
 struts-config.xml whether an Action requires the client to
authenticate first.

2. I overrode (overrided??) processPreprocess() to check the
ActionMapping (ActionConfig) for the presence
 of the UserAuth property (see #1).  If UserAuth is true, then the
HttpSession is checked for the presence of 
 a custom SecurityToken (functionally based on the Catalina
GenericPrincipal).  
 If the token is unavailable, Struts forwards to the login form with
the originally requested Action as
 a parameter (via a pre-populated ActionForm to allow for
continuation of workflow).
 If the token is available or UserAuth is false, the originally
requested Action is processed.
 
  3. The login form submits to a LoginAction that checks credentials and
stores the SecurityToken in the 
 HttpSession and then forwards to the originally requested Action.
This prevents authentication from
 interrupting the desired workflow.

  4. In Struts 1.1, the ActionMapping (ActionConfig) has accessors and
mutators 
 (getRoleNames(), getRoles(), and setRoles()) so that role-based
authorization can be 
 declaritively defined for Actions within struts-config.xml
(although, the Struts 1.1b DTD does not define the 
 necessary XML attribute for Action to allow one to use this - I had
to add it myself to the DTD).
 
5. The RequestProcessor has another hotspot (method) for checking
authorization via "roles".  I also overrode
 processRoles() to check the roles stored in my custom SecurityToken
against the roles defined in the ActionMapping
 (ActionConfig). 

The following pros and cons were acheived in implementing Struts-controlled
security over container managed security:
1. Pro: Retained the ability to declaritively define security
parameters for both authentication and authorization in
 an app-specific config file (struts-config.xml)
 
  2. Pro: Portability between servlet containers (as long as Struts 1.1
is used)

  3. Con (possibly): Struts-based security may be more resource
intensive by constantly having to check for 
 UserAuth presence in processPreprocess() even for Actions (and any
request) where it is not defined. 
 Container managed security may be implemented more efficiently on
the back-end, but it varies between containers.
 Toss-up in my book.

I welcome any and all comments.

Jason




-Original Message-
From: Joe Germuska [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 7:33 AM
To: Struts Users Mailing List
Subject: Re: container managed security


At 5:48 PM +0200 2002/07/08, Jürgen Weber wrote:
>Hello,
>
>I am into evaluating Struts.
>
>The struts-example.war does authentication for its users programmatically.
>
>Why doesn't it use container managed security?

I would assume simply because that's easier for an example.  There's 
nothing preventing anyone from using container managed security for 
Struts.

Do you see ways in which the Struts framework can do anything useful 
to make it easier to implement container managed security?  I can 
imagine perhaps having a SecureActionMapping subclass of 
ActionMapping that might allow declarative access control based on a 
user role or something -- but I haven't needed that kind of security 
in an app yet, so I haven't really learned all the details.

If you need it, maybe you can build it, and then contribute it back 
to the project?  That's how these things grow after all...

Joe

-- 
--
* Joe Germuska{ [EMAIL PROTECTED] }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
--Sam Goody, 1956
tune in posse radio: 

--
To unsubscribe, e-mail:

For additional commands, e-mail:




Re: DynaActionFormBean Advantages -- Complicates JSTL usage?

2002-07-09 Thread Craig R. McClanahan



On Mon, 8 Jul 2002, Stuart Robertson wrote:

> Date: Mon, 8 Jul 2002 22:35:43 -0400
> From: Stuart Robertson <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: DynaActionFormBean Advantages -- Complicates JSTL usage?
>
> This is really a question, since I'm not familiar with the details of
> how DynaBretheren pull off their magic.
>
> To what extent does reliance on DynaActionForm beans tie the view impl
> to using Struts tags?  Does using DynaStuff require that tags use the
> commons introspection utils?  Specifically, would a JSTL-based set of
> tags see Dyna properties as regular properties?
>

DynaActonForms use the commons-beanutils stuff for their magic, and the
introspection performed by JSTL won't work on them.  (Unless, of course,
we were to implement JSTL ourselves inside of Struts ...).

> If DynaActionForms don't trick the regular introspection mechanisms into
> thinking they have javabean properties, then I would consider that a
> major disadvantage.  JSTL is compelling...

Yep.

>
> 
> Regarding cool tag developments, if Craig is reading this, is there any
> info you can share about JSR 127?  I know your team's working hard on it
> now.

It's just entering Community Review in the JCP process.

>  One question I have in particular (if I may :-) is that it seems a
> framework using Faces would have controller logic interacting with these
> gui components/widgets.  Given that none of the servlet frameworks were
> built with Faces in mind, upon its release will any of our favorite
> frameworks be able to use it without major refactoring?

Well, I care most about the framework we all know and love :-).  We're
trying to make it possible to integrate Faces into existing controller
frameworks in fairly flexible ways -- for Struts, my goal is that you'll
be able to use Faces in your JSP pages with zero changes to the actions,
with only some tweaks to your config files and an extra JAR or two.

>  ...ok, I have
> lots of other questions, but will go back to pretending to wait
> paitiently like everybody else.
> 
>

Craig



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




Re: Off-Topic: JMS Design Question...

2002-07-09 Thread Kevin . Bedell



To begin with, I'd recommend using a web service instead of  just JMS. It's
more reusable, has the ability for a variety of clients to access it and
comes with fewer networking headaches. Plus they are especially good for
sending XML. Given the fact that you are simply sending messages and
getting responses, this may be better.

But I've also built JMS apps as well. JMS is extremely cool and has a whole
bunch of functionality that might be useful.  In fact, this is how Weblogic
implements message-oriented web services (see - "Message-Style Web Services
and JMS" at
http://edocs.bea.com/wls/docs61/webServices/develop.html#1031913 ).

Using JMS within your container with SOAP as the transport protocol as
outlined in the weblogic links above would be a great solution. It gives
you persistence within your container and theirs, while exposing the app as
a web service.

I believe this simplifies your solution:

 - Your web app either:
  1.  - Puts the transaction into a JMS queue (topic or
point-to-point) on your machine
- Another process on your machine gets  the message and then
makes a message-based web service call to their app server
- Their app server (which is exposed as a web service) gets the
message, processes it and places the result on an outoging queue
- Your web sevice call then retrieves the results.
  or, 2.  - Your web app simply acts as a client to their web
service and sends the message/retrieves the results by itself.
- In this case you may be able to use the simpler, RPC-style
web service.
- In this case you also lose the ability to easily persist the
transaction for sending later it their service is unavailable.


Let's assume you choose option #1 above -  to answer your questions:

1)  If Client's App Server is down, then our MDB should keep resending
till the message is sent successfully.  How can I do this in JMS?

 - roll-back your read of your internal JMS queue. The message will be
there when you retry at some later time. The normal transaction management
stuff in your app server should handle all this.


2)  If our JMS Server is down (shouldn't happen, but let's say it does)
what should the Web App do?  Would "Durable Subscriptions" help in this
case?

 - Log the information you captured in a database and/or via an e-mail
message to someone who cares and intervene manually (uless you want to
write some fail-safe backup delivery - but then how do you provide back-up
in case the back-up fails?). "Durable Subscriptions" would allow you to not
lose any messages already on the queue, but wouldn't help you add new
transactions if they came along while JMS was down.

Since this is off-topid. feel free to respond to me directly if you want to
follow up.

Kevin















Hello,

This is kind of off-topic, so I apologize in advance.  We do have some
J2EE gurus on this mailing list so I decided to ask it here.  (Is there
any other *active* mailing list where I can post JMS related questions?)

Anyway, I need some help to develop a JMS based solution. Here's what we
are trying to accomplish;

We need to send XML messages (as well as other types of messages) back &
forth between two Application Servers. In other words, a Web Application
created by us will send a message to the application server of our
client and vice versa.

This is what I was thinking of doing;

1) When it's time to send a message on our side, we will write it to a
Topic in our App Server.
2) A MDB on our side will retrieve the message and send it to the Topic
of our client.

The same logic will apply for incoming messages;
1) Client will write a message to our Topic.
2) A MDB on our side will then pick up this message and process it.

If this sounds okay, then I am wondering how I can handle Exception
conditions.  For example;

1)  If Client's App Server is down, then our MDB should keep resending
till the message is sent successfully.  How can I do this in JMS?
2)  If our JMS Server is down (shouldn't happen, but let's say it does)
what should the Web App do?  Would "Durable Subscriptions" help in this
case?

I would greatly appreciate any input in this matter. Thanks (a lot) for
your time.

- Ajay



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




Re: Doing a sendRedirect from an Action

2002-07-09 Thread Craig R. McClanahan



On Tue, 9 Jul 2002, James Turner wrote:

> Date: Tue, 09 Jul 2002 04:16:42 -0400
> From: James Turner <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Doing a sendRedirect from an Action
>
> Question of the morning:
>
> I'm in an Action, and I decide that I need to redirect off the current
> application (say to cnn.com)  I can't do it with a forward because they
> only work inside the current application.
>
> My initial instinct is to do a response.sendRedirect inside the Action, but
> this brings up the question of what to return?  null?
>

Yes.  Return null from an action whenever you do a redirect, or otherwise
have already created the response (such as a dynamically generated image
or something like that).  The null return tells the controller servlet
that no forwarding is required.

> James

Craig


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




Re: shouldn't html taglib support _ALL_ HTML 4.x default attributes?

2002-07-09 Thread Craig R. McClanahan



On Tue, 9 Jul 2002, Struts Newsgroup wrote:

> Date: Tue, 9 Jul 2002 01:55:02 -0700
> From: Struts Newsgroup <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: shouldn't html taglib support _ALL_ HTML 4.x default attributes?
>
> Subject: shouldn't html taglib support _ALL_ HTML 4.x default attributes?
> From: Serge Shikov <[EMAIL PROTECTED]>
>  ===
> Hello,
>
> I mean - id, lang, class, and many other attributes, defined in HTML 4.x
> specs? Why I coudn't specify id or class in  to do some DHTML
> tricks later?
>

The "styleId" attribute on nearly every Struts HTML tag actually generates
the "id" attribute in the emitted HTML.  We couldn't use "id" directly
because it is a reserved attribute name in JSP 1.1.  Likewise,
"styleClass" on the Struts tag renders "class" in HTML.

As for the rest, we've added most of the HTML 4.01 attributes that people
have asked for.  If you've got specific ones in mind, please submit an
enhancement request to our bug tracking system:

  http://nagoya.apache.org/bugzilla/


Craig


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




Re: [ARTICLE] Issues in Struts Adoption

2002-07-09 Thread Craig R. McClanahan



On Tue, 9 Jul 2002, John Yu wrote:

> Date: Tue, 09 Jul 2002 18:01:20 +0800
> From: John Yu <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [ARTICLE] Issues in Struts Adoption
>
> A new article "Issues in Struts Adoption" is available at:
>
>  http://www.scioworks.net/servlets/Redirect?pid=13
>
> ABSTRACT: This article discusses issues in Struts adoption, covering both
> technical considerations and business issues like total cost of ownership,
> maintenance, future direction and long term viability of the Apache Struts
> Framework.
>

John,

Many thanks for a nice article covering the important issues.  I only have
one request -- could you please spell my last name correctly :-) ?

You might also find it interesting to note that, not only am I an expert
group member on JavaServer Faces, I am now the Specification Lead for this
JSR.

Craig McClanahan
^^

> --
> John Yu   Scioworks Technologies
> e: [EMAIL PROTECTED] w: +(65) 873 5989
> w: http://www.scioworks.com   m: +(65) 9782 9610


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




Re: IllegalStateException on action chaining

2002-07-09 Thread Craig R. McClanahan



On Tue, 9 Jul 2002, Garg, Sanjay wrote:

> Date: Tue, 9 Jul 2002 10:05:24 -0400
> From: "Garg, Sanjay" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: IllegalStateException on action chaining
>
> Hi,
>
> I am using Struts 1.1b1 with Websphere 4.02.
>
> In one of my action I am forwarding to another action which in turn forwards
> to the final JSP.
>
> I always get the error pasted below. This does not cause any harm, other
> then cluttering up the log file.
> I have read that the workaround is to use redirect instead of forward for
> the intermediary action.
> But I would prefer to use forward and also avoid this error message.
>

As the error message says, it is not legal to do a
RequestDispatcher.forward() once the original response has been committed.
The fact that you are getting this message implies that you've somehow
created output (enough to cause the response buffer to be flushed) before
doing the forward.

Personally, I'm not a believer in Action chaining -- I think it's better
to abstract the business logic out into bean classes that can be called in
order from a single Action, which then does just a single forward to the
appropriate page.  Others seem to like chaining, however.

> I would appreciate any help.
> Thanks,
> Sanjay

Craig


>  Error message --
>
> [7/8/02 17:04:04:906 EDT] 3ce2be0b WebGroup  X Servlet Error: ERROR:
> Cannot forward. Response already committed.:
> java.lang.IllegalStateException: ERROR: Cannot forward. Response already
> committed.
>   at
> com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
> ispatcher.java:92)
>   at
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:97
> 2)
>   at
> org.apache.struts.action.RequestProcessor.processActionForward(RequestProces
> sor.java:408)
>   at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
>   at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
>   at
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:452)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
> .java:827)
>   at
> com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
> eServlet.java:167)
>   at
> com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
> t.java:297)
>   at
> com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
> Servlet.java:110)
>   at
> com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:47
> 2)
>   at
> com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
> ager.java:1012)
>   at
> com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
> er.java:913)
>   at
> com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W
> ebAppRequestDispatcher.java:523)
>   at
> com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest
> Dispatcher.java:282)
>   at
> com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
> ispatcher.java:112)
>   at
> com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
>   at
> com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
> java:184)
>   at
> com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
> vocation.java:67)
>   at
> com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheabl
> eInvocationContext.java:106)
>   at
> com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
> estProcessor.java:125)
>   at
> com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
> .java:315)
>   at
> com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.ja
> va:60)
>   at
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
>   at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
>   at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>
>


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




RE: DynaActionForm Advantages (A different approach)

2002-07-09 Thread Greg.Reddin

Something that has always bothered me in Struts is the "disconnect"
between Form Beans and Model Beans.  How many times do you have a Form
Bean and a model bean that contain the same data?  The disconnect makes
some sense because you want everything that could come in from a JSP
page to be String-based, while you want the properties of your model
beans to be properly typed.  Plus there are often things on the Form
Bean that will not be in the model bean or will be represented
differently.  But I've found myself constantly trying to find an easy
way to map the data from my form beans back to the model beans in Struts
without manually copying the data.  It appears DynaBeans don't fix this.

Our company has developed a framework loosely based on Struts, that has
a single component for storing page data and mapping it back to model
beans.  Each JSP page has a bean that holds its data.  The data is
contained in a list of PageField objects.  The PageField has
getFieldValue() and setFieldValue() methods that return and take Strings
respectively.  The PageField also has a mapping that will map the field
back to a model bean, if desired.  The mapping is specified in the JSP
tag.  Page data that is contained in a model bean is automatically
retrieved from and populated to the model bean by reflection.  Page data
that does not cleanly map back to the bean is kept in PageField's
internal storage.

This works great for us because we do not have to write form beans for
every page.  Whatever beans we need to use are automatically populated
by the framework.

Would something like this be useful to the Struts community?  Do you see
issues with the approach?

Thanks,
Greg

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 09, 2002 11:47 AM
> To: Struts Users Mailing List
> Subject: Re: DynaActionForm Advantages
> 
> 
> 
> 
> On Tue, 9 Jul 2002, Glen Mazza wrote:
> 
> > Date: Tue, 9 Jul 2002 09:58:29 -0500 (CDT)
> > From: Glen Mazza <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Re:  DynaActionForm Advantages
> >
> > > Fecha: Mon, 08 Jul 2002 23:37:03 -0400
> > > A: [EMAIL PROTECTED]
> > > De: James Turner <[EMAIL PROTECTED]>
> > > Asunto: RE: DynaActionForm Advantages
> > >
> > > My two cents on the topic.
> > >
> > > As mentioned, once you move to a good Java IDE like
> > > JBuilder, writing
> > > getters and setters is no longer nearly the pain it
> > > used to be.
> > >
> >
> > Correct--the ActionForm follows the standard JavaBeans
> > approach--reduced learning curve for newcomers, and
> > already generated by most IDE's.
> >
> >
> > > What bothers me about the DynaBean approach is that
> > > it's *yet another*
> > > file, and *yet another* level of indirection that
> > > obscure what's really
> > > going on.  I can look at an ActionForm, see all the
> > > properties, look at the
> > > validation, all in one step.  Making it a DynaBean
> > > form means having to
> > > maintain another file with the XML, always having to
> > > remember where it is, etc.
> > >
> >
> > Mostly agree.  It's not "yet another" file, because
> > DAF's were (I believe) originally designed to reduce
> > the number of ActionForms you'd have to implement.
> > I.e., if you don't have any special validation to do,
> > don't bother subclassing an ActionForm--just put the
> > variables in the struts-config and you're done.  Very
> > nice design.
> >
> > The problem was that the DAF class was not made final.
> >  Allowing it to be subclassed is creating the mess you
> > describe--the variables in the XML file and actions on
> > them in the DAF subclass.  (Another was writing about
> > putting member variable initializations in the
> > validate() function--the DAF subclass may also start
> > encouraging other messier programming habits.)
> >
> > As for those who don't like getter/setters and want to
> > use the common-beanutils "get" functions described by
> > Craig:  Might it have been better, in addition to
> > making the DAF class final,
> 
> Making DAF final would have prevented the use case where you want to
> subclass it for custom reset() or validate() methods.  This would have
> forced the use of two classes instead of one -- IMHO that 
> would have been
> more confusing, not less.
> 
> > to just have ActionForms
> > implement "get"'s interface? Just newbie thinking...
> 
> And the "set" methods also, I presume?  That's an interesting 
> idea -- then
> users of the form beans could always use get()/set() and not 
> care whether
> it was actually a DynaActionForm or not ...
> 
> >
> > Glen
> >
> 
> Craig
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

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




RE: DynaActionForm Advantages (A different approach)

2002-07-09 Thread Dan Cancro

How does your PageField list handle iterative and nested properties?  Can a
PageField's value be a String array?

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 09, 2002 10:22 AM
> To: [EMAIL PROTECTED]
> Subject: RE: DynaActionForm Advantages (A different approach)
> 
> 
> Something that has always bothered me in Struts is the "disconnect"
> between Form Beans and Model Beans.  How many times do you have a Form
> Bean and a model bean that contain the same data?  The 
> disconnect makes
> some sense because you want everything that could come in from a JSP
> page to be String-based, while you want the properties of your model
> beans to be properly typed.  Plus there are often things on the Form
> Bean that will not be in the model bean or will be represented
> differently.  But I've found myself constantly trying to find an easy
> way to map the data from my form beans back to the model 
> beans in Struts
> without manually copying the data.  It appears DynaBeans 
> don't fix this.
> 
> Our company has developed a framework loosely based on 
> Struts, that has
> a single component for storing page data and mapping it back to model
> beans.  Each JSP page has a bean that holds its data.  The data is
> contained in a list of PageField objects.  The PageField has
> getFieldValue() and setFieldValue() methods that return and 
> take Strings
> respectively.  The PageField also has a mapping that will map 
> the field
> back to a model bean, if desired.  The mapping is specified in the JSP
> tag.  Page data that is contained in a model bean is automatically
> retrieved from and populated to the model bean by reflection. 
>  Page data
> that does not cleanly map back to the bean is kept in PageField's
> internal storage.
> 
> This works great for us because we do not have to write form beans for
> every page.  Whatever beans we need to use are automatically populated
> by the framework.
> 
> Would something like this be useful to the Struts community?  
> Do you see
> issues with the approach?
> 
> Thanks,
> Greg
> 
> > -Original Message-
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 09, 2002 11:47 AM
> > To: Struts Users Mailing List
> > Subject: Re: DynaActionForm Advantages
> > 
> > 
> > 
> > 
> > On Tue, 9 Jul 2002, Glen Mazza wrote:
> > 
> > > Date: Tue, 9 Jul 2002 09:58:29 -0500 (CDT)
> > > From: Glen Mazza <[EMAIL PROTECTED]>
> > > Reply-To: Struts Users Mailing List 
> <[EMAIL PROTECTED]>
> > > To: [EMAIL PROTECTED]
> > > Subject: Re:  DynaActionForm Advantages
> > >
> > > > Fecha: Mon, 08 Jul 2002 23:37:03 -0400
> > > > A: [EMAIL PROTECTED]
> > > > De: James Turner <[EMAIL PROTECTED]>
> > > > Asunto: RE: DynaActionForm Advantages
> > > >
> > > > My two cents on the topic.
> > > >
> > > > As mentioned, once you move to a good Java IDE like
> > > > JBuilder, writing
> > > > getters and setters is no longer nearly the pain it
> > > > used to be.
> > > >
> > >
> > > Correct--the ActionForm follows the standard JavaBeans
> > > approach--reduced learning curve for newcomers, and
> > > already generated by most IDE's.
> > >
> > >
> > > > What bothers me about the DynaBean approach is that
> > > > it's *yet another*
> > > > file, and *yet another* level of indirection that
> > > > obscure what's really
> > > > going on.  I can look at an ActionForm, see all the
> > > > properties, look at the
> > > > validation, all in one step.  Making it a DynaBean
> > > > form means having to
> > > > maintain another file with the XML, always having to
> > > > remember where it is, etc.
> > > >
> > >
> > > Mostly agree.  It's not "yet another" file, because
> > > DAF's were (I believe) originally designed to reduce
> > > the number of ActionForms you'd have to implement.
> > > I.e., if you don't have any special validation to do,
> > > don't bother subclassing an ActionForm--just put the
> > > variables in the struts-config and you're done.  Very
> > > nice design.
> > >
> > > The problem was that the DAF class was not made final.
> > >  Allowing it to be subclassed is creating the mess you
> > > describe--the variables in the XML file and actions on
> > > them in the DAF subclass.  (Another was writing about
> > > putting member variable initializations in the
> > > validate() function--the DAF subclass may also start
> > > encouraging other messier programming habits.)
> > >
> > > As for those who don't like getter/setters and want to
> > > use the common-beanutils "get" functions described by
> > > Craig:  Might it have been better, in addition to
> > > making the DAF class final,
> > 
> > Making DAF final would have prevented the use case where you want to
> > subclass it for custom reset() or validate() methods.  This 
> would have
> > forced the use of two classes instead of one -- IMHO that 
> > would have been
> > more confusing, not less.
> > 
> > > to just have ActionForms
> > > implement "get"'s interface? Just ne

RE: DynaActionForm Advantages (A different approach)

2002-07-09 Thread Greg.Reddin

The PageField's internal storage is a simple String.  It could easily be
changed to anything else, though.  If the field maps to a model bean, it
handles nested and indexed properties the same way Struts does.  In fact
it uses BeanUtils and PropertyUtils.  If the field does not map to a
bean, it can only be a String, but this is just a design flaw.  After
sending that post, I decided to write an implementation that works with
Struts and post it for anyone who is interested.

> -Original Message-
> From: Dan Cancro [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 09, 2002 12:33 PM
> To: 'Struts Users Mailing List'
> Subject: RE: DynaActionForm Advantages (A different approach)
> 
> 
> How does your PageField list handle iterative and nested 
> properties?  Can a
> PageField's value be a String array?
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 09, 2002 10:22 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: DynaActionForm Advantages (A different approach)
> > 
> > 
> > Something that has always bothered me in Struts is the "disconnect"
> > between Form Beans and Model Beans.  How many times do you 
> have a Form
> > Bean and a model bean that contain the same data?  The 
> > disconnect makes
> > some sense because you want everything that could come in from a JSP
> > page to be String-based, while you want the properties of your model
> > beans to be properly typed.  Plus there are often things on the Form
> > Bean that will not be in the model bean or will be represented
> > differently.  But I've found myself constantly trying to 
> find an easy
> > way to map the data from my form beans back to the model 
> > beans in Struts
> > without manually copying the data.  It appears DynaBeans 
> > don't fix this.
> > 
> > Our company has developed a framework loosely based on 
> > Struts, that has
> > a single component for storing page data and mapping it 
> back to model
> > beans.  Each JSP page has a bean that holds its data.  The data is
> > contained in a list of PageField objects.  The PageField has
> > getFieldValue() and setFieldValue() methods that return and 
> > take Strings
> > respectively.  The PageField also has a mapping that will map 
> > the field
> > back to a model bean, if desired.  The mapping is specified 
> in the JSP
> > tag.  Page data that is contained in a model bean is automatically
> > retrieved from and populated to the model bean by reflection. 
> >  Page data
> > that does not cleanly map back to the bean is kept in PageField's
> > internal storage.
> > 
> > This works great for us because we do not have to write 
> form beans for
> > every page.  Whatever beans we need to use are 
> automatically populated
> > by the framework.
> > 
> > Would something like this be useful to the Struts community?  
> > Do you see
> > issues with the approach?
> > 
> > Thanks,
> > Greg
> > 
> > > -Original Message-
> > > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, July 09, 2002 11:47 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: DynaActionForm Advantages
> > > 
> > > 
> > > 
> > > 
> > > On Tue, 9 Jul 2002, Glen Mazza wrote:
> > > 
> > > > Date: Tue, 9 Jul 2002 09:58:29 -0500 (CDT)
> > > > From: Glen Mazza <[EMAIL PROTECTED]>
> > > > Reply-To: Struts Users Mailing List 
> > <[EMAIL PROTECTED]>
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Re:  DynaActionForm Advantages
> > > >
> > > > > Fecha: Mon, 08 Jul 2002 23:37:03 -0400
> > > > > A: [EMAIL PROTECTED]
> > > > > De: James Turner <[EMAIL PROTECTED]>
> > > > > Asunto: RE: DynaActionForm Advantages
> > > > >
> > > > > My two cents on the topic.
> > > > >
> > > > > As mentioned, once you move to a good Java IDE like
> > > > > JBuilder, writing
> > > > > getters and setters is no longer nearly the pain it
> > > > > used to be.
> > > > >
> > > >
> > > > Correct--the ActionForm follows the standard JavaBeans
> > > > approach--reduced learning curve for newcomers, and
> > > > already generated by most IDE's.
> > > >
> > > >
> > > > > What bothers me about the DynaBean approach is that
> > > > > it's *yet another*
> > > > > file, and *yet another* level of indirection that
> > > > > obscure what's really
> > > > > going on.  I can look at an ActionForm, see all the
> > > > > properties, look at the
> > > > > validation, all in one step.  Making it a DynaBean
> > > > > form means having to
> > > > > maintain another file with the XML, always having to
> > > > > remember where it is, etc.
> > > > >
> > > >
> > > > Mostly agree.  It's not "yet another" file, because
> > > > DAF's were (I believe) originally designed to reduce
> > > > the number of ActionForms you'd have to implement.
> > > > I.e., if you don't have any special validation to do,
> > > > don't bother subclassing an ActionForm--just put the
> > > > variables in the struts-config and you're done.  Very
> > > > nice design.
> > > >
> > > > The problem was that the DAF c

[ANNOUNCE] Struts Console v2.0

2002-07-09 Thread James Holmes

Struts Console version 2.0 is now available.

http://www.jamesholmes.com/struts/

Download Now:
http://www.jamesholmes.com/struts/struts-console-2.0.zip
  -- OR --
http://www.jamesholmes.com/struts/struts-console-2.0.tar.gz

Struts Console is FREE software.

This release is adds new features and fixes many bugs,
but most notably adds support for Tiles configuration
files. This release also adds support for all of the
latest 1.1 config changes.

Changes with Struts Console v2.0

  *) Fixed bug where Edit button was not properly
 being disabled for Properties and Form Properties
 which would allow Edit to be selected when no row
 was highlighted and thus causing exceptions to be
 thrown.

  *) Fixed bug where Properties and Form Properties
 tables weren't being updated after a row had been
 edited.

  *) Fixed bug where Forwards and Exceptions were not
 properly being removed from Actions.

  *) Fixed bug where changing an Action from using a
 Form Bean to "" would wrongfully set the
 Action's "name" attribute to "".

  *) Fixed bug in standalone app where after
 performing "Save As" on a file, the GUI wouldn't
 indicate whether or not a file had changes or
not.

  *) Fixed bug in Page Converter where an exception
 was thrown when trying to write files to a
 different directory.

  *) Added support for Tiles configuration files.

  *) Added support for "roles" attribute to Action
 screen for 1.1 config files.

  *) Added support for "forwardPattern", "pagePattern"
 and "inputForward" attributes to Controller
 screen for 1.1 config files.

  *) Added support for "bundle" attribute to Exception
 screen for 1.1 config files.

  *) Added ability to move elements up and down in
 relation to their parent.

  *) Added ability to specifiy the number of lines
 between elements in the Ouput Options.

  *) Added "Key" column to Exceptions tables and
 make "Key" a required field per the latest DTD
 for 1.1 config files.

  *) Updated Data Sources screen to be more consistent
 with the other screens.

  *) Extensive refactorings to improve performance and
 reduce code size.


Thanks,

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/

__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




Nested Classes problem

2002-07-09 Thread Matt Sales

Hello,

I'm having a problem nesting classes.  I'll try to keep it simple:
MyActionForm contains an instance of MyClass.  MyClass contains an instance
of MyNestedClass.  When displaying values in a struts form, I can refer to
the form property "myClass.myNestedClass.id", and it displays the correct
value.  However, when I validate the form after a submit (either via
MyActionForm or a cusom-built validate method in an Action class), a call to
myClass.getMyNestedClass() returns null.  All non-nested values are correct.

If I "un-nest" myNestedClass and put it in MyActionForm bean, I have no
problem...  But it seems you should be able to nest classes and refer to
those values...  I don't know why a a nested class would turn to null
between form presentation and submittal...  Has anyone else had this
problem?

Thanks,
Matt


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




RE: DynaActionForm and JSTL (was RE: DynaActionForm Advantages)

2002-07-09 Thread Craig R. McClanahan



On Tue, 9 Jul 2002, Jennings, Christofer J. wrote:

> Date: Tue, 9 Jul 2002 11:19:05 -0700
> From: "Jennings, Christofer J." <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: DynaActionForm and JSTL (was RE: DynaActionForm Advantages)
>
> My mistake. I was thinking DynaActionForm is a Map.
>
> It'd be a shame to not be able to use JSTL and DynaActionForm together (I
> think). As a general question, How much work would it be to have a
> MappedDynaActionForm subclassing DynaActionForm as an optional base class
> for our forms?
>

I'm going to take a look at the possibility of making DynaActionForm
itself implement Map -- if it makes them usable with JSTL expressions,
that would be pretty compelling.

> ,boz

Craig


>
> -Original Message-
> From: Joe Germuska [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 09, 2002 8:43 AM
> To: Struts Users Mailing List
> Subject: Re: DynaActionForm and JSTL (was RE: DynaActionForm Advantages)
>
>
> This would only work if ${form} implemented the Map interface.
>
> Making the DynaBean interface extend the Map interface seems like a
> lot of overkill considering the number of places people might want to
> use it that have nothing to do with the JSTL...
>
> Maybe you could make a case for having DynaActionForm implement Map,
> with a bunch of unsupported operations and delegating to the values
> hash otherwise.  It's still kind of cluttered, but at least it's off
> in Struts serving a specific need, instead of in beanutils.
>
> Joe
>
>
> At 8:19 AM -0700 2002/07/09, Jennings, Christofer J. wrote:
> >Looking at the JSTL 1.0 specification, section 3.3, leads me to believe
> that
> >DynaActionForm "properties" can be accessed through the JSTL EL but with a
> >different syntax than a regular JavaBean property.
> >
> >Example:
> > Regular JavaBean (e.g., ActionForm) EL syntax:
> > 
> > 
> > Map (e.g., DynaActionForm) EL syntax:
> > 
> > 
> >
> >If anyone has done this sort of thing I'd sure like to know how it works.
> >Especially how/if accessing "aSubProperty".
> >
> >I'm stuck using a container that can't support JSTL and I'm also not using
> >Struts 1.1 yet either so I can't confirm any of this.
> >
> >,
> >boz
> >
> >-Original Message-
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, July 08, 2002 6:19 PM
> >To: [EMAIL PROTECTED]
> >Subject: RE: DynaActionForm Advantages
> >
> >
> >But are DynaActionForm's compatible with JSTL?
> >
> >A discussion on taglibs-user made me think not:
> >http://marc.theaimsgroup.com/?l=taglibs-user&m=102433015725228&w=2
> >
> >Eddie
>
>
> --
> --
> * Joe Germuska{ [EMAIL PROTECTED] }
> "It's pitiful, sometimes, if they've got it bad. Their eyes get
> glazed, they go white, their hands tremble As I watch them I
> often feel that a dope peddler is a gentleman compared with the man
> who sells records."
>   --Sam Goody, 1956
> tune in posse radio: 
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>


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




Re: Announce: J2EE MVC training using Struts with Standard Tags (JSTL)

2002-07-09 Thread @Basebeans.com

Subject: Re: Announce: J2EE MVC training using Struts with Standard Tags (JSTL)
From: "Vic C." <[EMAIL PROTECTED]>
 ===
Standard J2EE MVC training using Struts with Standard Tags (JSTL)

-We have done more Struts training than anyone. This class adds Standard 
Tag Libs (JSTL) with MVC and a portal discussion.
Full Syllabus is at :
http://www.basebeans.com/syllabus.jsp

NYC on 8/2.
*This is the last week to sign up* :
http://www.basebeans.com/classReservation.jsp
More dates(tentative):
8/9 - Chicago downtown Marriott
8/16 - Atlanta downtown Marriott
8/23 - Austin downtown Marriott

To keep up on upcoming MVC training sign up at:
http://www.basebeans.com:8081/mailman/listinfo/mvc-programmers

Hope to see you,
Thanks,
Vic

Ps. 1: Set your newsreader such as Outlook Express or Netscape to 
news.basebeans.com for Open Standard news groups like JDO, Apache, SOAP, 
etc.

Ps 2: The sample app will be available end of next week at:
http://www.basebeans.com/downloads.jsp


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




RE: DynaActionForm Advantages (A different approach)

2002-07-09 Thread Greg.Reddin

> The preferences for Strings in form beans is to deal with bad 
> user input
> (such as typing "1a3" into a text field destined to be an 
> integer).  Any
> solution that does not redisplay the bad data that the user 
> typed (just
> like every GUI program in the world does it) is not acceptable, IMHO.
> 
I completely agree.  It took me a while to come around to that, but I
now appreciate the value in the String-based approach.

> One approach to migrating the data out of the form bean and 
> into the model
> bean would be to grab all the properties out into a Map (perhaps by
> calling PropertyUtils.describe()) and then using
> BeanUtils.populate() to copy these values into your model 
> bean.  This will
> perform String->whatever conversions for you as it goes.
> 
I'll try this method.  It sounds interesting.

> I'd certainly be interested in seeing how you've approached this.
> 
I think I'm going to "Struts-ify" our pattern and see if I can get it to
work.  If so, I'll post it here for review.

Greg

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




RE: DynaActionForm and JSTL (was RE: DynaActionForm Advantages)

2002-07-09 Thread Jennings, Christofer J.

My mistake. I was thinking DynaActionForm is a Map.

It'd be a shame to not be able to use JSTL and DynaActionForm together (I
think). As a general question, How much work would it be to have a
MappedDynaActionForm subclassing DynaActionForm as an optional base class
for our forms?

,boz

-Original Message-
From: Joe Germuska [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 8:43 AM
To: Struts Users Mailing List
Subject: Re: DynaActionForm and JSTL (was RE: DynaActionForm Advantages)


This would only work if ${form} implemented the Map interface.

Making the DynaBean interface extend the Map interface seems like a 
lot of overkill considering the number of places people might want to 
use it that have nothing to do with the JSTL...

Maybe you could make a case for having DynaActionForm implement Map, 
with a bunch of unsupported operations and delegating to the values 
hash otherwise.  It's still kind of cluttered, but at least it's off 
in Struts serving a specific need, instead of in beanutils.

Joe


At 8:19 AM -0700 2002/07/09, Jennings, Christofer J. wrote:
>Looking at the JSTL 1.0 specification, section 3.3, leads me to believe
that
>DynaActionForm "properties" can be accessed through the JSTL EL but with a
>different syntax than a regular JavaBean property.
>
>Example:
>   Regular JavaBean (e.g., ActionForm) EL syntax:
>   
>   
>   Map (e.g., DynaActionForm) EL syntax:
>   
>   
>
>If anyone has done this sort of thing I'd sure like to know how it works.
>Especially how/if accessing "aSubProperty".
>
>I'm stuck using a container that can't support JSTL and I'm also not using
>Struts 1.1 yet either so I can't confirm any of this.
>
>,
>boz
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Monday, July 08, 2002 6:19 PM
>To: [EMAIL PROTECTED]
>Subject: RE: DynaActionForm Advantages
>
>
>But are DynaActionForm's compatible with JSTL?
>
>A discussion on taglibs-user made me think not:
>http://marc.theaimsgroup.com/?l=taglibs-user&m=102433015725228&w=2
>
>Eddie


-- 
--
* Joe Germuska{ [EMAIL PROTECTED] }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
--Sam Goody, 1956
tune in posse radio: 

--
To unsubscribe, e-mail:

For additional commands, e-mail:




dynamically collect a series of String values to a vector property in an ActionForm

2002-07-09 Thread @Basebeans.com

Subject: dynamically collect a series of String values to a vector property in an 
ActionForm
From: "tom" <[EMAIL PROTECTED]>
 ===
How can I initialize a vector of Strings and assign values to the Strings in
jsp (view component) so that an ActionForm can collect the vector property
(a collection of String values) dynamically which depends on the number
values to be grasped from the submission form?



Thank you very much



Tom

[EMAIL PROTECTED]





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




Re: shouldn't html taglib support _ALL_ HTML 4.x default attributes?

2002-07-09 Thread Craig R. McClanahan



On Tue, 9 Jul 2002, Struts Newsgroup wrote:

> > http://jakarta.apache.org/struts/userGuide/struts-html.html#form
> >
> > That you can use styleClass and styleId attributes to render "class=" and
> > "id=" respectively.
> Thanks. But why not simple "class" and "id"?
>

In JSP 1.1, "id" is a reserved attribute name, so we couldn't use it.
(This got relaxed in JSP 1.2, but we need to maintain 1.1 compatibility).

For "class", the problem is that java.lang.Object already defines a
getClass() method (to return the Class corresponding to this object
instance), and you can't override getClass().

Craig


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




Re: shouldn't html taglib support _ALL_ HTML 4.x default attributes?

2002-07-09 Thread @Basebeans.com

Subject: Re: shouldn't html taglib support _ALL_ HTML 4.x default attributes?
From: Serge Shikov <[EMAIL PROTECTED]>
 ===
Matt Raible wrote:
> I've never heard of a "lang" attribute on a form.

HTML 4.01 loose.dtd:









> The documentation states:
> 
> http://jakarta.apache.org/struts/userGuide/struts-html.html#form
> 
> That you can use styleClass and styleId attributes to render "class=" and
> "id=" respectively.
Thanks. But why not simple "class" and "id"?


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




RE: DynaActionForm Advantages (A different approach)

2002-07-09 Thread Craig R. McClanahan



On Tue, 9 Jul 2002 [EMAIL PROTECTED] wrote:

> Date: Tue, 9 Jul 2002 12:21:44 -0500
> From: [EMAIL PROTECTED]
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: RE: DynaActionForm Advantages (A different approach)
>
> Something that has always bothered me in Struts is the "disconnect"
> between Form Beans and Model Beans.  How many times do you have a Form
> Bean and a model bean that contain the same data?  The disconnect makes
> some sense because you want everything that could come in from a JSP
> page to be String-based, while you want the properties of your model
> beans to be properly typed.  Plus there are often things on the Form
> Bean that will not be in the model bean or will be represented
> differently.  But I've found myself constantly trying to find an easy
> way to map the data from my form beans back to the model beans in Struts
> without manually copying the data.  It appears DynaBeans don't fix this.
>

No, any "disconnect" that exists for standard ActionForm beans will also
exist for DynaActionForm.

The preferences for Strings in form beans is to deal with bad user input
(such as typing "1a3" into a text field destined to be an integer).  Any
solution that does not redisplay the bad data that the user typed (just
like every GUI program in the world does it) is not acceptable, IMHO.

One approach to migrating the data out of the form bean and into the model
bean would be to grab all the properties out into a Map (perhaps by
calling PropertyUtils.describe()) and then using
BeanUtils.populate() to copy these values into your model bean.  This will
perform String->whatever conversions for you as it goes.

> Our company has developed a framework loosely based on Struts, that has
> a single component for storing page data and mapping it back to model
> beans.  Each JSP page has a bean that holds its data.  The data is
> contained in a list of PageField objects.  The PageField has
> getFieldValue() and setFieldValue() methods that return and take Strings
> respectively.  The PageField also has a mapping that will map the field
> back to a model bean, if desired.  The mapping is specified in the JSP
> tag.  Page data that is contained in a model bean is automatically
> retrieved from and populated to the model bean by reflection.  Page data
> that does not cleanly map back to the bean is kept in PageField's
> internal storage.
>
> This works great for us because we do not have to write form beans for
> every page.  Whatever beans we need to use are automatically populated
> by the framework.
>
> Would something like this be useful to the Struts community?  Do you see
> issues with the approach?
>

I'd certainly be interested in seeing how you've approached this.

> Thanks,
> Greg

Craig


>
> > -Original Message-
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 09, 2002 11:47 AM
> > To: Struts Users Mailing List
> > Subject: Re: DynaActionForm Advantages
> >
> >
> >
> >
> > On Tue, 9 Jul 2002, Glen Mazza wrote:
> >
> > > Date: Tue, 9 Jul 2002 09:58:29 -0500 (CDT)
> > > From: Glen Mazza <[EMAIL PROTECTED]>
> > > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > > To: [EMAIL PROTECTED]
> > > Subject: Re:  DynaActionForm Advantages
> > >
> > > > Fecha: Mon, 08 Jul 2002 23:37:03 -0400
> > > > A: [EMAIL PROTECTED]
> > > > De: James Turner <[EMAIL PROTECTED]>
> > > > Asunto: RE: DynaActionForm Advantages
> > > >
> > > > My two cents on the topic.
> > > >
> > > > As mentioned, once you move to a good Java IDE like
> > > > JBuilder, writing
> > > > getters and setters is no longer nearly the pain it
> > > > used to be.
> > > >
> > >
> > > Correct--the ActionForm follows the standard JavaBeans
> > > approach--reduced learning curve for newcomers, and
> > > already generated by most IDE's.
> > >
> > >
> > > > What bothers me about the DynaBean approach is that
> > > > it's *yet another*
> > > > file, and *yet another* level of indirection that
> > > > obscure what's really
> > > > going on.  I can look at an ActionForm, see all the
> > > > properties, look at the
> > > > validation, all in one step.  Making it a DynaBean
> > > > form means having to
> > > > maintain another file with the XML, always having to
> > > > remember where it is, etc.
> > > >
> > >
> > > Mostly agree.  It's not "yet another" file, because
> > > DAF's were (I believe) originally designed to reduce
> > > the number of ActionForms you'd have to implement.
> > > I.e., if you don't have any special validation to do,
> > > don't bother subclassing an ActionForm--just put the
> > > variables in the struts-config and you're done.  Very
> > > nice design.
> > >
> > > The problem was that the DAF class was not made final.
> > >  Allowing it to be subclassed is creating the mess you
> > > describe--the variables in the XML file and actions on
> > > them in the DAF subclass.  (Another was writing about
> > > putting member variable initialization

Re: preview view of a form

2002-07-09 Thread Mikael Eriksson


The reset() method of the formbean is called when you get back
to the form. So if you clean things up there your form gets empty.

You can avoid this by leaving the reset() method empty.

  /Mikael


At 15:00 2002-07-09 +0200, you wrote:
>Hi,
>
>after filling in the form I want to present the user a preview of what 
>she/he entered. Pushing save will make data persistance, pushing edit 
>brings back the form with the data in the form fields.
>
>How can I realize this with struts?
>When I send the control back to the form it always is empty! All data are 
>lost. the scope of the action is session.
>
>Rainer



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




Re: Tomcat 4 cross ServletContext attributes and standalone server

2002-07-09 Thread Craig R. McClanahan



On Mon, 8 Jul 2002, dbt1 wrote:

> Date: Mon, 8 Jul 2002 10:31:31 -0600
> From: dbt1 <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Tomcat Developers List <[EMAIL PROTECTED]>,
>  Struts Users Mailing List <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED]
> Subject: Tomcat 4 cross ServletContext attributes and standalone server
>
> I curently have 2 issues and hope someone may quickly point me to the right
> solutions.
> Environment: Tomcat 4.03, Struts 1.1
>
> Issue 1: Tomcat standalone to serve other file types such as .pdf .ppt .doc
> Previously I use Apache as a web server connected to Tomcat 3.3 for jsp
> pages. URLs to the above file types work fine. Changing to Tomcat 4
> standalone, everything is great with jsp, but Tomcat web server does not
> recognize and serve the other file types. I expect appropriate setting of
> file types would sold this problem so Tomcat Standalone will be appropriate
> for mostly dynamic jsp site without using Apache and connectors.
>

What does "does not recognize and serve the other file types" mean?  If
it's just an issue of getting the correct content type set, you can
configure that for yourself by using  entries in web.xml --
either for your app itself, or for the entire Tomcat installation (edit
the file "$CATALINA_HOME/conf/web.xml" for those).  If you are getting 404
errors, that means you don't have the files in the right place, or
something else is wrong.

> Issue 2: Using ServletContext attributes as global variables accross web
> applications within the same virtual host and across different virtual
> hosts. My arrangement is as follows:
>
> VirtualHost1/ROOT/mainApp
>/sub1/subApp1
> VirtualHost2/ etc.
>
> ServletContext attributes set in subApp1 are alive and available to subApp1.
> >From mainApp, I need to get attributes in subApp1. From mainApp, I access
> Struts 1.1 ActionServlet and get to its ServletContext
> (getServlet().getServletContext()). From mainApp ServletContext, I get to
> subApp1 ServletContext with getContext("/subApp1") and to get the required
> attributes of subApp1, which I know they are there and not null as tested
> from subApp1 ServletContext. The whole code  is:
>
> (MyPlugIn) myPlugIn = (MyPlugIn)
> ((getServlet().getServletContext()).getContext("/subApp1")).getAttribute(myP
> lugIn);
>
> This line of code gives null value from both mainApp and subApp1
> ServletContext. I did explicitly set appropriate docBase and
> crossContext="true" for both mainApp and subApp1 in tomcat4 server.xml
>

This sounds like an issue that should be reported against Tomcat.

> The question are:
> 1) How do I get global variables across web applications within 1
> virtual host and across virtual hosts using Tomcat 4 container?
> 2) Is there a better method for sharing global variables across web
> applications within the same virtual host, and across virtual hosts in the
> same server?

One option is to put the relevant classes in Tomcat's common/lib
directory, and make the appropriate information available through some
static method (such as a factory pattern).  Such statics are shared across
all virtual hosts and all webapps in a single Tomcat instance.

> 3) What is the best approach to scale from the above scenario to
> distributed environment?

Store the shared stuff in a database, EJB, LDAP server, or some other
external resource.

> 4) If Ldap is used for global variable distributed environment, what is
> the best design for mostly read and few updates of JavaBeans to Ldap, both
> for performance and security.
>

Most LDAP servers are optimized for read performance already.  If that's
not fast enough, consider caching the retrieved information in servlet
context attributes in each webapp -- keeping in mind that you will need
some technique to ensure that updates get propogated in a timely manner.

> Any help is greatly appreciated. Thanks.
>

Craig


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




RE: HOw to define the action ..??

2002-07-09 Thread James Mitchell

Accomplishing this is no more difficult than posting to another webapp on
the same server.

You simply agree on the sending/receiving fields required by both sites. (or
in the case of 3rd party, you make YOURs conform to what THEY want ;)

Then use any normal jsp view on your site (modified slightly to change the
action="" part) and then the user will submit the form (post) to the site
url that you choose.


You will need to:
1. use html:form, but change the action="" dynamically (JavaScript) on the
page
(onSubmit="JavaScript:document.forms.myform.action='http://whereever.com/pro
cess/my/form'"okyou get the idea)

or

2. do not use html:form and manually define the bean on the page the same
way struts form tag does for you. (request scope)  That way, its available
to your other tags.

*Hint*from the org.apache.struts.taglib.html.FormTag.java : 596
...
...
// Store this tag itself as a page attribute
pageContext.setAttribute(Constants.FORM_KEY, this,
 PageContext.REQUEST_SCOPE);
...
...

*DISCLAIMER*
Using either of these will eliminate the ability to prevent duplicate form
submission (something the transaction token does for you automagically).
However, if you are submitting to a 3rd party server, chances are that they
are handling it, since its probably a common problem.otherwise, you need
to handle those cases directly yourself.


Hope that helps

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta




> -Original Message-
> From: Manish_Purang [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 08, 2002 12:35 AM
> To: [EMAIL PROTECTED]
> Subject: HOw to define the action ..??
>
>
> Hi all..!
>
> Hey how come you  guyz have missed this one..! or is that it cannot be
> done...?? ( the Query posted below earlier )
> Let me again phrase in a way it's clearer..!
>
> How do i define the action of my form when i have to post the form to
> another website. Can we do it through the Struts framework..!

> The scenario
> is similar to posting your form to a payment gateway website ( such as
> verisign) If anybody has tried this before...!!)
>
> eagerly waiting for any response on this one...!
>
> Manish
>
> -Original Message-
> From: Manish_Purang
> Sent: Thursday, July 04, 2002 11:01 AM
> To: [EMAIL PROTECTED]
> Subject: HOw to define the action ..??
>
>
> Hi,
>
> We are trying to build a web application which posts the data
> obtained from
> the user form to another website. Using just simple HTML we were
> able to do
> so with the URL of the website's ( a certain application running there --
> situation similar to contacting the payment gateway from your
> JSP's ) given
> in the form's action variable. Howver now we need to do it though
> the struts
> framework.
> Not sure how we have to go on about this. How is the action supposed to
> be.?
> Any ideas...?
>
> Regards
> Manish Purang.
>
>
> **
> 
> This email (including any attachments) is intended for the sole use of the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or
> copying or
> distribution or forwarding of any or all of the contents in this
> message is
> STRICTLY PROHIBITED. If you are not the intended recipient, please contact
> the sender by email and delete all copies; your cooperation in this regard
> is appreciated.
> **
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> **
> 
> This email (including any attachments) is intended for the sole use of the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or
> copying or
> distribution or forwarding of any or all of the contents in this
> message is
> STRICTLY PROHIBITED. If you are not the intended recipient, please contact
> the sender by email and delete all copies; your cooperation in this regard
> is appreciated.
> **
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:




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




Checkbox Issues

2002-07-09 Thread Kamholz, Keith (corp-staff) USX

Hey everyone,
I'm having an issue with my checkboxes.  I know you're supposed to set the
corresponding boolean property to false in the reset method, and I do just
that.  However, for some reason the checkboxes cannot be unchecked.  After
they are checked for the first time, the property is always selected.  It
doesn't seem like a very complex issue, but I don't know what's going on.
Can anyone help me out here?  Thanks a lot!

~ Keith
http://www.buffalo.edu/~kkamholz


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




FW: Checkbox Issues

2002-07-09 Thread Kamholz, Keith (corp-staff) USX

One little addition to my question...
I have an  to the form JSP to avoid it being validated before
being submitted.  Do I need to go through an action in order for reset() to
be called?

~ Keith
http://www.buffalo.edu/~kkamholz


-Original Message-
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 3:14 PM
To: Struts (E-mail)
Subject: Checkbox Issues


Hey everyone,
I'm having an issue with my checkboxes.  I know you're supposed to set the
corresponding boolean property to false in the reset method, and I do just
that.  However, for some reason the checkboxes cannot be unchecked.  After
they are checked for the first time, the property is always selected.  It
doesn't seem like a very complex issue, but I don't know what's going on.
Can anyone help me out here?  Thanks a lot!

~ Keith
http://www.buffalo.edu/~kkamholz


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Validator

2002-07-09 Thread Chilukuri, Pratap N Mr USAREC


Hi,

  we are using struts 1.02 and want to know how to use validator with this
version. I went to jakarta commons site to download commons-validator.jar
and jakarta-oro.jar and could not find them and do i need to work on 1.1
release for validator to work? Any inputs would be appreciated.

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




RE: Validator

2002-07-09 Thread Ajay Chitre

Check this out...

http://home.earthlink.net/~dwinterfeldt/

-Original Message-
From: Chilukuri, Pratap N Mr USAREC
[mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, July 09, 2002 12:19 PM
To: 'Struts Users Mailing List'
Subject: Validator


Hi,

  we are using struts 1.02 and want to know how to use validator with
this
version. I went to jakarta commons site to download
commons-validator.jar
and jakarta-oro.jar and could not find them and do i need to work on 1.1
release for validator to work? Any inputs would be appreciated.

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Re: DynaActionForm Advantages

2002-07-09 Thread Glen Mazza

> Fecha: Tue, 9 Jul 2002 09:47:07 -0700 (PDT)
> De: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> A: Struts Users Mailing List
> <[EMAIL PROTECTED]>
> Asunto: Re:  DynaActionForm Advantages
> 
> >
> > The problem was that the DAF class was not made
> final.
> >  Allowing it to be subclassed is creating the mess
> you
> > describe--the variables in the XML file and
> actions on
> > them in the DAF subclass.  (Another was writing
> about
> > putting member variable initializations in the
> > validate() function--the DAF subclass may also
> start
> > encouraging other messier programming habits.)
> >
> > As for those who don't like getter/setters and
> want to
> > use the common-beanutils "get" functions described
> by
> > Craig:  Might it have been better, in addition to
> > making the DAF class final,
> 
> Making DAF final would have prevented the use case
> where you want to
> subclass it for custom reset() or validate()
> methods.  This would have
> forced the use of two classes instead of one -- IMHO
> that would have been
> more confusing, not less.
> 

Exactly--that's the advantage of making the DAF final!
If one wishes to have custom reset() or validate()
methods, one needs to trot back to the ActionForm. 
The only programming/configuration of any type you
should be able to do for a DAF is in the form beans
section of the struts-config file.

The DAF seems to me just a nice enhancement from 1.0.2
because you no longer need to create ActionForm
subclasses for jsp's not needing validation.  

And AF is then for when you do have specific
validation--and it would be good if we can give
programmers the option in the future of using either
the beanutils get()/set() functions or the JavaBeans
getter/setter functions within the AF.

Glen


_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

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




RE: Tomcat crashes on too many custom tags in a jsp

2002-07-09 Thread Stuart D. Robertson II

Which version of tomcat?  The latest snapshot of 4.1 (.7 I
think) mentions in the release notes that this is fixed.  It had
to do with a java limitation of 64k in a block or method (can't
remember which).




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




ActionServlet question

2002-07-09 Thread rainer jünger

Hi,

I have a general problem in understanding a Action servlet.
Is the servelt always involved when I access the belonging URL?

e.g.:
 
  
  
 

I access the *something*/trinkwasserform action. In that action I am logging a text to 
the serverlog. I am realy supprised that the logged text showes up only once within 
the log!
Isn't the Action Class always processed when I call the URL (e.g. /trinkwasserform ?)

thanks, Rainer



Struts and JetSpeed

2002-07-09 Thread Ryan Cuprak


I was just curious as to whether one can use both struts and jetspeed
(integrated). I have gotten a pretty good handle on Struts but recently
discovered jetspeed and liked what I saw.

Thanks,
 Ryan 


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




RE: DynaActionForm and JSTL (was RE: DynaActionForm Advantages)

2002-07-09 Thread Scott Ganyo

Could you just have the DynaActionForm expose a Map as a property?  If it
implemented, for example, a method like: "public Map getProperties();" you
could do this:



Scott

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 09, 2002 1:26 PM
> To: Struts Users Mailing List
> Subject: RE: DynaActionForm and JSTL (was RE: DynaActionForm 
> Advantages)
> 
> 
> 
> 
> On Tue, 9 Jul 2002, Jennings, Christofer J. wrote:
> 
> > Date: Tue, 9 Jul 2002 11:19:05 -0700
> > From: "Jennings, Christofer J." <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> > Subject: RE: DynaActionForm and JSTL (was RE: 
> DynaActionForm Advantages)
> >
> > My mistake. I was thinking DynaActionForm is a Map.
> >
> > It'd be a shame to not be able to use JSTL and 
> DynaActionForm together (I
> > think). As a general question, How much work would it be to have a
> > MappedDynaActionForm subclassing DynaActionForm as an 
> optional base class
> > for our forms?
> >
> 
> I'm going to take a look at the possibility of making DynaActionForm
> itself implement Map -- if it makes them usable with JSTL expressions,
> that would be pretty compelling.
> 
> > ,boz
> 
> Craig
> 
> 
> >
> > -Original Message-
> > From: Joe Germuska [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 09, 2002 8:43 AM
> > To: Struts Users Mailing List
> > Subject: Re: DynaActionForm and JSTL (was RE: 
> DynaActionForm Advantages)
> >
> >
> > This would only work if ${form} implemented the Map interface.
> >
> > Making the DynaBean interface extend the Map interface seems like a
> > lot of overkill considering the number of places people 
> might want to
> > use it that have nothing to do with the JSTL...
> >
> > Maybe you could make a case for having DynaActionForm implement Map,
> > with a bunch of unsupported operations and delegating to the values
> > hash otherwise.  It's still kind of cluttered, but at least it's off
> > in Struts serving a specific need, instead of in beanutils.
> >
> > Joe
> >
> >
> > At 8:19 AM -0700 2002/07/09, Jennings, Christofer J. wrote:
> > >Looking at the JSTL 1.0 specification, section 3.3, leads 
> me to believe
> > that
> > >DynaActionForm "properties" can be accessed through the 
> JSTL EL but with a
> > >different syntax than a regular JavaBean property.
> > >
> > >Example:
> > >   Regular JavaBean (e.g., ActionForm) EL syntax:
> > >   
> > >   
> > >   Map (e.g., DynaActionForm) EL syntax:
> > >   
> > >   
> > >
> > >If anyone has done this sort of thing I'd sure like to 
> know how it works.
> > >Especially how/if accessing "aSubProperty".
> > >
> > >I'm stuck using a container that can't support JSTL and 
> I'm also not using
> > >Struts 1.1 yet either so I can't confirm any of this.
> > >
> > >,
> > >boz
> > >
> > >-Original Message-
> > >From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]]
> >Sent: Monday, July 08, 2002 6:19 PM
> >To: [EMAIL PROTECTED]
> >Subject: RE: DynaActionForm Advantages
> >
> >
> >But are DynaActionForm's compatible with JSTL?
> >
> >A discussion on taglibs-user made me think not:
> >http://marc.theaimsgroup.com/?l=taglibs-user&m=102433015725228&w=2
> >
> >Eddie
>
>
> --
> --
> * Joe Germuska{ [EMAIL PROTECTED] }
> "It's pitiful, sometimes, if they've got it bad. Their eyes get
> glazed, they go white, their hands tremble As I watch them I
> often feel that a dope peddler is a gentleman compared with the man
> who sells records."
>   --Sam Goody, 1956
> tune in posse radio: 
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:




Re: DynaActionForm Advantages

2002-07-09 Thread Craig R. McClanahan



On Tue, 9 Jul 2002, Glen Mazza wrote:

> Date: Tue, 9 Jul 2002 14:33:46 -0500 (CDT)
> From: Glen Mazza <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re:  DynaActionForm Advantages
>
> > Fecha: Tue, 9 Jul 2002 09:47:07 -0700 (PDT)
> > De: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> > A: Struts Users Mailing List
> > <[EMAIL PROTECTED]>
> > Asunto: Re:  DynaActionForm Advantages
> >
> > >
> > > The problem was that the DAF class was not made
> > final.
> > >  Allowing it to be subclassed is creating the mess
> > you
> > > describe--the variables in the XML file and
> > actions on
> > > them in the DAF subclass.  (Another was writing
> > about
> > > putting member variable initializations in the
> > > validate() function--the DAF subclass may also
> > start
> > > encouraging other messier programming habits.)
> > >
> > > As for those who don't like getter/setters and
> > want to
> > > use the common-beanutils "get" functions described
> > by
> > > Craig:  Might it have been better, in addition to
> > > making the DAF class final,
> >
> > Making DAF final would have prevented the use case
> > where you want to
> > subclass it for custom reset() or validate()
> > methods.  This would have
> > forced the use of two classes instead of one -- IMHO
> > that would have been
> > more confusing, not less.
> >
>
> Exactly--that's the advantage of making the DAF final!
> If one wishes to have custom reset() or validate()
> methods, one needs to trot back to the ActionForm.
> The only programming/configuration of any type you
> should be able to do for a DAF is in the form beans
> section of the struts-config file.
>
> The DAF seems to me just a nice enhancement from 1.0.2
> because you no longer need to create ActionForm
> subclasses for jsp's not needing validation.
>
> And AF is then for when you do have specific
> validation--and it would be good if we can give
> programmers the option in the future of using either
> the beanutils get()/set() functions or the JavaBeans
> getter/setter functions within the AF.
>

I don't buy this argument at all.

It is still easier to write a DAF subclass with a custom reset() or
validate() than a corresponding AF subclass -- because with DAF you still
get to skip writing the getters and setters.  Crippling DAF, and forcing
people back to AF solely for this purpose, is not helpful.

> Glen

Craig


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




RE: Tomcat crashes on too many custom tags in a jsp

2002-07-09 Thread Craig R. McClanahan



On Tue, 9 Jul 2002, Stuart D. Robertson II wrote:

> Date: Tue, 9 Jul 2002 12:09:52 -0500
> From: Stuart D. Robertson II <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: RE: Tomcat crashes on too many custom tags in a jsp
>
> Which version of tomcat?  The latest snapshot of 4.1 (.7 I
> think) mentions in the release notes that this is fixed.  It had
> to do with a java limitation of 64k in a block or method (can't
> remember which).
>

I'm not sure it counts as "fixed", but the JSP page compiler in 4.1.7
generates substantially better code for custom tags, including lessening
the impact of the 64k limit on method size.  But the JSP 1.x specs
basically require that the entire page be generated in a single method if
you have any scriptlets at all, so there is only so much that the compiler
can do.

Craig


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




Re: ActionServlet question

2002-07-09 Thread Craig R. McClanahan



On Tue, 9 Jul 2002, rainer jünger wrote:

> Date: Tue, 9 Jul 2002 19:56:53 +0200
> From: rainer jünger <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: ActionServlet question
>
> Hi,
>
> I have a general problem in understanding a Action servlet.
> Is the servelt always involved when I access the belonging URL?
>
> e.g.:
>type="trinkwasser.TrinkwasserInputAction"
>  name="trinkwasserInputForm"
>  scope="session"
>  input="/application/datensteckbriefe/forms/form_trinkwasser.jsp">
>   
>   path="/application/datensteckbriefe/forms/form_trinkwasser_preview.jsp"/>
>  
>
> I access the *something*/trinkwasserform action. In that action I am
> logging a text to the serverlog. I am realy supprised that the logged
> text showes up only once within the log! Isn't the Action Class always
> processed when I call the URL (e.g. /trinkwasserform ?)
>

It depends on how you set up your .

The usual practice for Struts is to use a URL pattern like "*.do", which
means that any URL ending with ".do" will be sent to the controller
servlet.  Other URLs (like one ending in "foo.jsp") will bypass the
controller, and go to whatever servlet is mapped for that URL instead.

> thanks, Rainer
>

Craig



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




Re: Announcement List - WAS: RE: squeaky wheel with struts experience needs a job

2002-07-09 Thread Ted Husted

They've been threatening to give me more karma in the Apache Mail group
(since moderating the Struts list gets very squeaky from time to time),
and the first thing I was going to do with it is create this list.  Stay
tuned. 

James Holmes wrote:
> 
> This is something Ted Husted proposed on the dev list
> awhile back.  I think it makes sense and would help
> "partition" the messages.
> 
> Ted, what do we have to do to get this rolling?
> 
> -james
> [EMAIL PROTECTED]
> http://www.jamesholmes.com/struts/
> 
> --- Mark Nichols <[EMAIL PROTECTED]> wrote:
> > I have wondered about the possibility of there being
> > an "announcement"
> > mailing list for Struts, and this posting gives me
> > an opportunity to ask my
> > question. In a previous development lifetime I used
> > Forte TOOL and was
> > active with the Forte mail list. There was the
> > primary questions list and a
> > separate announce list for job postings,
> > availability postings, and product
> > release notices. What are the chances of having such
> > a list for Struts?
> >
> > 
> >
> >
> > > -Original Message-
> > > From: Dominique Plante
> > [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, July 08, 2002 6:52 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: OT: squeaky wheel with struts experience
> > needs a job
> > >
> > >
> > > I have recently heard the saying: "The squeaky
> > wheel gets the grease",
> > > so I thought I would take a minute to be a
> > "squeaky wheel".
> > >
> > > I am familiar bunch of technologies and projects
> > in addition to Struts,
> > > including JSP, Java, and HTML, ANT, cactus, and
> > Tomcat.  I am also very
> > > interested and have experience with refactoring,
> > design patterns, and
> > > performance optimization.
> > >
> > > Please contact me at [EMAIL PROTECTED] to send
> > me details about a
> > > potential opportunity.
> > > I am in the East San Francisco Bay area.
> > >
> > > Now I wait for the grease ;)
> > >
> > > Sorry about the off topic post.
> > >
> > > Dominique
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > >
> > 
> > > For additional commands, e-mail:
> > > 
> > >
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
> 
> __
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Java Web Development with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services

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




RE: Validator

2002-07-09 Thread chuckcavaness

It would also be great if you could read my chapter on 
the Validator and provide some feedback on how helpful 
it was to you. You can download the draft chapter from 
here:

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

The perspective from someone new to it would be very 
helpful, and hopefully it would help you as well!

Chuck

> Check this out...
> 
> http://home.earthlink.net/~dwinterfeldt/
> 
> -Original Message-
> From: Chilukuri, Pratap N Mr USAREC
> [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, July 09, 2002 12:19 PM
> To: 'Struts Users Mailing List'
> Subject: Validator
> 
> 
> Hi,
> 
>   we are using struts 1.02 and want to know how to use validator with
> this
> version. I went to jakarta commons site to download
> commons-validator.jar
> and jakarta-oro.jar and could not find them and do i need to work on 1.1
> release for validator to work? Any inputs would be appreciated.
> 
> --
> 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 and JetSpeed

2002-07-09 Thread Dan Cancro


>From http://jakarta.apache.org/jetspeed/site/resources.html, 

JetSpeed relies on these
Xerces 
Xalan 
Turbine 
Cocoon 
Castor 
ECS 
Hypersonic-SQL 
Velocity 
Working Dogs (Village) 
Tomcat 
CVS, WinCvs 

I don't think you can use both Turbine and Struts for the same application.

> -Original Message-
> From: Ryan Cuprak [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 09, 2002 12:36 PM
> To: Struts Users Mailing List
> Subject: Struts and JetSpeed
> 
> 
> 
> I was just curious as to whether one can use both struts and jetspeed
> (integrated). I have gotten a pretty good handle on Struts 
> but recently
> discovered jetspeed and liked what I saw.
> 
> Thanks,
>  Ryan 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

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




RE: Use of

2002-07-09 Thread mtstruts

Joe, 

Thanks for your post!  I'm actually doing what you suggest here, with one slight 
difference:  

My  tries to define a collection which is the property of another bean on 
the page.  My defines go like this:

First get a foo bean from the fooFormBean.


The foo bean contains a collection which I want to use the options tag with.


Now the select:




I'm getting the error "Cannot find bean under name fooItems".  What am I doing wrong?

Thanks!

"Joseph Barefoot" <[EMAIL PROTECTED]> wrote:

>Yep, the docs are a bit obtuse about the actual usage, aren't they? :)
>
>You put an option and/or option tag inside the select tag, like so:
>
>property="myCollectionField" scope="page" />
>
>
>      
>        Please choose something.
>      
>      property="value" />
> 
>
>
>Here, the option tag will ouput "Please choose something" as the label for
>the top option in the rendered html tags, with -1 as the value.  The options
>tag points to a Collection object (or an array) in some scope containing a
>list of beans with getKey() and getValue() methods which return the value
>for the option label and the value for the option value, respectively.
>
>Note that in this example, I defined the Collection Object in page scope
>using a bean:define tag that references a form bean field, but it just as
>easily could have bean an Object already in session or request scope (placed
>there by an Action or something) named "myCollection".
>
>
>peace,
>
>Joe Barefoot
>
>> -Original Message-
>> From: Kenny Smith [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, July 02, 2002 4:01 PM
>> To: Struts User
>> Subject: Use of 
>>
>>
>> Hello,
>>
>> I've having trouble figuring out how to use .. I've read
>> through the struts docs, and I can see all of the available properties to
>> set, like which value I want selected, but it doesn't say how to set what
>> the list of options are. Am I just plain missing something?
>>
>> Thanks,
>> Kenny Smith
>>
>>
>> --
>> To unsubscribe, e-mail:
>> 
>> For additional commands, e-mail:
>> 
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


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




RE: Struts and JetSpeed

2002-07-09 Thread Craig R. McClanahan



On Tue, 9 Jul 2002, Dan Cancro wrote:

> Date: Tue, 9 Jul 2002 13:22:22 -0700
> From: Dan Cancro <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: Struts and JetSpeed
>
>
> >From http://jakarta.apache.org/jetspeed/site/resources.html,
>
> JetSpeed relies on these
> Xerces
> Xalan
> Turbine
> Cocoon
> Castor
> ECS
> Hypersonic-SQL
> Velocity
> Working Dogs (Village)
> Tomcat
> CVS, WinCvs
>
> I don't think you can use both Turbine and Struts for the same application.
>

I don't see why that would be the case, as long as you don't have
conflicts over the servlet mappings.

Craig


> > -Original Message-
> > From: Ryan Cuprak [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 09, 2002 12:36 PM
> > To: Struts Users Mailing List
> > Subject: Struts and JetSpeed
> >
> >
> >
> > I was just curious as to whether one can use both struts and jetspeed
> > (integrated). I have gotten a pretty good handle on Struts
> > but recently
> > discovered jetspeed and liked what I saw.
> >
> > Thanks,
> >  Ryan
> >
> >
> > --
> > 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: DynaActionForm and JSTL (was RE: DynaActionForm Advantages)

2002-07-09 Thread @Basebeans.com

Subject: Re: DynaActionForm and JSTL (was RE: DynaActionForm Advantages)
From: "Vic C." <[EMAIL PROTECTED]>
 ===
I like to unit test my beans... and am also looking to design a 
propertyChangedEvent() and even SOAP to my beans; so no maps for me.
Vic

Scott Ganyo wrote:
> Could you just have the DynaActionForm expose a Map as a property?  If it
> implemented, for example, a method like: "public Map getProperties();" you
> could do this:
> 
> 
> 
> Scott
> 
> 
>>-Original Message-
>>From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, July 09, 2002 1:26 PM
>>To: Struts Users Mailing List
>>Subject: RE: DynaActionForm and JSTL (was RE: DynaActionForm 
>>Advantages)
>>
>>
>>
>>
>>On Tue, 9 Jul 2002, Jennings, Christofer J. wrote:
>>
>>
>>>Date: Tue, 9 Jul 2002 11:19:05 -0700
>>>From: "Jennings, Christofer J." <[EMAIL PROTECTED]>
>>>Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
>>>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>>>Subject: RE: DynaActionForm and JSTL (was RE: 
>>
>>DynaActionForm Advantages)
>>
>>>My mistake. I was thinking DynaActionForm is a Map.
>>>
>>>It'd be a shame to not be able to use JSTL and 
>>
>>DynaActionForm together (I
>>
>>>think). As a general question, How much work would it be to have a
>>>MappedDynaActionForm subclassing DynaActionForm as an 
>>
>>optional base class
>>
>>>for our forms?
>>>
>>
>>I'm going to take a look at the possibility of making DynaActionForm
>>itself implement Map -- if it makes them usable with JSTL expressions,
>>that would be pretty compelling.
>>
>>
>>>,boz
>>
>>Craig
>>
>>
>>
>>>-Original Message-
>>>From: Joe Germuska [mailto:[EMAIL PROTECTED]]
>>>Sent: Tuesday, July 09, 2002 8:43 AM
>>>To: Struts Users Mailing List
>>>Subject: Re: DynaActionForm and JSTL (was RE: 
>>
>>DynaActionForm Advantages)
>>
>>>
>>>This would only work if ${form} implemented the Map interface.
>>>
>>>Making the DynaBean interface extend the Map interface seems like a
>>>lot of overkill considering the number of places people 
>>
>>might want to
>>
>>>use it that have nothing to do with the JSTL...
>>>
>>>Maybe you could make a case for having DynaActionForm implement Map,
>>>with a bunch of unsupported operations and delegating to the values
>>>hash otherwise.  It's still kind of cluttered, but at least it's off
>>>in Struts serving a specific need, instead of in beanutils.
>>>
>>>Joe
>>>
>>>
>>>At 8:19 AM -0700 2002/07/09, Jennings, Christofer J. wrote:
>>>
Looking at the JSTL 1.0 specification, section 3.3, leads 
>>>
>>me to believe
>>
>>>that
>>>
DynaActionForm "properties" can be accessed through the 
>>>
>>JSTL EL but with a
>>
different syntax than a regular JavaBean property.

Example:
Regular JavaBean (e.g., ActionForm) EL syntax:


Map (e.g., DynaActionForm) EL syntax:



If anyone has done this sort of thing I'd sure like to 
>>>
>>know how it works.
>>
Especially how/if accessing "aSubProperty".

I'm stuck using a container that can't support JSTL and 
>>>
>>I'm also not using
>>
Struts 1.1 yet either so I can't confirm any of this.

,
boz

-Original Message-
From: [EMAIL PROTECTED] 
>>>
> [mailto:[EMAIL PROTECTED]]
> 
>>>Sent: Monday, July 08, 2002 6:19 PM
>>>To: [EMAIL PROTECTED]
>>>Subject: RE: DynaActionForm Advantages
>>>
>>>
>>>But are DynaActionForm's compatible with JSTL?
>>>
>>>A discussion on taglibs-user made me think not:
>>>http://marc.theaimsgroup.com/?l=taglibs-user&m=102433015725228&w=2
>>>
>>>Eddie
>>
>>
>>--
>>--
>>* Joe Germuska{ [EMAIL PROTECTED] }
>>"It's pitiful, sometimes, if they've got it bad. Their eyes get
>>glazed, they go white, their hands tremble As I watch them I
>>often feel that a dope peddler is a gentleman compared with the man
>>who sells records."
>>  --Sam Goody, 1956
>>tune in posse radio: 
>>
>>--
>>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: Use of

2002-07-09 Thread Joseph Barefoot

The tag usage seems to be fine, except you probably want to make the beans
"page" scope (rather than "session") in both cases, unless you plan on using
the beans somewhere else besides the JSP you are in.

As for the error, make double-sure that the collection is not null, as this
may be causing the error message.  If that isn't it, you could try the below
alternate syntax (using "name" + "property" to specify the Collection
location rather than "collection" attribute) ...it may not fix your problem,
but trying an alternate method may help you pinpoint what the problem is, at
least.

 

 
 
 


peace,
Joe



> Joe,
>
> Thanks for your post!  I'm actually doing what you suggest here,
> with one slight difference:
>
> My  tries to define a collection which is the
> property of another bean on the page.  My defines go like this:
>
>
> I'm getting the error "Cannot find bean under name fooItems".
> What am I doing wrong?
>
> Thanks!
>
> "Joseph Barefoot" <[EMAIL PROTECTED]> wrote:
>
> >Yep, the docs are a bit obtuse about the actual usage, aren't they? :)
> >
> >You put an option and/or option tag inside the select tag, like so:
> >
> > >property="myCollectionField" scope="page" />
> >
> >
> >      
> >        Please choose something.
> >      
> >       >property="value" />
> > 
> >
> >
> >Here, the option tag will ouput "Please choose something" as the
> label for
> >the top option in the rendered html tags, with -1 as the value.  
> The options
> >tag points to a Collection object (or an array) in some scope
> containing a
> >list of beans with getKey() and getValue() methods which return the value
> >for the option label and the value for the option value, respectively.
> >
> >Note that in this example, I defined the Collection Object in page scope
> >using a bean:define tag that references a form bean field, but it just as
> >easily could have bean an Object already in session or request
> scope (placed
> >there by an Action or something) named "myCollection".
> >
> >
> >peace,
> >
> >Joe Barefoot
> >
> >> -Original Message-
> >> From: Kenny Smith [mailto:[EMAIL PROTECTED]]
> >> Sent: Tuesday, July 02, 2002 4:01 PM
> >> To: Struts User
> >> Subject: Use of 
> >>
> >>
> >> Hello,
> >>
> >> I've having trouble figuring out how to use .. I've read
> >> through the struts docs, and I can see all of the available
> properties to
> >> set, like which value I want selected, but it doesn't say how
> to set what
> >> the list of options are. Am I just plain missing something?
> >>
> >> Thanks,
> >> Kenny Smith
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
> >> 
> >> For additional commands, e-mail:
> >> 
> >
> >
> >--
> >To unsubscribe, e-mail:  

>For additional commands, e-mail:

>
>


__
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/


--
To unsubscribe, e-mail:

For additional commands, e-mail:




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




Tag>

2002-07-09 Thread Kevin . Bedell


Anyone heard of this tag?

We received an app from a vendor that is built on Struts and it's throwing
an exception in this tag - it's using an old version od Struts. Not sure
the version number - I do't have the code right here.

The vendor built this app on Struts and is distributing it without the
Struts source code (or their code for that matter)..

I've been through all the old "tagged releases" in the Struts cvs tree. I
can't find this tag anywhere - I'm beginning to think it must be a custom
extension the vendor created - but the stacktrace says the error is in:

  org.apache.struts.taglib.template.ProfileInsertTag.java

According to CVS this file has never existed!  (Unless I'm just looking in
the wrong place which is likely!).

Anyone ever heard of this tag or, better yet, have a copy of Struts source
from when it used to exist?






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




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

2002-07-09 Thread Robert Taylor

Perfect timing Chuck. I just started to dig in on this particular issue.

Once again, great job. Below are my comments. Sections are demarcated using
'Section:' and quotes from the document are identified with double quotes
around them.




Section: Required Packages

"All of the dependent packages for the Validator are included in the Struts
1.1 download."

The Struts1.1b that I downloaded did not have the jakarta-oro.jar file
included. Granted, they
probably will when they finalize the 1.1 release.




Section: Validation.xml file

"The form element corresponds to a particular ActionForm definition that you
want to provide validation for. It contains a single attribute name, which
should match one of the name attributes from the form-beans section of the
Struts configuration file."

The ValidatorActionForm and DynaValidatorActionForm both match on the action
mapping rather than the form name. That is, instead of using the form name
in the name attribute of the form element to match on, you can use the
action mapping. This allows the same form to be used for different action
mappings where each action mapping may only depend on certain form fields to
be validated and the others to be left alone. I know you explain this under
the "Using ActionForm with Validator" section, but you may want to put a
comment or a reference in this section.



"Notice in Example 11-1, the constant phone that’s declared in the global
section, is used in the var element for the postalCode validation rule."
I don't see this in the example. Should it be the following?

...the constant zip that's declared in the global section,



"The msg element allows you specify an alternate message for a field
element. The validation rule can use this value instead of the default
message declared with the rule. The value for the msg element must be a key
from the application resource bundle."

Where is the msg element? I don't see anything that looks like  in
the example.



"The field element allows up to four additional elements to be included. The
elements, named arg0, arg1, arg2, and arg3, are used to pass addition values
to the message, either from the resource bundle, var, or constant elements.
Example 11-1 included elements for arg0 and arg1."

Should ...pass addition... be  ...pass additional... ?



"The arg0 value uses a key attribute to specify a value from the resource
bundle. The arg1 element on the other hand, is passing the value specified
in the var element, to the minLength validation rule. The resource attribute
is set to false to indicate that the framework should not attempt to
retrieve this value from the resource bundle."

I understand how arg0 works, but I'm really confused on how arg1 is working.
Could you clarify?





Section: Using ActionForm With Validator

"Notice that the type attribute specifies the exact ActionForm subclass that
we chose and have also set the dynamic attribute to true. These are two
common setup mistakes that newcomers to the framework make."
If your form is a subclass of DynaActionForm, then is the above statement
still true? According to the
Struts 1.1 DTD:

dynamic  Is the class identified by the "type" attribute
 a DynaActionForm with dynamic properties?  If the
 type attribute is set to
 "org.apache.struts.action.DynaActionForm", this
 property defaults to true, otherwise it defaults
 to false.





Section: Using the Validator Framework


"Not that we have everything configure for the Storefront example, it’s time
to run the example."
Should 'Not' be 'Now' ?

That's all for now. Thanks again for such a great reference!


robert


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 09, 2002 11:49 AM
> To: [EMAIL PROTECTED]
> Subject: [ANN] Chapter 11 of the O'Reilly Struts book now available
>
>
> Chapter 11 "Using the Struts Validator " has been
> posted on theserverside.com.
>
> http://www.theserverside.com/resources/strutsreview.jsp
>
> Chapters 8 and 20 will also be posted this week.
>
> As always, I look forward to the feedback.
>
> Chuck
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>


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




html:base misunderstood, broken, or misleading?

2002-07-09 Thread @Basebeans.com

Subject: html:base misunderstood, broken, or misleading?
From: Eric Rizzo <[EMAIL PROTECTED]>
 ===
I've got a problem using Struts under Jetty that I think is related to 
the  tag.
The comments for this tag read:
"Renders an HTML  element with an href attribute pointing to the 
absolute location of the enclosing JSP page. [snip]
This tag is useful because it allows you to use relative URL references 
in the page that are calculated based on the URL of the page itself, 
rather than the URL to which the most recent submit took place (which is 
where the browser would normally resolve relative references against)."

But the  html element it generates does not point to the JSP page. 
  It generates something like
http://localhost:8080/appName/action.do";>

which does not point to the JSP location as the docs indicate.  Tomcat 
seems to deal with this fine anyway - I can use relative paths to other 
resources (CSS, images, other JSPs) or use the Struts custom tags to 
generate full "proper" paths to them.
But when the app is run under Jetty, the relative references stop 
working.  For example, something like this fails when /images is a 
sibling of /jsp:
 

The problem seems to be that the request for foo.gif is sent back with a 
URL of "/images/foo.gif" although it should be 
"/appName/jsp/../images/foo.gif" or "/appName/images/foo.gif"

My questions are:
1) Why does the  tag not work according to what is documented 
and expected?
2) Why would Tomcat not care but Jetty does?


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


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




Oracle interMedia and Struts - any context contention?

2002-07-09 Thread Eva Garabedian

Hi All,
 
 I am attempting to use Oracle 9i's interMedia classes to manage images
and thumbnails, and when attempting to display them in JSPs, I notice
that if I run this outside of Struts, all is well, but within Struts,
the image is no longer displayed. 
 
Can anything be done to work around this possible context contention
issue?
 
Here is some of the JSP code:
<%@ page language="java" %>
<%@ page import="PhotoAlbumBean" %>
<%@ page import="oracle.ord.im.OrdHttpJspResponseHandler" %>
 


<%
String id = request.getParameter( "id" );
String media = request.getParameter( "media" );
if ( id != null || media != null ) {
// Use a try block to ensure the JDBC connection is released
try {
// Select data and fetch the row
album.selectRowById( id );
if ( !album.fetch() ) {
response.setStatus( response.SC_NOT_FOUND );
return;
}
 
// Deliver the full-size or thumb-nail image
handler.setPageContext( pageContext );
if ( media.equals( "image" ) ) {
handler.sendImage( album.getImage() );
return;
}
if ( media.equals( "thumb" ) ) {
handler.sendImage( album.getThumb() );
return;
}
}
finally {
album.release();
}
}
%>



Re: Tag>

2002-07-09 Thread Craig R. McClanahan



On Tue, 9 Jul 2002 [EMAIL PROTECTED] wrote:

> Date: Tue, 9 Jul 2002 16:59:26 -0400
> From: [EMAIL PROTECTED]
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject:  Tag>
>
>
> Anyone heard of this tag?
>
> We received an app from a vendor that is built on Struts and it's throwing
> an exception in this tag - it's using an old version od Struts. Not sure
> the version number - I do't have the code right here.
>
> The vendor built this app on Struts and is distributing it without the
> Struts source code (or their code for that matter)..
>
> I've been through all the old "tagged releases" in the Struts cvs tree. I
> can't find this tag anywhere - I'm beginning to think it must be a custom
> extension the vendor created - but the stacktrace says the error is in:
>
>   org.apache.struts.taglib.template.ProfileInsertTag.java
>
> According to CVS this file has never existed!  (Unless I'm just looking in
> the wrong place which is likely!).
>

I don't see any trace that it's ever been in the official Struts CVS (i.e.
it's not in the "Attic" directory either.

> Anyone ever heard of this tag or, better yet, have a copy of Struts source
> from when it used to exist?
>

Craig


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




  1   2   >