Re: Submitting a form

2003-11-03 Thread Tim T. Young

Your link could look like this :

Link Text

The javascript could look like this :

linkClicked() {
  document.forms[0].myHiddenField.value = 'something';
  document.forms[0].action = '/differentAction.do';
  document.forms[0].submit();
}

You could pass the "something" value into the function also, if needed.

Tim



|-+>
| |   "bort"   |
| |   <[EMAIL PROTECTED]|
| |   com> |
| ||
| |   11/03/2003 03:26 |
| |   PM   |
| |   Please respond to|
| |   "Struts Users|
| |   Mailing List"|
| ||
|-+>
  
>--|
  |
  |
  |
  |
  |
  |
  |
  |
  |To: [EMAIL PROTECTED]   
 |
  |cc: 
  |
  |
  |
  |
  |
  |
  |
  |  Subject:  Re: Submitting a form   
  |
  
>--|



Caterpillar: Confidential Green Retain Until: 12/03/2003
Retention Category:  G90 -
General
Matters/Administration




Here is where I'm having a problem...

will update a hidden field in
the form, and submit the form to a different action.

If this is possible, how would I do it?

TIA


"bort" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I just realized that part of my post was cut out.  Here is the post in
its
> entirety:
>
>
> Hi all
>
> I have a form that has a series of fields.  When I submit the form, the
> action retrieves information from a database, based on the information in
> the form.  The information retrieved is then shown the same html page
that
> the form resides on, in a table.  It should be noted that the table does
NOT
> reside within the  tags.  So basically, the user can make
queries
> and see the results of the queries on the same html page.  Simple.
>
> Here is where I'm having a problem...
>
>  tags), I want to have a link that will update a hidden field
in
> the form, and submit the form to a different action.
>
> If this is possible, how would I do it?
>
> TIA
>
>
> "boort" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi all
> >
> > I have a form that has a series of fields.  When I submit the form, the
> > action retrieves information from a database, based on the information
in
> > the form.  The information retrieved is then shown the same html page
that
> > the form resides on, in a table.  It should be noted that the table
does
> NOT
> > reside within the  tags.  So basically, the user can make
> queries
> > and see the results of the queries on the same html page.  Simple.
> >
> > Here is where I'm having a problem...
> >
> >  tags), I want to have a link that will update a hidden
field
> in
> > the form, and submit the form to a different action.
> >
> > If this is possible, how would I do it?
> >
> > TIA




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







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



Re: Exception handling 100% declarative

2003-10-29 Thread Tim T. Young

Sounds like you need to add a custom handler like so:







Your "EJBCreateHandler" class would extend from ExceptionHandler and
override execute.  In there you can then create the custom parameterized
messages you want.  In the execute method of a ExeceptionHandler you have
references to the form, the mapping, request/response, and the
ExceptionConfig.  The ExceptionConfig class has the message key (and type,
path, etc) contained in the exception mapping.

HTH,
Tim





|-+>
| |   "Jim Kennedy"|
| |   <[EMAIL PROTECTED]|
| |   om>  |
| ||
| |   10/29/2003 12:13 |
| |   PM   |
| |   Please respond to|
| |   "Struts Users|
| |   Mailing List"|
| ||
|-+>
  
>--|
  |
  |
  |
  |
  |
  |
  |
  |
  |To: "Struts Users Mailing List" <[EMAIL PROTECTED]> 
 |
  |cc: 
  |
  |
  |
  |
  |
  |
  |
  |  Subject:  Exception handling 100% declarative 
  |
  
>--|



Caterpillar: Confidential Green Retain Until: 11/28/2003
Retention Category:  G90 -
General
Matters/Administration




I would like to be able to customize the output when an exception is thrown
with minimal or no extra overridden classes.  My struts config (1.1) config
file looks like this:











The properties file looks like this:

errors.header=The following system errors occurred:
errors.footer=
error.persistence.create=An error occurred attempting to create a database
record
error.http.methodnotsupported=This type of request is not supported for
this URL
error.naming.namenotfound=Lookup failed with naming service
error.servlet.illegalparameter=A required field or parameter is missing for
the request


The syserror.jsp file is simply:

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










The above does work.  But I only get the properties file message printed.
I would like to do something like this:

error.servlet.illegalparameter=A required field or parameter is missing for
the request {0}

so that I can dynamically generate a message specific to the error.  In
this case I want to display whatever field is identified by the exception.
So if the exception is thrown like:

throw new IllegalParamsException("fieldXYZ is missing");

I would like to see "A required field or parameter is missing for the
request 'fieldXYZ is missing' "
Can I do this 100% in a declaritive manner?  Or how can I pull this off.

thanks






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



Re: Cannot find bean viewcontactlist in scope request

2003-09-10 Thread Tim T. Young

paramName (in your case viewcontactlist) is the name of the bean in the
request (paramScope="request").  You need to have a paramProperty
="beanProperty" also.

>From the docs:

Specify both the paramName and paramProperty attributes - The specified
property getter method will be called on the JSP bean identified by the
paramName (and optional paramScope) attributes, in order to select a value
that can be converted to a String.

HTH,
Tim




|-+>
| |   "Mehran Zonouzi" |
| |   <[EMAIL PROTECTED]|
| |   b.com>   |
| ||
| |   09/10/2003 08:15 |
| |   AM   |
| |   Please respond to|
| |   "Struts Users|
| |   Mailing List"|
| ||
|-+>
  
>--|
  |
  |
  |
  |
  |
  |
  |
  |
  |To: Struts Users Mailing List <[EMAIL PROTECTED]>   
 |
  |cc: 
  |
  |
  |
  |
  |
  |
  |
  |  Subject:  Cannot find bean viewcontactlist in scope request   
  |
  
>--|



Caterpillar: Confidential Green Retain Until: 10/10/2003
Retention Category:  G90 -
General
Matters/Administration




I am getting this error message when my JSP page first loads up.

Cannot find bean viewcontactlist in scope request


I am using a link to call my ActionForm class( as below):

 

My ActinForm is called ContactForm and I want to call it using a param
called 'page' with the initial value of 'viewcontactlist'
to it.

Can anyone help me with the syntax plz?


--

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








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



Commons Version with Struts in WSAD 5

2003-02-27 Thread Tim T. Young

Does anyone know what version of Commons is with Struts 1.1b2 in WSAD 5?
Or what version of Commons Validator was distributed with Struts 1.1b2 in
general?

I read the release notes for 1.1b2 and while they mention using commons
they do not specify versions.

Thanks,
Tim



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



xml validation error on Tiles plugin entry

2003-01-14 Thread Tim T. Young

I am using WSAD 5 and am having a problem enabling the Tiles plugin in the
struts-config.xml file.

I put this entry into the file:


  
  
  


and I get validation errors on the first 2 set-property lines




The error messages are:
"Invalid data for attribute "property" in part definitions-config type
set-property"
and
"Invalid data for attribute "property" in part definitions-parser-validate
type set-property"

Oddly enough when I take the - (dash) out of the property="" the validation
errors go away.

The DTD I am pointing at is:

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>

Any help would be appreciated!

Thanks
Tim



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




Re: Disadvantages of Struts

2002-09-12 Thread Tim T. Young


It's way too productive for my taste...



   
  
raghuramudu.v@pol  
  
aris.co.in 
  
   
  
09/11/2002 11:20   
  
PMTo:  struts help 
<[EMAIL PROTECTED]>  
Please respond to cc:  
  
"Struts Users  
  
Mailing List"  
  
   
  
Subject:Disadvantages of Struts
  
   
  



Caterpillar: Confidential Green  Retain Until: 10/11/2002
 Retention Category:  G90 -
 Information and Reports




Hi All,

Can any one tell me what are the disadvantages of Struts?.
Your help is appreciated

thanks and regards
Raghu

(See attached file: InterScan_Disclaimer.txt)--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>




InterScan_Disclaimer.txt
Description: Binary data

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


Re: Building confirm screens in Struts

