AW: Formatting Dates, Integers...

2002-02-04 Thread Hudayioglu, Fehmi

thanks ted,
we had done exactly what you've said. It works quite fine, and appears to be
the most effortless choice we have.
But still, in the deepness of my heart, I am not agree with the philosophy
of business tier, I think it is a pure localization problem. But I must
admit that adopting this sort of formatting would be very hard (I believe it
is easy to display formatted strings by using tags, but goddamn I couldn't
imagine how to set them back to the properties after user click that
goddamned button). 
thanks,
Fehmi.

-Ursprüngliche Nachricht-
Von: Ted Husted [mailto:[EMAIL PROTECTED]]
Gesendet am: Monday, February 04, 2002 3:59 AM
An: Struts Users Mailing List
Betreff: Re: Formatting Dates, Integers...

Pesonally, I recommend doing such things in the ActionForm. You can do
them in the page, but that means modifying the page, and placing what is
really business logic in the presentation tier. While it seems we are
talking about how data looks, formatting it this way or that is really
a business requirement. The part about stuffing the formatted string
into HTML is the presentation tier. The J2EE blueprints call these
helper beans or methods.

Generally, I add a second getter to provide the formatted version. This
does the same thing a tag would do, but is easier to write. The actual
formatting code I would put into a library in the business tier that the
ActionForm method would simply call. So you could add these without
touching your existing methods, and just have the bean:write call these
getters instead. 

Of course, if we are talking about display data, and you already have
beans that render the formatted data, just use those. The ActionForms
are only important for inputting data. 

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


Hudayioglu, Fehmi wrote:
 
 Hi fellows,
 
 I have searched the mailing list in hope to find a way to display a number
 in format (e.g:120.200,32). I couldn't find any solution. There were some
 messages proposing to play on the getter and setter methods. But, this is
 not a solution we imagine. Because we have some object properties in the
 Form Bean and their properties can be set by struts directly. So changing
 getter and setter methods requires tons of effort to modify our  data
 classes and form beans which is of course NOT desirable. I also know that
 there is a DateTag library of Jakarta, which is yet in beta release.
 Therefore, my managers (regards to them) don't want to use beta releases.
 They don't want to modify struts tags neither. However, I believe this is
 quite straightforward way (hopefully they will be contended soon).
 
 So,
 1. Do you have any clever solution for this common problem?
 2. What necessary steps should I take in order to add a new Format
attribute
 to the form:text and bean:write?
 2.1 In case, I added necessary methods, how can I guarantee that struts
set
 this formatted value to the property. According to my tries, it doesn't
set
 them correctly?
 2.2 How long does an ordinary developer require to modify struts to do so?
 
 thanks and my best regards,
 fehmi.
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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

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




Using bean:message with multiple resource bundles

2002-02-04 Thread Rishi Khanna

Can someone please give me an example of how to use bean:message tag for
getting messages from multiple resource bundles. I know we could set the
bundle attribute to point to a particular bundle but its not working. Please
help.

-Rishi

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




org.apache.jasper.JasperException: File /bean not found

2002-02-04 Thread Sunento Wu

Hi,

I was trying to create a simple application by using struts, however it ends
up with this error, any one knows what the problem is ?

type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server Error)
that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: File /bean not found
 at
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:214)
 at
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:174)
 at
org.apache.jasper.compiler.JspParseEventListener.processTaglibDirective(JspP
arseEventListener.java:1159)
 at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
ntListener.java:755)
 at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
ener.java:121)
 at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:243)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1133)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1091)







_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




Re: Hi....

2002-02-04 Thread Arun_Kumar_N



Hello,
Hello,
 The content type for text is setContentType(text/plain);
It works fine in IE,but it is not working in Netscape.
Will any one please look inot this

Regards
Arun



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




Re: Using bean:message with multiple resource bundles

2002-02-04 Thread jwas

Rishi 

Hope this will help u 

%
  //
  // Put a Locale object in the user's
  // session describing the Locale that
  // is specified by the browser's language preference (obtained via http 
header).
  //
  String lang = request.getHeader(Accept-Language);
  boolean headerSuccess = false;
  if (lang != null)
  {
if (lang.length() = 2)
{
  session.putValue(org.apache.struts.action.Action.LOCALE_KEY, new 
java.util.Locale(lang.substring(0, 2), ) );
  headerSuccess = true;
}
  }

  if (headerSuccess)
  {
%bean:message key=hello.message /%
  }
  else
  {
out.println(Header 'Accept-Language' either not found or has no 
recognisable value.);
  }
%

Jwas





Rishi Khanna [EMAIL PROTECTED]
02/04/02 12:42 PM
Please respond to Struts Users Mailing List

 
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
cc: 
Subject:Using bean:message with multiple resource bundles


Can someone please give me an example of how to use bean:message tag for
getting messages from multiple resource bundles. I know we could set the
bundle attribute to point to a particular bundle but its not working. 
Please
help.

-Rishi

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





Re: AW: Formatting Dates, Integers...

2002-02-04 Thread Ted Husted

IMHO, localisation is part of the business tier too. With static
messages that apply to all users, Struts provides a common resource and
a common way to access that resource. But the message resource files are
really part of the business tier; Struts is just provide a means to
access them. (This is more evident in the nightly build, where we
remembered to take the HTML out the messages resources.)

But the Struts message resources is not always the only i18n player in
the game. People often have substantial i18n resources of their own,
which are better exposed through custom beans or routing to different
page trees, via the controller, than through a series of bean:message
calls on the page.

If i18n is part of the formatting here, you can of course tie into the
same controller system by keying on the same locale object.

The key question is what happens when we needs to present the same
dynamic information on something besides a web page? (Say a PDF or true
Excel spreadsheet using POI.) The bean:message tags use standard bundles
that any JavaBean could reference. Any other i18n or formatting system
should also likewise be available to beans using another presentation
system.

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


Hudayioglu, Fehmi wrote:
 
 thanks ted,
 we had done exactly what you've said. It works quite fine, and appears to be
 the most effortless choice we have.
 But still, in the deepness of my heart, I am not agree with the philosophy
 of business tier, I think it is a pure localization problem. But I must
 admit that adopting this sort of formatting would be very hard (I believe it
 is easy to display formatted strings by using tags, but goddamn I couldn't
 imagine how to set them back to the properties after user click that
 goddamned button).
 thanks,
 Fehmi.
 
 -Ursprüngliche Nachricht-
 Von: Ted Husted [mailto:[EMAIL PROTECTED]]
 Gesendet am: Monday, February 04, 2002 3:59 AM
 An: Struts Users Mailing List
 Betreff: Re: Formatting Dates, Integers...
 
 Pesonally, I recommend doing such things in the ActionForm. You can do
 them in the page, but that means modifying the page, and placing what is
 really business logic in the presentation tier. While it seems we are
 talking about how data looks, formatting it this way or that is really
 a business requirement. The part about stuffing the formatted string
 into HTML is the presentation tier. The J2EE blueprints call these
 helper beans or methods.
 
 Generally, I add a second getter to provide the formatted version. This
 does the same thing a tag would do, but is easier to write. The actual
 formatting code I would put into a library in the business tier that the
 ActionForm method would simply call. So you could add these without
 touching your existing methods, and just have the bean:write call these
 getters instead.
 
 Of course, if we are talking about display data, and you already have
 beans that render the formatted data, just use those. The ActionForms
 are only important for inputting data.
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Java Web Development with Struts.
 -- Tel +1 585 737-3463.
 -- Web http://www.husted.com/struts/
 
 Hudayioglu, Fehmi wrote:
 
  Hi fellows,
 
  I have searched the mailing list in hope to find a way to display a number
  in format (e.g:120.200,32). I couldn't find any solution. There were some
  messages proposing to play on the getter and setter methods. But, this is
  not a solution we imagine. Because we have some object properties in the
  Form Bean and their properties can be set by struts directly. So changing
  getter and setter methods requires tons of effort to modify our  data
  classes and form beans which is of course NOT desirable. I also know that
  there is a DateTag library of Jakarta, which is yet in beta release.
  Therefore, my managers (regards to them) don't want to use beta releases.
  They don't want to modify struts tags neither. However, I believe this is
  quite straightforward way (hopefully they will be contended soon).
 
  So,
  1. Do you have any clever solution for this common problem?
  2. What necessary steps should I take in order to add a new Format
 attribute
  to the form:text and bean:write?
  2.1 In case, I added necessary methods, how can I guarantee that struts
 set
  this formatted value to the property. According to my tries, it doesn't
 set
  them correctly?
  2.2 How long does an ordinary developer require to modify struts to do so?
 
  thanks and my best regards,
  fehmi.
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

--
To 

Re: Scaffold+Artimus Documentation

2002-02-04 Thread Ted Husted

At this point, just the JavaDoc I'm afraid. Sorry about that. 

Scaffold is general extension to Struts. It's like a framework for
writing things with the framework.

There is a very simple approach to DBMS connectivity in Scaffold called
ModelBeans. It works, but in practice it is a little bit too simple. 

No documentation here yet either, but I'm liking what simper is up to
now 

http://netmeme.org/simper/

Help wanted :)

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

Hertzel Karbasi - OPTinity eBusiness Solutions wrote:
 
 Hi All,
 
 Is there any documentation for Scaffold+Artimus packages in nightly build?
 Any reference will be appreciated.
 
 Thanks
 Hertzel
 
   
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




Re: J2EE BluePrints and Struts

2002-02-04 Thread Ted Husted

This type of message can also be posted to the USER list, since it does
not involve the present or future development of Struts. 

But anyway, the Blueprints are just that -- plans. Struts implements
many of the patterns and strategies described in the BluePrints and in
Core J2EE Patterns 

http://www.amazon.com/exec/obidos/ISBN=0130648841/hitchhikeguidetoA/

But was doing so before each of these were released, based on prior
patterns literature. In fact, Struts code was used as the example
implementation for Synchronizer Token strategy. 

Working from the Core J2EE Patterns terminology, Struts employs a number
of cataloged patterns, including 

Service to Worker (ActionServlet, Action classes, ContextHelper), 
Front Controller, Singleton (ActionServlet), 
Dispatcher, View Helper, Session Facade, Singleton (Action classes),
Value Objects (ActionForm, ActionErrors), 
View Helper (ActionForm, ContextHelper, tag extensions), 
Composite View (Template and Tiles taglibs), 
Synchronizer Token (Action class methods).

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



[EMAIL PROTECTED] wrote:
 
 Hi,
 
 I am new to this framework and to this list. Can anybody tell me how this
 framework differs from the Sun's framework J2EE BluePrints ?
 What is the strength of the framework when compared to the BluePrints?
 
 If there are any articles available, please let me know.

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




Re: Formatting Dates, Integers...

2002-02-04 Thread Peter Pilgrim



Hiya

I would also consider writing some custom tags to format numbers and dates.
Subclass the Struts' own bean WriteTag bean:write. It is pretty easy
to check for a java.lang.Number  or java.lang.String, which you can attempt
to parse into a double.

The only problem is a creating large numbers of
java.text.NumberFormat or java.text.DecimalFormat objects.
They are expensive to create and garbage collect.
I would suggest you put a NUMBER_FORMAT_KEY in the session scope
or write the tags to reuse a global Format object.

Unfortunate I cant give you my tags, but here is a handy project
for someone to write for Struts 1.1!!!

--
Peter Pilgrim ++44 (0)207-545-9923

 Swamped under electionic mails


 Message History 



From: Ted Husted [EMAIL PROTECTED] on 03/02/2002 21:58 EST

Please respond to Struts Users Mailing List [EMAIL PROTECTED]

To:   Struts Users Mailing List [EMAIL PROTECTED]
cc:
Subject:  Re: Formatting Dates, Integers...


Pesonally, I recommend doing such things in the ActionForm. You can do
them in the page, but that means modifying the page, and placing what is
really business logic in the presentation tier. While it seems we are
talking about how data looks, formatting it this way or that is really
a business requirement. The part about stuffing the formatted string
into HTML is the presentation tier. The J2EE blueprints call these
helper beans or methods.



--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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




Re: AW: Formatting Dates, Integers...

2002-02-04 Thread Jonathan Gibbons


Hi,

one thing I'm doing today is:
a) Add formatting strings to the resource bundles
b) Adding util classes which can apply the formatting, either in form object 
getter/setter or wherever.

Step b could be done in one of your own tag libs, but I can't be bothered to do that.

This means I can specify the format per locale, rather than use the defaults.  The 
tricky bit is getting at the resource bundle from your
own code.  You can do this by using the servlet context and session objects with names 
attributes - ie the same ones used
by struts.  Take a glance at the MessageTag class for how to.

Validation means you should do this in the form validate func as well.

Jonathan



 Message History 



From: Hudayioglu, Fehmi [EMAIL PROTECTED] on 04/02/2002 09:52 CET

Please respond to Struts Users Mailing List [EMAIL PROTECTED]

To:   'Struts Users Mailing List' [EMAIL PROTECTED]
cc:
Subject:  AW: Formatting Dates, Integers...


thanks ted,
we had done exactly what you've said. It works quite fine, and appears to be
the most effortless choice we have.
But still, in the deepness of my heart, I am not agree with the philosophy
of business tier, I think it is a pure localization problem. But I must
admit that adopting this sort of formatting would be very hard (I believe it
is easy to display formatted strings by using tags, but goddamn I couldn't
imagine how to set them back to the properties after user click that
goddamned button).
thanks,
Fehmi.

-Ursprüngliche Nachricht-
Von: Ted Husted [mailto:[EMAIL PROTECTED]]
Gesendet am: Monday, February 04, 2002 3:59 AM
An: Struts Users Mailing List
Betreff: Re: Formatting Dates, Integers...

Pesonally, I recommend doing such things in the ActionForm. You can do
them in the page, but that means modifying the page, and placing what is
really business logic in the presentation tier. While it seems we are
talking about how data looks, formatting it this way or that is really
a business requirement. The part about stuffing the formatted string
into HTML is the presentation tier. The J2EE blueprints call these
helper beans or methods.

Generally, I add a second getter to provide the formatted version. This
does the same thing a tag would do, but is easier to write. The actual
formatting code I would put into a library in the business tier that the
ActionForm method would simply call. So you could add these without
touching your existing methods, and just have the bean:write call these
getters instead.

Of course, if we are talking about display data, and you already have
beans that render the formatted data, just use those. The ActionForms
are only important for inputting data.

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


Hudayioglu, Fehmi wrote:

 Hi fellows,

 I have searched the mailing list in hope to find a way to display a number
 in format (e.g:120.200,32). I couldn't find any solution. There were some
 messages proposing to play on the getter and setter methods. But, this is
 not a solution we imagine. Because we have some object properties in the
 Form Bean and their properties can be set by struts directly. So changing
 getter and setter methods requires tons of effort to modify our  data
 classes and form beans which is of course NOT desirable. I also know that
 there is a DateTag library of Jakarta, which is yet in beta release.
 Therefore, my managers (regards to them) don't want to use beta releases.
 They don't want to modify struts tags neither. However, I believe this is
 quite straightforward way (hopefully they will be contended soon).

 So,
 1. Do you have any clever solution for this common problem?
 2. What necessary steps should I take in order to add a new Format
attribute
 to the form:text and bean:write?
 2.1 In case, I added necessary methods, how can I guarantee that struts
set
 this formatted value to the property. According to my tries, it doesn't
set
 them correctly?
 2.2 How long does an ordinary developer require to modify struts to do so?

 thanks and my best regards,
 fehmi.

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

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

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






--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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




error display

2002-02-04 Thread Henry Lu

WHen there is error in the validate() function, my jsp page only displays
ul
/ulhr
Why? How to let the page display the message specified in the validate()
function?


---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372



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




Re: AW: Formatting Dates, Integers...

2002-02-04 Thread Ted Husted

That sounds neat, Jonathan. I hope you will share your code when you are
ready -:o)

Right now, a lot of us are in FUD lock because of JSTL and JSF. 

Something to consider in proposing new tags is how they would fit in
with the JSTL. The concern is that we don't want to lead people in a
direction that would make it harder to migrate later. Though, at the
same time, we all have applications that we need to ship today. 

Solutions like this, where the JavaBean does most of the work, sounds
like a good path to me, since it could be easily used with a JSTL
expression language later. 

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


Jonathan Gibbons wrote:
 
 Hi,
 
 one thing I'm doing today is:
 a) Add formatting strings to the resource bundles
 b) Adding util classes which can apply the formatting, either in form object 
getter/setter or wherever.
 
 Step b could be done in one of your own tag libs, but I can't be bothered to do that.
 
 This means I can specify the format per locale, rather than use the defaults.  The 
tricky bit is getting at the resource bundle from your
 own code.  You can do this by using the servlet context and session objects with 
names attributes - ie the same ones used
 by struts.  Take a glance at the MessageTag class for how to.
 
 Validation means you should do this in the form validate func as well.
 
 Jonathan
 
  Message History 

 
 From: Hudayioglu, Fehmi [EMAIL PROTECTED] on 04/02/2002 09:52 
CET
 
 Please respond to Struts Users Mailing List [EMAIL PROTECTED]
 
 To:   'Struts Users Mailing List' [EMAIL PROTECTED]
 cc:
 Subject:  AW: Formatting Dates, Integers...
 
 thanks ted,
 we had done exactly what you've said. It works quite fine, and appears to be
 the most effortless choice we have.
 But still, in the deepness of my heart, I am not agree with the philosophy
 of business tier, I think it is a pure localization problem. But I must
 admit that adopting this sort of formatting would be very hard (I believe it
 is easy to display formatted strings by using tags, but goddamn I couldn't
 imagine how to set them back to the properties after user click that
 goddamned button).
 thanks,
 Fehmi.
 
 -Ursprüngliche Nachricht-
 Von: Ted Husted [mailto:[EMAIL PROTECTED]]
 Gesendet am: Monday, February 04, 2002 3:59 AM
 An: Struts Users Mailing List
 Betreff: Re: Formatting Dates, Integers...
 
 Pesonally, I recommend doing such things in the ActionForm. You can do
 them in the page, but that means modifying the page, and placing what is
 really business logic in the presentation tier. While it seems we are
 talking about how data looks, formatting it this way or that is really
 a business requirement. The part about stuffing the formatted string
 into HTML is the presentation tier. The J2EE blueprints call these
 helper beans or methods.
 
 Generally, I add a second getter to provide the formatted version. This
 does the same thing a tag would do, but is easier to write. The actual
 formatting code I would put into a library in the business tier that the
 ActionForm method would simply call. So you could add these without
 touching your existing methods, and just have the bean:write call these
 getters instead.
 
 Of course, if we are talking about display data, and you already have
 beans that render the formatted data, just use those. The ActionForms
 are only important for inputting data.
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Java Web Development with Struts.
 -- Tel +1 585 737-3463.
 -- Web http://www.husted.com/struts/
 
 Hudayioglu, Fehmi wrote:
 
  Hi fellows,
 
  I have searched the mailing list in hope to find a way to display a number
  in format (e.g:120.200,32). I couldn't find any solution. There were some
  messages proposing to play on the getter and setter methods. But, this is
  not a solution we imagine. Because we have some object properties in the
  Form Bean and their properties can be set by struts directly. So changing
  getter and setter methods requires tons of effort to modify our  data
  classes and form beans which is of course NOT desirable. I also know that
  there is a DateTag library of Jakarta, which is yet in beta release.
  Therefore, my managers (regards to them) don't want to use beta releases.
  They don't want to modify struts tags neither. However, I believe this is
  quite straightforward way (hopefully they will be contended soon).
 
  So,
  1. Do you have any clever solution for this common problem?
  2. What necessary steps should I take in order to add a new Format
 attribute
  to the form:text and bean:write?
  2.1 In case, I added necessary methods, how can I guarantee that struts
 set
  this formatted value to the property. According to my tries, it doesn't
 set
  them correctly?
  2.2 How long does an ordinary developer require 