2002-09-09 Thread Tim T. Young


You will want to use a  tag to display properties of a bean,
plus the  tag (you are already using) to keep the data.

Tim



   
   
"Smith,
   
Johnathan M."  
   
 
   
   
   
09/09/2002To: "'[EMAIL PROTECTED]'" 
<[EMAIL PROTECTED]> 
01:33 PM  cc:  
   
Please 
   
respond to 
   
"Struts Users  
   
Mailing List"Subject: Building confirm screens in 
Struts  
   
   
   
   



Caterpillar: Confidential Green  Retain Until: 10/09/2002
 Retention Category:  G90 -
 Information and Reports




I have a question on how to build a confirm screen in struts.  In the past
I
had my user enter data in one screen into text fields on a form.  Once the
user clicks submit I would use hiddle fields on the next screen to save the
values and I would also display the values on the screen to??

I see in struts I can use the hidden tag but how do I display the value and
also have it in a hidden tag


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






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




RE: [Share DB Connections] how to return errors from Model component

2002-09-06 Thread Tim T. Young


Database connections (ie jdbc) are usually done through connection manager
classes or container managed data sources.  Our infrastructure provides a
PoolManager which does db, ldap, custom, etc pooling.  When we want a
connection we just "PoolManager.getCurrent().getConnection(...).  The
connections are pooled behind the scenes, improving effeciency, etc.  Of
course when I hear "model" I think totally independent classes which could
be reused in any jvm, so I probably would have some type of persistance
manager class asking for the connections to do the persistance work on the
model object.

Tim



   

"Kenny Smith"  

 

   

09/06/2002 

11:32 AM   To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
Please respond cc: 

to "Struts 

Users Mailing  

List"  

  Subject: RE: how to return errors from 
Model component   
   




Caterpillar: Confidential Green  Retain Until: 10/06/2002
 Retention Category:  G90 -
 Information and Reports




Hi,

> Someone on the list once said that the Model should
> not know its in a web app...

I totally agree with this statement, but I've been having real problems
keeping the Model from knowing it's a webapp and still being able to
properly share a database connection. I'm still a beginner to java and
struts, so there may be a simple answer I'm missing but...

How do you guys and gals get your model objects to share your database
connections without letting them know they are a web app?

Kenny Smith
JournalScape.com


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






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




Re: how to return errors from Model component

2002-09-06 Thread Tim T. Young


I would agree that your model should not be manipulating ActionError(s).
If your requirement is that you MUST send multiple errors back from the
model then perhaps a custom exception (with a list of other exception,
errors string, or keys to i18n, internal to it), that you can pick apart in
the Action:perform( ... catch (...)).If you think that multiple model
errors is a down-the-road thing, take the XP route and implement a solution
for single errors, then when the feature becomes required you can use your
knowledge gained from the first pass to implement the multiple way.

Tim



   
   
"Donald Ball"  
   

   
   
   
09/06/2002 
   
10:11 AM  To: [EMAIL PROTECTED]   
   
Pleasecc:  
   
respond to 
   
"Struts Users  
   
Mailing List"  
   
 Subject: how to return errors from Model 
component   
   
   



Caterpillar: Confidential Green  Retain Until: 10/06/2002
 Retention Category:  G90 -
 Information and Reports




Hey guys, I have an MVC-type question. My View captures data from the user
and sends it to the Controller, which validates and massages it and uses it
to configure the Model and tell the Model to do something. Based on the
something, the Controller sends another View to the client. So far so good.

What happens when something, or rather, somethings go wrong when the Model
is doing its work? How should the Model communicate this to the Controller
in a way that doesn't violate the seperation of concerns? Currently, my
Model creates a struts ActionErrors object and puts the error messages into
it and returns it to the Controller. This strikes me as a bad design choice
because the Model object shouldn't have any notion of the environment in
which it lives. However, I'm unsure what the best practice is. Choices
include:

* Tossing an exception - but I would like to be able to send multiple
errors at the same time

* Return a List or array of String error messages - but then my messages
are hard-coded into the application, making i18n painful. I could make the
Strings returned be keys into the ApplicationResources properties file, but
then how do I attach parameters for messages that need them?

* Return, oh, a SortedMap of error messages, where the keys are the error
message keys, sorted in order of occurance, and the values are Lists of
parameters for the error messages - but this seems awfully convoluted.

Any suggestions?

- donald


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






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




RE: [FRIDAY] SOMEONE SAVE OUR LIST!!!!

2002-09-06 Thread Tim T. Young



including some drugs used to treat hypertension and some mood
altering drugs.


I hope beer is not on that list...



   
   
wbchmura@Ensign-Bickf  
   
ordInd.com 
   
   
   
09/06/2002 09:41 AM
   
Please respond to  
   
"Struts Users Mailing To: [EMAIL PROTECTED]   
   
List" cc:  
   
   
   
   
   
   
   
 Subject: RE: [FRIDAY] SOMEONE 
SAVE OUR LIST  
   
   



Caterpillar: Confidential Green  Retain Until: 10/06/2002
 Retention Category:  G90 -
 Information and Reports




Refuse?!  I am just trying to help henry!

Good god man he has got RETROGRADE EJACULATION for cryin out loud!

From: http://www.nlm.nih.gov/medlineplus/ency/article/001282.htm

Retrograde ejaculation refers to the entry of semen into the bladder
instead of going out through the urethra during ejaculation.

Retrograde ejaculation may be caused by prior prostate or urethral
surgery, diabetes, some medications, including some drugs used to treat
hypertension and some mood altering drugs.

Switching to a framework like Jakarta Struts can help reduce most of the
symptoms.

The condition is relatively uncommon and may occur either partially or
completely. The presence of semen into the bladder is harmless. It mixes
into the urine and leaves the body with normal urination. Men with
diabetes and those who have had genitourinary tract surgery are at
increased risk of developing the condition.


-Original Message-
From: Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 06, 2002 10:21 AM
To: struts-user
Subject: RE: [FRIDAY] SOMEONE SAVE OUR LIST


Lighten up, Brandon.  It's just BS from www.snopes.com.

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 06, 2002 10:05 AM
To: Struts Users Mailing List
Subject: RE: [FRIDAY] SOMEONE SAVE OUR LIST


I thought it was funny! (Of course, I grew up watching Monty Python, so
I
could well be more corrupted than I think I am. ;-)

Simon "Sasquatches taste just like chicken" Chappell

>-Original Message-
>From: Brandon Goodin [mailto:[EMAIL PROTECTED]]
>Sent: Friday, September 06, 2002 9:01 AM
>To: Struts Users Mailing List
>Subject: RE: [FRIDAY] SOMEONE SAVE OUR LIST
>
>
>Isn't this list suppossed to be protected from this kind of
>refuse! I've got
>a good sense of humor. But this is just sick! What the heck is this all
>about? This really doesn't even qualify as a Friday topic.
>YUUUK!
>
>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]]
>Sent: Friday, September 06, 2002 8:00 AM
>To: [EMAIL PROTECTED]
>Subject: RE: [FRIDAY] Please help save my soul
>
>
>
>Dear Henry,
>
>I would be most willing to contribute to your cause, in the
>order of the
>full amount.  I would do this in trade for one of your kidneys
>(of which
>you only need one).  I intend to put the kidney in question up for
>auction on E-Bay.
>
>Please forward me your mailing address there in Ghana and I
>will be most
>happy to mail you:
>
>1 x Coleman cooler (2 six pack size)
>3 x Ice packs
>1 x pair latex gloves
>1 x Cutco steak knife
>1 x Zip lock baggie (Freezer bag size)
>1 x copy of Gray's Anatomy with relevant page dog-eared and organ
>hig

Re: [ANN] Struts Q&A Distilled, Vol#2

2002-09-06 Thread Tim T. Young


Great resource, keep up the good work.

Tim



   
   
John Yu
   

   
   
   
09/06/2002 
   
08:00 AM  To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
Pleasecc:  
   
respond to 
   
"Struts Users  
   
Mailing List"  
   
 Subject: [ANN] Struts Q&A Distilled, 
Vol#2   
   
   



Caterpillar: Confidential Green  Retain Until: 10/06/2002
 Retention Category:  G90 -
 Information and Reports





"Struts Q&A Distilled" is a catalogue of question-and-answers distilled
from Struts mailing lists and other sources. The catalogue is organized in
topics. New entries are added to the catalogue periodically in batches.

Volume #2:

  http://www.scioworks.net/servlets/ShowPage?pid=34&dp=3

Covers:
Q1: It is recommended properties of the FormBeans should be String
properties. In that case, where do I do the type conversions?

Q2: How much does Struts depend on the session object and when is the
object created?

Q3: I have problem with using ActionErrors and . I don't see
my messages. Why?

Q4: My error messages generated by  contain "null" at the
start and the end. What have I done wrong?

Q5: How do I prevent my form from being validated when it is displayed the
first time, if the JSP is fronted by an Action?

Q6: Struts 1.1 seems to support multiple resource bundles. How to use it?

Q7: After I replace my  to , my
Javascript document.forms[0].submit() does not work anymore and returns me
"Object doesn't support this property or method". Why?

Q8: How do I configure Struts to intercept requests and perform some logic
before passing them to the controller servlet for processing?

Q9: How do I send binary data to the controller servlet? (e.g. a
Swing-based client sends serialized object to the controller servlet.)

Q10: I want to associate data with  and return the selected
value as a String property in the FormBean. But I got exception coming from

RequestUtils.populate(). Why?

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

Scioworks Camino - "Don't develop Struts Apps without it!"
Copyright (c) 2002 John Yu/Scioworks Technologies. All rights reserved.





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




RE: Call action from JSP

2002-09-05 Thread Tim T. Young


I see nothing wrong with what you are doing.  You don't even need the name
="" in the xml.   You might want to look at  in case you need to
do anything more with maintaining session, etc.

Tim



|+->
||  "Piper, James D CECOM SEC  |
||  EPS"   |
||  <[EMAIL PROTECTED]|
||  .army.mil> |
|| |
||  09/05/2002 01:12 PM|
||  Please respond to "Struts  |
||  Users Mailing List"|
|| |
|+->
  
>---|
  |
   |
  |
   |
  |
   |
  |
   |
  |
   |
  |To: Struts Users Mailing List <[EMAIL PROTECTED]>  
   |
  |cc: 
   |
  |
   |
  |
   |
  |
   |
  |   Subject: RE: Call action from JSP
   |
  
>---|



Caterpillar: Confidential Green  Retain Until: 10/05/2002
 Retention Category:  G90 -
 Information and Reports





I am new to struts and I don't know if this is of any use or if it is even
right, but when I wanted to call an Action when the user clicked a link I
used something like (no forms involved):

Build Database: Button

and in my struts-config.xml had something like:

 


 

I left name="" because I wasn't doing anything with a form, just responding
to a user clicking on a link.  I welcome comments letting me know if this
is
the right way to be doing this or (rather more likely) that I am clueless
and that there is some other struts mechanism I should be using to handle
getting access to the action mappings when no forms are involved.

Thanks,

- Jim



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 05, 2002 1:40 PM
To: Struts Users Mailing List
Subject: RE: Call action from JSP



I don't use form because I don't need to submit any data. The action will
perform some logic against query string in request and data in session, and
forward wither to a success page or a failure page.

I could put this logic directly in JSP rather than in an action, but I
don't want so many Java code in JSP.





  "Galbreath, Mark"

  
  com> cc:

   Subject:  RE: Call action
from JSP
  09/05/2002 12:27

  PM

  Please respond to

  "Struts Users

  Mailing List"








Why would you want to call an Action class directly from a JSP (outside a
form:action block)?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 05, 2002 1:19 PM
To: [EMAIL PROTECTED]
Subject: Call action from JSP


Could someone help me on this code:

In *.jsp:

<%
  if (condition satisfied) {
// how to fill this line to call an action, say invoke.do?
  }
%>

Thanks.


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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







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






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




RE: Call action from JSP

2002-09-05 Thread Tim T. Young


This was sorta mentioned before, but...why not have and index.do instead of
an index.jsp?   Does index.jsp show something to the user or does it just
do some logic and then call the server?
If it does the latter, make it a .do

Tim



   
   
[EMAIL PROTECTED]  
   
om 
   
   
   
09/05/2002 
   
12:58 PM   
   
PleaseTo: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
respond tocc:  
   
"Struts Users  
   
Mailing List"  
   
   
   
 Subject: RE: Call action from JSP 
   
   
   



Caterpillar: Confidential Green  Retain Until: 10/05/2002
 Retention Category:  G90 -
 Information and Reports





The JSP is an index.jsp and condition has to be check there.

If I use response.sendRedirect(URL) in the JSP scriplet, it seems that a
new request is created during redirect. Is there a simple way to keep the
previous request rather than create a new one?




  "Joe Barefoot"

  
  va.com>  cc:

   Subject:  RE: Call action
from JSP
  09/05/2002 12:42

  PM

  Please respond to

  "Struts Users

  Mailing List"






hmmm...why not check your condition and perform this logic in an action
before you even forward to the JSP in the first place?

b.t.w., you can always issue a response.sendRedirect( URL ) in the JSP
scriplet, and give it the URL-mapping for the action you wish to redirect
to.  I don't think that doing this is a great idea, however. :)


peace,
Joe

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 05, 2002 10:40 AM
> To: Struts Users Mailing List
> Subject: RE: Call action from JSP
>
>
>
> I don't use form because I don't need to submit any data. The
> action will
> perform some logic against query string in request and data
> in session, and
> forward wither to a success page or a failure page.
>
> I could put this logic directly in JSP rather than in an action, but I
> don't want so many Java code in JSP.
>
>
>
>
>
>
>   "Galbreath, Mark"
>
>
>"'Struts Users Mailing List'"
> <[EMAIL PROTECTED]>
>   com> cc:
>
>
>Subject:  RE:
> Call action from JSP
>
>   09/05/2002 12:27
>
>
>   PM
>
>
>   Please respond to
>
>
>   "Struts Users
>
>
>   Mailing List"
>
>
>
>
>
>
>
>
>
>
>
> Why would you want to call an Action class directly from a
> JSP (outside a
> form:action block)?
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 05, 2002 1:19 PM
> To: [EMAIL PROTECTED]
> Subject: Call action from JSP
>
>
> Could someone help me on this code:
>
> In *.jsp:
>
> <%
>   if (condition satisfied) {
> // how to fill this line to call an action, say invoke.do?
>   }
> %>
>
> Thanks.
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROT

Re: Call external page

2002-09-05 Thread Tim T. Young


You could just make a link in the jsp instead of going through an action.
If you have to go through an action, mmm, does having redirect="true" make
you able to go to "external" sites?

Tim



   
  
"Benoit Segaert"   
  
 
  
   
  
09/05/2002 03:24   
  
AM   To: [EMAIL PROTECTED]
  
Please respond   cc:   
  
to "Struts Users   
  
Mailing List"  
  
   
  
Subject: Call external page
  
   
  



Caterpillar: Confidential Green  Retain Until: 10/05/2002
 Retention Category:  G90 -
 Information and Reports




How can I call an external site from an Action?

I would like to set the site from struts-config.xml file
and use the Struts forward mechanism.
Example:


http://www.google.be"/>


But the ActionForward accepts only relative redirection.

Could you help me?
Benoit



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






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




Re: tag question

2002-08-29 Thread Tim T. Young


Not tested or anything, but from
http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#image ...





   

Ashish Kulkarni

 

   

08/29/2002 09:33   

AM To: Struts Users Mailing List 
<[EMAIL PROTECTED]>  
Please respond to  cc: 

"Struts Users  

Mailing List"  

   

  Subject:  tag question  

   