Re: DTDS Required for Struts and Web Application.

2002-02-04 Thread Ted Husted

It's suppose to use the one's in the Struts JARs. Under some
circumstances, from what people say, that doesn't seem to happen. 

There is a switch in the ActionServlet (validating) that can turn the
DTD validation off if it gets to be a problem. 

http://jakarta.apache.org/struts/api-1.0/org/apache/struts/action/ActionServlet.html

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



Sudhir S. Shetty wrote:
 
 Hi All,
   I have an Intranet application hosted on Weblogic Server , the
 application is built on STRUTS, I need to know, whenever I start up
 weblogic, the server downloads the DTD's for the application i.e. the struts
 specific DTD's and the ones specific to Sun for the Web application.
 Can You suggest me a work arond in which I download the DTD's on to my
 machine on to a folder, so that These DTD's dont need to be downloaded
 everytime I start Weblogic up.
 Kindly tell me the places I have to make the change.
 
 Thanks in advance,
 Sudhir
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




Re: Struts Validator Load Failure

2002-02-04 Thread Patrick Refondini

Hi,

I have had the same error :
Digester.getParser:
javax.xml.parsers.ParserConfigurationException:
Namespace not supported
by SAXParser
(...)

The digester (org.apache.commons.digester) namespace setup seems not 
supported by all versions of xml parsers.
I had the same problem with both digester package version 1.0 and 1.1.1

A solution :

Since tomcat 3.3a (Final ) and above this problem do not arise, due to 
the included xml parser version I guess.

I tried to upgrade the tomcat 3.2.2 parser, the digester errors seemed 
resolved but it broke tomcat somewhere else ... I stoped spending time 
there and choose the easy way: upgrading the servlet - JSP container.

I think it must be possible to work with Tomcat 4 in the JBuilder 
environement since JBuilder 5.0 but I haven't tested it yet.

Regards, Patrick



Robert D. Morse wrote:

Thanks Ted, but I get a different error under JBuilder 6.0:

Digester.getParser:
javax.xml.parsers.ParserConfigurationException: Namespace not supported by
SAXParser
   at com.sun.xml.parser.SAXParserImpl.init(SAXParserImpl.java:60)
   at
com.sun.xml.parser.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.ja
va:57)
   at org.apache.commons.digester.Digester.getParser(Digester.java:523)
   at org.apache.commons.digester.Digester.getReader(Digester.java:542)
   at org.apache.commons.digester.Digester.parse(Digester.java:1234)
   at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1762)
   at org.apache.struts.action.ActionServlet.init(ActionServlet.java:496)
   at javax.servlet.GenericServlet.init(GenericServlet.java:258)
   at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
   at org.apache.tomcat.core.Handler.init(Handler.java:215)
   at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
   at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartup
Interceptor.java:130)
   at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
   at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)java.lang
.NoSuchMethodError
   at org.apache.commons.digester.Digester.getReader(Digester.java:542)
   at org.apache.commons.digester.Digester.parse(Digester.java:1234)
   at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1762)
   at org.apache.struts.action.ActionServlet.init(ActionServlet.java:496)
   at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
   at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)

   at javax.servlet.GenericServlet.init(GenericServlet.java:258)
   at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
   at org.apache.tomcat.core.Handler.init(Handler.java:215)
   at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
   at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartup
Interceptor.java:130)
   at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
   at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
   at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
   at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
Exception in thread main

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 02, 2002 11:03 AM
To: Struts Users Mailing List
Subject: Re: Struts Validator Load Failure


Try it with this one instead (binaries only),

http://husted.com/struts/resources/struts_1_1a.zip

and let us know if it works as well as it did Struts 1.0.x

Hey, and any notes on using Torque with Struts would be welcome =:o)

-Ted.


Robert D. Morse wrote:

Hello Ted.
I just tried the nightly 31-Jan-2002 version of struts.  Torque is from
01-06-2002.

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 02, 2002 6:07 AM
To: Struts Users Mailing List
Subject: Re: Struts Validator Load Failure

By any version of Struts, do include version 1.0.1 or a nightly build
prior to 15-Jan ?

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

Robert D. Morse wrote:

Has anyone discovered a fix for this?  I see this with the 01-06-2002
nightly of Torque and any version of Struts other than 1.0.  Struts 1.0
works perfectly.  I haven't had the time to track this down personally,

so

I'm wondering if anyone discovered a solution.  Thanks.

-Original Message-
From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
Sent: Sunday, January 06, 2002 12:10 PM
To: [EMAIL PROTECTED]
Subject: Struts Validator Load Failure

Subject: Struts Validator Load Failure
From: Paul Heath [EMAIL PROTECTED]
 ===
The following is a partial stack trace of when the app server tries to

load

Struts Validator.

I have the latest version of Digester (v1.1.1) 

Re: DTDS Required for Struts and Web Application.

2002-02-04 Thread Christian Bouessay

Sudhir S. Shetty wrote:

 Hi All,
   I have an Intranet application hosted on Weblogic Server , the
 application is built on STRUTS, I need to know, whenever I start up
 weblogic, the server downloads the DTD's for the application i.e. the struts
 specific DTD's and the ones specific to Sun for the Web application.
 Can You suggest me a work arond in which I download the DTD's on to my
 machine on to a folder, so that These DTD's dont need to be downloaded
 everytime I start Weblogic up.


Try to copy DTD files in the directory:

org/apache/struts/resources

This directory doesn't exist in src distrib, but is present in the .jar 
file.

It works for me.

--
C. Bouessay






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




Design advice.

2002-02-04 Thread rob

This is a pretty lengthy post so if you're not that interested be warned not
to continue.

I'm trying to develop a struts application that has the ability to have new
beans plugged
into it after it's been deployed.

The idea is someone will come along later and write a new set of component
class files
(that also use struts) and can simply modify the struts-config.xml and plug
them in.

I've developed two sets of actions, the first is a set of generic actions
that will rely on
methods that will exist by convention in any component that is developed for
the
application.  The second set of actions are specific to whatever component
is being
plugged in and are specified per action.

Below I have illustrated an example struts-config.xml that has two familiar
components
plugged into it.  A 'Folder' and 'Document' which is a fairly familiar idea
to most.  Each
component may implement 4 core operations view, creation, modification and
removal.

I was just wondering if anyone could offer some comments that might be
helpful in
developing the model I am trying to build.  Or by all means any other design
advice is
good as well.

Thanks

rob
form-beans
  form-bean name=viewFolder   type=CreateFolderForm/
  form-bean name=viewDocument type=CreateDocumentForm/
  form-bean name=createFolder type=CreateFolderForm/
  form-bean name=createDocument   type=CreateDocumentForm/
  form-bean name=modifyFolder   type=CreateFolderForm/
  form-bean name=modifyDocument type=CreateDocumentForm/
  form-bean name=removeFolder   type=CreateFolderForm/
  form-bean name=removeDocument type=CreateDocumentForm/
/form-beans

global-forwards
  forward name=view type=do/view/
  forward name=create   type=do/create/
  forward name=modify type=do/modify/
  forward name=remove type=do/remove/
/global-forwards

!-- begin element independant actions --
action path=/view
  type=ViewAction
  name=viewForm
  scope=request

  forward name=view/Folder
path=do/viewFolder/
  forward name=view/Document
path=do/viewDocument/

/action

action path=/create
  type=CreateAction
  name=createForm
  scope=request

  forward name=create/Folder
path=/WEB-INF/pages/createFolder.jsp/
  forward name=create/Document
path=/WEB-INF/pages/createDocument.jsp/

/action

action path=/modify
  type=ModifyAction
  name=modifyForm
  scope=request

  forward name=modify/Folder
path=/WEB-INF/pages/modifyFolder.jsp/
  forward name=modify/Document
path=/WEB-INF/pages/modifyDocument.jsp/

/action

action path=/remove
  type=RemoveAction
  name=removeForm
  scope=request

  forward name=remove/Folder
path=/WEB-INF/pages/removeFolder.jsp/
  forward name=remove/Document
path=/WEB-INF/pages/removeDocument.jsp/

/action

!-- begin element dependant actions --

action path=/viewFolder
  type=ViewFolderAction
  name=viewFolderForm
  scope=request

  forward name=view.Folder
path=/WEB-INF/pages/viewFolder.jsp/

/action


action path=/viewDocument
  type=ViewDocumentAction
  name=viewDocumentForm
  scope=request

  forward name=view.Document
path=/WEB-INF/pages/viewDocument.jsp/

/action


action path=/createFolder
  type=CreateFolderAction
  name=createFolderForm
  input=/WEB-INF/pages/createFolder.jsp
  scope=request

/action


action path=/createDocument
  type=CreateDocumentAction
  name=createDocumentForm
  input=/WEB-INF/pages/createDocument.jsp
  scope=request
/action


action path=/modifyFolder
  type=ModifyFolderAction
  name=modifyFolderForm
  input=/WEB-INF/pages/modifyFolder.jsp
  scope=request
/action


action path=/modifyDocument
  type=ModifyDocumentAction
  name=modifyDocumentForm
  input=/WEB-INF/pages/modifyDocument.jsp
  scope=request
/action


action path=/removeFolder
  type=RemoveFolderAction
  name=removeFolderForm
  input=/WEB-INF/pages/removeFolder.jsp
  scope=request
/action


action path=/removeDocument
  type=RemoveDocumentAction
  name=removeDocumentForm
  input=/WEB-INF/pages/removeDocument.jsp
  scope=request
/action


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




DynaActionForm questions

2002-02-04 Thread Dick Starr

It seems that letting DynaActionForm generate the form bean via info in
struts-config may be the way to go if no extra code is needed in the form
bean. I do have two questions, however.

Does ValidatorForm work with DynaActionForm?

Is DynaActionForm as efficient (system performance) as manually created form
beans?

Thanks,

Dick Starr


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




Re: Poolman benefits? (was Re: Connection Pooling)

2002-02-04 Thread Jason B Menard

Currently using Oracle 8.1.7 and Poolman 2.0.4.  Like you, we also stay away
from betas.