Caterpillar: Confidential Green  Retain Until: 09/28/2002
 Retention Category:  G90 -
 Information and Reports





Hi,

How can i handle Mouse Events in  tag, ??my preivous tag when
not using struts was like this, what would be the equivalant struts tag




A$HI$H


-
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes




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




RE: [BEER ] Is it Friday Yet?

2002-08-29 Thread Tim T. Young


Common guys, keeping up is hard enough without having to babelfish
everything!



   
   
"Galbreath,
   
Mark"  
   
  
   
   
   
08/29/2002To: "'Struts Users Mailing List'" 
<[EMAIL PROTECTED]>  
02:33 PM  cc:  
   
Please 
   
respond to 
   
"Struts Users  
   
Mailing List"Subject: RE: [BEER] Is it Friday Yet? 
   
   
   
   
   



Caterpillar: Confidential Green  Retain Until: 09/28/2002
 Retention Category:  G90 -
 Information and Reports




Mon dieu! J'espère pas!

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 29, 2002 3:28 PM

Mais vous reviendrez samedi à la finition ce que vous avez négligé.

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




> -Original Message-
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 29, 2002 3:18 PM
> To: 'Struts Users Mailing List'
> Subject: RE: [BEER] Is it Friday Yet?
>
>
> Je pars du bureau tot pour obtenir une biere.
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 29, 2002 2:21 PM
>
> "Can we have a [Mark] tag added?"
> +1
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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






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




Re: [Proposal] Thread Topic Identification (was [BS] Are we gettingo ff thetopic)

2002-08-29 Thread Tim T. Young


My fear with another list is that good information will be available in
both, and I will have to process 300+ emails a day (2 lists x 150 a list).

Tim



   
   
Cliff Rowley   
   
   
   
   
   
08/29/2002 
   
08:55 AM  To: Struts Users Mailing List 
<[EMAIL PROTECTED]>  
Pleasecc:  
   
respond to 
   
"Struts Users  
   
Mailing List"  
   
 Subject: Re: [Proposal] Thread Topic 
Identification (was [BS] Are we gettingo ff the topic)  
   
   



Caterpillar: Confidential Green  Retain Until: 09/28/2002
 Retention Category:  G90 -
 Information and Reports




It's a good idea, but in practice I think it's going to be a hassle,
especially if this list grows.  Those who are filtering will have to go
through the rigmarole of setting them up again should they have to
reinstall their client.  And new users will also have to start
filtering, and I can foresee lots of posts in the future informing
people of the use of filters etc.

I think it would be a whole lot less hassle to keep a core struts
mailing list, and move off-topic discussions to another list -
'struts-related' or something.  It doesn't seem fair to force those not
interested in the other stuff to take measures to filter it when they're
not even a part of it in the first place :)

On Thu, 2002-08-29 at 14:40, Michael Lee wrote:
> I think a filter is good...the best filter being [OT]
> My 5 c
> add...
> [APPSVR-WLS]
> [APPSVR-JBOSS]
> [WEBSVR-TOMCAT]
> [WEBSVR-JRUN]
> etc...
> Michael Lee
>
> - Original Message -
> From: "Jerry Jalenak" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, August 29, 2002 9:28 AM
> Subject: [Proposal] Thread Topic Identification (was [BS] Are we getting
o
> ff the topic)
>
>
> > 
> >
> > Still chuckling about the Veggie Tales thread from yesterday. Thanks
> > to everyone for lightening up the afternoon!
> >
> > 
> >
> > James Mitchell had a suggestion yesterday about using a [topic] prefix
in
> > the subject line that can be used to filter threads.  I know that I
would
> > use this as I don't really care about how to configure WebSphere or
> JBuilder
> > (no offense intended) to use Struts.  James had a pretty good start on
a
> > list (see below); I vote that we ALL begin trying to use these and
expand
> on
> > them as needed.  It would be nice to be able to limit the number of
> e-mails
> > that we all have to deal with from this list (and all of the others)
that
> we
> > belong to.
> >
> > James List:
> >
> > [DynaForms]
> > [Validator]
> > [Logging]
> > [DTD]
> > [EJB]
> > [i18n]
> > [IDE] - maybe include the name of the IDE?  i.e [IDE-JBuilder]
> > [JSTL]
> > [Modules] or [Sub-Apps]
> > [Struts-Example]
> > [Tiles]
> > [SOAP]
> > [Taglib]
> > [UML]
> >
> > I would like to add
> >
> > [Struts-Config]
> > [Tiles-Config]
> > [Validator-Config]
> >
> > etc.
> >
> > or is this getting to fine-grained?
> >
> >
> > Jerry Jalenak
> > Development Manager, Web Publishing
> > LabOne, Inc.
> > 10101 Renner Blvd.
> > Lenexa, KS  66219
> > (913) 577-1496
> > [EMAIL PROTECTED]
> >
> >
> > This transmission (and any information attached to it) may be
confidential
> and is intended solely for the use of the individual or entity to which
it
> is addressed. If you are not the intended recipient or the person
> responsible for delivering the transmission to the intended recipient, be
> advised that you have received this transmission in error and that any
use,
> dissemination, forwarding, printing, or copying of this information is
> st

Anchors

2002-08-21 Thread Tim T. Young


I need to create a page that will have links on the LH navigation bar to
anchors in the current page.

I would like to know if this first scenario is possible.  I have browsed
some anchor info in the archives but did not see anything that addressed
this exactly.

1. Step One (   /page.do#step1  <-- is this possible?  )
2. Step Two (  /page.do#step2  )
3. Step Three  (  /page.do#step3  )

 
   


 


If page.do is just a forward and has redirect=true will this work?  This
seems to keep the knowledge of the anchors in the page itself and creates
less definition entries.

Or

My second option is to have a definition name for each anchor so I would
have:

1. Step One (   /step1.do )
2. Step Two (  /step2.do  )
3. Step Three  (  /step3.do  )

 
   


 


This would work, but now the anchors are in the xml for Tiles, which I
would rather not have.  Are there other options?

Thanks,
Tim






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




Re:

2002-08-21 Thread Tim T. Young


Someone please correct me if I am wrong, but ...



works doesn't it?  I think I remember doing that before.

Tim



   
   
"Aiken,
   
Weston -   
   
Raleigh, NC"   
   
 
   
  To: <[EMAIL PROTECTED]> 
   
08/21/2002cc:  
   
01:46 PM   
   
Please 
   
respond to 
   
"Struts UsersSubject:  
   
Mailing List"  
   
   
   
   
   



Caterpillar: Confidential Green  Retain Until: 09/20/2002
 Retention Category:  G90 -
 Information and Reports




Is there a struts tag to display a String that has been added to the
Request as an attribute, instead of adding an object with a property and
a getter?

Non Struts way:

<%=request.getAttribute("myattribute")%>

Struts way:

?

The bean:write tag wants an object with a getter and I simply want to
pass a String and pull it out to display it.

Thanks






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




RE: Struts Community is going crazy! :-))

2002-08-19 Thread Tim T. Young


Dan,

That is a great diagram.  It will save me LOADS of time explaining or
training people on Struts...

Thanks for the contribution,
Tim



   

Dan Cancro 

 

   

08/19/2002 

12:17 PM   To: "'Struts Users Mailing List'" 
<[EMAIL PROTECTED]>  
Please respond cc: 

to "Struts 

Users Mailing  

List"  

  Subject: RE: Struts Community is going 
crazy! :-))   
   




Caterpillar: Confidential Green  Retain Until: 09/18/2002
 Retention Category:  G90 -
 Information and Reports




This may or may not be what you're looking for, but I've been trying to
organize patterns in the following diagram that's meant to show, among
other
things, where all the routine http request sub-activities should be coded.
I color coded the activities to identify those that can be coded in more
than one place and so contribute to potentially chaotic designs.  I'll look
over Ted's patterns and see how I can add some of that stuff to the
diagram.

http://members.telocity.com/dcancro/images/eng/Struts_MVC.gif


Dan

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






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




Re: XP (and not the Microsoft kind)

2002-08-16 Thread Tim T. Young


Why is it that everytime I read Agile/XP related material, I feel
energized, inspired and positive, but everytime I am asked to fill out a
Project Definition Report/Architecture Diagram/Test Planblahblah(TPS
Report)blahblah, I feel drained, suffocated, and wasteful?  From the
resources on the article (Jim Highsmith)

Documentation is not Understanding
Formality is not Discipline
Process is not Skill

Amen,
Tim




   
   
Cliff Rowley   
   
   
   
   
   
08/16/2002 
   
01:00 PM  To: [EMAIL PROTECTED]   
   
Pleasecc:  
   
respond to 
   
"Struts Users  
   
Mailing List"  
   
 Subject: XP (and not the Microsoft kind)  
   
   
   



Caterpillar: Confidential Green  Retain Until: 09/15/2002
 Retention Category:  G90 -
 Information and Reports




A bit of off-topic, but it's Friday, so there :)

Today I read an new article on IBM developerWorks on eXtreme
Programming, in which the author pretty much sorts the wheat from the
chaff in explaining XP, and I am very interested.  I'd avoided XP in the
past because all the FUD that surrounds it made it difficult for me to
determine exactly what it was and what it involved without spending a
significant amount of time researching it (time is money!).

Now I am curious as to who is using XP and how true it is to it's
promise of increased collaboration, increased productivity and more
importantly increased project success rate.

Being unedjumucated, I have found it difficult in the past dealing with
projects in the various ways I have experienced.  I've not had a great
time all in all, with too many horror stories for someone with only 4
years professional experience.  I've found myself asking 'why?' quite a
lot, and I've always wondered if there was a better way.  This also has
a lot to do with why I operate as a one man band, and generally try to
avoid 'complicated' development.

If anyone has any views on XP or any real world world experience with
it, I'd love to hear about it.  It appears that XP is being more widely
adopted these days, with JUnit and various other tools available that
support the XP processes.

The article is here, for anyone interested:
http://www-106.ibm.com/developerworks/library/j-xp0813/?n-j-8152
--

Regards

---
 Cliff Rowley| [EMAIL PROTECTED]
 Software Engineer   |   www.doctype.co.uk
 +44 (0) 1206 514263 | www.cliffrowley.com
---


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






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




Re: struts newbie

2002-08-16 Thread Tim T. Young


Hello and welcome!

HTML Tags --> http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html
Bean Tags -->   http://jakarta.apache.org/struts/doc-1.0.2/struts-bean.html
Logic Tags -->
http://jakarta.apache.org/struts/doc-1.0.2/struts-logic.html
Template Tags -->
http://jakarta.apache.org/struts/doc-1.0.2/struts-template.html

Tim



   
 
"Lito Ang" 
 
 
 
   
 
08/16/2002 
 
04:28 AMTo: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
Please respond  cc:
 
to "Struts 
 
Users Mailing  
 
List"  
 
   Subject: struts newbie  
 
   
 



Caterpillar: Confidential Green  Retain Until: 09/15/2002
 Retention Category:  G90 -
 Information and Reports




hi,

i'm new to struts. just want to ask where i can
find detailed references to the struts tag libraries
as well as examples on their usage.

:)



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






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




Re: error handling in jsp

2002-08-15 Thread Tim T. Young


I would be curious to see if anyone has a design for this.  I fixed it by
moving to Tiles, as it handles errors much better.  It is a little more
complex than straight templates, but it is worth it once you do your first
"extends" definition and realize the possibilities...

Tim




   
   
"Billy Ng" 
   
  
   
   
   
08/15/2002 
   
11:29 AM  To: [EMAIL PROTECTED]   
   
Pleasecc:  
   
respond to 
   
"Struts Users  
   
Mailing List"  
   
 Subject: error handling in jsp
   
   
   



Caterpillar: Confidential Green  Retain Until: 09/14/2002
 Retention Category:  G90 -
 Information and Reports




Hi folks,

I am using struts-template.tld to generate the pages.  For example,

<%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %>






When any exception is thrown in the content.jsp, the page will display with

header only.  I want to display the error_content.jsp if any eception is
thrown in content.jsp is caught.  Would anybody please share how you handle

this, thanks!

Billy Ng

_
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx


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






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




RE: Use of Iterator tag

2002-08-14 Thread Tim T. Young


Refactor mercilessly!  :)

Tim



   
   
"nathan
   
phillips"  
   
  
   
   
   
08/14/2002To: [EMAIL PROTECTED]   
   
12:21 PM  cc:  
   
Please 
   
respond to 
   
"Struts Users  
   
Mailing List"Subject: RE: Use of Iterator tag  
   
   
   
   
   



Caterpillar: Confidential Green  Retain Until: 09/13/2002
 Retention Category:  G90 -
 Information and Reports





Actually I have a large object base that contains objects with iterator
methods.  I didn't want to disturb it by writing "getIterator" methods.
Thanks for your help though.



From: "Kamholz, Keith   (corp-staff) USX" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: RE: Use of Iterator tag
Date: Wed, 14 Aug 2002 13:14:45 -0400
MIME-Version: 1.0
Received: from nagoya.betaversion.org ([192.18.49.131]) by
mc2-f27.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Wed, 14
Aug
2002 10:16:59 -0700
Received: (qmail 85 invoked by uid 97); 14 Aug 2002 17:16:26 -
Received: (qmail 31 invoked by uid 98); 14 Aug 2002 17:16:25 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Unsubscribe: 
List-Subscribe: 
List-Help: 
List-Post: 
List-Id: "Struts Users Mailing List" 
Delivered-To: mailing list [EMAIL PROTECTED]
X-Antivirus: nagoya (v4198 created Apr 24 2002)
Message-ID: <[EMAIL PROTECTED]>
X-Mailer: Internet Mail Service (5.5.2653.19)
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
Return-Path:
[EMAIL PROTECTED]
X-OriginalArrivalTime: 14 Aug 2002 17:17:01.0035 (UTC)
FILETIME=[66F6BBB0:01C243B6]

You're trying to bypass the internal workings of struts.  That's just the
way struts works, if you want to pull the iterator out of the bean, you
need
the get method.  If you want to keep the iterator method only because it's
used else where and you don't want to change it in those places, I suppose
you could have both.  It results in slightly longer code, but you could
have
both if you wanted to.

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


-Original Message-
From: nathan phillips [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 14, 2002 1:12 PM
To: [EMAIL PROTECTED]
Subject: RE: Use of Iterator tag


I simply have a method named "iterator" in my bean that I'd like to use.
If

I rename it to "getIterator" then it works fine.  However, I don't want to
rename my method to "getIterator."  Any ideas?


From: "Kamholz, Keith   (corp-staff) USX" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: RE: Use of Iterator tag
Date: Wed, 14 Aug 2002 13:00:31 -0400
MIME-Version: 1.0
Received: from nagoya.betaversion.org ([192.18.49.131]) by
mc2-f26.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Wed, 14
Aug

2002 10:02:55 -0700
Received: (qmail 18489 invoked by uid 97); 14 Aug 2002 17:02:12 -
Received: (qmail 18438 invoked by uid 98); 14 Aug 2002 17:02:12 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Unsubscribe: 
List-Subscribe: 
List-Help: 

Re: No getter error

2002-08-13 Thread Tim T. Young


I get that error when I add a property to a bean (with, in my case,
Websphere still running) and then try to add that new property to a tag,
and then run it.  Struts caches the PropertyDescriptors and so I end up
having to restart Websphere to pick up the changes.

Tim



   
   
"Sri   
   
Sankaran"  
   
  
   
   
   
08/13/2002To: "Struts-User" <[EMAIL PROTECTED]>   
   
08:44 AM  cc:  
   
Please 
   
respond to 
   
"Struts Users  
   
Mailing List"Subject: No getter error  
   
   
   
   
   



Caterpillar: Confidential Green  Retain Until: 09/12/2002
 Retention Category:  G90 -
 Information and Reports




Using Struts 1.0.2 on Tomcat 4.0.2

I am blue in the face having stared at this error for the last several
hours and can't figure out what is wrong.

The problem:  When attempting to display a page I receive the error "No
getter method for property itemsArray of bean cart"
Page snippet:

  

  


My struts-config has:





What am I doing wrong.  The same pattern works flawlessly on other pages.
TIA
Sri





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




Re: Newbie iterate problem

2002-08-12 Thread Tim T. Young


Hi Tracy.  Your code looks correct, so you might try tracing through the
iterate tag and the write tag to get a better idea of the problem.  I had
to do that several times before when I get those types of errors that
aren't obvious.  Start at the write tag to see what it is getting (and what
it is trying to look up) and work your way back.