- Original Message -
From: Mark Woon [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, February 01, 2002 4:12 PM
Subject: Re: Poolman benefits? (was Re: Connection Pooling)



 Thanks for the info.

 Out of curiosity, what version of Poolman and Oracle thin client are you
using?
 We have a policy here that frowns upon using anything marked as beta on
our
 production systems, and I'm wondering about the stability of the beta
Poolman
 2.1.  Should I be using the older 2.0.4 version instead?

 -Mark

 Jason B Menard wrote:

  We are using Poolman with the Oracle thin client.  It does not replace
it,
  just sits on top of it.
 
  One of the benefits is that you can specify your various pools in an XML
  file.  This makes any changes that might need to be made at a later date
  simple, and also ensures consistancy across the organization.
Specifying
  all your connection pools in one place, even if there are different
  databases, is a nice benefit.  It also makes it easier on the
developers.
  Poolman does not do just connection pooling though, it will pool any
object.
 
  We've been using it for a few versions now and have been pretty happy
with
  it so far.  It's painless to setup and get running, so you might want to
  take a look at it and see if it's right for you.
 
  Jason





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




Re: Design advice.

2002-02-04 Thread Ted Husted

An approach I've used successfully, which is looks like where you are
going,  is to 

(1) create a set of standard Actions that can act up a known type of
object, or an object that implements a particular interface, and 

(2) pass the type of the bean to create to the standard Action as the
parameter property.

 action 
  path=/item/Edit
  type=org.apache.gavel.http.SecureHelper -- standard section
name=itemForm
scope=request
 validate=false
  parameter=org.apache.gavel.item.Select -- business bean
  forward 
name=continue  
  path=/pages/item/Form.jsp/ 
   /action


The standard Action can then instantiate the bean and use the interface
methods to act upon it. 

This is akin to the approach Struts uses for ActionForms, et cetera. 

The ModelBeans in the Scaffold/Artimus packages in the Contrib folder
demonstrate using this in practice.

I now find myself writing signficant applications that use virtually no
custom Actions at all, and instead end up putting all the business logic
in business beans (where they belong). 

This is exactly the same idea that Craig proposed in his Workflow
proposal (thanks Craig!). 

When I get a break, I hope to revisit the workflow proposal and see if I
can get my apps to do the same thing I'm doing with these standard
actions (see Scaffold) with workflow objects.


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

rob wrote:
 
 This is a pretty lengthy post so if you're not that interested be warned not
 to continue.
 
 I'm trying to develop a struts application that has the ability to have new
 beans plugged
 into it after it's been deployed.
 
 The idea is someone will come along later and write a new set of component
 class files
 (that also use struts) and can simply modify the struts-config.xml and plug
 them in.
 
 I've developed two sets of actions, the first is a set of generic actions
 that will rely on
 methods that will exist by convention in any component that is developed for
 the
 application.  The second set of actions are specific to whatever component
 is being
 plugged in and are specified per action.
 
 Below I have illustrated an example struts-config.xml that has two familiar
 components
 plugged into it.  A 'Folder' and 'Document' which is a fairly familiar idea
 to most.  Each
 component may implement 4 core operations view, creation, modification and
 removal.
 
 I was just wondering if anyone could offer some comments that might be
 helpful in
 developing the model I am trying to build.  Or by all means any other design
 advice is
 good as well.
 
 Thanks
 
 rob
 form-beans
   form-bean name=viewFolder   type=CreateFolderForm/
   form-bean name=viewDocument type=CreateDocumentForm/
   form-bean name=createFolder type=CreateFolderForm/
   form-bean name=createDocument   type=CreateDocumentForm/
   form-bean name=modifyFolder   type=CreateFolderForm/
   form-bean name=modifyDocument type=CreateDocumentForm/
   form-bean name=removeFolder   type=CreateFolderForm/
   form-bean name=removeDocument type=CreateDocumentForm/
 /form-beans
 
 global-forwards
   forward name=view type=do/view/
   forward name=create   type=do/create/
   forward name=modify type=do/modify/
   forward name=remove type=do/remove/
 /global-forwards
 
 !-- begin element independant actions --
 action path=/view
   type=ViewAction
   name=viewForm
   scope=request
 
   forward name=view/Folder
 path=do/viewFolder/
   forward name=view/Document
 path=do/viewDocument/
 
 /action
 
 action path=/create
   type=CreateAction
   name=createForm
   scope=request
 
   forward name=create/Folder
 path=/WEB-INF/pages/createFolder.jsp/
   forward name=create/Document
 path=/WEB-INF/pages/createDocument.jsp/
 
 /action
 
 action path=/modify
   type=ModifyAction
   name=modifyForm
   scope=request
 
   forward name=modify/Folder
 path=/WEB-INF/pages/modifyFolder.jsp/
   forward name=modify/Document
 path=/WEB-INF/pages/modifyDocument.jsp/
 
 /action
 
 action path=/remove
   type=RemoveAction
   name=removeForm
   scope=request
 
   forward name=remove/Folder
 path=/WEB-INF/pages/removeFolder.jsp/
   forward name=remove/Document
 path=/WEB-INF/pages/removeDocument.jsp/
 
 /action
 
 !-- begin element dependant actions --
 
 action path=/viewFolder
   type=ViewFolderAction
   name=viewFolderForm
   scope=request
 
   forward name=view.Folder
 path=/WEB-INF/pages/viewFolder.jsp/
 
 /action
 
 action path=/viewDocument
   type=ViewDocumentAction
   name=viewDocumentForm
   scope=request
 
   forward name=view.Document
 path=/WEB-INF/pages/viewDocument.jsp/
 
 /action
 
 action path=/createFolder
   type=CreateFolderAction
   name=createFolderForm
   input=/WEB-INF/pages/createFolder.jsp
   scope=request
 
 /action
 
 action path=/createDocument
   type=CreateDocumentAction
   

Re: Design advice.

2002-02-04 Thread Bob Williams

I am new to this list so I have some catching up to do, so forgive me if
this is an old question.  Mr. Husted refers to the workflow
proposal/objects in his response.  What is the status of the Workflow
proposal and/or how do I track what is happening there?  I have read the
proposal, but haven't found anything that refers to the implementation of
it.

Thanks for your patience,

bob

- Original Message -
From: Ted Husted [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, February 04, 2002 9:11 AM
Subject: Re: Design advice.



 An approach I've used successfully, which is looks like where you are
 going,  is to

 (1) create a set of standard Actions that can act up a known type of
 object, or an object that implements a particular interface, and

 (2) pass the type of the bean to create to the standard Action as the
 parameter property.

  action
   path=/item/Edit
   type=org.apache.gavel.http.SecureHelper -- standard section
 name=itemForm
 scope=request
  validate=false
   parameter=org.apache.gavel.item.Select -- business bean
   forward
 name=continue
   path=/pages/item/Form.jsp/
/action


 The standard Action can then instantiate the bean and use the interface
 methods to act upon it.

 This is akin to the approach Struts uses for ActionForms, et cetera.

 The ModelBeans in the Scaffold/Artimus packages in the Contrib folder
 demonstrate using this in practice.

 I now find myself writing signficant applications that use virtually no
 custom Actions at all, and instead end up putting all the business logic
 in business beans (where they belong).

 This is exactly the same idea that Craig proposed in his Workflow
 proposal (thanks Craig!).

 When I get a break, I hope to revisit the workflow proposal and see if I
 can get my apps to do the same thing I'm doing with these standard
 actions (see Scaffold) with workflow objects.


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

 rob wrote:
 
  This is a pretty lengthy post so if you're not that interested be warned
not
  to continue.
 
  I'm trying to develop a struts application that has the ability to have
new
  beans plugged
  into it after it's been deployed.
 
  The idea is someone will come along later and write a new set of
component
  class files
  (that also use struts) and can simply modify the struts-config.xml and
plug
  them in.
 
  I've developed two sets of actions, the first is a set of generic
actions
  that will rely on
  methods that will exist by convention in any component that is developed
for
  the
  application.  The second set of actions are specific to whatever
component
  is being
  plugged in and are specified per action.
 
  Below I have illustrated an example struts-config.xml that has two
familiar
  components
  plugged into it.  A 'Folder' and 'Document' which is a fairly familiar
idea
  to most.  Each
  component may implement 4 core operations view, creation, modification
and
  removal.
 
  I was just wondering if anyone could offer some comments that might be
  helpful in
  developing the model I am trying to build.  Or by all means any other
design
  advice is
  good as well.
 
  Thanks
 
  rob
  form-beans
form-bean name=viewFolder   type=CreateFolderForm/
form-bean name=viewDocument type=CreateDocumentForm/
form-bean name=createFolder type=CreateFolderForm/
form-bean name=createDocument   type=CreateDocumentForm/
form-bean name=modifyFolder   type=CreateFolderForm/
form-bean name=modifyDocument type=CreateDocumentForm/
form-bean name=removeFolder   type=CreateFolderForm/
form-bean name=removeDocument type=CreateDocumentForm/
  /form-beans
 
  global-forwards
forward name=view type=do/view/
forward name=create   type=do/create/
forward name=modify type=do/modify/
forward name=remove type=do/remove/
  /global-forwards
 
  !-- begin element independant actions --
  action path=/view
type=ViewAction
name=viewForm
scope=request
 
forward name=view/Folder
  path=do/viewFolder/
forward name=view/Document
  path=do/viewDocument/
 
  /action
 
  action path=/create
type=CreateAction
name=createForm
scope=request
 
forward name=create/Folder
  path=/WEB-INF/pages/createFolder.jsp/
forward name=create/Document
  path=/WEB-INF/pages/createDocument.jsp/
 
  /action
 
  action path=/modify
type=ModifyAction
name=modifyForm
scope=request
 
forward name=modify/Folder
  path=/WEB-INF/pages/modifyFolder.jsp/
forward name=modify/Document
  path=/WEB-INF/pages/modifyDocument.jsp/
 
  /action
 
  action path=/remove
type=RemoveAction
name=removeForm
scope=request
 
forward name=remove/Folder
  path=/WEB-INF/pages/removeFolder.jsp/
forward name=remove/Document
  

Re: Design advice.

2002-02-04 Thread Ted Husted

The work moved over to the Commons, 

http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/workflow/

There is actually some code there, and I put together a quick Rosetta
Stone demo here 

http://husted.com/struts/resources/struts-simple.zip

(this really should be named struts-workflow.zip)

but there's more to be done.

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


Bob Williams wrote:
 
 I am new to this list so I have some catching up to do, so forgive me if
 this is an old question.  Mr. Husted refers to the workflow
 proposal/objects in his response.  What is the status of the Workflow
 proposal and/or how do I track what is happening there?  I have read the
 proposal, but haven't found anything that refers to the implementation of
 it.
 
 Thanks for your patience,
 
 bob
 
 - Original Message -
 From: Ted Husted [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Monday, February 04, 2002 9:11 AM
 Subject: Re: Design advice.
 
 
  An approach I've used successfully, which is looks like where you are
  going,  is to
 
  (1) create a set of standard Actions that can act up a known type of
  object, or an object that implements a particular interface, and
 
  (2) pass the type of the bean to create to the standard Action as the
  parameter property.
 
   action
path=/item/Edit
type=org.apache.gavel.http.SecureHelper -- standard section
  name=itemForm
  scope=request
   validate=false
parameter=org.apache.gavel.item.Select -- business bean
forward
  name=continue
path=/pages/item/Form.jsp/
 /action
 
 
  The standard Action can then instantiate the bean and use the interface
  methods to act upon it.
 
  This is akin to the approach Struts uses for ActionForms, et cetera.
 
  The ModelBeans in the Scaffold/Artimus packages in the Contrib folder
  demonstrate using this in practice.
 
  I now find myself writing signficant applications that use virtually no
  custom Actions at all, and instead end up putting all the business logic
  in business beans (where they belong).
 
  This is exactly the same idea that Craig proposed in his Workflow
  proposal (thanks Craig!).
 
  When I get a break, I hope to revisit the workflow proposal and see if I
  can get my apps to do the same thing I'm doing with these standard
  actions (see Scaffold) with workflow objects.
 
 
  -- Ted Husted, Husted dot Com, Fairport NY USA.
  -- Java Web Development with Struts.
  -- Tel +1 585 737-3463.
  -- Web http://www.husted.com/struts/
 
  rob wrote:
  
   This is a pretty lengthy post so if you're not that interested be warned
 not
   to continue.
  
   I'm trying to develop a struts application that has the ability to have
 new
   beans plugged
   into it after it's been deployed.
  
   The idea is someone will come along later and write a new set of
 component
   class files
   (that also use struts) and can simply modify the struts-config.xml and
 plug
   them in.
  
   I've developed two sets of actions, the first is a set of generic
 actions
   that will rely on
   methods that will exist by convention in any component that is developed
 for
   the
   application.  The second set of actions are specific to whatever
 component
   is being
   plugged in and are specified per action.
  
   Below I have illustrated an example struts-config.xml that has two
 familiar
   components
   plugged into it.  A 'Folder' and 'Document' which is a fairly familiar
 idea
   to most.  Each
   component may implement 4 core operations view, creation, modification
 and
   removal.
  
   I was just wondering if anyone could offer some comments that might be
   helpful in
   developing the model I am trying to build.  Or by all means any other
 design
   advice is
   good as well.
  
   Thanks
  
   rob
   form-beans
 form-bean name=viewFolder   type=CreateFolderForm/
 form-bean name=viewDocument type=CreateDocumentForm/
 form-bean name=createFolder type=CreateFolderForm/
 form-bean name=createDocument   type=CreateDocumentForm/
 form-bean name=modifyFolder   type=CreateFolderForm/
 form-bean name=modifyDocument type=CreateDocumentForm/
 form-bean name=removeFolder   type=CreateFolderForm/
 form-bean name=removeDocument type=CreateDocumentForm/
   /form-beans
  
   global-forwards
 forward name=view type=do/view/
 forward name=create   type=do/create/
 forward name=modify type=do/modify/
 forward name=remove type=do/remove/
   /global-forwards
  
   !-- begin element independant actions --
   action path=/view
 type=ViewAction
 name=viewForm
 scope=request
  
 forward name=view/Folder
   path=do/viewFolder/
 forward name=view/Document
   path=do/viewDocument/
  
   /action
  
   action path=/create
 type=CreateAction
 name=createForm

RE: Design advice.

2002-02-04 Thread Jon.Ridgway

Hi Bob,

If you download the latest nightly build you will find an initial
implementation of the Workflow proposal.

Jon.

-Original Message-
From: Bob Williams [mailto:[EMAIL PROTECTED]] 
Sent: 04 February 2002 15:33
To: Struts Users Mailing List
Subject: Re: Design advice.

I am new to this list so I have some catching up to do, so forgive me if
this is an old question.  Mr. Husted refers to the workflow
proposal/objects in his response.  What is the status of the Workflow
proposal and/or how do I track what is happening there?  I have read the
proposal, but haven't found anything that refers to the implementation of
it.

Thanks for your patience,

bob

- Original Message -
From: Ted Husted [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, February 04, 2002 9:11 AM
Subject: Re: Design advice.



 An approach I've used successfully, which is looks like where you are
 going,  is to

 (1) create a set of standard Actions that can act up a known type of
 object, or an object that implements a particular interface, and

 (2) pass the type of the bean to create to the standard Action as the
 parameter property.

  action
   path=/item/Edit
   type=org.apache.gavel.http.SecureHelper -- standard section
 name=itemForm
 scope=request
  validate=false
   parameter=org.apache.gavel.item.Select -- business bean
   forward
 name=continue
   path=/pages/item/Form.jsp/
/action


 The standard Action can then instantiate the bean and use the interface
 methods to act upon it.

 This is akin to the approach Struts uses for ActionForms, et cetera.

 The ModelBeans in the Scaffold/Artimus packages in the Contrib folder
 demonstrate using this in practice.

 I now find myself writing signficant applications that use virtually no
 custom Actions at all, and instead end up putting all the business logic
 in business beans (where they belong).

 This is exactly the same idea that Craig proposed in his Workflow
 proposal (thanks Craig!).

 When I get a break, I hope to revisit the workflow proposal and see if I
 can get my apps to do the same thing I'm doing with these standard
 actions (see Scaffold) with workflow objects.


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

 rob wrote:
 
  This is a pretty lengthy post so if you're not that interested be warned
not
  to continue.
 
  I'm trying to develop a struts application that has the ability to have
new
  beans plugged
  into it after it's been deployed.
 
  The idea is someone will come along later and write a new set of
component
  class files
  (that also use struts) and can simply modify the struts-config.xml and
plug
  them in.
 
  I've developed two sets of actions, the first is a set of generic
actions
  that will rely on
  methods that will exist by convention in any component that is developed
for
  the
  application.  The second set of actions are specific to whatever
component
  is being
  plugged in and are specified per action.
 
  Below I have illustrated an example struts-config.xml that has two
familiar
  components
  plugged into it.  A 'Folder' and 'Document' which is a fairly familiar
idea
  to most.  Each
  component may implement 4 core operations view, creation, modification
and
  removal.
 
  I was just wondering if anyone could offer some comments that might be
  helpful in
  developing the model I am trying to build.  Or by all means any other
design
  advice is
  good as well.
 
  Thanks
 
  rob
  form-beans
form-bean name=viewFolder   type=CreateFolderForm/
form-bean name=viewDocument type=CreateDocumentForm/
form-bean name=createFolder type=CreateFolderForm/
form-bean name=createDocument   type=CreateDocumentForm/
form-bean name=modifyFolder   type=CreateFolderForm/
form-bean name=modifyDocument type=CreateDocumentForm/
form-bean name=removeFolder   type=CreateFolderForm/
form-bean name=removeDocument type=CreateDocumentForm/
  /form-beans
 
  global-forwards
forward name=view type=do/view/
forward name=create   type=do/create/
forward name=modify type=do/modify/
forward name=remove type=do/remove/
  /global-forwards
 
  !-- begin element independant actions --
  action path=/view
type=ViewAction
name=viewForm
scope=request
 
forward name=view/Folder
  path=do/viewFolder/
forward name=view/Document
  path=do/viewDocument/
 
  /action
 
  action path=/create
type=CreateAction
name=createForm
scope=request
 
forward name=create/Folder
  path=/WEB-INF/pages/createFolder.jsp/
forward name=create/Document
  path=/WEB-INF/pages/createDocument.jsp/
 
  /action
 
  action path=/modify
type=ModifyAction
name=modifyForm
scope=request
 
forward name=modify/Folder
  path=/WEB-INF/pages/modifyFolder.jsp/

Preselecting Radio Buttons

2002-02-04 Thread John M. Corro

I would have thought this was a simple thing, but I must be missing something.  Is 
there an attribute to the html:radio tag that sets it as selected?  I want to have a 
group of radio buttons w/ 1 button being the default.  I didn't see anything in the 
tag lib documentation and I tried coding in the default value into the reset method 
(so if the form attribute was programmerLanguage, I would say 'programmerLanguage = 
java;' in the reset method., but no luck on either front. 

Can anyone provide some insight into this simple problem?



collecting parameters from a dynamic form

2002-02-04 Thread Jeff Oberlander

I have a dynamic form that is built from an ArrayList of objects (see below
(b) ).  Building the form works great.  I get multiple rows of widget names
and values.  However, I can't seem to collect the data in my Action.  The
HTML that is rendered just repeats the same named input fields (see below
(b)).  In my action, my widget ArrayList comes in with the right number of
objects, but they are blank (no data has been collected from the form).  A 

request.getParameter(name));
request.getParameter(value));

works, but of course only returns one of the sets of data - the first in the
form.  So I can't seem to retrieve the multiple values from in my Action
class in any way.  Am I doing something that can't be done?

(a)
input type=text name=name 
input type=text name=value 
 input type=text name=name 
input type=text name=value 

(b)
html:form action=/saveWidgets
logic:iterate id=element name=widgetForm property=widgets
table 
  tr
th 
 Widget Name
/th
td  
 html:text name=element property=name
/td
  /tr
  tr
th 
 Widget Value
   /th
td  
 html:text name=element property=value
/td
  /tr
/logic:iterate
/html:form


Thanks

Jeff




http://www.xns.org/=jeffoberlander 

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




Re: Preselecting Radio Buttons

2002-02-04 Thread MARK NICHOLS

Add the 'checked' parm to your default radio button, like so...


What is your gender?br
Female input type=radio name=gender value=female checked
Male input type=radio name=gender value=male




_
/\/\ark /\/ichols
Harris I, 2nd Floor
217.558.2919

Ooo. They've got the Internet on computers now. - Homer Simpson 

 [EMAIL PROTECTED] 02/04/02 09:57AM 
I would have thought this was a simple thing, but I must be missing something.  Is 
there an attribute to the html:radio tag that sets it as selected?  I want to have a 
group of radio buttons w/ 1 button being the default.  I didn't see anything in the 
tag lib documentation and I tried coding in the default value into the reset method 
(so if the form attribute was programmerLanguage, I would say 'programmerLanguage = 
java;' in the reset method., but no luck on either front. 

Can anyone provide some insight into this simple problem?


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




RE: Boost Struts with XSLT and XML - JavaWorld.com

2002-02-04 Thread Knoll, Zach

This is really cool. I've been struggling with this for a while trying to
convince myself that everything that comes from SUN must be good and
beautiful and that those that were ragging on JSP were just fringe loonies.
I thought the whole struts tag library and tag libraries in general would
shut up the non-believers by removing spaghetti code from JSP. But from
experience I am seeing that people will always go the easiest route and when
offered a choice between learning how to handle a new tag library API or
just slopping some java code into your JSP, its the rare coder who wont take
the sloppy, easier, impossibly harder to debug 2 months later approach. I
think I can finally admit now that JSP is just not a clean good technology
and although I have a lot to learn I'd like to move away from JSP's
altogether. Simultaneous to my JSP=bad voyage of discovery I was also
starting to learn Struts and saw and continue to see in Struts stuff that I
have been doing on my own for a while now, done in a more polished cleaner
fashion that attracts me to it. This article showing how to have the best
servlet centric architecture (Struts) while cutting out the dead-weight
(JSP) really hits home. I just wish they would've provided more code so
people like myself who are new to xml can really get a sense of how to
implement this beast. 

-Original Message-
From: Pete Carapetyan [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 02, 2002 12:17 PM
To: Struts Users Mailing List
Subject: Re: Boost Struts with XSLT and XML - JavaWorld.com


This is one of the most well written articles I have ever seen.

At first blush, I am having a difficult time deciding wether this technology
is
totally cool, or it is just such a straightforward presentation that I am
twitterpated.

Thanks Todd

Todd G. Nist wrote:

 I have not seen this posted so, for those interested in using XSLT and XML
 with Struts, thought the following article maybe of value.

 Boost Struts with XSLT and XML
 An introduction to Model 2X

 Summary
 Struts is an innovative server-side Java framework designed to build Web
 applications. Hosted by the Apache Software Foundation's Jakarta Project,
 Struts has recently gained wide acceptance in the Java community. In this
 article, Julien Mercay and Gilbert Bouzeid introduce the processing model
 underlying Struts, describe the Struts framework itself, and present Model
 2X, which enhances Struts by replacing JSP (JavaServer Pages) with XML and
 XSLT (Extensible Stylesheet Language Transformations) to better separate
 logic and presentation. (2,600 words; February 1, 2002)

 By Julien Mercay and Gilbert Bouzeid

 URL:
http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-strutsxslt.html?

 Todd G. Nist

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

--
Pete Carapetyan
http://datafundamentals.com
Java Development Services

Open standards technology for commercial profitability



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


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the postmaster at [EMAIL PROTECTED]


www.sothebys.com
**


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




[Fwd: RE: [Fwd: Re: Hi....]]

2002-02-04 Thread Vic Cekvenich

The thing on tags is do not use to many tags. Try to avoid writing 
tags.
Somehow, the example app on struts has a custom tag and people like to 
learn how to write tags, and so there are lots of tags in Struts. This 
is a bad habit. Only do it if you must.
Try to do as little code as possible in presentation/view/jsp.

So to me, tags and Struts framework are 2 different things, but bellow 
is a good book anyway.

Vic

 Original Message 
Subject: RE: [Fwd: Re: Hi]
Date: Wed, 30 Jan 2002 18:49:35 +0100
From: Lacerda, Wellington (AFIS) [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
Organization: Basebeans.com
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Newsgroups: Struts

Another book with a lot of information on Struts is JSP and Tag Libraries
for Web Development,
available at Amazon and BN. Check the publisher's page at:
http://www.newriders.com/books/title.cfm?isbn=0735710953.

It is heavily focused on Tag Libraries and Struts is discussed on the light
of that.

Wellington

-Original Message-
From: Vic Cekvenich [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 6:39 PM
To: [EMAIL PROTECTED]
Subject: [Fwd: Re: Hi]



Newsgroups: Struts @ news.basebeans.com
References: [EMAIL PROTECTED]

One Struts book at http://www.basebeans.com/book.jsp

Amir N. Nashat wrote:

   Hi Chetan,
  
   There are no books available at this time though 2 are currently
being written that I know of. However, they will not be available for a
while. The best place to start is to go to the website
jakarata.apache.org and search under struts. there is A LOT of good
information there. Also, another very good site is www.husted.com.
Ted(who runs the site) is very knowledgeable in this field and posts to
this mailing list very often. Hope that helps.
  
   amir
  
  
  
  
  [EMAIL PROTECTED] 10:38:51 PM 01/29/02 
  
   I'm just a newbie to Struts and find it very interesting, I just want
to ask
   where is it best to start learning struts from... Is there a book out
there
   that I can buy
   Thankz
   Chetan
  
   --
   To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
  
  
  
  




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


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




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




cannot find tag library

2002-02-04 Thread Elijah Jacobs

Hi all,

I am using Tomcat 4.01; Windows 2000 ; Struts v1.0

I created a tag which displays a message on the screen.  I followed the
basic layout of the example that came with struts.  by layout I mean:

1. I created a tag under the /classes directory.  this time I put it right
under the /classes directory so I didn't need to deal with package names.
2. I added the tag in the app.tld (which is right under /web-inf)
3. On my jsp page, I reference the TLD file and gave it a prefix app (just
like the example).
%@ taglib uri=/WEB-INF/app.tld prefix=app %


when I do  app:hello /  in my JSP page (Bid.jsp) I get:

Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\localhost\blank\bid$jsp.java:143:
Class org.apache.jsp.HelloTag not found.
  HelloTag _jspx_th_app_hello_0 = new HelloTag();
  ^

I am not sure why it's looking for my HelloTag under org.apache.jsp when I
put it on the /classes directory.  I have other Java files right under the
/classes directory and Tomcat 4.0.1 was able to find them - although they
were not custom tag file, but that shouldn't matter, right?

thanks in advance,
- ej -

p.s. below are parts my app.tld and web.xml files and the rest of the error:
app.tld 
  tag
namehello/name
tagclassHelloTag/tagclass
bodycontentempty/bodycontent
  /tag

web.xml 
  taglib
taglib-uri/WEB-INF/app.tld/taglib-uri
taglib-location/WEB-INF/app.tld/taglib-location
  /taglib

error message 

type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server Error)
that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 14 in the jsp file: /bid.jsp

Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\localhost\blank\bid$jsp.java:143:
Class org.apache.jsp.HelloTag not found.
  HelloTag _jspx_th_app_hello_0 = new HelloTag();
  ^


An error occurred at line: 14 in the jsp file: /bid.jsp

Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\localhost\blank\bid$jsp.java:143:
Class org.apache.jsp.HelloTag not found.
  HelloTag _jspx_th_app_hello_0 = new HelloTag();
  ^
2 errors

at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled
Code)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:177)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:189)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled
Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java,
Compiled Code)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java,
Compiled Code)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
at

Re: Preselecting Radio Buttons

2002-02-04 Thread John M. Corro

When it comes to form input tags, I tend to look at the straight html tags
as a last resortI prefer to use the struts taglib implementation so that
in case the user failed validation tests when submitting the form, the value
they selected when first filling it out would stay selected.  Thanks though!

- Original Message -
From: MARK NICHOLS [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 04, 2002 10:25 AM
Subject: Re: Preselecting Radio Buttons


Add the 'checked' parm to your default radio button, like so...


What is your gender?br
Female input type=radio name=gender value=female checked
Male input type=radio name=gender value=male




_
/\/\ark /\/ichols
Harris I, 2nd Floor
217.558.2919

Ooo. They've got the Internet on computers now. - Homer Simpson

 [EMAIL PROTECTED] 02/04/02 09:57AM 
I would have thought this was a simple thing, but I must be missing
something.  Is there an attribute to the html:radio tag that sets it as
selected?  I want to have a group of radio buttons w/ 1 button being the
default.  I didn't see anything in the tag lib documentation and I tried
coding in the default value into the reset method (so if the form attribute
was programmerLanguage, I would say 'programmerLanguage = java;' in the
reset method., but no luck on either front.

Can anyone provide some insight into this simple problem?


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





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




Re: Boost Struts with XSLT and XML - JavaWorld.com

2002-02-04 Thread Ted Husted

See also the Velocity/Struts toolset. 

http://husted.com/struts/resources/velstruts.zip

and 

http://cvs.apache.org/viewcvs/jakarta-velocity-tools/

Same basic idea: expose the Struts API as an object that anybody can
easily use, without having to know that Struts even exists. All the
hooks are there, they just aren't as easy to get to as they might be. 

I started a ContextHelper object that did this as part of the core
framework. We pulled it out temporarily while the new multiapps stuff is
going on. But I plan to put it back in so that the default controller
does what the X2 Servlet and Velocity Servlets are doing, in a uniform
way. 

It's my personal opinion that, while JSPs are flexible, these other
technologies work are ever bit as effictive when used as the V in MVC. 

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



Knoll, Zach wrote:
 
 This is really cool. I've been struggling with this for a while trying to
 convince myself that everything that comes from SUN must be good and
 beautiful and that those that were ragging on JSP were just fringe loonies.
 I thought the whole struts tag library and tag libraries in general would
 shut up the non-believers by removing spaghetti code from JSP. But from
 experience I am seeing that people will always go the easiest route and when
 offered a choice between learning how to handle a new tag library API or
 just slopping some java code into your JSP, its the rare coder who wont take
 the sloppy, easier, impossibly harder to debug 2 months later approach. I
 think I can finally admit now that JSP is just not a clean good technology
 and although I have a lot to learn I'd like to move away from JSP's
 altogether. Simultaneous to my JSP=bad voyage of discovery I was also
 starting to learn Struts and saw and continue to see in Struts stuff that I
 have been doing on my own for a while now, done in a more polished cleaner
 fashion that attracts me to it. This article showing how to have the best
 servlet centric architecture (Struts) while cutting out the dead-weight
 (JSP) really hits home. I just wish they would've provided more code so
 people like myself who are new to xml can really get a sense of how to
 implement this beast.
 
 -Original Message-
 From: Pete Carapetyan [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, February 02, 2002 12:17 PM
 To: Struts Users Mailing List
 Subject: Re: Boost Struts with XSLT and XML - JavaWorld.com
 
 This is one of the most well written articles I have ever seen.
 
 At first blush, I am having a difficult time deciding wether this technology
 is
 totally cool, or it is just such a straightforward presentation that I am
 twitterpated.
 
 Thanks Todd
 
 Todd G. Nist wrote:
 
  I have not seen this posted so, for those interested in using XSLT and XML
  with Struts, thought the following article maybe of value.
 
  Boost Struts with XSLT and XML
  An introduction to Model 2X
 
  Summary
  Struts is an innovative server-side Java framework designed to build Web
  applications. Hosted by the Apache Software Foundation's Jakarta Project,
  Struts has recently gained wide acceptance in the Java community. In this
  article, Julien Mercay and Gilbert Bouzeid introduce the processing model
  underlying Struts, describe the Struts framework itself, and present Model
  2X, which enhances Struts by replacing JSP (JavaServer Pages) with XML and
  XSLT (Extensible Stylesheet Language Transformations) to better separate
  logic and presentation. (2,600 words; February 1, 2002)
 
  By Julien Mercay and Gilbert Bouzeid
 
  URL:
 http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-strutsxslt.html?
 
  Todd G. Nist
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 Pete Carapetyan
 http://datafundamentals.com
 Java Development Services
 
 Open standards technology for commercial profitability
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the postmaster at [EMAIL PROTECTED]
 
 www.sothebys.com
 **
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




Re: Preselecting Radio Buttons

2002-02-04 Thread Ted Husted

The html tags set checked on their own, based on the value of the
property. The default radio button would be one that is not null.

John M. Corro wrote:
 
 When it comes to form input tags, I tend to look at the straight html tags
 as a last resortI prefer to use the struts taglib implementation so that
 in case the user failed validation tests when submitting the form, the value
 they selected when first filling it out would stay selected.  Thanks though!
 
 - Original Message -
 From: MARK NICHOLS [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, February 04, 2002 10:25 AM
 Subject: Re: Preselecting Radio Buttons
 
 Add the 'checked' parm to your default radio button, like so...
 
 What is your gender?br
 Female input type=radio name=gender value=female checked
 Male input type=radio name=gender value=male
 
 _
 /\/\ark /\/ichols
 Harris I, 2nd Floor
 217.558.2919
 
 Ooo. They've got the Internet on computers now. - Homer Simpson
 
  [EMAIL PROTECTED] 02/04/02 09:57AM 
 I would have thought this was a simple thing, but I must be missing
 something.  Is there an attribute to the html:radio tag that sets it as
 selected?  I want to have a group of radio buttons w/ 1 button being the
 default.  I didn't see anything in the tag lib documentation and I tried
 coding in the default value into the reset method (so if the form attribute
 was programmerLanguage, I would say 'programmerLanguage = java;' in the
 reset method., but no luck on either front.
 
 Can anyone provide some insight into this simple problem?
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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

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




Re: Preselecting Radio Buttons

2002-02-04 Thread John M. Corro

For those interested, Ivan Siviero was kind enough to answer my question.
Apparently, you preselect a radio button based on the incoming value from
the form.

So for set of radio buttons...
html:radio property=propertyname value=1
html:radio property=propertyname value=2

you'd preselect the first radio button by having your getPropertyName()
method in your ActionForm return a 1 by default.  So you'd want to set the
value that is returned by getPropertyName() to 1 at the constructor
level and the reset level (I was only doing it in the reset method).


- Original Message -
From: John M. Corro [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, February 04, 2002 10:39 AM
Subject: Re: Preselecting Radio Buttons


 When it comes to form input tags, I tend to look at the straight html tags
 as a last resortI prefer to use the struts taglib implementation so
that
 in case the user failed validation tests when submitting the form, the
value
 they selected when first filling it out would stay selected.  Thanks
though!

 - Original Message -
 From: MARK NICHOLS [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, February 04, 2002 10:25 AM
 Subject: Re: Preselecting Radio Buttons


 Add the 'checked' parm to your default radio button, like so...


 What is your gender?br
 Female input type=radio name=gender value=female checked
 Male input type=radio name=gender value=male




 _
 /\/\ark /\/ichols
 Harris I, 2nd Floor
 217.558.2919

 Ooo. They've got the Internet on computers now. - Homer Simpson

  [EMAIL PROTECTED] 02/04/02 09:57AM 
 I would have thought this was a simple thing, but I must be missing
 something.  Is there an attribute to the html:radio tag that sets it as
 selected?  I want to have a group of radio buttons w/ 1 button being the
 default.  I didn't see anything in the tag lib documentation and I tried
 coding in the default value into the reset method (so if the form
attribute
 was programmerLanguage, I would say 'programmerLanguage = java;' in
the
 reset method., but no luck on either front.

 Can anyone provide some insight into this simple problem?


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





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





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




Re: RE: [Fwd: Re: Hi....]]

2002-02-04 Thread Elijah Jacobs

Hi Vic,

Could you elaborate a lilttle more on why you do not suggest a good number
of custom tags in struts?  I'll be buidling a software for a client that
requires a lot of custom tags and am right now evaluating struts.

any input would be helpful, thanks.

- ej -
- Original Message -
From: Vic Cekvenich [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 30, 2002 2:48 PM
Subject: [Fwd: RE: [Fwd: Re: Hi]]


 The thing on tags is do not use to many tags. Try to avoid writing
 tags.
 Somehow, the example app on struts has a custom tag and people like to
 learn how to write tags, and so there are lots of tags in Struts. This
 is a bad habit. Only do it if you must.
 Try to do as little code as possible in presentation/view/jsp.

 So to me, tags and Struts framework are 2 different things, but bellow
 is a good book anyway.

 Vic

  Original Message 
 Subject: RE: [Fwd: Re: Hi]
 Date: Wed, 30 Jan 2002 18:49:35 +0100
 From: Lacerda, Wellington (AFIS) [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 Organization: Basebeans.com
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Newsgroups: Struts

 Another book with a lot of information on Struts is JSP and Tag Libraries
 for Web Development,
 available at Amazon and BN. Check the publisher's page at:
 http://www.newriders.com/books/title.cfm?isbn=0735710953.

 It is heavily focused on Tag Libraries and Struts is discussed on the
light
 of that.

 Wellington

 -Original Message-
 From: Vic Cekvenich [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 30, 2002 6:39 PM
 To: [EMAIL PROTECTED]
 Subject: [Fwd: Re: Hi]



 Newsgroups: Struts @ news.basebeans.com
 References: [EMAIL PROTECTED]

 One Struts book at http://www.basebeans.com/book.jsp

 Amir N. Nashat wrote:

Hi Chetan,
   
There are no books available at this time though 2 are currently
 being written that I know of. However, they will not be available for a
 while. The best place to start is to go to the website
 jakarata.apache.org and search under struts. there is A LOT of good
 information there. Also, another very good site is www.husted.com.
 Ted(who runs the site) is very knowledgeable in this field and posts to
 this mailing list very often. Hope that helps.
   
amir
   
   
   
   
   [EMAIL PROTECTED] 10:38:51 PM 01/29/02 
   
I'm just a newbie to Struts and find it very interesting, I just want
 to ask
where is it best to start learning struts from... Is there a book out
 there
that I can buy
Thankz
Chetan
   
--
To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
   
   
   
   




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


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




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



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




Re: Boost Struts with XSLT and XML - JavaWorld.com

2002-02-04 Thread Jonathan Gibbons


Matt,

nicely said.  Pretty much what I feel, but could not describe.  I guess it comes down 
to:

ITS TOO EARLY.

i.e use it for prototypes and dept projects.  Don't start designing customer web sites 
with it until you have sorted out tools, maintenance, evolving xslt/xml specs and so 
on.

Jonathan
(who also hates JSP, they are too easy...and thus messy.)


 Message History 



From: Matt Raible [EMAIL PROTECTED] on 04/02/2002 09:00 PST

Please respond to Struts Users Mailing List [EMAIL PROTECTED]

To:   Struts Users Mailing List [EMAIL PROTECTED]
cc:
Subject:  Re: Boost Struts with XSLT and XML - JavaWorld.com


I read this article and think that it is good - but there's a couple of things
that I think need to happen before this architecture is embraced.

1.  There needs to be mechanisms for getting internationalization into your XML
or XSL.  It seems difficult to use messages from a properties files for
messages and form labels.  By difficult, I mean harder than it is to use
bean:message in JSPs.  I could see putting them into the XML document, but
then it seems that HTML developer type stuff is getting handed off to the Java
developer.

2.  XSL Templates and examples are difficult to find.  I think this technology
and concept would rapidly catch-on if there were XSL stylesheets that you could
download that would format all your form-elements and other details.  If the
struts-example where adapted to use this approach, people would jump all over
it I'll bet.

3.  XSL is difficult to debug, and if we're truly separating view from
everything else - good luck finding a view developer that knows XSL.

I know some of these are irrelevant since we HTML developers are often Java
coders and XSL experts... but just my 2 cents.

Matt





--- Ted Husted [EMAIL PROTECTED] wrote:
 See also the Velocity/Struts toolset.

 http://husted.com/struts/resources/velstruts.zip

 and

 http://cvs.apache.org/viewcvs/jakarta-velocity-tools/

 Same basic idea: expose the Struts API as an object that anybody can
 easily use, without having to know that Struts even exists. All the
 hooks are there, they just aren't as easy to get to as they might be.

 I started a ContextHelper object that did this as part of the core
 framework. We pulled it out temporarily while the new multiapps stuff is
 going on. But I plan to put it back in so that the default controller
 does what the X2 Servlet and Velocity Servlets are doing, in a uniform
 way.

 It's my personal opinion that, while JSPs are flexible, these other
 technologies work are ever bit as effictive when used as the V in MVC.

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



 Knoll, Zach wrote:
 
  This is really cool. I've been struggling with this for a while trying to
  convince myself that everything that comes from SUN must be good and
  beautiful and that those that were ragging on JSP were just fringe loonies.
  I thought the whole struts tag library and tag libraries in general would
  shut up the non-believers by removing spaghetti code from JSP. But from
  experience I am seeing that people will always go the easiest route and
 when
  offered a choice between learning how to handle a new tag library API or
  just slopping some java code into your JSP, its the rare coder who wont
 take
  the sloppy, easier, impossibly harder to debug 2 months later approach. I
  think I can finally admit now that JSP is just not a clean good technology
  and although I have a lot to learn I'd like to move away from JSP's
  altogether. Simultaneous to my JSP=bad voyage of discovery I was also
  starting to learn Struts and saw and continue to see in Struts stuff that I
  have been doing on my own for a while now, done in a more polished cleaner
  fashion that attracts me to it. This article showing how to have the best
  servlet centric architecture (Struts) while cutting out the dead-weight
  (JSP) really hits home. I just wish they would've provided more code so
  people like myself who are new to xml can really get a sense of how to
  implement this beast.
 
  -Original Message-
  From: Pete Carapetyan [mailto:[EMAIL PROTECTED]]
  Sent: Saturday, February 02, 2002 12:17 PM
  To: Struts Users Mailing List
  Subject: Re: Boost Struts with XSLT and XML - JavaWorld.com
 
  This is one of the most well written articles I have ever seen.
 
  At first blush, I am having a difficult time deciding wether this
 technology
  is
  totally cool, or it is just such a straightforward presentation that I am
  twitterpated.
 
  Thanks Todd
 
  Todd G. Nist wrote:
 
   I have not seen this posted so, for those interested in using XSLT and
 XML
   with Struts, thought the following article maybe of value.
  
   Boost Struts with XSLT and XML
   An introduction to Model 2X
  
   Summary
   Struts is an 

Possible to setup Hashmap to pass multi params in link without usingscriptlet?

2002-02-04 Thread Rob Breeds

Hi

I'm currently using scriptlet to set up a Hashmap of params to pass in a
html:link. Works great.

Is it possible to use bean:define tags to setup the Hashmap without
scriptlets.

Similarly (?) how do I invoke setter methods on a bean I've defined with
the bean:define tag?

Thank you

Rob



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




artimus - cannot add article

2002-02-04 Thread John Menke

Does the artimus example work as far as adding articles.  I can search but
not add.  I think it has something to do with the Article ID.  It says NOT
ASSIGNED before I try to save then error messages come back

*Unable to transfer data
*null

Do I have something wrong with my configuration?

-john

Thanks to anyone who can help:)


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




RE: Implementing HTTPS in Struts

2002-02-04 Thread Ditlinger, Steve


Hmmm. I just tried it again to be sure and it worked.  
Maybe it is just slow.

Try this one, maybe you can reach it better.

http://us.f1.yahoofs.com/users/aee2731f/bc/public/Struts+Security+Extension.
jar?bcB4.X8AlFd_32Ts


HTH,

Steve

-Original Message-
From: Rob Breeds [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 4:07 AM
To: Struts Users Mailing List
Subject: Re: Implementing HTTPS in Struts



Steve

This link fails to load a complete page for me, and doesn't include a link!
Perhaps it's just me?

Rob




 

Ditlinger,

Steve   To: '[EMAIL PROTECTED]'
[EMAIL PROTECTED],  
SDitlinger@eb'[EMAIL PROTECTED]'
[EMAIL PROTECTED]  
uilt.comcc: '[EMAIL PROTECTED]'
[EMAIL PROTECTED] 
 Subject: Re: Implementing HTTPS
in Struts 
02/02/2002

00:30

Please respond

to Struts

Users Mailing

List

 

 






Robert:

We recently posted just such a solution.  Check it out at
http://struts.ditlinger.com.  There you will find a description of our
solution and a link to download our Struts extensions and example app.  If
you have any questions, please do not hesitate to ask.

Steve


You wrote:
---
Hello all, my name is Rob Scaduto and I have just recently joined the
Struts
user mailing list. I have yet to find any resources talking about how to
handle switching between http and https (and vice versa) using struts. The
only solution I was able to come up with was sub classing the Struts
LinkTag
and adding a secure attribute. This would then dynamically build an
absolute
path based on the jsp. This works great when you use the forward or page
attribute, but doesn't work at all if you use the href attribute. I'd like
to have a solution that works in all cases and I was curious if someone
could add some insight. Thanks in advance, Rob


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





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




RE: Boost Struts with XSLT and XML - JavaWorld.com

2002-02-04 Thread Taylor Cowan

Matt,

Those are very good points.  Here is how I deal with each one:

1. You can internationalize using resource bundles with Xalan, because it
allows Java extensions.  Another thing on i18n, I've noted that when UI's
are described in XML, you are combining question text, labels, instructions
all in one document.  In that case it's more direct to just translate the
XML docs, and not use resource bundles.  It's rare that you just need to
translate a word here or there for web apps.  They are full of text, and
resource bundles are suited well to managing documents of translated text.
The framework just needs to choose the correct XML doc based on the
language.

2. XForms is introducing a generic form descriptor language, once that's
available we can choose a generic style sheet and modify...I have defined my
own XML strucure, and that article gave an example as well.  It's not that
big of a deal.  Once the first style sheet is done, it's easy to modify to
account for little changes here and there.

3. Using a tool like excelon makes XSL easy to debug.  It is not difficult
to debug.  You're not really 100% correct on that one.  J2EE is difficult to
debug, but we still use it.

I just saw the post from J. Gibbons, and it is NOT TOO EARLY.  Nope.  That's
wrong.  It's time has come, at least for us to consider as developers.

Taylor

-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 11:01 AM
To: Struts Users Mailing List
Subject: Re: Boost Struts with XSLT and XML - JavaWorld.com


I read this article and think that it is good - but there's a couple of
things
that I think need to happen before this architecture is embraced.

1.  There needs to be mechanisms for getting internationalization into your
XML
or XSL.  It seems difficult to use messages from a properties files for
messages and form labels.  By difficult, I mean harder than it is to use
bean:message in JSPs.  I could see putting them into the XML document, but
then it seems that HTML developer type stuff is getting handed off to the
Java
developer.

2.  XSL Templates and examples are difficult to find.  I think this
technology
and concept would rapidly catch-on if there were XSL stylesheets that you
could
download that would format all your form-elements and other details.  If the
struts-example where adapted to use this approach, people would jump all
over
it I'll bet.

3.  XSL is difficult to debug, and if we're truly separating view from
everything else - good luck finding a view developer that knows XSL.

I know some of these are irrelevant since we HTML developers are often Java
coders and XSL experts... but just my 2 cents.

Matt





--- Ted Husted [EMAIL PROTECTED] wrote:
 See also the Velocity/Struts toolset.

 http://husted.com/struts/resources/velstruts.zip

 and

 http://cvs.apache.org/viewcvs/jakarta-velocity-tools/

 Same basic idea: expose the Struts API as an object that anybody can
 easily use, without having to know that Struts even exists. All the
 hooks are there, they just aren't as easy to get to as they might be.

 I started a ContextHelper object that did this as part of the core
 framework. We pulled it out temporarily while the new multiapps stuff is
 going on. But I plan to put it back in so that the default controller
 does what the X2 Servlet and Velocity Servlets are doing, in a uniform
 way.

 It's my personal opinion that, while JSPs are flexible, these other
 technologies work are ever bit as effictive when used as the V in MVC.

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



 Knoll, Zach wrote:
 
  This is really cool. I've been struggling with this for a while trying
to
  convince myself that everything that comes from SUN must be good and
  beautiful and that those that were ragging on JSP were just fringe
loonies.
  I thought the whole struts tag library and tag libraries in general
would
  shut up the non-believers by removing spaghetti code from JSP. But from
  experience I am seeing that people will always go the easiest route and
 when
  offered a choice between learning how to handle a new tag library API or
  just slopping some java code into your JSP, its the rare coder who wont
 take
  the sloppy, easier, impossibly harder to debug 2 months later approach.
I
  think I can finally admit now that JSP is just not a clean good
technology
  and although I have a lot to learn I'd like to move away from JSP's
  altogether. Simultaneous to my JSP=bad voyage of discovery I was also
  starting to learn Struts and saw and continue to see in Struts stuff
that I
  have been doing on my own for a while now, done in a more polished
cleaner
  fashion that attracts me to it. This article showing how to have the
best
  servlet centric architecture (Struts) while cutting out the dead-weight
  (JSP) really hits home. I just wish they would've provided more code so
  

RE: Boost Struts with XSLT and XML - JavaWorld.com

2002-02-04 Thread Chappell, Simon P

I'm in the process of reading the article ... so no comments on it yet, but I have 
done a little XSL/XSLT and am in the process of converting my personal website to use 
it.

1. I18N. Agreed. This is a problem. Having gotten used to I18N in my apps, I really 
have no desire to give it up. According to the book XSLT (by Doug Tidwell, Pub: 
O'Reilly, Aug 2001) it is possible to extend XSL/XSLT with Java extensions. Could we 
brave souls not write an XSL/XSLT extension to give us the I18N that we get in 
struts-powered JSPs? On the other hand, as I re-read this before I hit send, the 
XSL/XSLT only process the XML that it's given. It's up to what ever generates the XML 
to perform the I18N. With a struts/XSL/XSLT mix, who's responsibility would it be to 
provide I18N?

2. XSL examples. Hmmm. I've written some small ones. They really aren't that hard. I'm 
planning to write some HOW-TOs (ant, junit etc) once my wife delivers our #2 child, 
and I take a week off to show support and pull the night shift for her, but she's T 
plus 5 days right now, so I'm still here at work. I'll add some simple XSL/XSLT 
examples  to the list of things to write. The Tidwell XSLT book has a number of good 
examples in it and coupled with his excellent explanations, is a powerful book. 
Recommended. (Although being six months old, I'm sure that it's ready for a re-write! 
:-)

Just a few comments before I get back to reading the article.

Simon

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

-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 11:01 AM
To: Struts Users Mailing List
Subject: Re: Boost Struts with XSLT and XML - JavaWorld.com


I read this article and think that it is good - but there's a 
couple of things
that I think need to happen before this architecture is embraced.

1.  There needs to be mechanisms for getting 
internationalization into your XML
or XSL.  It seems difficult to use messages from a properties files for
messages and form labels.  By difficult, I mean harder than 
it is to use
bean:message in JSPs.  I could see putting them into the XML 
document, but
then it seems that HTML developer type stuff is getting handed 
off to the Java
developer.

2.  XSL Templates and examples are difficult to find.  I think 
this technology
and concept would rapidly catch-on if there were XSL 
stylesheets that you could
download that would format all your form-elements and other 
details.  If the
struts-example where adapted to use this approach, people 
would jump all over
it I'll bet.

3.  XSL is difficult to debug, and if we're truly separating view from
everything else - good luck finding a view developer that 
knows XSL.  

I know some of these are irrelevant since we HTML developers 
are often Java
coders and XSL experts... but just my 2 cents.

Matt





--- Ted Husted [EMAIL PROTECTED] wrote:
 See also the Velocity/Struts toolset. 
 
 http://husted.com/struts/resources/velstruts.zip
 
 and 
 
 http://cvs.apache.org/viewcvs/jakarta-velocity-tools/
 
 Same basic idea: expose the Struts API as an object that anybody can
 easily use, without having to know that Struts even exists. All the
 hooks are there, they just aren't as easy to get to as they 
might be. 
 
 I started a ContextHelper object that did this as part of the core
 framework. We pulled it out temporarily while the new 
multiapps stuff is
 going on. But I plan to put it back in so that the default controller
 does what the X2 Servlet and Velocity Servlets are doing, in 
a uniform
 way. 
 
 It's my personal opinion that, while JSPs are flexible, these other
 technologies work are ever bit as effictive when used as the 
V in MVC. 
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Java Web Development with Struts.
 -- Tel +1 585 737-3463.
 -- Web http://www.husted.com/struts/
 
 
 
 Knoll, Zach wrote:
  
  This is really cool. I've been struggling with this for a 
while trying to
  convince myself that everything that comes from SUN must 
be good and
  beautiful and that those that were ragging on JSP were 
just fringe loonies.
  I thought the whole struts tag library and tag libraries 
in general would
  shut up the non-believers by removing spaghetti code from 
JSP. But from
  experience I am seeing that people will always go the 
easiest route and
 when
  offered a choice between learning how to handle a new tag 
library API or
  just slopping some java code into your JSP, its the rare 
coder who wont
 take
  the sloppy, easier, impossibly harder to debug 2 months 
later approach. I
  think I can finally admit now that JSP is just not a clean 
good technology
  and although I have a lot to learn I'd like to move away from JSP's
  altogether. Simultaneous to my JSP=bad voyage of discovery 

RE: Boost Struts with XSLT and XML - JavaWorld.com

2002-02-04 Thread Vaughan Jackson

A couple of naive questions.

1. Given that the authors of the article mention that the 
   Cocoon framework uses XML and XSLT to generate HTML
   (among other formats), I assume their motivation
   for using Struts is to gain the MVC framework. Is this 
   correct? Does Velocity also have the same deficiency 
   compared with Struts?

2. Is there any possibility that something like this
   may become a formal extension to Struts?

Thanks,
Vaughan.


 -Original Message-
 From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 04, 2002 9:32 AM
 To: Struts Users Mailing List
 Subject: RE: Boost Struts with XSLT and XML - JavaWorld.com
 
 
 I'm in the process of reading the article ... so no comments 
 on it yet, but I have done a little XSL/XSLT and am in the 
 process of converting my personal website to use it.
 
 1. I18N. Agreed. This is a problem. Having gotten used to 
 I18N in my apps, I really have no desire to give it up. 
 According to the book XSLT (by Doug Tidwell, Pub: O'Reilly, 
 Aug 2001) it is possible to extend XSL/XSLT with Java 
 extensions. Could we brave souls not write an XSL/XSLT 
 extension to give us the I18N that we get in struts-powered 
 JSPs? On the other hand, as I re-read this before I hit send, 
 the XSL/XSLT only process the XML that it's given. It's up to 
 what ever generates the XML to perform the I18N. With a 
 struts/XSL/XSLT mix, who's responsibility would it be to provide I18N?
 
 2. XSL examples. Hmmm. I've written some small ones. They 
 really aren't that hard. I'm planning to write some HOW-TOs 
 (ant, junit etc) once my wife delivers our #2 child, and I 
 take a week off to show support and pull the night shift for 
 her, but she's T plus 5 days right now, so I'm still here at 
 work. I'll add some simple XSL/XSLT examples  to the list of 
 things to write. The Tidwell XSLT book has a number of good 
 examples in it and coupled with his excellent explanations, 
 is a powerful book. Recommended. (Although being six months 
 old, I'm sure that it's ready for a re-write! :-)
 
 Just a few comments before I get back to reading the article.
 
 Simon
 
 -
 Simon P. Chappell [EMAIL PROTECTED]
 Java Programming Specialist  www.landsend.com
 Lands' End, Inc.   (608) 935-4526
 
 -Original Message-
 From: Matt Raible [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 04, 2002 11:01 AM
 To: Struts Users Mailing List
 Subject: Re: Boost Struts with XSLT and XML - JavaWorld.com
 
 
 I read this article and think that it is good - but there's a 
 couple of things
 that I think need to happen before this architecture is embraced.
 
 1.  There needs to be mechanisms for getting 
 internationalization into your XML
 or XSL.  It seems difficult to use messages from a 
 properties files for
 messages and form labels.  By difficult, I mean harder than 
 it is to use
 bean:message in JSPs.  I could see putting them into the XML 
 document, but
 then it seems that HTML developer type stuff is getting handed 
 off to the Java
 developer.
 
 2.  XSL Templates and examples are difficult to find.  I think 
 this technology
 and concept would rapidly catch-on if there were XSL 
 stylesheets that you could
 download that would format all your form-elements and other 
 details.  If the
 struts-example where adapted to use this approach, people 
 would jump all over
 it I'll bet.
 
 3.  XSL is difficult to debug, and if we're truly separating 
 view from
 everything else - good luck finding a view developer that 
 knows XSL.  
 
 I know some of these are irrelevant since we HTML developers 
 are often Java
 coders and XSL experts... but just my 2 cents.
 
 Matt
 
 
 
 
 
 --- Ted Husted [EMAIL PROTECTED] wrote:
  See also the Velocity/Struts toolset. 
  
  http://husted.com/struts/resources/velstruts.zip
  
  and 
  
  http://cvs.apache.org/viewcvs/jakarta-velocity-tools/
  
  Same basic idea: expose the Struts API as an object that 
 anybody can
  easily use, without having to know that Struts even exists. All the
  hooks are there, they just aren't as easy to get to as they 
 might be. 
  
  I started a ContextHelper object that did this as part of the core
  framework. We pulled it out temporarily while the new 
 multiapps stuff is
  going on. But I plan to put it back in so that the default 
 controller
  does what the X2 Servlet and Velocity Servlets are doing, in 
 a uniform
  way. 
  
  It's my personal opinion that, while JSPs are flexible, these other
  technologies work are ever bit as effictive when used as the 
 V in MVC. 
  
  -- Ted Husted, Husted dot Com, Fairport NY USA.
  -- Java Web Development with Struts.
  -- Tel +1 585 737-3463.
  -- Web http://www.husted.com/struts/
  
  
  
  Knoll, Zach wrote:
   
   This is really cool. I've been struggling with this for a 
 while trying to
   convince myself that 

Re: Boost Struts with XSLT and XML - JavaWorld.com

2002-02-04 Thread Ted Husted


Vaughan Jackson wrote:
 
 A couple of naive questions.
 
 1. Given that the authors of the article mention that the
Cocoon framework uses XML and XSLT to generate HTML
(among other formats), I assume their motivation
for using Struts is to gain the MVC framework. Is this
correct? Does Velocity also have the same deficiency
compared with Struts?


It's said that Velocity enforces MVC better than JSPs.



 2. Is there any possibility that something like this
may become a formal extension to Struts?

Definately. 



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

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




Tiles Vs Templates

2002-02-04 Thread Sriram Nookala

I'm trying to get some information in order to make a choice between struts
templates and Tiles for our UI design and templating. Where would you choose
one over the other, and what does Tiles offer you that Templates doesn't?
thanks,
sriram


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




Re: Boost Struts with XSLT and XML - JavaWorld.com

2002-02-04 Thread Ted Husted

The ActionForms are just JavaBeans in the standard request or session
scope, and available to any servlet process in the Application. 

Most of the other Struts elements are just application scope objects,
which are also avaialble to any servlet process in the application, or
request attributes (errors) or session attributes (locale). 

The Struts taglibs just happen to know what attribute name to look under
for these objects, and which scope to find them in. 

It's important to remember that Struts does not render the JSPs. This is
done by the container, usually through a service like Tomcat's Jasper. 

Anything with access to the servlet context can do the same things that
the taglibs do, just as the Velocity/Struts kit does. 

http://husted.com/struts/resources/velstruts.zip

Here, the functionality of the Sturts taglibs is provided as standard
objects that other presentation layer devices can easily access.


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

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




Questions from an Idiot who Longs to Understand Struts

2002-02-04 Thread cody.burleson


OK -

So, not long ago, having read about MVC and having been introduced to
Struts by discovering it on the Jakarta site, I embarked upon my journey to
learn it.  Absolutely frustrated with the documentation (it appers to be
written for people who happen to know a thing or two), and ffrustrated by
the lack of support references in bookstores or the online community - I
broke doen and started implementing my own MVC. Why? Because I at least
found a step by step reference for how to do it.

Anyways

Having done the MVC myself, I finally got to the place where I thought
(OK, now I think I will probably be able to comprehend Struts).

So I begin to convert my app.

Here's where I stand:

I've got all the tld's set and tested and struts is up and rearing to go
(as far as I can tell).
I've got Poolman set and tested; ready for use in the system (as I heard
this was more robust than the b uilt-in Struts pool manager).
Log4J is in.

And now I am just stuck on the most basic, simplist things!


I'm trying to iterate through a list and I am just stuck - somebody please
help.  Here's what I have got:

First, a custom tag called userList:


***
// UserListTag.java

package com.magneta.tags;

import org.apache.log4j.*;
import java.util.List;
import java.util.ArrayList;
import javax.servlet.jsp.tagext.TagSupport;

public class UserListTag extends TagSupport implements java.io.Serializable
{

// a category instance for log4j logging
private Category cat = Category.getInstance(UserListTag.class.getName
());

private List userList;

public int doStartTag() {

cat.debug(in doStartTag());


userList = new ArrayList();
userList.add(cburleson001);
userList.add(bshoemate001);
userList.add(jacarey001);
userList.add(agilbert001);
userList.add(rafael001);
userList.add(margetic001);

 cat.debug(storing userList bean in page scope);
pageContext.setAttribute(userList,userList);

return SKIP_BODY;

}

public List getUserList () {
return userList;
}

}
***


Now, here's what I am trying to do on my JSP page - just simply iteratte
through the list with the following...

* from admin_userAdmin.jsp

!-- initialize the user list (in bean in page scope) --
app:userList/

logic:iterate id=userList name=userList
bean:write name=userList property=userList/
/logic:iterate

***

BUT when I hit the page, I get the following exception

javax.servlet.ServletException: No getter method for property userList of
bean userList


Can someone shed some light? Help me people - I am on square one.

- Cody


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.


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




RE: Implementing HTTPS in Struts

2002-02-04 Thread Rob Breeds

Steve

That second link gets me the jar. The original link still stops loading at
same point on my machine but now I've got access to a different machine and
that's fine. So it was me! Sorry!

Thanks

Rob



   

Ditlinger,

Steve   To: Rob Breeds/UK/IBM@IBMGB, Struts Users 
Mailing List
SDitlinger@eb[EMAIL PROTECTED] 

uilt.comcc:   

 Subject: RE: Implementing HTTPS in Struts 

04/02/2002 

17:21  

Please respond 

to Struts 

Users Mailing  

List  

   

   






Hmmm. I just tried it again to be sure and it worked.
Maybe it is just slow.

Try this one, maybe you can reach it better.

http://us.f1.yahoofs.com/users/aee2731f/bc/public/Struts+Security+Extension
.jar?bcB4.X8AlFd_32Ts


HTH,

Steve

-Original Message-
From: Rob Breeds [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 4:07 AM
To: Struts Users Mailing List
Subject: Re: Implementing HTTPS in Struts



Steve

This link fails to load a complete page for me, and doesn't include a link!
Perhaps it's just me?

Rob






Ditlinger,

Steve   To: '[EMAIL PROTECTED]'
[EMAIL PROTECTED],
SDitlinger@eb
'[EMAIL PROTECTED]'
[EMAIL PROTECTED]
uilt.comcc: '[EMAIL PROTECTED]'
[EMAIL PROTECTED]
 Subject: Re: Implementing
HTTPS
in Struts
02/02/2002

00:30

Please respond

to Struts

Users Mailing

List










Robert:

We recently posted just such a solution.  Check it out at
http://struts.ditlinger.com.  There you will find a description of our
solution and a link to download our Struts extensions and example app.  If
you have any questions, please do not hesitate to ask.

Steve


You wrote:
---
Hello all, my name is Rob Scaduto and I have just recently joined the
Struts
user mailing list. I have yet to find any resources talking about how to
handle switching between http and https (and vice versa) using struts. The
only solution I was able to come up with was sub classing the Struts
LinkTag
and adding a secure attribute. This would then dynamically build an
absolute
path based on the jsp. This works great when you use the forward or page
attribute, but doesn't work at all if you use the href attribute. I'd like
to have a solution that works in all cases and I was curious if someone
could add some insight. Thanks in advance, Rob


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





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





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




RE: Boost Struts with XSLT and XML - JavaWorld.com

2002-02-04 Thread Chappell, Simon P

Ok. I've read the article now.

1. They point out, correctly in my humble opinion, that the internationalisation is 
best done during the creation of the XML document. This makes sense to me.

2. They do provide a couple of examples of XML/XSL/XSLT.

3. They do not really seem to much in the way of HOW-TO. I see that there is an 
accompanying download file, but even if it contains everything I need to get this 
going, there is no explanation in the article as to how to implement this stuff. This 
article would have been better as a two-parter. We have the first part, now come back 
and show us how it's done!

Simon

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


-Original Message-
From: Chappell, Simon P 
Sent: Monday, February 04, 2002 11:32 AM
To: Struts Users Mailing List
Subject: RE: Boost Struts with XSLT and XML - JavaWorld.com


I'm in the process of reading the article ... so no comments 
on it yet, but I have done a little XSL/XSLT and am in the 
process of converting my personal website to use it.

1. I18N. Agreed. This is a problem. Having gotten used to I18N 
in my apps, I really have no desire to give it up. According 
to the book XSLT (by Doug Tidwell, Pub: O'Reilly, Aug 2001) it 
is possible to extend XSL/XSLT with Java extensions. Could we 
brave souls not write an XSL/XSLT extension to give us the 
I18N that we get in struts-powered JSPs? On the other hand, as 
I re-read this before I hit send, the XSL/XSLT only process 
the XML that it's given. It's up to what ever generates the 
XML to perform the I18N. With a struts/XSL/XSLT mix, who's 
responsibility would it be to provide I18N?

2. XSL examples. Hmmm. I've written some small ones. They 
really aren't that hard. I'm planning to write some HOW-TOs 
(ant, junit etc) once my wife delivers our #2 child, and I 
take a week off to show support and pull the night shift for 
her, but she's T plus 5 days right now, so I'm still here at 
work. I'll add some simple XSL/XSLT examples  to the list of 
things to write. The Tidwell XSLT book has a number of good 
examples in it and coupled with his excellent explanations, is 
a powerful book. Recommended. (Although being six months old, 
I'm sure that it's ready for a re-write! :-)

Just a few comments before I get back to reading the article.

Simon

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

-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 11:01 AM
To: Struts Users Mailing List
Subject: Re: Boost Struts with XSLT and XML - JavaWorld.com


I read this article and think that it is good - but there's a 
couple of things
that I think need to happen before this architecture is embraced.

1.  There needs to be mechanisms for getting 
internationalization into your XML
or XSL.  It seems difficult to use messages from a properties 
files for
messages and form labels.  By difficult, I mean harder than 
it is to use
bean:message in JSPs.  I could see putting them into the XML 
document, but
then it seems that HTML developer type stuff is getting handed 
off to the Java
developer.

2.  XSL Templates and examples are difficult to find.  I think 
this technology
and concept would rapidly catch-on if there were XSL 
stylesheets that you could
download that would format all your form-elements and other 
details.  If the
struts-example where adapted to use this approach, people 
would jump all over
it I'll bet.

3.  XSL is difficult to debug, and if we're truly separating view from
everything else - good luck finding a view developer that 
knows XSL.  

I know some of these are irrelevant since we HTML developers 
are often Java
coders and XSL experts... but just my 2 cents.

Matt





--- Ted Husted [EMAIL PROTECTED] wrote:
 See also the Velocity/Struts toolset. 
 
 http://husted.com/struts/resources/velstruts.zip
 
 and 
 
 http://cvs.apache.org/viewcvs/jakarta-velocity-tools/
 
 Same basic idea: expose the Struts API as an object that anybody can
 easily use, without having to know that Struts even exists. All the
 hooks are there, they just aren't as easy to get to as they 
might be. 
 
 I started a ContextHelper object that did this as part of the core
 framework. We pulled it out temporarily while the new 
multiapps stuff is
 going on. But I plan to put it back in so that the default 
controller
 does what the X2 Servlet and Velocity Servlets are doing, in 
a uniform
 way. 
 
 It's my personal opinion that, while JSPs are flexible, these other
 technologies work are ever bit as effictive when used as the 
V in MVC. 
 
 -- Ted 

RE: collecting parameters from a dynamic form

2002-02-04 Thread Jeff Oberlander

The issue is one of distinct element names when you use an iterator to
create your form.  I found the solution by way of the indexed=true
property of html:text  It produces a parameter name of element[0].name -
where element is the name given to the iterator object and the bracket
represents the index of the iterator.  

Apparently this is new though because I had to install the nightly build in
order to use it.

Jeff

-Original Message-
From: Marcus Brito [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 10:40 AM
To: Struts Users Mailing List
Subject: Re: collecting parameters from a dynamic form


Em Seg, 2002-02-04 às 14:11, Jeff Oberlander escreveu:
 request.getParameter(name));
 request.getParameter(value));
 
 works, but of course only returns one of the sets of data - the first in
the
 form.  

Take a look at the HttpServletRequest API. If you need to get multiple
values for a parameter, you need to use the getParameterValues() method.

-- 
Ja ne,
   Pazu
   mailto: [EMAIL PROTECTED]

Anime Gaiden: de fãs para fãs, sempre.

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




Extending Struts (was: Boost Struts with XSLT and XML - JavaWorld.com)

2002-02-04 Thread Couball, James

I have been lurking for a couple of months now and have seen many useful
extensions to the Struts framework.  I am curious to understand what thought
has gone into better understand how Struts can be extended in common ways
such that:

(1) Extensions are an add-on/plug-in rather than a rewrite of the Struts
classes.

And

(2) non-overlapping extensions are compatible.  For example, wouldn't expect
Velocity and XSLT extensions to work together but might expect different
classes of extensions to work together.

Can the types of extensions be classified?  For example, the XSLT extension
talked about in the JavaWorld article could be a View extension.

Should the framework be separated out into core and extension pieces?
For example, maybe the custom taglibs should be considered part of the JSP
Extension.  And the JSP Extension considered a View extension that follows
certain rules that other View extensions (such as Velocity and XSLT) must
follow.

Thank you,
James.





-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]] 
Sent: Monday, February 04, 2002 9:51 AM
To: Struts Users Mailing List
Subject: Re: Boost Struts with XSLT and XML - JavaWorld.com


Vaughan Jackson wrote:
 
 A couple of naive questions.
 
 1. Given that the authors of the article mention that the
Cocoon framework uses XML and XSLT to generate HTML
(among other formats), I assume their motivation
for using Struts is to gain the MVC framework. Is this
correct? Does Velocity also have the same deficiency
compared with Struts?


It's said that Velocity enforces MVC better than JSPs.



 2. Is there any possibility that something like this
may become a formal extension to Struts?

Definately. 



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

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

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




Re: Implementing HTTPS in Struts

2002-02-04 Thread Nick Torenvliet


- Original Message -
From: Rob Breeds [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, February 04, 2002 1:12 PM
Subject: RE: Implementing HTTPS in Struts


 Steve

 That second link gets me the jar. The original link still stops loading at
 same point on my machine but now I've got access to a different machine
and
 that's fine. So it was me! Sorry!

 Thanks

 Rob




 Ditlinger,
 Steve   To: Rob Breeds/UK/IBM@IBMGB,
Struts Users Mailing List
 SDitlinger@eb[EMAIL PROTECTED]
 uilt.comcc:
  Subject: RE: Implementing
HTTPS in Struts
 04/02/2002
 17:21
 Please respond
 to Struts
 Users Mailing
 List








 Hmmm. I just tried it again to be sure and it worked.
 Maybe it is just slow.

 Try this one, maybe you can reach it better.


http://us.f1.yahoofs.com/users/aee2731f/bc/public/Struts+Security+Extension
 .jar?bcB4.X8AlFd_32Ts


 HTH,

 Steve

 -Original Message-
 From: Rob Breeds [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 04, 2002 4:07 AM
 To: Struts Users Mailing List
 Subject: Re: Implementing HTTPS in Struts



 Steve

 This link fails to load a complete page for me, and doesn't include a
link!
 Perhaps it's just me?

 Rob






 Ditlinger,

 Steve   To:
'[EMAIL PROTECTED]'
 [EMAIL PROTECTED],
 SDitlinger@eb
 '[EMAIL PROTECTED]'
 [EMAIL PROTECTED]
 uilt.comcc: '[EMAIL PROTECTED]'
 [EMAIL PROTECTED]
  Subject: Re: Implementing
 HTTPS
 in Struts
 02/02/2002

 00:30

 Please respond

 to Struts

 Users Mailing

 List










 Robert:

 We recently posted just such a solution.  Check it out at
 http://struts.ditlinger.com.  There you will find a description of our
 solution and a link to download our Struts extensions and example app.  If
 you have any questions, please do not hesitate to ask.

 Steve


 You wrote:
 ---
 Hello all, my name is Rob Scaduto and I have just recently joined the
 Struts
 user mailing list. I have yet to find any resources talking about how to
 handle switching between http and https (and vice versa) using struts. The
 only solution I was able to come up with was sub classing the Struts
 LinkTag
 and adding a secure attribute. This would then dynamically build an
 absolute
 path based on the jsp. This works great when you use the forward or page
 attribute, but doesn't work at all if you use the href attribute. I'd like
 to have a solution that works in all cases and I was curious if someone
 could add some insight. Thanks in advance, Rob


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





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





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



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




RE: Boost Struts with XSLT and XML - JavaWorld.com

2002-02-04 Thread Matt Raible


Hmmm,

I read everyone's posts, and they are somewhat inspiring.  I'd like to see
examples of using Xalan to get my struts message bundle, or other messag
bundles.  I'm sure I could spend an hour and figure this out, but if anyone has
ready examples, links, send them my way!

XForms - I'm excited about these, but I think it'll be awhile before the
browser's support them.

#3 is probably from my own experience.  I spent a week trying to develop a
XML/XSL framework using JSPs to emit XML, XSL and the JSTL to do the
transformation.  My JSPs became very small and nice, but it seemed I was
spending a lot of time writing the XSL and trying to get it to work properly. 
I've had a lot of experience with writing HTML and JSPs, and so I bagged the
whole idea and recommended we just use JSP/HTML with Tiles and CSS.  I know
that my client will get more value from my time with this approach.

The reason my client wanted to use XML/XSL was to easily adapt the UI for other
devices.  I think this is a great reason, but it almost seems simpler to me to
separate my HTML client from my WAP client and develop entirely new JSPs for
the WAP client.

Of course, working with a limited budget and a small development team (1) -
there's not much time for learning curve.

Matt


--- Taylor Cowan [EMAIL PROTECTED] wrote:
 Matt,
 
 Those are very good points.  Here is how I deal with each one:
 
 1. You can internationalize using resource bundles with Xalan, because it
 allows Java extensions.  Another thing on i18n, I've noted that when UI's
 are described in XML, you are combining question text, labels, instructions
 all in one document.  In that case it's more direct to just translate the
 XML docs, and not use resource bundles.  It's rare that you just need to
 translate a word here or there for web apps.  They are full of text, and
 resource bundles are suited well to managing documents of translated text.
 The framework just needs to choose the correct XML doc based on the
 language.
 
 2. XForms is introducing a generic form descriptor language, once that's
 available we can choose a generic style sheet and modify...I have defined my
 own XML strucure, and that article gave an example as well.  It's not that
 big of a deal.  Once the first style sheet is done, it's easy to modify to
 account for little changes here and there.
 
 3. Using a tool like excelon makes XSL easy to debug.  It is not difficult
 to debug.  You're not really 100% correct on that one.  J2EE is difficult to
 debug, but we still use it.
 
 I just saw the post from J. Gibbons, and it is NOT TOO EARLY.  Nope.  That's
 wrong.  It's time has come, at least for us to consider as developers.
 
 Taylor
 
 -Original Message-
 From: Matt Raible [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 04, 2002 11:01 AM
 To: Struts Users Mailing List
 Subject: Re: Boost Struts with XSLT and XML - JavaWorld.com
 
 
 I read this article and think that it is good - but there's a couple of
 things
 that I think need to happen before this architecture is embraced.
 
 1.  There needs to be mechanisms for getting internationalization into your
 XML
 or XSL.  It seems difficult to use messages from a properties files for
 messages and form labels.  By difficult, I mean harder than it is to use
 bean:message in JSPs.  I could see putting them into the XML document, but
 then it seems that HTML developer type stuff is getting handed off to the
 Java
 developer.
 
 2.  XSL Templates and examples are difficult to find.  I think this
 technology
 and concept would rapidly catch-on if there were XSL stylesheets that you
 could
 download that would format all your form-elements and other details.  If the
 struts-example where adapted to use this approach, people would jump all
 over
 it I'll bet.
 
 3.  XSL is difficult to debug, and if we're truly separating view from
 everything else - good luck finding a view developer that knows XSL.
 
 I know some of these are irrelevant since we HTML developers are often Java
 coders and XSL experts... but just my 2 cents.
 
 Matt
 
 
 
 
 
 --- Ted Husted [EMAIL PROTECTED] wrote:
  See also the Velocity/Struts toolset.
 
  http://husted.com/struts/resources/velstruts.zip
 
  and
 
  http://cvs.apache.org/viewcvs/jakarta-velocity-tools/
 
  Same basic idea: expose the Struts API as an object that anybody can
  easily use, without having to know that Struts even exists. All the
  hooks are there, they just aren't as easy to get to as they might be.
 
  I started a ContextHelper object that did this as part of the core
  framework. We pulled it out temporarily while the new multiapps stuff is
  going on. But I plan to put it back in so that the default controller
  does what the X2 Servlet and Velocity Servlets are doing, in a uniform
  way.
 
  It's my personal opinion that, while JSPs are flexible, these other
  technologies work are ever bit as effictive when used as the V in MVC.
 
  -- Ted Husted, Husted dot Com, Fairport NY USA.
  -- 

Off topic: My images are garbled again...

2002-02-04 Thread Craig Tataryn

http://www.computer-programmer.org/articles/struts/ppframe.htm

I can't quite figure this one out.  I even restarted Apache.  Anyone else 
ever see this type of problem?

Craig.

Craig W. Tataryn
Programmer/Analyst
Compuware

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




JSP/Struts question: Best way to loop through an array/list/enumeration on my JSP?

2002-02-04 Thread Michael Mehrle

Is there a struts-specific tag allowing me to loop through an array (list)
of strings and have them be printed sequentially? I am currently populating
a template JSP from the database - the way I retrieve the page content is by
tagging a contentID to the end of the request, like this:

http://myserver/app/getpage.do?cid=42

Now, I have a 'related' field in my content table, which is a simpe list of
other page cids. What I need to do is to retrieve go to those other content
entries, retrieve the linktext field and THEN loop through it on my JSP.

Everything until the looping is no problem - at firsthand I was simply
considering to just pull in the data and then pre-process some
HTML/JavaScript tags in my bean that gets the db data. However, after giving
it a second thought I was pretty sure that this is a common task and that
there must be something out there that allows me to loop through an
array/list/enumeration or something.

ANY input would be very welcome.

Cheers,

Michael



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




Re: JSP/Struts question: Best way to loop through an array/list/enumeration on my JSP?

2002-02-04 Thread Thomas Paul

--- Michael Mehrle [EMAIL PROTECTED] wrote:
 However, after giving
 it a second thought I was pretty sure that this is a
 common task and that
 there must be something out there that allows me to
 loop through an
 array/list/enumeration or something.

Do you mean like the logic:iterate tag?


__
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

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




Re: Extending Struts (was: Boost Struts with XSLT and XML - JavaWorld.com)

2002-02-04 Thread Ted Husted

Couball, James wrote:
 
 I have been lurking for a couple of months now and have seen many useful
 extensions to the Struts framework.  I am curious to understand what thought
 has gone into better understand how Struts can be extended in common ways
 such that:
 
 (1) Extensions are an add-on/plug-in rather than a rewrite of the Struts
 classes.

Craig and Oleg are doing some work along those lines via the Commons
Services component 

http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/services/




 
 And
 
 (2) non-overlapping extensions are compatible.  For example, wouldn't expect
 Velocity and XSLT extensions to work together but might expect different
 classes of extensions to work together.

I believe both of these would be. The model is that the ActionServlet
forwards the request to another servlet (via the container). The second
servlet then finishes the response cycle, building on what the Action
and ActionServlet started. So, you could use a Velocity template in one
requesst, and XLST document the next, and then back to JSPs. 



 Can the types of extensions be classified?  For example, the XSLT extension
 talked about in the JavaWorld article could be a View extension.
 
 Should the framework be separated out into core and extension pieces?
 For example, maybe the custom taglibs should be considered part of the JSP
 Extension.  And the JSP Extension considered a View extension that follows
 certain rules that other View extensions (such as Velocity and XSLT) must
 follow.

Yes. At some point, I'd like to get the taglibs moved out into a
seperate JAR to help clarify this point. This would be slightly more
important if more people where using alternative presentation devices
and didn't need the JSP tags at all. But right now, we are all still
recovering from suddenly needing so many Commons JARs :o)

-Ted.



 Thank you,
 James.
 
 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 04, 2002 9:51 AM
 To: Struts Users Mailing List
 Subject: Re: Boost Struts with XSLT and XML - JavaWorld.com
 
 Vaughan Jackson wrote:
 
  A couple of naive questions.
 
  1. Given that the authors of the article mention that the
 Cocoon framework uses XML and XSLT to generate HTML
 (among other formats), I assume their motivation
 for using Struts is to gain the MVC framework. Is this
 correct? Does Velocity also have the same deficiency
 compared with Struts?
 
 It's said that Velocity enforces MVC better than JSPs.
 
  2. Is there any possibility that something like this
 may become a formal extension to Struts?
 
 Definately.
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Java Web Development with Struts.
 -- Tel +1 585 737-3463.
 -- Web http://www.husted.com/struts/
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




form target to different frame leaves current frame busy

2002-02-04 Thread Rob Breeds


I've got a problem with forms and frames I hadn't noticed until now. Two
frames - input form in one, which when submitted, the results appear in the
second. Works functionally (results appear in target frame) but the mouse
cursor remains with hourglass image when it is over the source frame.

I am submitting a form with a link, using a JavaScript function like so:

html:form action=saveEntity.do focus=name target=detail
.
.
.
html:link href
=javascript:subForm(document.forms[0],'Entity.Advanced');bean:message
key=link.add_detail//html:link
.
.


the JS functions used is:
function subForm(iform, act) {
  validate(iform, act);
  iform.action=Publish. + act + .do;
  iform.submit();
}

where act is the action to perform, e.g. if act='Chapter' then the
'Publish.Chapter.do' is set as the form action.

What am I doing wrong?

Thank you.

Rob


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




Re: Questions from an Idiot who Longs to Understand Struts

2002-02-04 Thread Richard Yee

Cody,
I'd suggest not using a custom tag to contain your list and instead just 
use a regular bean class.
You can then use the jsp:usebean tag to instantiate the bean and then I 
think the iterate tags will be able to call the getUserList method from the 
class

Regards,

Richard

At 12:17 PM 2/4/2002 -0600, you wrote:

OK -

So, not long ago, having read about MVC and having been introduced to
Struts by discovering it on the Jakarta site, I embarked upon my journey to
learn it.  Absolutely frustrated with the documentation (it appers to be
written for people who happen to know a thing or two), and ffrustrated by
the lack of support references in bookstores or the online community - I
broke doen and started implementing my own MVC. Why? Because I at least
found a step by step reference for how to do it.

Anyways

Having done the MVC myself, I finally got to the place where I thought
(OK, now I think I will probably be able to comprehend Struts).

So I begin to convert my app.

Here's where I stand:

I've got all the tld's set and tested and struts is up and rearing to go
(as far as I can tell).
I've got Poolman set and tested; ready for use in the system (as I heard
this was more robust than the b uilt-in Struts pool manager).
Log4J is in.

And now I am just stuck on the most basic, simplist things!


I'm trying to iterate through a list and I am just stuck - somebody please
help.  Here's what I have got:

First, a custom tag called userList:


***
// UserListTag.java

package com.magneta.tags;

import org.apache.log4j.*;
import java.util.List;
import java.util.ArrayList;
import javax.servlet.jsp.tagext.TagSupport;

public class UserListTag extends TagSupport implements java.io.Serializable
{

 // a category instance for log4j logging
 private Category cat = Category.getInstance(UserListTag.class.getName
());

 private List userList;

 public int doStartTag() {

 cat.debug(in doStartTag());


 userList = new ArrayList();
 userList.add(cburleson001);
 userList.add(bshoemate001);
 userList.add(jacarey001);
 userList.add(agilbert001);
 userList.add(rafael001);
 userList.add(margetic001);

  cat.debug(storing userList bean in page scope);
 pageContext.setAttribute(userList,userList);

 return SKIP_BODY;

 }

 public List getUserList () {
 return userList;
 }

}
***


Now, here's what I am trying to do on my JSP page - just simply iteratte
through the list with the following...

* from admin_userAdmin.jsp

!-- initialize the user list (in bean in page scope) --
 app:userList/

 logic:iterate id=userList name=userList
 bean:write name=userList property=userList/
 /logic:iterate

***

BUT when I hit the page, I get the following exception

javax.servlet.ServletException: No getter method for property userList of
bean userList


Can someone shed some light? Help me people - I am on square one.

- Cody


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.


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



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




Re: cannot find tag library

2002-02-04 Thread Max Cooper

Elijah,

Try giving your tag handler class a proper package name and put that in the
app.tld file.

-Max

- Original Message -
From: Elijah Jacobs [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, February 04, 2002 8:33 AM
Subject: cannot find tag library


 Hi all,

 I am using Tomcat 4.01; Windows 2000 ; Struts v1.0

 I created a tag which displays a message on the screen.  I followed the
 basic layout of the example that came with struts.  by layout I mean:

 1. I created a tag under the /classes directory.  this time I put it right
 under the /classes directory so I didn't need to deal with package names.
 2. I added the tag in the app.tld (which is right under /web-inf)
 3. On my jsp page, I reference the TLD file and gave it a prefix app
(just
 like the example).
 %@ taglib uri=/WEB-INF/app.tld prefix=app %


 when I do  app:hello /  in my JSP page (Bid.jsp) I get:

 Generated servlet error:
 C:\Program Files\Apache Tomcat 4.0\work\localhost\blank\bid$jsp.java:143:
 Class org.apache.jsp.HelloTag not found.
   HelloTag _jspx_th_app_hello_0 = new HelloTag();
   ^

 I am not sure why it's looking for my HelloTag under org.apache.jsp when I
 put it on the /classes directory.  I have other Java files right under the
 /classes directory and Tomcat 4.0.1 was able to find them - although they
 were not custom tag file, but that shouldn't matter, right?

 thanks in advance,
 - ej -
(SNIP)


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




Re: cannot find tag library

2002-02-04 Thread Elijah Jacobs

Thanks Max,

that worked great.

- ej
- Original Message -
From: Max Cooper [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, February 04, 2002 3:34 PM
Subject: Re: cannot find tag library


 Elijah,

 Try giving your tag handler class a proper package name and put that in
the
 app.tld file.

 -Max

 - Original Message -
 From: Elijah Jacobs [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Monday, February 04, 2002 8:33 AM
 Subject: cannot find tag library


  Hi all,
 
  I am using Tomcat 4.01; Windows 2000 ; Struts v1.0
 
  I created a tag which displays a message on the screen.  I followed the
  basic layout of the example that came with struts.  by layout I mean:
 
  1. I created a tag under the /classes directory.  this time I put it
right
  under the /classes directory so I didn't need to deal with package
names.
  2. I added the tag in the app.tld (which is right under /web-inf)
  3. On my jsp page, I reference the TLD file and gave it a prefix app
 (just
  like the example).
  %@ taglib uri=/WEB-INF/app.tld prefix=app %
 
 
  when I do  app:hello /  in my JSP page (Bid.jsp) I get:
 
  Generated servlet error:
  C:\Program Files\Apache Tomcat
4.0\work\localhost\blank\bid$jsp.java:143:
  Class org.apache.jsp.HelloTag not found.
HelloTag _jspx_th_app_hello_0 = new HelloTag();
^
 
  I am not sure why it's looking for my HelloTag under org.apache.jsp when
I
  put it on the /classes directory.  I have other Java files right under
the
  /classes directory and Tomcat 4.0.1 was able to find them - although
they
  were not custom tag file, but that shouldn't matter, right?
 
  thanks in advance,
  - ej -
 (SNIP)


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



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




Re: form target to different frame leaves current frame busy

2002-02-04 Thread Rob Breeds

Hmmm, I created a frameset of html files using the generated html from the
JSPs I was using as my two frame sources - and that works without the mouse
cursor staying in 'busy' mode.

Does that suggest this is a Struts/JSP/tags problem? I can't see how though
because the browser never sees the JSP source, only the generated HTML! I
am so confused by this!

Help!

Rob



   

Rob

Breeds/UK/IBM@   To: Struts Users Mailing List 
[EMAIL PROTECTED]  
IBMGBcc:   

 Subject: form target to different frame 
leaves current frame busy 
04/02/2002 

20:13  

Please respond 

to Struts 

Users Mailing  

List  

   

   






I've got a problem with forms and frames I hadn't noticed until now. Two
frames - input form in one, which when submitted, the results appear in the
second. Works functionally (results appear in target frame) but the mouse
cursor remains with hourglass image when it is over the source frame.

I am submitting a form with a link, using a JavaScript function like so:

html:form action=saveEntity.do focus=name target=detail
.
.
.
html:link href
=javascript:subForm(document.forms[0],'Entity.Advanced');bean:message
key=link.add_detail//html:link
.
.


the JS functions used is:
function subForm(iform, act) {
  validate(iform, act);
  iform.action=Publish. + act + .do;
  iform.submit();
}

where act is the action to perform, e.g. if act='Chapter' then the
'Publish.Chapter.do' is set as the form action.

What am I doing wrong?

Thank you.

Rob


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





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




RE: Re: Extending Struts (was: Boost Struts with XSLT and XML - JavaWorld.com)

2002-02-04 Thread Kosh . Podder

Can someone please enlighten me as to the current thinking is on 
integrating Struts with Cocoon:

- there seems to be certain amount of thought/discussion that points 
toward reinventing the wheel as far as Cocoon's outstanding XML 
functionality is concerned
- Cocoon also seems somewhat to have started encroaching on areas that 
were previously not part of its scope, i.e. not directly XML related... 
at the very least there is a close analogy between Cocoon pipelines and 
the (and eagerly anticipated!) workflow functionality in the next 
version of Struts. The Cocoon sitemap and Struts action mappings config 
file also exhibit similar ideas, and the ideas of both combined 
together could provide a very powerful framework for building apps.

Is this overlap occurring or am I just been seeing things! Forgive me 
if this discussion has already taken place, or I've got the wrong end 
of the stick! It's true that there are sometimes different perspectives 
in each project's take on the same ideas, and sometimes the duplication 
of work may make sense, but I think there is probably more common 
ground than differences.

It's just that there there are a number of amazing projects under 
various parts of the Apache umbrella that I've used use together to 
build apps, but recently it seems that sometimes they are not aware of 
obvious overlap with other Apache projects... I'd just rather continue 
discounting inferior expensive commercial solutions to the benefit of 
using the great work going on in the projects at Apache XML, Jakarta 
etc rather than have to trade off between two different implementations 
of the similar functionality in two Apache projects.

Anyway, I'd be interested in hearing thoughts... 

Kosh


 -Original Message-
 From: husted 
 Sent: 04 February 2002 19:51
 To: struts-user
 Cc: husted
 Subject: Re: Extending Struts (was: Boost Struts with XSLT and XML -
 JavaWorld.com)
 
 
 Couball, James wrote:
  
  I have been lurking for a couple of months now and have 
 seen many useful
  extensions to the Struts framework.  I am curious to 
 understand what thought
  has gone into better understand how Struts can be extended 
 in common ways
  such that:
  
  (1) Extensions are an add-on/plug-in rather than a rewrite 
 of the Struts
  classes.
 
 Craig and Oleg are doing some work along those lines via the Commons
 Services component 
 
 http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/services/
 
 
 
 
  
  And
  
  (2) non-overlapping extensions are compatible.  For 
 example, wouldn't expect
  Velocity and XSLT extensions to work together but might 
 expect different
  classes of extensions to work together.
 
 I believe both of these would be. The model is that the ActionServlet
 forwards the request to another servlet (via the container). 
 The second
 servlet then finishes the response cycle, building on what the Action
 and ActionServlet started. So, you could use a Velocity 
 template in one
 requesst, and XLST document the next, and then back to JSPs. 
 
 
 
  Can the types of extensions be classified?  For example, 
 the XSLT extension
  talked about in the JavaWorld article could be a View extension.
  
  Should the framework be separated out into core and 
 extension pieces?
  For example, maybe the custom taglibs should be considered 
 part of the JSP
  Extension.  And the JSP Extension considered a View 
 extension that follows
  certain rules that other View extensions (such as Velocity 
 and XSLT) must
  follow.
 
 Yes. At some point, I'd like to get the taglibs moved out into a
 seperate JAR to help clarify this point. This would be slightly more
 important if more people where using alternative presentation devices
 and didn't need the JSP tags at all. But right now, we are all still
 recovering from suddenly needing so many Commons JARs :o)
 
 -Ted.
 
 
 
  Thank you,
  James.
  
  -Original Message-
  From: Ted Husted [mailto:[EMAIL PROTECTED]]
  Sent: Monday, February 04, 2002 9:51 AM
  To: Struts Users Mailing List
  Subject: Re: Boost Struts with XSLT and XML - JavaWorld.com
  
  Vaughan Jackson wrote:
  
   A couple of naive questions.
  
   1. Given that the authors of the article mention that the
  Cocoon framework uses XML and XSLT to generate HTML
  (among other formats), I assume their motivation
  for using Struts is to gain the MVC framework. Is this
  correct? Does Velocity also have the same deficiency
  compared with Struts?
  
  It's said that Velocity enforces MVC better than JSPs.
  
   2. Is there any possibility that something like this
  may become a formal extension to Struts?
  
  Definately.
  
  -- Ted Husted, Husted dot Com, Fairport NY USA.
  -- Java Web Development with Struts.
  -- Tel +1 585 737-3463.
  -- Web http://www.husted.com/struts/
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  --
  To unsubscribe, e-mail:   

RE: Preselecting Radio Buttons

2002-02-04 Thread Maturo, Larry

Hi John,

I ran into something similar with the select/options
tag last week.  The solution may be the same.  The 
tag sets a variable in the form with the user's
selection, and if you set the same variable in 
the form in your action class to what you want
selected, it may use that as the initial value.  I
haven't used the radio tag yet, so I may be 
totally off track here.

I hope this helps.

-- Larry


-Original Message-
From: John M. Corro [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 9:57 AM
To: [EMAIL PROTECTED]
Subject: Preselecting Radio Buttons


I would have thought this was a simple thing, but I must be missing
something.  Is there an attribute to the html:radio tag that sets it as
selected?  I want to have a group of radio buttons w/ 1 button being the
default.  I didn't see anything in the tag lib documentation and I tried
coding in the default value into the reset method (so if the form attribute
was programmerLanguage, I would say 'programmerLanguage = java;' in the
reset method., but no luck on either front. 

Can anyone provide some insight into this simple problem?

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




Tomcat - How will it recognise files placed elsewhere

2002-02-04 Thread Syed Niaz


Hi ,

I have installed Tomcat under Program Files/Apache .
The jsp files run when placed under webapps/example .

I want to execute a jsp file placed in C:/webapps/example/ .

What and where should I change ,so that the Tomcat recognises the Jsp located 
elsewhere .

Thanks

Regards,
Syed Niaz

 


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




RE: Formatting Dates, Integers...

2002-02-04 Thread Jeff Martin

Be very careful about using DateFormatter's that way. I learned a hard lesson in a 
previous project that DateFormater (and even just the format method) is not thread 
safe.

Jeff

-Original Message-
From: Peter Pilgrim [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 7:23 AM
To: Struts Users Mailing List
Subject: Re: Formatting Dates, Integers...




Hiya

I would also consider writing some custom tags to format numbers and dates.
Subclass the Struts' own bean WriteTag bean:write. It is pretty easy
to check for a java.lang.Number  or java.lang.String, which you can attempt
to parse into a double.

The only problem is a creating large numbers of
java.text.NumberFormat or java.text.DecimalFormat objects.
They are expensive to create and garbage collect.
I would suggest you put a NUMBER_FORMAT_KEY in the session scope
or write the tags to reuse a global Format object.

Unfortunate I cant give you my tags, but here is a handy project
for someone to write for Struts 1.1!!!

--
Peter Pilgrim ++44 (0)207-545-9923

 Swamped under electionic mails


 Message History 



From: Ted Husted [EMAIL PROTECTED] on 03/02/2002 21:58 EST

Please respond to Struts Users Mailing List [EMAIL PROTECTED]

To:   Struts Users Mailing List [EMAIL PROTECTED]
cc:
Subject:  Re: Formatting Dates, Integers...


Pesonally, I recommend doing such things in the ActionForm. You can do
them in the page, but that means modifying the page, and placing what is
really business logic in the presentation tier. While it seems we are
talking about how data looks, formatting it this way or that is really
a business requirement. The part about stuffing the formatted string
into HTML is the presentation tier. The J2EE blueprints call these
helper beans or methods.



--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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





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




RE: Indexed html:radio is broken

2002-02-04 Thread Maturo, Larry

Dave Hay wrote:

What if you want, say,

   logic:iterate id=category name=TraceForm property=categoryList
...
On html:radio  name=category property=value value=on
indexed=true/
Off html:radio  name=category property=value value=off
indexed=true/
Deferred html:radio  name=category property=value
value=deferred indexed=true/
...
 /logic:iterate

That way the buttons SHOULD all have the same name for each iteration, and
different one for the next one etc..  That was the thinking behind it.

Dave



Will that not generate:

On input type=radio name=category[0].value value=on
Off input type=radio name=category[0].value value=off
Deferred input type=radio name=category[0].value value=deferred

On input type=radio name=category[1].value value=on
Off input type=radio name=category[1].value value=off
Deferred input type=radio name=category[1].value value=deferred

etc, where category must be an array?  If so, then what you really have
is a list of lists, since both TraceForm and category must be a list.

If so, what is the logic behind this?

What I would have expected is to pick up the names for radio groups from
category, and have html:raido use an array property within the Form Bean
for this action. This would look something like:

On input type=radio name=someValue[0] value=on
Off input type=radio name=someValue[0] value=off
Deferred input type=radio name=someValue[0] value=deferred
Group A

On input type=radio name=someValue1] value=on
Off input type=radio name=someValue[1] value=off
Deferred input type=radio name=someValue[1] value=deferred
Group B

where someValue is an array property within the form bean and Group A,
Group B, etc. are from a string property within category.

What I am trying to do is something like:

+---+---+
|Status |   |   |
+---++--+---+
| Req'd | Exempt | Done |  Gate |
+---++--+---+
|   o   |   o|  *   | Statement of Work |
+---++--+---+
|   o   |   *|  o   |  Kickoff  |
+---++--+---+

-- Larry Maturo
   [EMAIL PROTECTED]

   

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




Uploading files - determining content type and other attributes

2002-02-04 Thread Matt Raible

When using the Upload feature of Struts, is it possible to determine the
content-type of the uploaded file?  For instance, how do I figure out that
themovie.mov is a video, or that it's really a jpeg with the wrong extension?

Is this possible, or is it only possible to determine the content type from the
extension?

Also, when uploading images, is it possible to determine their width and
height?

If anyone has any pointers for determining file properties - please send me
links.

Thanks,

Matt

__
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

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




Re: Questions from an Idiot who Longs to Understand Struts

2002-02-04 Thread cody.burleson



Sounds like a plan Richard. I shall try it!

Thank you.

- Cody





Richard Yee [EMAIL PROTECTED] on 02/04/2002 02:31:53 PM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]
To:   Struts Users Mailing List [EMAIL PROTECTED]
cc:
Subject:  Re: Questions from an Idiot who Longs to Understand Struts


Cody,
I'd suggest not using a custom tag to contain your list and instead just
use a regular bean class.
You can then use the jsp:usebean tag to instantiate the bean and then I
think the iterate tags will be able to call the getUserList method from the
class

Regards,

Richard

At 12:17 PM 2/4/2002 -0600, you wrote:

OK -

So, not long ago, having read about MVC and having been introduced to
Struts by discovering it on the Jakarta site, I embarked upon my journey
to
learn it.  Absolutely frustrated with the documentation (it appers to be
written for people who happen to know a thing or two), and ffrustrated by
the lack of support references in bookstores or the online community - I
broke doen and started implementing my own MVC. Why? Because I at least
found a step by step reference for how to do it.

Anyways

Having done the MVC myself, I finally got to the place where I thought
(OK, now I think I will probably be able to comprehend Struts).

So I begin to convert my app.

Here's where I stand:

I've got all the tld's set and tested and struts is up and rearing to go
(as far as I can tell).
I've got Poolman set and tested; ready for use in the system (as I heard
this was more robust than the b uilt-in Struts pool manager).
Log4J is in.

And now I am just stuck on the most basic, simplist things!


I'm trying to iterate through a list and I am just stuck - somebody please
help.  Here's what I have got:

First, a custom tag called userList:


***
// UserListTag.java

package com.magneta.tags;

import org.apache.log4j.*;
import java.util.List;
import java.util.ArrayList;
import javax.servlet.jsp.tagext.TagSupport;

public class UserListTag extends TagSupport implements
java.io.Serializable
{

 // a category instance for log4j logging
 private Category cat = Category.getInstance(UserListTag.class.getName
());

 private List userList;

 public int doStartTag() {

 cat.debug(in doStartTag());


 userList = new ArrayList();
 userList.add(cburleson001);
 userList.add(bshoemate001);
 userList.add(jacarey001);
 userList.add(agilbert001);
 userList.add(rafael001);
 userList.add(margetic001);

  cat.debug(storing userList bean in page scope);
 pageContext.setAttribute(userList,userList);

 return SKIP_BODY;

 }

 public List getUserList () {
 return userList;
 }

}

***


Now, here's what I am trying to do on my JSP page - just simply iteratte
through the list with the following...

* from admin_userAdmin.jsp

!-- initialize the user list (in bean in page scope) --
 app:userList/

 logic:iterate id=userList name=userList
 bean:write name=userList property=userList/
 /logic:iterate

***

BUT when I hit the page, I get the following exception

javax.servlet.ServletException: No getter method for property userList of
bean userList


Can someone shed some light? Help me people - I am on square one.

- Cody


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you
received
this in error, please contact the sender and delete the material from any
computer.


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



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





The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.


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

RE: Formatting Dates, Integers...

2002-02-04 Thread ltorrence

So is the answser to create global Format object and synchronize access?

-Original Message-
From: Jeff Martin [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 5:56 PM
To: Struts Users Mailing List
Subject: RE: Formatting Dates, Integers...


Be very careful about using DateFormatter's that way. I learned a hard
lesson in a previous project that DateFormater (and even just the format
method) is not thread safe.

Jeff

-Original Message-
From: Peter Pilgrim [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 7:23 AM
To: Struts Users Mailing List
Subject: Re: Formatting Dates, Integers...




Hiya

I would also consider writing some custom tags to format numbers and dates.
Subclass the Struts' own bean WriteTag bean:write. It is pretty easy
to check for a java.lang.Number  or java.lang.String, which you can attempt
to parse into a double.

The only problem is a creating large numbers of
java.text.NumberFormat or java.text.DecimalFormat objects.
They are expensive to create and garbage collect.
I would suggest you put a NUMBER_FORMAT_KEY in the session scope
or write the tags to reuse a global Format object.

Unfortunate I cant give you my tags, but here is a handy project
for someone to write for Struts 1.1!!!

--
Peter Pilgrim ++44 (0)207-545-9923

 Swamped under electionic mails


 Message History



From: Ted Husted [EMAIL PROTECTED] on 03/02/2002 21:58 EST

Please respond to Struts Users Mailing List
[EMAIL PROTECTED]

To:   Struts Users Mailing List [EMAIL PROTECTED]
cc:
Subject:  Re: Formatting Dates, Integers...


Pesonally, I recommend doing such things in the ActionForm. You can do
them in the page, but that means modifying the page, and placing what is
really business logic in the presentation tier. While it seems we are
talking about how data looks, formatting it this way or that is really
a business requirement. The part about stuffing the formatted string
into HTML is the presentation tier. The J2EE blueprints call these
helper beans or methods.



--

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.



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





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



Re: RE: [Fwd: Re: Hi....]]

2002-02-04 Thread Jay Sissom

I don't agree.  If you need to use scriptlets in your JSPs and you use them
over and over on many pages, the scriptlet should be a tag.  The tag can be
reused on many pages, the scriptlet can't.

Please explain why This is a bad habit.  Only do it if you must.  Should
we only re-use code if we must?  Is re-use of code a bad habit. :)

Jay



- Original Message -
From: Vic Cekvenich [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 30, 2002 2:48 PM
Subject: [Fwd: RE: [Fwd: Re: Hi]]


 The thing on tags is do not use to many tags. Try to avoid writing
 tags.
 Somehow, the example app on struts has a custom tag and people like to
 learn how to write tags, and so there are lots of tags in Struts. This
 is a bad habit. Only do it if you must.
 Try to do as little code as possible in presentation/view/jsp.

 So to me, tags and Struts framework are 2 different things, but bellow
 is a good book anyway.

 Vic

  Original Message 
 Subject: RE: [Fwd: Re: Hi]
 Date: Wed, 30 Jan 2002 18:49:35 +0100
 From: Lacerda, Wellington (AFIS) [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 Organization: Basebeans.com
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Newsgroups: Struts

 Another book with a lot of information on Struts is JSP and Tag Libraries
 for Web Development,
 available at Amazon and BN. Check the publisher's page at:
 http://www.newriders.com/books/title.cfm?isbn=0735710953.

 It is heavily focused on Tag Libraries and Struts is discussed on the
light
 of that.

 Wellington

 -Original Message-
 From: Vic Cekvenich [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 30, 2002 6:39 PM
 To: [EMAIL PROTECTED]
 Subject: [Fwd: Re: Hi]



 Newsgroups: Struts @ news.basebeans.com
 References: [EMAIL PROTECTED]

 One Struts book at http://www.basebeans.com/book.jsp

 Amir N. Nashat wrote:

Hi Chetan,
   
There are no books available at this time though 2 are currently
 being written that I know of. However, they will not be available for a
 while. The best place to start is to go to the website
 jakarata.apache.org and search under struts. there is A LOT of good
 information there. Also, another very good site is www.husted.com.
 Ted(who runs the site) is very knowledgeable in this field and posts to
 this mailing list very often. Hope that helps.
   
amir
   
   
   
   
   [EMAIL PROTECTED] 10:38:51 PM 01/29/02 
   
I'm just a newbie to Struts and find it very interesting, I just want
 to ask
where is it best to start learning struts from... Is there a book out
 there
that I can buy
Thankz
Chetan
   
--
To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
   
   
   
   




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


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




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



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




Re: Form fields submitted multiple times...

2002-02-04 Thread Ted Husted

If you are using the ValidatorForm, another good trick is to key off the
page property it provides. 

In the reset function, put in a wrapper like this:

if (getPage()==0) {

setForward(null);
setName(null);
setTelephone(null);
setNumber(null);
};

This will keep the fields from being reset when you are in Wizard mode
and using multiple pages. You can also use it to provide a quick and
easy readonly mode. Just call 

setPage(1);

in your Action before forwarding it. 

Also works great in the Config if you are relaying actions. Just pass
?page=1 as part of the URI.

-T.


Ted Husted wrote:
 
 If you are forwarding from Action to Actoin, the ActionServlet will
 handle each request the same as the first.
 
 If you do not want your ActionForm to be repopulated from the request as
 you forward it around, the workaround is to put an readonly property on
 the form. The public setters for your properties can then check this to
 see if they should allow changes or not. The first action can then set
 the ActionForm to readonly before forwarding it along.
 
 public void setProperty(String property) {
 if (isMutable()) {
 this.property = property;
 }
 }
 
 There's a SuperForm class in the Scaffold package in the contrib
 folder that demonstrates this and some other techniques
 [org.apache.scaffold.http.SuperForm].
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Java Web Development with Struts.
 -- Tel +1 585 737-3463.
 -- Web http://www.husted.com/struts/
 
 Kearfott, David (DST-CLT) wrote:
 
  Has anyone ever noticed the Set methods in the ActionForm invoked multiple
  times (always using the values submitted from the html:form) from Action to
  Action?
 
  In our JSP, we have several buttons pertaining to the same form
  (thisActionForm).  Depending on which button was pressed, a different
  action mapping is invoked from Struts:
 
  action path=/handleButtons type=HandleButtonsAction
  name=thisActionForm validate=false scope=session input=/home.jsp
  forward name=updateDetailsButton
  path=/updateDetails.do/
  forward name=resetDetailsButton
  path=/resetDetails.do/
  forward name=calculateButton
  path=/calculateAmounts.do/
  forward name=deleteButton
  path=/deleteDetails.do/
  /action
 
  action path=/resetDetails type=ResetDetailsAction name=thisActionForm
   validate=false scope=session input=/home.jsp
  forward name=success
  path=/calculateAmounts.do/
  /action
  action path=/calculateAmounts type=CalculateAmountsAction
  name=thisActionForm  validate=false scope=session input=/home.jsp
  forward name=success path=/details.jsp/
  /action
 
  We see the fields entered/changed in thisActionForm set before entering
  the HandleButtonsAction class.
  We also see the same field values set again before entering the
  ResetDetailsAction class, as if the HTML form has been submitted a second
  time.
  The ResetDetailsAction resets some date fields on thisActionForm, by
  invoking various Set methods.
  We then see the original field values set a third time before entering the
  CalculateAmountsAction class, clearing out the values reset in the
  ResetDetailsAction
 
  As anyone seen anything similar?
  Is there an attribute we could use in the action element that would disallow
  the form from submitting again and again and again?
 
  Our current work around is to not use thisActionForm on any other actions,
  except the HandleButtonsAction, and just grab thisActionForm off of the
  session in ResetDetailsAction and CalculateAmountsAction, but we feel
  that there's an easier way.
 
  Sorry for the novel...
  -dave kearfott
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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

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




Struts and Borland jbuilder6

2002-02-04 Thread Nick Torenvliet

Hi all, I'm in the process of trying to get a struts project to compile in
jbuilder 6.

I am new to both the products and I can't seem to get them to work.

I imagine its operator error, but I've seen references to an open source
tool
that you need to use to get jb5 to work with struts- I am wondering if there
is any special hoops I must pass through to get jb6 working with struts.

Thanks, and yes I will post this on the jb news groups as well :-)


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




Struts runtime expression tag.

2002-02-04 Thread Victor Hadianto

Hi list,

I wonder if I'm doing something really wrong here, this is what I want to do:

html:link page=/membership.do?id=bean:write name='formBean' 
property='id'/Membership/html:link

Struts ignores the bean:write tag altogether. 
I have to use a normal a href tag for example:

a href/context/membership.do?id=bean:write name='formBean' 
property='id'/Membership/a

to get this to work. Now the obvious problem is using the a href tag
I have to include the context. Very annoying.

Did I do something really wrong here?

Regards,

-- 
Victor Hadianto
---
Remember, in 2039, MOUSSE  PASTA will be available ONLY by prescription!!

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




Re: Struts runtime expression tag.

2002-02-04 Thread Matt Raible

Unfortunately, you cannot nest tags within each other.  You best best is to
put a global forward in your struts-config.xml, such as:

forward name=membership path=/membership.do/

And then write your a href as follows:

a href=html:rewrite forward='membership'/?id=bean:write name='formBean'
property='id'/Membership/a

OR, I think you can do it this way:

html:link page=/membership.do paramId=id paramName=formBean
paramProperty=idMembership/html:link

Also, I think it's good practice to have all your links go to forwards
rather than pages.  This way, if you ever need to change your action mapping
(from say *.do to /do/*), you can do it by only touching the web.xml and
struts-config.xml.

HTH,

Matt

--- Victor Hadianto [EMAIL PROTECTED] wrote:
 Hi list,
 
 I wonder if I'm doing something really wrong here, this is what I want to do:
 
 html:link page=/membership.do?id=bean:write name='formBean'
 property='id'/Membership/html:link
 
 Struts ignores the bean:write tag altogether. 
 I have to use a normal a href tag for example:
 
 a href/context/membership.do?id=bean:write name='formBean'
 property='id'/Membership/a
 
 to get this to work. Now the obvious problem is using the a href tag
 I have to include the context. Very annoying.
 
 Did I do something really wrong here?
 
 Regards,
 
 -- 
 Victor Hadianto
 ---
 Remember, in 2039, MOUSSE  PASTA will be available ONLY by prescription!!
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

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




Importing CSV and VCF files

2002-02-04 Thread Matt Raible

Does anyone know of any examples to import CSV files into a database using
Java?  Like Yahoo does with Addresses?

What about importing a VCF file?  

Any links, suggestions are appreciated,

Matt

__
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

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




Re: Struts and Borland jbuilder6

2002-02-04 Thread Jay Sissom

Make sure that the struts.jar file is in your web-inf/lib directory in your
project.

You do this by right clicking on the web root in the project pain, selecting
properties, click on dependancies, then make sure the struts library is set
to include all.  When you do that, Jbuilder will automatically copy the
struts library into web-inf/lib.  If the jar file isn't in this folder, it
will not work.

You don't need any of the Jbuilder 5 addons in Jbuilder 6.

If you have any problems, you can email me off the group and I can try to
help.

Jay

- Original Message -
From: Nick Torenvliet [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, February 04, 2002 7:08 PM
Subject: Struts and Borland jbuilder6


 Hi all, I'm in the process of trying to get a struts project to compile in
 jbuilder 6.

 I am new to both the products and I can't seem to get them to work.

 I imagine its operator error, but I've seen references to an open source
 tool
 that you need to use to get jb5 to work with struts- I am wondering if
there
 is any special hoops I must pass through to get jb6 working with struts.

 Thanks, and yes I will post this on the jb news groups as well :-)


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



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




display property

2002-02-04 Thread Cheng, Sophia

Hi,


I can show data correctly in a table by using the following syntax, 
  
tdhtml:text property=deptName size=80//td

But, if I just want to display the data(property), instead of putting data
in a text field, say 

tdDepartment A/td

Then, which tag should I use?

Thanks,
Sophia


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




Re: display property

2002-02-04 Thread Matt Raible

bean:write name=formName property=deptName /

HTH,

Matt

--- Cheng, Sophia [EMAIL PROTECTED] wrote:
 Hi,
 
 
 I can show data correctly in a table by using the following syntax, 
   
 tdhtml:text property=deptName size=80//td
 
 But, if I just want to display the data(property), instead of putting data
 in a text field, say 
 
 tdDepartment A/td
 
 Then, which tag should I use?
 
 Thanks,
 Sophia
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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




How to put useBean data in HTML attribute?

2002-02-04 Thread cody.burleson



Could someone please shed some light on the following?  What would be the
solution for an attempt like this? Consider this code snippet that has an
obviously incorrect syntax:

logic:iterate name=users property=userList id=currentUser
html:link href=admin_userForm.jsp?user_id=bean:write
name='currentUser'/bean:write name='currentUser'//html:linkbr
/logic:iterate

I am trying to set a URL paramer with bean data (admin_userForm.jsp?user_id
=bean:write name='currentUser'/), but because it is inside of an HTML
attribute, it is not working. I end up with an uninterpereted param value
of user_id=bean:write name='currentUser'/. I know it's just a syntax
issue. I can think of a better way to do it, but not without introducing
java code into the page.

What is the more elegant Struts-centric way to do this?

- Cody


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.


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




RE: form target to different frame leaves current frame busy

2002-02-04 Thread Barr, Scott [IBM GSA]

Hi Rob

I've come across something similar before.
I haven't got time to test this myself right now, but try returning true
from your javascript function. I cant remember the details but this solved a
similar problem once form me

Scott

 -Original Message-
 From: Rob Breeds [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, February 05, 2002 6:43 AM
 To:   Struts Users Mailing List
 Subject:  form target to different frame leaves current frame busy
 
 
 I've got a problem with forms and frames I hadn't noticed until now. Two
 frames - input form in one, which when submitted, the results appear in
 the
 second. Works functionally (results appear in target frame) but the mouse
 cursor remains with hourglass image when it is over the source frame.
 
 I am submitting a form with a link, using a JavaScript function like so:
 
 html:form action=saveEntity.do focus=name target=detail
 .
 .
 .
 html:link href
 =javascript:subForm(document.forms[0],'Entity.Advanced');bean:message
 key=link.add_detail//html:link
 .
 .
 
 
 the JS functions used is:
 function subForm(iform, act) {
   validate(iform, act);
   iform.action=Publish. + act + .do;
   iform.submit();
 }
 
 where act is the action to perform, e.g. if act='Chapter' then the
 'Publish.Chapter.do' is set as the form action.
 
 What am I doing wrong?
 
 Thank you.
 
 Rob
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]

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




Re: How to put useBean data in HTML attribute?

2002-02-04 Thread Richard Yee

Cody,
You can't nest tags - you can't have one tag inside the 's of another tag.
To do what you want, try this:
logic:iterate name=myBean property=userList id=currentUser
% String ref = admin_userForm.jsp?user_id= + currentUser; %
html:link href=%= ref %%= currentUser %/html:linkbr
/logic:iterate

-Richard


logic:iterate name=users property=userList id=currentUser
 html:link href=admin_userForm.jsp?user_id=%= 
 currentUser %%= currentUser %/html:linkbr
/logic:iterate


At 11:37 PM 2/4/2002 -0600, you wrote:


Could someone please shed some light on the following?  What would be the
solution for an attempt like this? Consider this code snippet that has an
obviously incorrect syntax:

logic:iterate name=users property=userList id=currentUser
 html:link href=admin_userForm.jsp?user_id=bean:write
name='currentUser'/bean:write name='currentUser'//html:linkbr
/logic:iterate

I am trying to set a URL paramer with bean data (admin_userForm.jsp?user_id
=bean:write name='currentUser'/), but because it is inside of an HTML
attribute, it is not working. I end up with an uninterpereted param value
of user_id=bean:write name='currentUser'/. I know it's just a syntax
issue. I can think of a better way to do it, but not without introducing
java code into the page.

What is the more elegant Struts-centric way to do this?

- Cody


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.


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



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




Re: display property

2002-02-04 Thread Arnab Sengupta

Sophia,
I guess u can use bean:message key=./
in the td tag.Offcourse put the key value in the
ApplicationResources.property file of struts before.
like
key=prompt.tablevalue...
and in the ApplicationResources file put
prompt.tablevalue=Department A.

Hope it works.
Regards,
Arnab.
- Original Message -
From: Cheng, Sophia [EMAIL PROTECTED]
To: 'Struts Users Mailing List' (E-mail) [EMAIL PROTECTED]
Sent: Tuesday, February 05, 2002 8:50 AM
Subject: display property


 Hi,


 I can show data correctly in a table by using the following syntax,

 tdhtml:text property=deptName size=80//td

 But, if I just want to display the data(property), instead of putting data
 in a text field, say

 tdDepartment A/td

 Then, which tag should I use?

 Thanks,
 Sophia


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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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