Tim



   
   
"Nelson,   
   
Tracy (ETW)"   
   
 
   
   
   
08/12/2002To: "Struts user list (E-mail)" 
<[EMAIL PROTECTED]>
03:00 PM  cc:  
   
Please 
   
respond to 
   
"Struts Users  
   
Mailing List"Subject: Newbie iterate problem   
   
   
   
   
   



Caterpillar: Confidential Green  Retain Until: 09/11/2002
 Retention Category:  G90 -
 Information and Reports




I'm coming up to speed with Struts, and I can't seem to figure out the
 tag.  I've got:


 ...


I keep getting a "cannot find bean logo in scope null" error.  Do I have to
have an instance of the bean in the request?  I've tried specifying both
session and request scoping, and I've specified the type of the bean, but I
can't seem to get an instance created.  Is this something that Struts is
supposed to do, or is that something that is my responsibility?

Thanks!
-- Tracy Nelson
"Yes, learning Struts is a little like having bees live in your head.
Butthere they are!"


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






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




Re: How do you handle non-text data in Struts forms?

2002-08-12 Thread Tim T. Young


I tend not to mix my ActionForms and any "business" type classes at all.
I keep the forms lightweight, even "dumb" by having only string data (this
also supports redisplay properly) In the action I take the data out of the
form and give it to the business layer.  This is 2-way separation - Struts
doesn't know about my app specific logic and my app specific logic (and
data) does not know about Struts).  A class like Money and MoneyForm will
look and feel like a bit of duplication, but as design goes (balancing of
forces and all that) I tolerate the duplication for the benefit of the
separation.  This way as Struts changes you can "upgrade" without worrrying
about new behaviors or features in the forms, etc.  And if you ever (God
forbid) had to get away from Struts, it would be a easy split on your app
code.

Tim



   
   
BootedBear 
   
 
   
   
   
08/12/2002 11:47   
   
AMTo: [EMAIL PROTECTED]   
   
Please respond to cc:  
   
"Struts Users  
   
Mailing List"  
   
   
   
 Subject: How do you handle non-text 
data in Struts forms?
   
   



Caterpillar: Confidential Green  Retain Until: 09/11/2002
 Retention Category:  G90 -
 Information and Reports




Hello all, Struts newbie here. I'm in the process of evaluating Struts for
use in a project and one of the criteria I'm checking out is how to deal
with non-text data to and from a form.

For my test case I coded a fairly simple Money class that represents a
currency value (stored internally as an integer value of pennies). This
class has a factory method that can construct a Money instance from a
parsed text field, and has a toString() method that returns the value
formatted as its textual equivalent.

So in my AmountForm (extending ActionForm) I have the following instance
variable, setter, and getter for a field with the key "amount":

   private Money amount = null;

   public void setAmount( String text ) {
 this.amount = Money.parseText( text );
   }

   public String getAmount() {
 return this.amount.toString();
   }

So far, so good.

But of course, my actions aren't really interested in the text format of
the field, but in the Money instance itself. So I changed the getter to:

   public Money getAmount() {
 return this.amount;
   }

Figuring that because Money has a toString() method, that all would be
well: my actions could obtain the Money instance, and Struts could obtain
the text format for displaying on the pages.

Well, that broke things. Strangely enough, the symptom of the above change
seems to cause the setter to not be called upon form submission (all seems
to go well with the getter itself -- curious).

I'm not sure why the symptoms of the failure are as such, but my question
boils down to this:

What patterns do you use to handle this type of non-textual data in your
Struts forms?

Do you create 2 getters: the bean-patterned setter to return the text
value, AND a getter to get the Money (or other non-text) class instance? As
in:

   public String getAmount() { return this.amount.toString(); }
   public Money getMoneyAmount() { return this.amount; }

This seems rather messy to me, and since this is probably a common
requirement (use of non-text data), I figured someone must have come up
with a better pattern.

Thanks for any input you all might have!

bear


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

Re: Differentiating between to two actions

2002-08-09 Thread Tim T. Young

I think in this case you will need your onchange to set a flag (hidden
field) indicating which list was used, then submit the form.  In your
actionform you would need a corresponding property.
Then in the servlet you then could ask the actionform for the flag.

Tim




"vk vk"




08/08/2002

07:30 AM   To: [EMAIL PROTECTED]

Please respond cc:

to "Struts

Users Mailing

List"

  Subject: Differentiating
between to two actions




Caterpillar: Confidential Green  Retain Until: 09/07/2002
 Retention Category:  G90 -
 Information and Reports




Hi,
   I am using STRUTS 1.0.2. I have two List boxes on page. Which are used
to
to query DB to bring some results. My problem is there anyway to
distinguish
in action class which list box is used. my code looks like this. I am using

javascript to kick of an action on 'oncahnge'. But every time i do onchange

both list list box are called.


  

 




   
  
  
   
thanks in advance.

Cheers
vkvk






_
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx


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






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





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




Re: Newbie question on displaying lists

2002-08-09 Thread Tim T. Young


Couple of ways I have handled this...

1) Don't go to a page directly (*.jsp), go to an Action (*.do) first to
prep the form and put it in whatever scope you have it configured for
(request, session, etc).  Some people don't care for these "preparing"
actions, though.  Like any design you have to balance the pros and cons.

2) The form could directly call your business layer to get the data.  I
don't really like this, but have done it for short, static lists before.

There are probably other ways, I'm sure others have used different methods.

Tim





   

Ray

 

   

08/09/2002 

09:09 AM   To: [EMAIL PROTECTED]  

Please respond cc: 

to "Struts 

Users Mailing  

List"  

  Subject: Newbie question on displaying 
lists 
   




Caterpillar: Confidential Green  Retain Until: 09/08/2002
 Retention Category:  G90 -
 Information and Reports




Hello there  :-)

I'm playing around with struts at the moment (very impressive work), but I
seem to have got myself into a little trouble.

I'm writing a web application, that lists the contents of a database table
as soon as you hit the page.

Now so far, I've been working on just submitting forms, which seems to be
Ok.

But what is the approach, if I have to retrieve information and display it
*before* anything gets submitted?

Do I build my display page as a form; how do I populate it before
submission?

If someone could point me in the right direction, that would be great.

Thanks in advance:-)

Ray


__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

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






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




RE: Sample implementation of Applications using Struts. (aka Life, theUniverse, and Everything)

2002-07-31 Thread Tim T. Young


Just hang around this list and you will get more information than you can
process in any given day about Struts, DBs, J2EE containers, beer, design
patternsand stick around for casual Fridays too!

Tim



   
   
Vikramjit Singh
   
 
   
   
   
07/31/2002 03:24   
   
AMTo: "'Struts Users Mailing List'" 
<[EMAIL PROTECTED]>  
Please respond to cc:  
   
"Struts Users  
   
Mailing List"  
   
   
   
 Subject: RE: Sample implementation of 
Applications using Struts. 
   
   



Caterpillar: Confidential Green  Retain Until: 08/30/2002
 Retention Category:  G90 -
 Information and Reports




http://jakarta.apache.org/struts/resources/examples.html

Regards,
Vikramjit Singh,
Systems Engineer,
GTL Ltd.
Ph. 7612929-1059


-Original Message-
From: Atul A Gohad [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 31, 2002 12:46 AM
To: [EMAIL PROTECTED]
Subject: Sample implementation of Applications using Struts.


Hi All Strut USERS,

Since i am new to struts, wanted to know, from where can i get a
sample application code, to have a look and use as a reference, while i
study struts.

any other pointers, suggestions are welcome.

Best Regards,
Atul.

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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






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




Re: invalid e-mail address

2002-07-30 Thread Tim T. Young


Is anyone else getting this bounce when posting to the list?  Is it
possible to remove the offending address?

Tim




   
  
"AutoReply,
  
Invitrogen.com"
  
 
  
   
  
07/30/2002 12:30 To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> 
  
PM   cc:   
  
   
  
   
  
   
  
Subject: invalid e-mail address
  
   
  



Caterpillar: Confidential Green  Retain Until: 08/29/2002
 Retention Category:  G90 -
 Information and Reports




You have sent an e-mail to an address at invitrogen.com that is no longer
valid.

If you would like to place an order, please resend your email to
"[EMAIL PROTECTED] "

If you require Technical Service, please resend your email to
"[EMAIL PROTECTED] "

If you require immediate assistance, please call us at 1-800-955-6288.

Thank you,

Invitrogen Corporation







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




Re: How to install Struts 1.1b on WebSphere 3.5.4 (Missing ressourcesattribute org.apache.struts.action.MESSAGE)

2002-07-30 Thread Tim T. Young


You will want to add the path of that resource file to your webapp's
classpath. (Or put the resource file, with any corresponding directory
structure, into a path that is already in the classpath.)

Tim



   

"Renato

Aganippe"  

 

   

07/30/2002 To: <[EMAIL PROTECTED]>

12:03 PM   cc: 

Please respond 

to "Struts 

Users Mailing  

List" Subject: How to install Struts 1.1b on 
WebSphere 3.5.4 (Missing ressources attribute 
  org.apache.struts.action.MESSAGE)

   




Caterpillar: Confidential Green  Retain Until: 08/29/2002
 Retention Category:  G90 -
 Information and Reports




Hi everybody!

I'm triyng to put Struts 1.1b on WebSphere 3.5.4 but I have the following
message :
Message : Server caught unhandled exception from servlet [Activateur de
service de fichiers]: Server caught unhandled exception from servlet
[Processeur JSP 1.1]: Missing resources attribute
org.apache.struts.action.MESSAGE

Does anybody have an idea? (I understand that the ressource file is not
availaible but where do I have to put it to make it available)

Then, is there someone who knows where I get an installation guide for
struts 1.1b on WebSphere 3.5.4?

Thanks a lot!

Renato Aganippe
Cardiweb
Web Developer





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




Conversion from templates (Struts 1.0.2) to Tiles

2002-07-26 Thread Tim T. Young


I am converting a couple of test pages from templates in Struts 1.0.2 to
use Tiles.  My question is, how do I do something like this:

 
  
 
 
 



 


Can I use "extends" to turn the "sidebar" off?  From a couple of quick
tests this seems not to work (it tries to load a file called "" and
understandably fails)  The template stuff in Struts 1.0.2 was forgiving
enough to treat "" as nothing and would just return null or empty string or
something from the tag, not an error or anything.

Any info would be appreciated...
Tim


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




RE: Tiles and Struts 1.0.2?

2002-07-25 Thread Tim T. Young


Thanks, seems I was overlooking it in the zip file.  Of course the next
question is, where is the source for that jar?

Tim



   
 
esther.miranda@glob
 
alsign.net 
 
   
 
07/25/2002 01:12 AM
 
Please respond to  
 
"Struts Users   To: [EMAIL PROTECTED] 
 
Mailing List"   cc:
 
   
 
   
 
   
 
   Subject: RE: Tiles and Struts 
1.0.2? 
   
 



Caterpillar: Confidential Green  Retain Until: 08/24/2002
 Retention Category:  G90 -
 Information and Reports




The Tiles site (http://www.lifl.fr/~dumoulin/tiles/) is the place to go.
The binary download (tiles.zip for ex.) contains the
'tilesForStruts1.0.jar'
you mention and also a 'tiles-blank-struts1-0.war to help you get started.

g
Esther

> -Original Message-
> From: Tim T. Young [mailto:[EMAIL PROTECTED]]
> Sent: woensdag 24 juli 2002 18:04
> To: Struts Users Mailing List
> Subject: Tiles and Struts 1.0.2?
>
>
> I am looking for the Tiles version that works with Struts
> 1.0.2.  Google,
> the Tiles site, etc have not helped.  I have seen mention of
> a file called
> tilesForStruts1.0.jar but I cannot find anywhere.  (Of course
> I would love
> to upgrade to the latest of everything Struts/Tiles/etc but
> VAJ is holding
> me back with clashes with JAXP 1.1.  WSAD is months away for me also.)
> Maybe I am just overlooking the link or something...
>
> Thanks!
> Tim
>
>
> --
> 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: Best way to get a Form's content

2002-07-24 Thread Tim T. Young


You could 





I tend to do that to get away from calling getters, plus if you use it in
the jsp more than once you already have it defined.

Tim



   
   
Struts 
   
Newsgroup  
   
 (
   
   
   
07/24/2002To: [EMAIL PROTECTED]   
   
11:55 AM  cc:  
   
Please 
   
respond to 
   
"Struts Users  
   
Mailing List"Subject: Best way to get a Form's content 
   
   
   
   
   



Caterpillar: Confidential Green  Retain Until: 08/23/2002
 Retention Category:  G90 -
 Information and Reports




Subject: Best way to get a Form's content
From: "Matt Raible" <[EMAIL PROTECTED]>
 ===
Is this the best way to get a bean's values for parameter substitution?






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






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




Tiles and Struts 1.0.2?

2002-07-24 Thread Tim T. Young

I am looking for the Tiles version that works with Struts 1.0.2.  Google,
the Tiles site, etc have not helped.  I have seen mention of a file called
tilesForStruts1.0.jar but I cannot find anywhere.  (Of course I would love
to upgrade to the latest of everything Struts/Tiles/etc but VAJ is holding
me back with clashes with JAXP 1.1.  WSAD is months away for me also.)
Maybe I am just overlooking the link or something...

Thanks!
Tim


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




Re: WEB-INF/web.xml hardcoded in initServlet() [struts 1.0.2]

2002-07-11 Thread Tim T. Young


Yes VAJ/WTE is a pain, but it is ok to have the same configuration in the
webapp file and the web.xml file.

Like this...


action
*.do
  

and the actual servlet definition, etc.   If you deploy WAS 3.5.x running
in compatibility mode you have to do the same kinda thing in that
environment.   Everything will work in the end though.

Tim




   
   
"Craig R.  
   
McClanahan"
   
   
   
   
   
07/11/2002To: Struts Users Mailing List 
<[EMAIL PROTECTED]>  
01:10 PM  cc:  
   
Please 
   
respond to 
   
"Struts Users  
   
Mailing List"Subject: Re: WEB-INF/web.xml hardcoded in 
initServlet() [struts 1.0.2]   
   
   
   
   



Caterpillar: Confidential Green  Retain Until: 08/10/2002
 Retention Category:  G90 -
 Information and Reports






On Thu, 11 Jul 2002 [EMAIL PROTECTED] wrote:

> Date: Thu, 11 Jul 2002 17:40:38 +0200
> From: [EMAIL PROTECTED]
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: WEB-INF/web.xml hardcoded in initServlet() [struts 1.0.2]
>
> Hi !
>
> I am using Struts 1.0.2 under Visual Age for Java 3.5.3 and Websphere
Test
> Environment ; the architecture is not fully J2EE. In particular, WTE does
> not parse the WEB-INF/web.xml file but another file with a similar syntax
> (xxx_app.webapp) : this is where it finds the mappings for the servlets
> (*.jsp -> jasper ; *.do -> Struts for instance).
> Unfortunately, the WEB-INF/web.xml file is hardcoded in the initServlet()
> method of the ActionServlet class ; it seems that this method parses the
> file to store the mapping of the current servlet. This code, in my
> environment, fails, but since a catch Throwable is done, the process goes
> on. But, the ServletMapping variable has not been valued.
> So, my question is : though everything seems to be working all right, am
I
> to expect a problem because of this ? And, subsequently, why does the
> controller servlet need to know the original mapping, since this topic is
> handled by the servlet container ? Can I go on in this situation without
> fearing a future problem ?
>

Struts needs to know which mapping is used so that it can construct an
appropriate URL for  links where you specify the action path
only in the "action" parameter.  For example, if your struts-config.xml
says:

  ...
  
  ...

and your JSP says:

  

then Struts needs to know what extension to add (if you do extension
mapping) or what path prefix to stick on the front (if you are using path
mapping).

Struts is designed to operate only in containers that are compliant with
the specifications.  I'm not really interested in making accomodiations
for things like this -- I would suggest that WTE be changed to use the
standard deployment descriptors.

In the mean time, can you just ensure that the mapping is defined in both
files?



> Thanks for any explanation.
>
> Olivier Schmeltzer
>

Craig


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






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




Re: License and copyrighted code

2002-06-26 Thread Tim T. Young


Thanks Craig, this information will help me explain that the risk is low
(and I like your point that the same risk is also present with in-house
developers, too).

Thanks,
Tim



   
   
"Craig R.  
   
McClanahan"
   
   
   
   
   
06/26/2002To: Struts Users Mailing List 
<[EMAIL PROTECTED]>  
11:49 AM  cc:  
   
Please 
   
respond to 
   
"Struts Users  
   
Mailing List"Subject: Re: License and copyrighted code 
   
   
   
   
   



Caterpillar: Confidential Green  Retain Until: 07/26/2002
 Retention Category:  G90 -
 Information and Reports






On Wed, 26 Jun 2002, Tim T. Young wrote:

> Date: Wed, 26 Jun 2002 10:44:25 -0500
> From: Tim T. Young <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: License and copyrighted code
>
>
> I am preparing technical and business information to deliver to a
> technology group
> at my firm.  I know the issue of licensing and copyright will come up and
> of course I
> have read and studied the Apache license.  One question I know will be
> asked is this:
> How does the Apache process (with its commiters, etc) ensure
> non-copyrighted code
> from "someplace else" does not get into the distribution?
>

Committers on Apache projects, among other things, agree to the the terms
of the Contributor License Agreement
<http://jakarta.apache.org/site/agreement.html>, which requires them to
assert that they have the legal rights to grant the specified license to
the code (that they contribute) to the Apache Software Foundation, which
is the legal owner of all the code.  It is primarily a matter of self
policing, but the process of becoming a committer is also a pretty high
barrier -- the other committers have to get to know you and trust you
before they are voted in.

In addition, the source code of every single CVS commit is mirrored to the
appropriate developer mailing list (STRUTS-DEV for Struts code).  There,
it can be reviewed for licensing problems (such as a company agreeing to
contribute code but forgetting to remove the old license first -- I've had
to clean up a few of those for my employer (Sun) on occasion) as well as
code quality.  So, it is not possible to "sneak" code in that is clearly
not licensed to Apache correctly.

> The probability of this happening is probably not statistically
significant
> but I need to
> be able to point to facts that supports the statement that this will
never
> happen, ie my
> opinion (even the opinion of all of the users on this list) would not
> necessarily be enough
> to convice this group that there is no risk of it happening.
>

There is no such thing as zero risk.  In practice, this hasn't been an
issue on the Apache projects I've been involved in (primarily Tomcat,
Struts, and Commons) over the last several years.

Having worked in both closed source and open source environments, I can
also see the relevance of assertions by some that closed source
development efforts are *more* susceptible to this exact problem than open
source ones, precisely because the open source community can review every
submission.  How do you kno

Re: ActionError strange behavior

2002-06-26 Thread Tim T. Young


In your ApplicationResources.properties file put errors.header= and
errors.footer= lines with either something meaningful or just nothing and
they will go away.

Tim



   
   
Oren Gross 
   
  
   
   
   
06/26/2002 
   
11:17 AM  To: "Struts User (E-mail)" 
<[EMAIL PROTECTED]> 
Pleasecc:  
   
respond to 
   
"Struts Users  
   
Mailing List"  
   
 Subject: ActionError strange behavior 
   
   
   



Caterpillar: Confidential Green  Retain Until: 07/26/2002
 Retention Category:  G90 -
 Information and Reports




Quick one pals: I'm using ActionError, and in my input form, when ever
there
is an error to present, and for instance I use , I am getting "null" string before and after the
message, any ideas?
TIA Oren

-

Oren Gross Java(TM) Developer

Mercury Interactive APM TAC R&D

+972-3-5399407 [EMAIL PROTECTED]







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




License and copyrighted code

2002-06-26 Thread Tim T. Young


I am preparing technical and business information to deliver to a
technology group
at my firm.  I know the issue of licensing and copyright will come up and
of course I
have read and studied the Apache license.  One question I know will be
asked is this:
How does the Apache process (with its commiters, etc) ensure
non-copyrighted code
from "someplace else" does not get into the distribution?

The probability of this happening is probably not statistically significant
but I need to
be able to point to facts that supports the statement that this will never
happen, ie my
opinion (even the opinion of all of the users on this list) would not
necessarily be enough
to convice this group that there is no risk of it happening.

I would appreciate any information on this subject.
Thank you,
Tim


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




DispatchAction

2002-06-25 Thread Tim T. Young


I am using a subclass of DispatchAction to route multiple operations (add,
delete, etc) to methods
of the same name.  I have named all of the buttons the same and used that
name in the parameter
entry of the action mapping (not concerned with i18n).  The quirk I have
found is that since my buttons
are "Add", "Delete", etc my method names have to be capitalized too.  Which
is not standard convention
and people wonder what the heck I am doing.

Any thoughts?

(Using 1.0.2)

Thanks,
Tim


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




Re: html:errors tag funny null strings

2002-06-20 Thread Tim T. Young


Are you using Websphere?  If you are, when null String objects get written
to a jsp
they produce a "null".  Early versions of Websphere did not do this but we
had problems
starting with version 3.5.3.

I just put a errors.header= and errors.footer= in the properties file and
it takes care of it,
since I didn't have anything I wanted to display like in the example below.

Tim



   

Jan Fetyko 

 

   

06/20/2002 

02:48 PM   To: Struts Users Mailing List 
<[EMAIL PROTECTED]>  
Please respond cc: 

to "Struts 

Users Mailing  

List"  

  Subject: Re: html:errors tag funny null 
strings  
   




Caterpillar: Confidential Green  Retain Until: 07/20/2002
 Retention Category:  G90 -
 Information and Reports




Actualy I'm not missing the entry for the error, since it gets writen to
the page, but there are aditional "null" strings.

I have this in properties file:

text.login.password.error=Password is required

on the jsp page I have



but the output on the page is not just: "Password is required"
but : "null Password is required null".

Does that make sense ?

Jf

Celestino Pena wrote:
> In your properties file you are missing entries for "errors" as in...
>
> errors.header=Validation ErrorYou must
> correct the following error(s) before proceeding:
> errors.footer=
>
>
> -Original Message-
> From: Jan Fetyko [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 20, 2002 1:51 PM
> To: Struts Users Mailing List
> Subject: html:errors tag funny null strings
>
>
> Hi,
>
> I'm using the  tag to display errors after
> the form validation fails. The problem is that when the error is
> displayed it contains a "null" string at the begining and at the end on
> the actual error message. Ex.: "null Password is required null".
>
> What's going on ? Is this fix-able ?
>
> Jf
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>
>
>



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






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