RE: Taking only the first value in a list?

2003-10-03 Thread Michael Ruppin
Perhaps if you posted some code someone could provide more specific help.

m

--- "Smith, Johnathan M." <[EMAIL PROTECTED]> wrote:
> Does not work!
> 
> -Original Message-----
> From: Michael Ruppin [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 03, 2003 4:20 PM
> To: Struts Users Mailing List
> Subject: Re: Taking only the first value in a list?
> 
> 
> Try 
> 
> m
> 
> --- "Smith, Johnathan M." <[EMAIL PROTECTED]> wrote:
> > 
> > I have bean in struts that returns a list of names how can I only take the
> > first name out of the list?
> > 
> > 
> > Please do not transmit orders or instructions regarding a UBS account by
> > email. The information provided in this email or any attachments is not an
> > official transaction confirmation or account statement. For your
> protection,
> > do not include account numbers, Social Security numbers, credit card
> > numbers, passwords or other non-public information in your email. Because
> > the information contained in this message may be privileged, confidential,
> > proprietary or otherwise protected from disclosure, please notify us
> > immediately by replying to this message and deleting it from your computer
> > if you have received this communication in error.  Thank you.
> > 
> > UBS Financial Services Inc.
> > UBS International Inc.
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> Please do not transmit orders or instructions regarding a UBS account by
> email. The information provided in this email or any attachments is not an
> official transaction confirmation or account statement. For your protection,
> do not include account numbers, Social Security numbers, credit card
> numbers, passwords or other non-public information in your email. Because
> the information contained in this message may be privileged, confidential,
> proprietary or otherwise protected from disclosure, please notify us
> immediately by replying to this message and deleting it from your computer
> if you have received this communication in error.  Thank you.
> 
> UBS Financial Services Inc.
> UBS International Inc.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Re: Taking only the first value in a list?

2003-10-03 Thread Michael Ruppin
Try 

m

--- "Smith, Johnathan M." <[EMAIL PROTECTED]> wrote:
> 
> I have bean in struts that returns a list of names how can I only take the
> first name out of the list?
> 
> 
> Please do not transmit orders or instructions regarding a UBS account by
> email. The information provided in this email or any attachments is not an
> official transaction confirmation or account statement. For your protection,
> do not include account numbers, Social Security numbers, credit card
> numbers, passwords or other non-public information in your email. Because
> the information contained in this message may be privileged, confidential,
> proprietary or otherwise protected from disclosure, please notify us
> immediately by replying to this message and deleting it from your computer
> if you have received this communication in error.  Thank you.
> 
> UBS Financial Services Inc.
> UBS International Inc.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Re: Handling Exceptions in ActionForm

2003-10-03 Thread Michael Ruppin
At your own risk, manipulate the ActionErrors and ActionMessages collections any way 
you like. 
They're in the request scope and named according to Globals.ERROR_KEY and 
Globals.MESSAGE_KEY.

m

--- Shane Mingins <[EMAIL PROTECTED]> wrote:
> Hi
> 
> I have a Swing app where the SwingView implements the view interface and has
> a method duplicateException(String s).
> 
> In the SwingView it is implemented as
> 
> public void duplicateException(String duplicateName)
> {
> JOptionPane.showMessageDialog(this, "That would result in a duplicate
> Channel", "Duplicate Channel",
>  JOptionPane.ERROR_MESSAGE);
> }
> 
> So if the business layer finds a duplicate it can inform the presentation
> layer.  I am wondering how this would map on Struts?
> 
> Using Struts, if I have an ActionForm implement the view interface, how
> would it create an ActionError or ActionMessage?  It seems that from an
> ActionForm the validate() method can do it, and an Action can do it but is
> it possible to create an ActionError and save it from my
> duplicateException() method?
> 
> Could I perhaps have my duplicateException() method add to collection
> variable in the ActionForm and then have the validate() method check that
> collection and generate the required ActionErrors?  
> 
> Any thoughts?
> 
> Shane
> 
> 
> Shane Mingins
> Analyst Programmer
> Assure NZ Ltd
> Ph 644 494 2522
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



RE: can not get bean property, help!!

2003-10-03 Thread Michael Ruppin
The actionformbean has not been specified anywhere in this code snippet.  Try adding 
 before the  where "foo" is the instance of the 
actionformbean you
have instantiated.

m

--- "Karr, David" <[EMAIL PROTECTED]> wrote:
> That's a different error.  You always have to quote attribute values.
> Start with that, and focus on the other problem.  Try restating your
> problem, showing exactly what you have and what error you're getting.
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> > 
> > thank you, David, actually i tried single quote '   ...' 
> > before, however 
> > it doesnt work, always  gave me
> > Cannot retrieve mapping for action /'  error
> > 
> > > -Original Message-
> > > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] 
> > > 
> > > Hi, I have an attribute called "actionName" in my actionformbean
> > > and I set it properly in my action class before forward to my jsp
> > > in the jsp I try to retrieve it like this:
> > > >
> > > ...
> > > ...
> > > 
> > > 
> > > it always gives me "Attribute value must be quoted" error 
> > message in 
> > > action.jsp
> > > anything wrong ?
> > 
> > Well, I don't know how much clearer that error message could be.  You
> > need to change this:
> > 
> > >
> > 
> > To:
> > 
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Re: [POLL] ActionFrom vs DynaActionForm

2003-09-30 Thread Michael Ruppin
+1 (#1).

m

--- Brandon Goodin <[EMAIL PROTECTED]> wrote:
> #1
> 
> Reasons:
> -Dynas massive struts configs are annoying and the runtime errors
> bite.
> -DynaForm time saving is insignificant (how long does it take for your
> ide to generate getters/setters?).
> -Refactoring is easier is traditional ActionForms
> -Also, for all the time that you spend restarting your tomcat for each
> change you make to the config you could make changes to a hard class
> more easily and let the classloader reaload it instead of the whole
> container.
> -An ActionForm is more cleanly organized in package structures (not
> configs).
> -DynaForms also have limitations in regards to the use of LazyList
> -DynaForms also make extending more difficult
> -DynaForms also don't have traditional getters and setter for the times
> that you want to insert code into them (personally, I use them quite
> often cuz I don't like huge Action classes)
> 
> That said... I am not completely anti Dyna. I just don't see the value
> in using them for everything. I've used them for my whole app and didn't
> find them that useful. But, I have used them in niche cases where I
> wanted to enhance chained action classes (see http://strutschaining.org/
> ). But, even that can be solved with a mapped back form.
> 
> IMAO - I do not see the case for DynaForms. But, I am willing to be
> convinced.
> 
> Brandon Goodin
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



RE: [Poll] action mappings

2003-09-25 Thread Michael Ruppin
+1 (#3)

--- "Mainguy, Mike" <[EMAIL PROTECTED]> wrote:
> #2 and #3 are, to me, flip sides of the same coin.  Our team is really
> divided over which is better.  Currently, we're using #3 and I personally
> think it's the best way, but, the argument that has been made that it is
> much simpler to understand the application if there is a 1 to 1 mapping and
> developers can more readily see the flow of information in a class diagram.
> The other advantage that has been proposed is that you can then use your
> containers security mechanism to limit access based on Role without
> resorting to custom code.
> 
> My point of contention is that I don't want to have 4 classes for every
> single screen (1 for Create, Read, Update, and Delete) plus 4 action
> mappings...  It may be ok for a simple system, but in a large system I can
> see that becoming unmanageable very quickly.  Not only that, but I tend to
> make my apps very stateless, so, every single request needs to use the Read
> operation so I end up with a bunch of duplicate code (i.e. Update and Create
> also need to perhaps call read when they are done).
> 
> 
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> 
> Sent: Thursday, September 25, 2003 10:25 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [Poll] action mappings
> 
> 
> Thats what prompted me to vote for 2...
> Why to have unnecessary have this case statement in every action?
> 
> HAve the actions as simple handlers.Performing just simple atomic operations
> and acting on whatever configuration they are provided to decide navigation
> 
> Something like 
> 
> execute(){
> //Getdata from form bean
> //validate(if automatic validation turned off or u have special validation
> requirements) //model.getData or model.updateData //may be form.setData
> return mapping.findForward("success"); }
> 
> 
> And the voing results are wrong..I have seen 2 votes to #2 including
> myself..
> 
> 
> -Original Message-
> From: Mainguy, Mike [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 25, 2003 3:47 PM
> To: 'Struts Users Mailing List'
> Subject: RE: [Poll] action mappings
> 
> 
> So far the results are as follows:
> 
> #1 5
> #2 1
> #3 2
> #4 0
> 
> I added myself to both 1 and 3 as I've done a project both ways...  Now I
> wonder, how does everyone determine which operation you are doing?  As a
> parameter in the action mapping?  A big case-style (if else) statement?
> 
> -Original Message-
> From: Mainguy, Mike [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 23, 2003 11:06 AM
> To: [EMAIL PROTECTED]
> Subject: [Poll] action mappings
> 
> 
> I have yet another opinion poll for struts-user...
> 
> What are folks currently doing for action mappings in relation to CRUD
> operations?  
> Are you:
> 
> #1  creating a unique Action mapping for each atomic operation 
> (potentially mapped to the same action class)
>   /createUser.do ->>  UserAction.java
>   /readUser.do   ->>  UserAction.java
>   /updateUser.do ->>  UserAction.java
>   /deleteUser.do ->>  UserAction.java
>   
> 
> #2  creating a unique Action mapping for each atmoic operation 
> with each action having a unique class
>   /createUser.do ->>  CreateUserAction.java
>   /readUser.do   ->>  ReadUserAction.java
>   /updateUser.do ->>  UpdateUserAction.java
>   /deleteUser.do ->>  DeleteUserAction.java
> 
> #3  creating an aggregate action class with a unique action mapping with 
> multiple operations and using form/request variable to accomplish CUD
>   /editUser.do   ->> UserAction.java   (?OP=Update, ?OP=Create,
> ?OP=Delete)
>   /displayUser.do->> UserAction.java
> 
> 
> #4  creating an aggregate action class with a unique action mapping with 
> multiple operations
>   /editUser.do   ->> EditUserAction.java   
>   /displayUser.do->> DisplayUserAction.java
> 
> 
> Some other way (or a combination) ...
> 
>   
> 
> This message and its contents (to include attachments) are the property of
> Kmart Corporation (Kmart) and may contain confidential and proprietary
> information. You are hereby notified that any disclosure, copying, or
> distribution of this message, or the taking of any action based on
> information contained herein is strictly prohibited. Unauthorized use of
> information contained herein may subject you to civil and criminal
> prosecution and penalties. If you are not the intended recipient, you should
> delete this message immediately.
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> This message and its contents (to include attachments) are the property of
> Kmart Corporation (Kmart) and may contain confidential and proprietary
> information. You are hereby notified that any disclosure, copying, or
> distribution of this message, 

RE: multiple forms with the same formBean

2003-09-19 Thread Michael Ruppin
Yeah, but doesn't that assume he has a "static" set of forms?  Looks likely dynamic, 
to me.

I use nested collections of Forms for this.  Rather than multiple HTML forms, there is 
one, and
everything gets submitted with indices.

HTH

m

--- Edgar P Dollin <[EMAIL PROTECTED]> wrote:
> Use multiple form-bean entries for the same form and struts will keep them
> separate.
> 
> Edgar
> 
> > -Original Message-
> > From: Rajat Pandit [mailto:[EMAIL PROTECTED] 
> > Sent: Friday, September 19, 2003 4:21 AM
> > To: [EMAIL PROTECTED]
> > Subject: multiple forms with the same formBean
> > 
> > 
> > hello,
> > i am using multiple forms in one page which are
> > attached to the same form bean. now the problem is
> > that when there is an validation error and the page is
> > returned back to INPUT all the forms in the page are
> > prefilled with the same value. i am giving the
> > struture of my jsp  pls help as this is urgent
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > this will print the form n times on the page.. now
> > suppose the first form is submitted with some eror
> > then the bean bidForm will be saved with this value
> > and in all the iterated forms will be prefilled with
> > the same.. any clues. am i doing it the wrong way or
> > any better way to do the same thing.
> > regards
> > rajat
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site design 
> > software http://sitebuilder.yahoo.com
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: Problem updating values from html:select

2003-09-19 Thread Michael Ruppin
I'm fairly certain your ActionForm needs an indexed setter for the Device Objects, as 
well.  Give it a try.
 
m

"Hajratwala, Nayan (N.)" <[EMAIL PROTECTED]> wrote:
Not directly on my form, but on the Device object, I have the following methods:

public String getDeviceParameterValue(int parameterId)
public void setDeviceParameterValue(int parameterId, String value)

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Michael Ruppin [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 19, 2003 12:42 PM
To: Struts Users Mailing List
Subject: Re: Problem updating values from html:select



You did make the indexed setters in your Form, right? 

m

Hajratwala, Nayan (N.)" wrote: 
Folks, I have the following jsp that is giving me a headache.

My ActionForm contains a Collection of Device objects. The outer loop iterates over 
each device.

Each Device contains a Collection of Parameter objects. The inner loop iterates over 
each parameter.

The problem comes in the The values are displaying properly on the screen, but they 
are not updating during the submit.

I am not getting any errors or anything .. Just no updated values.

Can anyone provide some insight?

Thanks!






Device Name: 

Device Type: 


Settings:




:


'>









[input] " name=currentDevice>







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


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

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


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: Nested properties and vectors

2003-09-19 Thread Michael Ruppin
I never got any official confirmation on this, but in my experience, you can't do this 
without the nested taglib.  You can nest with strut tags, and you can index, and you 
can nest and index, but only if the indexed object is the furthest nested.  In other 
words, sl.s[0] would work, but sl[0].s never will.
 
HTH
 
m

"Gregory F. March" <[EMAIL PROTECTED]> wrote:

I have a class that contains a member that is a vector. I have a vector
of these objects in the session and I am iterating through them.

I need to access the first element in that sub-vector. How does one go
about doing this?

For example:

public myClass {
mySubClass[] sl;
...
}

public mySubClass {
String s;
...
}

and in my action, something like:

new mySubList sl = new Vector();
new myList l = new myClass();

l.setV(v);

In my jsp, I have something like:





How do I get that sl[0].s into my jsp? I'm looking for an "as
struts-only" solution as I can find.

Thanks...

/greg

--
Gregory F. March -=- http://www.gfm.net:81/~march -=- AIM:GfmNet

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


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: Problem updating values from html:select

2003-09-19 Thread Michael Ruppin

You did make the indexed setters in your Form, right? 

m

Hajratwala, Nayan (N.)" <[EMAIL PROTECTED]>wrote: 
Folks, I have the following jsp that is giving me a headache.

My ActionForm contains a Collection of Device objects. The outer loop iterates over 
each device.

Each Device contains a Collection of Parameter objects. The inner loop iterates over 
each parameter.

The problem comes in the The values are displaying properly on the screen, but they 
are not updating during the submit.

I am not getting any errors or anything .. Just no updated values.

Can anyone provide some insight?

Thanks!






Device Name: 

Device Type: 


Settings:




:


'>









 [input] " name=currentDevice>







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


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

RE: select tag woes

2003-09-16 Thread Michael Ruppin
Alternatively, nest your beans.  That is, have TeamForm contain an instance of 
AwayTeam and an instance of HomeTeam:
 
   public class TeamForm extends ActionForm {
private AwayTeam awayteam = new AwayTeam();
private HomeTeam hometeam = new HomeTeam();
   ...
 
Then, your select tags look like:
 
   

RE: Easy Question

2003-09-12 Thread Michael Ruppin
Funny you should mention that, the thread I provided discusses a caveat with that very 
Object

Edgar P Dollin <[EMAIL PROTECTED]> wrote:Boolean form properties are cool too (at 
least in my experience)...

Edgar

> -Original Message-
> From: Michael Ruppin [mailto:[EMAIL PROTECTED] 
> Sent: Friday, September 12, 2003 3:14 PM
> To: Struts Users Mailing List
> Subject: RE: Easy Question
> 
> 
> Non-String Form bean properties are evil though, you'll thank 
> yourself later if you use Strings. As long as the String is 
> set to something sensible like "true" or "false", your 
> checkbox will be properly set.
> 
> I'm sure there are ample posts on the pros & cons of this 
> approach, here's one pro thread: 
> http://marc.theaimsgroup.com/?l=struts-user&m=> 106159073522015&w=2
> 
> m
> 
> "Slattery, Tim - BLS" wrote:
> > Sorry for emailing so many questions. My last one (i promise) is,
> > how do I set an to display as checked?
> 
> The "property" attribute of the tag should point to a boolean 
> property of the FormBean. If that property is "true" the box 
> will be checked.
> 
> --
> Tim Slattery
> [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> 

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



-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

RE: Easy Question

2003-09-12 Thread Michael Ruppin
Non-String Form bean properties are evil though, you'll thank yourself later if you 
use Strings.  As long as the String is set to something sensible like "true" or 
"false", your checkbox will be properly set.
 
I'm sure there are ample posts on the pros & cons of this approach, here's one pro 
thread:
http://marc.theaimsgroup.com/?l=struts-user&m=106159073522015&w=2
 
m

"Slattery, Tim - BLS" <[EMAIL PROTECTED]> wrote:
> Sorry for emailing so many questions. My last one (i promise) is, 
> how do I set an to display as checked?

The "property" attribute of the tag should point to a boolean property of
the FormBean. If that property is "true" the box will be checked.

--
Tim Slattery
[EMAIL PROTECTED]


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


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: Error:Cannot find bean org.apache.struts.taglib.html.BEAN in any Scope

2003-09-12 Thread Michael Ruppin
This looks a lot like your last post.
Try:

name="logonForm"
in your 
 
m

Ritvik <[EMAIL PROTECTED]> wrote:
Hi There,

I am following the book 'Struts In Action' books and trying to build the

Sample Logon Application from first few chapters. I was able to display
Welcome page (Welcome.do) and when i click on 'Sign In' link, I am
getting the following error? Please also review the configurations added

to struts-config file. Why does 'logonForm' bean being created?

javax.servlet.jsp.JspException: Cannot find bean
org.apache.struts.taglib.html.BEAN in any

scope
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:714)
at
org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:193)

at org.apache.jsp.Logon$jsp._jspService(Logon$jsp.java:116)

-- Welcome.jsp code snippet --


Sign in

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



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

path="/Logon"
type="org.apache.struts.actions.ForwardAction"
parameter="/pages/Logon.jsp"/>

thanks,
Ritvik


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


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: Valid Regexp for MM/dd/yyyy matching in a string?

2003-09-10 Thread Michael Ruppin
This might provide more ideas for your regexp pattern, it works with egrep:
 
^((0?[1-9]{1})|(1[0-2]{1})){1}[/]((0?[1-9]{1})|(1[0-9]{1})|(2[0-9]{1})|(3[0-1]{1})){1}[/][0-9]{4}$
 
Not sure about the "date validator".  Does it prevent submission of 2/29/2003?  I do 
everything server side ;)
 
m

David Erickson <[EMAIL PROTECTED]> wrote:
Here is what I came up with.. I don't know if its valid or not but I'd like
it to match a date in the format MM/dd/ for parsing.

mask

^[0-1]{1}[0-9]{1}/[0-3]{1}[0-9]{1}/[1-2]{1}[0-9]{3}$



Thanks!

-David




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


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: ActionForm's reset method is invoked twice ??

2003-09-09 Thread Michael Ruppin
Check this thread:
 
http://marc.theaimsgroup.com/?t=10559454236&r=1&w=2
 
HTH
 
m

Fumitada Hattori <[EMAIL PROTECTED]> wrote:
Hi gurus,

I wanna know that ActionForm's reset method is invoked twice ?
There's an action tag in my struts-config.xml.
type="example.Test"
name="TestForm"
scope="request"
>



and I got a jsp named test.jsp





With my application, seems that both when I visite the test.jsp 
and I click the submit button, reset method is invoked.

Is it a normal operation ?

Thanks in advance.



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


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: [FRIDAY] Some flash fun

2003-09-05 Thread Michael Ruppin
Distract him with some tasty ants.  Mmmm.  Ants.

Adam Hardy <[EMAIL PROTECTED]> wrote:I can hardly believe I am saying this, but the 
aardvark keeps eating my 
pixie.

On 09/05/2003 05:28 PM Bradley Handy wrote:
> That was neat.
> 
> 
>>-Original Message-
>>From: Andrew Hill [mailto:[EMAIL PROTECTED]
>>Sent: Friday, September 05, 2003 10:21 AM
>>To: Struts
>>Subject: [FRIDAY] Some flash fun
>>
>>I just know Mark loves flash stuff ;-)
>>This should take your mind off dealing with validator quirks for a
> 
> while.
> 
>>(Sorry mate - couldnt find any lisp to go with it!)
>>
>>http://www.freshsensation.com/samorost.swf
>>
>>
>>
>>
>>-
>>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]
> 
> 

-- 
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9


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



-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

RE: Can we create a Action class object

2003-09-04 Thread Michael Ruppin
I find that this can still be a valid solution, even when business logic is entirely 
factored out of Actions.  For example, I have Form A and Form B, both of which nest 
Form C.  My Actions are all related to LookupDispatchActions.  Action A checks the 
request for Form A specific submissions, and then calls Action C to check for Form C 
specific submissions.  Similarly, Action B checks the request for Form B specific 
submissions, and then calls Action C to check for Form C specific submissions.  Since 
my business logic is well factored, I could have had Action A and Action B check all 
the same stuff in the request that Action C does, and then call all the same business 
logic that Action C does, but why?  Then, I would have to do the same in every Action 
processing a Form which nests Form C.  Action C always handles whatever Form C may 
sumbit on any form in which it is nested; I instantiate it, and execute it, and it's 
up to the "parent" Action to determine what to do with the returned
 forward.
 
I had been doing this with chaining, but we all know where that leads ;)
 
m

Andrew Hill <[EMAIL PROTECTED]> wrote:
Danny is right you know. I probably didnt stress the point well enough in my
own response to the question just now.
You would be much better off doing a spot of refactoring.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Thursday, 4 September 2003 22:37
To: [EMAIL PROTECTED]
Subject: RE: Can we create a Action class object


Why? This sounds like bad design. Why not just refactor the common
code out into a helper class and call that from both actions?

--
Danny Yates



-Original Message-
From: Ashok.D [mailto:[EMAIL PROTECTED]
Sent: 04 September 2003 14:42
To: Struts Users Mailing List
Subject: Can we create a Action class object


Hi,

Can we create a Action class object. I need to access the perform method
from another Action class.

If we access this Action class by using *.do, I have some limiations in my
application. I don't want to use action.do.

But I need to execute another action class perform method.

Pls put some light on this issue.

Thanks & Regards,
Ashok.D


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


_
Notice to recipient:
The information in this internet e-mail and any attachments is confidential
and may be privileged. It is intended solely for the addressee. If you are
not the intended addressee please notify the sender immediately by
telephone. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it,
is prohibited and may be unlawful.

When addressed to external clients any opinions or advice contained in this
internet e-mail are subject to the terms and conditions expressed in any
applicable governing terms of business or client engagement letter issued by
the pertinent Bank of America group entity.

If this email originates from the U.K. please note that Bank of America,
N.A., London Branch, Banc of America Securities Limited and Banc of America
Futures Incorporated are regulated by the Financial Services Authority.
_



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



-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: Java Bean Naming Rules for boolean fields?

2003-08-26 Thread Michael Ruppin
I don't know about intellij idea, but check here:
http://java.sun.com/products/javabeans/docs/spec.html
Section 8.3.2.  I think you need either boolean
getIsTuesday(), or boolean isIsTuesday().  boolean
isTuesday() is non-conforming since you have no
boolean property by the name of tuesday in this Bean.

HTH

m

--- "White, Joshua A (HTSC, CASD)"
<[EMAIL PROTECTED]> wrote:
> What is the java bean method naming rule for boolean
> fields?  Is the
> following valid?  (I ask because I am having a
> problem with referencing a
> getter in a form from a html tag)
> 
> 
> ...
> 
> private boolean isTuesday;
> 
> public boolean isTuesday() {
>   return this.isTuesday;
> }
> 
> public boolean setIsTuesday(boolean isTuesday) {
>   this.isTuesday = isTuesday;
> }
> 
> ...
> 
> 
> Or is the prefix "get" required for all getters
> (e.g. getIsTuesday())?
> 
> I am using intellij idea.  When I generate the
> getter and setters, it
> generates them using the first syntax (no get in
> front of a boolean getter).
> If this is not good form, anyone know how to change
> this in idea?
> 
> Regards,
> 
> Joshua
> 
> 
> 
> 
> 
> 
> 
> 
> 
> This communication, including attachments, is for
> the exclusive use of 
> addressee and may contain proprietary, confidential
> or privileged 
> information. If you are not the intended recipient,
> any use, copying, 
> disclosure, dissemination or distribution is
> strictly prohibited. If 
> you are not the intended recipient, please notify
> the sender 
> immediately by return email and delete this
> communication and destroy all copies.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



[OT] Re: Small request...

2003-08-25 Thread Michael Ruppin
What is it that makes you think our dates & time are
not correct?

--- Keith Pemberton <[EMAIL PROTECTED]> wrote:
> I know that this is way off topic but it would be a
> bit help for my
> inbox.  Could the people associated with this list
> please check the
> clock on there computers and set the correct date
> and time?  I really
> would appreciate this small request.
> 
> -- 
> Keith Pemberton <[EMAIL PROTECTED]>
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



[FRIDAY] BeanUtils.populate and Booleans

2003-08-22 Thread Michael Ruppin
I know, I know, never use anything but Strings in an
ActionForm to be populated from the request.  I guess
this is the same old argument for that.

I recently thought it might be convenient to use a
Boolean, and it worked fine, until I re-used the Form
for a query jsp where this property was NOT
represented by a checkbox (Of course, I had to change
reset() to leave the property null instead of
defaulting false when "mode=query" is in the request).
 BeanUtils.populate does clearly specify that it only
handles setters for String, boolean, int, long, float,
and double.  Still, I was surprised to learn that when
an empty string was submitted for this property in the
request, my Boolean was set to false.

m

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: method to get new Id to next action when old Id is in request?

2003-08-14 Thread Michael Ruppin

--- Adam Hardy <[EMAIL PROTECTED]>
wrote:
> I have two actions chained together. They both take
> the same formbean. 
> The first is sectionInsert.do and the second, which
> sectionInsert 
> forwards to on success, is sectionEdit.do
> 
> sectionInsert.do receives the properties of a
> Section in the request 
> parameters, including id=0 where it is 0 because it
> does not exist in 
> the DB yet. So it inserts the new Section into the
> DB and returns the 
> new id, which is needed by sectionEdit to put into
> the html for the edit 
> page.
> 
> I originally thought I could save the new id to the
> formbean and this 
> would get passed on, but sectionEdit instantiates
> its own formbean and 
> fills it with the request parameters - include id=0.

Out of curiosity, is it really making a new one, or
just putting the request data in to the existing Form,
again?

> Is there an intuitive way of passing on the new id?
> 
> I already use sectionEdit.do as a first action by
> calling it with an id 
> on a querystring, where the formbean picks it up. I
> would like to use a 
> method that is easy for both these situations.
> 
> I'd appreciate any inspiration.

How about putting in another Form property which will
never be populated from a request?  If this property
is populated, ignore the property Struts populated
from the request.  I guess this depends on my
assumption above, but if Struts really is making a new
Form, you could still put this new property in the
request, and make sure it happens only in the Action
you chain from, and never from the HTML you render.

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


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [OT] Determining Class Type of Action

2003-08-14 Thread Michael Ruppin
Is this a cut & paste of the code?  You're missing a
closing paren in your if statement.

m

--- Jerry Jalenak <[EMAIL PROTECTED]> wrote:
> I am extracting the class type from an Action:
> 
>   Class c = Class.forName(mapping.getType());
> 
> I can then 'chase' the class chain backwards:
>   
>   boolean isDispatchAction = false;
>   while(!isDispatchAction)
>   {
>   c = c.getSuperClass();
>   if
>
(c.isInstance(org.apache.struts.actions.DispatchAction)
>   {
>   isDispatchAction = true;
>   }
>   }
> 
> The 'if' statement comparison is never true.  I've
> printed out the value of
> 'c' on each iteration through the loop, and can see
> when it is
> 'org.apache.struts.actions.DispatchAction', but my
> isDispatchAction boolean
> never gets set to true.
> 
> What's the right way to do this?
> 
> Thanks!
> 
> 
> Jerry Jalenak
> Team Lead, 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 strictly
> prohibited. If you have received this transmission
> in error, please immediately notify LabOne at the
> following email address:
> [EMAIL PROTECTED]
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: validation philosophical question

2003-08-14 Thread Michael Ruppin
I agree with Simon & Adam.  Something else to consider
is moving the cursory checks to your actions.  If you
ever plan to use [Lookup]DispatchAction or similar,
you may have the need for different, or a lack of,
validation in your methods.  Extending your Forms
might not be the best alternative, furthermore, using
the validate method, you're limited to the single
input defined in your mapping.

m

--- David Thielen <[EMAIL PROTECTED]> wrote:
> Hi;
> 
> Everyone who hits my site has a high-speed
> connection. So I am thinking that it makes sense to
> do server side validation only as that provides a
> better method than the javascript pop-ups.
> 
> And in this case, it seems to me that the logical
> place for all validation then is inside the
> ActionForm validate method.
> 
> comments?
> 
> thanks - dave


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: Button labels and DispatchActions mix?

2003-08-14 Thread Michael Ruppin
I wouldn't suggest this is a design issue.  This
happens all the time, especially if you're nesting
forms.  Furthermore, LookupDispatchAction can get you
into trouble; your Message Resources could be
translated in such a way that some methods become
unreachable (button.one=FooBar, button.two=FooBar).  I
solved this by making a new Class that associates
methods with Form properties, instead of text.  The
downside is that each submit button is associated with
a different Form property, not with the single
parameter named in the struts-config.  The method is
executed which is the first in the HashMap associated
with a non-null Form property.

HTH

m


--- Paul McCulloch <[EMAIL PROTECTED]>
wrote:
> I'm not sure I understand you. Why would you want
> multple buttons, with the
> same label doing different things? Surely this would
> just confuse the user?
> 
> -Original Message-
> From: Todor Sergueev Petkov
> [mailto:[EMAIL PROTECTED]
> Sent: 07 August 2003 13:58
> To: Struts Users Mailing List
> Subject: Re: Button labels and DispatchActions mix?
> 
> 
> 
> Even DispatchLookupAction doesn't work if you want
> to use the same label
> eg. buttons.reset or buttons.search
> for two different buttons useing the same Action...
> 
> Paul McCulloch wrote:
> > 
> > I believe that the solution is to use a
> DispatchLookupAction rather than a
> > dispatch action. See p226 in Struts in Action for
> a description.
> > 
> > Paul
> > 
> > -Original Message-
> > From: Rohit Aeron [mailto:[EMAIL PROTECTED]
> > Sent: 07 August 2003 13:27
> > To: Struts Users Mailing List
> > Subject: RE: Button labels and DispatchActions
> mix?
> > 
> > Its better you use javascript
> > There you can append your action also with submit
> value
> > 
> > Eg:
> > 
> > Document..action="search.do"+"";
> > 
> > Regards
> > Rohit
> > 
> > -Original Message-
> > From: Todor Sergueev Petkov
> [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 07, 2003 5:49 PM
> > To: Struts Users Mailing List
> > Subject: Re: Button labels and DispatchActions
> mix?
> > 
> > It works with the button label But I have two
> Search buttons on the
> > same page both labeled
> > search.button.reset but they perform two different
> actions. So I need a
> > way to distinguish which was pressed
> > inside my DispatchAction
> > 
> > Rohit Aeron wrote:
> > >
> > > This will work ..
> > >
> > >  > > value=" />" >
> > > 
> > >
> > > -Original Message-
> > > From: Todor Sergueev Petkov
> [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, August 07, 2003 5:29 PM
> > > To: Struts Users Mailing List
> > > Subject: Button labels and DispatchActions mix?
> > >
> > > Hello people,
> > >
> > > I have the following code :
> > >
> > >  
> > >  
> > >  
> > >
> > > What I am trying to do is have a Dispatch Action
> > > so that when this button is pressed the request
> is something like
> > > search.do?action=resetg
> > > But I don't want my button to have the resetg
> title on it. I want it to
> > > have the search.button.reset title from
> ApplicationResources bundle
> > > on it. It seems tha Struts html tag library
> mixes the two. Is there a
> > > way out of this?
> > >
> > > Thanks
> > >
> > >
>
-
> > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > >
> > > *--
> > > This message and any attachment(s) is intended
> only for the use of the
> > addressee(s) and may contain information that is
> PRIVILEGED and
> > CONFIDENTIAL. If you are not the intended
> addressee(s), you are hereby
> > notified that any use, distribution, disclosure or
> copying of this
> > communication is strictly prohibited. If you have
> received this
> > communication in error, please erase all copies of
> the message and its
> > attachment(s) and notify the sender or Kanbay
> postmaster immediately.
> > >
> > > Any views expressed in this message are those of
> the individual sender
> and
> > not of Kanbay.
> > >
> > > Although we have taken steps to ensure that this
> e-mail and any
> > attachment(s) are free from any virus, we advise
> that in keeping with good
> > computing practice the recipient should ensure
> they are actually virus
> free.
> > >
> > >
>
-
> > > 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]
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> > **
> > Axios Email Confidentiality Footer
> > Privileged/Confidential Information may be
> co

Re: Problem with html:message

2003-08-14 Thread Michael Ruppin
Check that the ActionErrors object under
org.apache.struts.action.ERROR actually contains
anything:

Iterator i =
request.getAttribute(Globals.ERROR_KEY).get();
while (i.hasNext()){
  System.out.println(i.next()).getKey());
}

Although, even if it did, I don't think you'll see
them when you set message="true" in the html:message
tag.  AFAIK that attribute switches between the Struts
ActionError and ActionMessage instances.

HTH

m

--- Charles Canning <[EMAIL PROTECTED]> wrote:
> Hey,
> 
> This is the contents of my request object. This is
> displayed from inside the
> messagesPresent tag:
> 
> A Name: javax.servlet.include.context_path
> A Name: createAccountForm
> A Name: org.apache.struts.action.MESSAGE
> A Name: javax.servlet.include.servlet_path
> A Name: javax.servlet.include.request_uri
> A Name: org.apache.struts.taglib.tiles.CompContext
> A Name: org.apache.struts.action.ERROR
> A Name: org.apache.struts.taglib.html.BEAN
> A Name: org.apache.struts.taglib.html.FORM
> A Name: org.apache.struts.action.mapping.instance
> A Name: org.apache.struts.action.MODULE
> 
> Here is a code snippet
> 
>  
><%
>  Enumeration names =
> request.getParameterNames();
>  while(names.hasMoreElements() == true) {
>out.println("P Name: " +
> (String)names.nextElement());
>  }
> 
>  names = request.getAttributeNames();
>  while(names.hasMoreElements() == true) {
>out.println("A Name: " +
> (String)names.nextElement());
>  }
>%>
> 
>
>  
>
>  
>   
>  
> 
> My errors are not displaying. Could someone please
> shne some light on this.
> Thanks.
> 
> Chuck
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Two forms on one page -

2003-08-14 Thread Michael Ruppin
In your Form/Action you specify a property for
ActionErrors:

String property="FormOne";
ActionErrors errors = ...;
ActionError error = ...;
errors.add(property, error);

In your jsp you use the Struts  tag
with the "property" attribute:


...


m

--- David Thielen <[EMAIL PROTECTED]> wrote:
> Hi;
> 
> I have two forms on one page. In this case, how do I
> handle  for each form? I want to put
> the errors from each form above that form.
> 
> thanks - dave
> 
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: problem with bean:write and capitalization of attribute name

2003-08-08 Thread Michael Ruppin
Here's the spec:

http://sunsdlc1-1.sjc-colo.bbnplanet.com/servlet/EComFileServlet/main_products/SDLC//ESD4/JSCDL/javabeans/1.01/beans.101.pdf?ActionId=verify&TicketId=Cl5Z%2BEmLVFM%3D&TicketServerUrl=UMdnxpfbimnVhsPzHcxQH1vcfpnakcdixIDR8grWSV9U3HLSgqDMYN%2BV1osLy1dXQQ%3D%3D&GroupName=5PoE

Ahhh.  Beans.  :|

m

--- David Graham <[EMAIL PROTECTED]> wrote:
> Section 8.8 of the JavaBeans spec details the
> capitalization rules.  My
> guess is that it can't find your property because it
> starts with 2 upper
> case letters and assumes the rest is upper case
> (which getLName isn't). 
> Use "lastName" and everything will work fine :-).
> 
> David
> 
> --- Wes Rood <[EMAIL PROTECTED]> wrote:
> > Could you point me to more information on this
> behavior?
> > 
> > I'm still confused as to why it will capitailze
> the "f" in "fax" to 
> > locate the getFax() method, but it will not
> capitalize the "l" in 
> > "lName" to locate the getLName() method.
> > 
> > Thanks!
> > 
> > David Graham wrote:
> > 
> > >This is standard JavaBean behavior.  Regardless,
> I encourage you to use
> > >lastName instead because lName is rather ugly and
> confusing.
> > >
> > >David
> > >
> > >--- Wes Rood <[EMAIL PROTECTED]> wrote:
> > >  
> > >
> > >>I have an object as follows
> > >>
> > >>public class Contact {
> > >>...
> > >>private String lName;  // the contact's last
> name
> > >>private String fax; // the contact's fax
> number
> > >>...
> > >>public String getLName() {
> > >>return lName;
> > >>}
> > >>
> > >>public String getFax() {
> > >>return fax;
> > >>}
> > >>...
> > >>}
> > >>
> > >>Then I use  to go through a list
> of Contact objects
> > and 
> > >>attempt to access the lName and the fax
> attributes.  I observe the 
> > >>following behavior:
> > >>
> > >>   correctly
> displays the value of the 
> > >>"fax" attribute
> > >>while:
> > >>   causes 
> > >>org.apache.jasper.JasperException: No getter
> method for property 
> > >>contacts[0].Fax of bean ...
> > >>
> > >>Apparently it is uppercasing the "f" in "fax" to
> call getFax(), but
> > when
> > >>
> > >>the "F" is already in caps, it doesn't see the
> attribute.  This is
> > fine,
> > >>
> > >>but then I tried accessing the "lName" property:
> > >>
> > >>  causes 
> > >>org.apache.jasper.JasperException: No getter
> method for property 
> > >>contacts[0].lName of bean ...
> > >>while:
> > >> correctly
> displays the value of the 
> > >>"lName" attribute
> > >>
> > >>I also rewrote the jsp logic using
>  and 
> > and 
> > >>the same thing happened.
> > >>
> > >>What is going on here?  It appears that the "N"
> in the lName property
> > is
> > >>
> > >>affecting how the "L" is handled.  Any ideas?
> > >>
> > >>
> > >>
> >
>
>>-
> > >>To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > >>For additional commands, e-mail:
> [EMAIL PROTECTED]
> > >>
> > >>
> > >>
> > >
> > >
> > >__
> > >Do you Yahoo!?
> > >Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> > >http://sitebuilder.yahoo.com
> > >
> >
>
>-
> > >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]
> > 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: Cancel Button Not Working in 1.1

2003-08-08 Thread Michael Ruppin
Maybe someone in this thread figured it out:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg72575.html

m

> -Original Message-
> From: Natalie D Rassmann
> [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, August 07, 2003 1:07 PM
> To: Struts Users Mailing List
> Subject: Cancel Button Not Working in 1.1
> 
> Hi,
> 
> I am trying to use the cancel button in Struts 1.1. 
> It is not
> working
> 
> The isCancelled(request) is always returnning
> false
> 
> Can anyone help me?
> 
> Natalie
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Html Form Tag Question

2003-08-01 Thread Michael Ruppin
I don't know if it was resolved, but this thread
should be of interest to you:

http://marc.theaimsgroup.com/?l=struts-user&m=105943092932593&w=2

HTH

m

--- "Jones, Marty B." <[EMAIL PROTECTED]>
wrote:
> I have the following tag declaration in a jsp file:
> 
>  focus="username" method="POST"
> type="com.dailyaccess.actions.LoginBean">
> 
> The jsp compiles correct and views correctly.  The
> issue that I am having is
> that the action attribute in the html form that is
> created is an empty
> string!  It is as if the FormTag class is not
> setting the action string.
> 
> Any help would be greatly appreciated.
> 
> 
> Marty B. Jones
> Senior Software Engineer
> DailyAccess.Com
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Is it possible to capture selected values on jsp page?

2003-07-31 Thread Michael Ruppin
Well, ultimately jsp IS Java  You can always do
this:

<%
String
foo="http://myweb.com/mypage?companyid="+id+"&ssn="+ssn;
%>


However, use of scriptlet is discouraged here.  If you
switch to JSTL tags, and put foo into an ActionForm
property populated in your Action, you could:



m

--- Rick Col <[EMAIL PROTECTED]> wrote:
> Thanks, 
> 
> I will try that out. What I try to do is to capture
> form variables as strings, and concatenate them with
> 
> a html address as request parameters. I am not sure
> how to 
> concatenate them with the link in JSP page, and add
> the 
> whole address to a taglib parameter like the
> following:
> 
> 
uri="http://myweb.com/mypage?companyid="+id+"&ssn="+ssn>
> 
> In Java, we can concatenate strings like that, in
> Jsp,
> can we do that? Or there is another way?
> 
> regards,
> 
> 
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Repost: Clicking "Submit" returns a blank page

2003-07-31 Thread Michael Ruppin
Check that

Constants.SUCCESS=success

m

--- todd thorner <[EMAIL PROTECTED]> wrote:
> I have reached this far in my debut logon page
> development...
>  
> The first JSP page comes up fine, showing me a form
>  with a rendered
>  tag for each required field (username
> and password), plus a "Reset" and a "Submit" button.
> Code sample below comes from my struts-config.xml
> file:
>  
> 
> type="mystrutsforms.LogonForm"/>
> 
>  
> 
>  
> 
> 
> 
> type="org.apache.struts.actions.ForwardAction"
>   parameter="/pages/Logon.jsp"/>
> type="mystrutsactions.LogonAction"
> name="logonForm"
>   scope="request" validate="true"
>   input="/pages/Logon.jsp">
>path="/pages/LogonSuccess.jsp"/>
>path="/pages/LogonFail.jsp"/>
>  
> 
>  
> ** struts-config.xml code above
> **
> 
> I can enter data into the  fields and
> they will erase if I click "Reset"
> I can click "Submit" with nothing filled in (passing
> nulls with the request), and the proper
>  are displayed.
> 
> However...
> 
> If I enter any values for the "username" and
> "password" fields, then click "Submit," a blank page
> is always returned (neither "LogonSuccess.jsp" nor
> "LogonFail.jsp" are blank).
> 
> What's up with that?  The browser says it's trying
> to display results from "LogonSubmit.do" (which is
> what I expect).  I have a file called
> "users.properties" in the directory
> "WEB-INF/classes" and in my LogonAction.java code:
> 
> public final class LogonAction extends Action {
>  
>public ActionForward execute( ActionMapping
> mapping,
>   ActionForm form,
>   HttpServletRequest request,
>   HttpServletResponse response )
>   throws Exception {
>   
>   String username = ( ( LogonForm ) form
> ).getUsername();
>   String password = ( ( LogonForm ) form
> ).getPassword();
>   boolean validated = false;
>   
>   try {
>   
>   validated = isUserLoggedOn( username,
> password );
>   }
>   catch ( SimpleUserDirectoryException
> sudexc ) {
>   ActionErrors errors = new
> ActionErrors();
>   errors.add( ActionErrors.GLOBAL_ERROR,
>  new ActionError(
> "error.logon.connect" ) );
>   saveErrors( request, errors );
>   return ( new ActionForward(
> mapping.getInput() ) );
>   }
>   
>   if ( !validated ) {
>   
>   ActionErrors errors = new
> ActionErrors();
>   errors.add( ActionErrors.GLOBAL_ERROR,
>  new ActionError(
> "error.logon.invalid" ) );
>   saveErrors( request, errors );
>   return ( new ActionForward(
> mapping.getInput() ) );
>   }
>   
>   HttpSession session =
> request.getSession();
>   session.setAttribute( Constants.USER_KEY,
> form );
>   
>   return ( mapping.findForward(
> Constants.SUCCESS ) );
>   }
>   
>   public boolean isUserLoggedOn( String
> username,
>   String password ) throws
> SimpleUserDirectoryException {
>   
>   return (
> SimpleUserDirectory.getInstance().passwordIsValid(
> username, password ) );
>   }
>   }
>   
> ** mystrutsactions.LogonAction.java
> code above **
>   
> Note: The LogonAction.java file above makes use of
> the following SimpleUserDirectory.java code:
>   
>  private static final String
> SimpleUserDirectoryFilepath = "users.properties";
>   InputStream ips =
>
this.getClass().getClassLoader().getResourceAsStream(
> SimpleUserDirectoryFilepath );
>   
> ** mystrutsforms.LogonForm.java code
> above **
>  
> Also, my web.xml file has:
>  
>  
>   application
>   application
>  
>  
> ** web.xml code above
> **
>  
> Any suggestions or guesses are appreciated.
> 
> 
> 
>

> Get advanced SPAM filtering on Webmail or POP Mail
> ... Get Lycos Mail!
> http://login.mail.lycos.com/r/referral?aid=27005
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Is it possible to capture selected values on jsp page?

2003-07-31 Thread Michael Ruppin
Well, I don't use that taglib, so I'm not sure.  In
your situation, I believe the ActionForm is available
to you, even outside the  tags.  When the
 code executes, it creates an ActionForm
instance, iff one does not exist (see
http://jakarta.apache.org/struts/struts-html.html#form).
 However, in your case, the ActionForm you want access
to was created and populated when processing the
request.  I don't know what you wanted to do with the
selection, but it should be available using
name="myForm" and property="theSelection" in most
Struts tags. You might need to include logic not to
use them, when the ActionForm has not yet been
created.

HTH

m

--- Rick Col <[EMAIL PROTECTED]> wrote:
> Thanks, Michael:
> 
> I actually want to capture them outside
> ...<.html:form>. I know these values
> will be in my action form, should I use
> 
> to
> get their string values?
> 
> regards,
> 
> 
> --- Michael Ruppin <[EMAIL PROTECTED]> wrote:
> > So long as both s are in the same 
> as
> > the , they will both be in
> the
> > request.
> > 
> > m
> > 
> > --- Rick Col <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > > 
> > > I have two drop down lists. Once a user selects
> > once
> > > item for every list, she will press on submit
> > > button.
> > > The two lists are collections. I am trying to
> > > capture
> > > these two values after the user submission. Is
> > there
> > > an easy way to do that?
> > > 
> > > regards,
> > > 
> > > __
> > > Do you Yahoo!?
> > > SBC Yahoo! DSL - Now only $29.95 per month!
> > > http://sbc.yahoo.com
> > > 
> > >
> >
>
-
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> > design software
> > http://sitebuilder.yahoo.com
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Is it possible to capture selected values on jsp page?

2003-07-31 Thread Michael Ruppin
So long as both s are in the same  as
the , they will both be in the
request.

m

--- Rick Col <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I have two drop down lists. Once a user selects once
> item for every list, she will press on submit
> button.
> The two lists are collections. I am trying to
> capture
> these two values after the user submission. Is there
> an easy way to do that?
> 
> regards,
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: reset() in my action form is not working

2003-07-30 Thread Michael Ruppin
That's not what the ActionForm.reset() method is for. 
It's called prior to population of your ActionForm
from the request, to set values for things which may
not be in the request [but should be], like unchecked
checkboxes.

What you need is some ActionForm.setEmpty() method to
call before forwarding to whatever code renders your
HTML.

m

--- victor gusz <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I define a reset function and seset every form
> variables to null, since I want to reset all inputs
> to
> null after I hit submit button. I also put the
> following
> line before I return ActionForward in my action
> class:
> 
> request.setAttribute(mapping.getAttribute(),
> sampleForm);
> 
> But its not working, after I hit submit button, old
> values 
> are still there. Am I missing something?
> 
> thanks,
> 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Action Chaining problems

2003-07-28 Thread Michael Ruppin
What's in your struts-config action mapping?  If you
have redirect=true this is expected.

--- Alex Shneyderman <[EMAIL PROTECTED]> wrote:
> I have a need to chain actions and my code looks
> like:
> 
> OperationConfig oc = new OperationConfig ();
> 
> if ((oc.getStep () == null) || "".equals (oc.getStep
> ().trim ())) {
>oc.setStep (DEFAULT_STEP);
> }
> 
> if ((oc.getOperation () == null) || "".equals
> (oc.getOperation ().trim
> ())) {
>oc.setOperation (DEFAULT_OP);
> }
> 
> ActionForward af = mapping.findForward
> ("navigate.step" + oc.getStep
> ());
> 
> //System.out.println ("Hash code: " + ((Object)
> request).hashCode ());
> //System.out.println ("To string: " + ((Object)
> request).toString ());
> 
> if (af != null) {
>request.setAttribute
> (Constants.REQATTRIBUTE_OPCFG, oc);
> 
> //for (Enumeration enum =
> request.getAttributeNames();
> enum.hasMoreElements // (); ) {
> //   String key = (String) enum.nextElement ();
> // System.out.println ("Key: " + key + "; Class:
> " +
> //request.getAttribute (key).getClass().getName ());
> //}
> 
>return af;
> } else { // TODO: this is an error.
>return null;
> }
> 
> Now when my action that I chain to gets the request
> it actualy does not
> get the attribute that I set. As the matter of fact
> my request object is
> completely different instance (which I really could
> care less about, as
> long the content stays there).
> 
> Can someone shed some light on this?
> My redirect is false.
> 
> Thanks,
> Alex.
> 
> PS here is the output of the commented code:
> 
> Hash code: 5738457
> To string:
>
[EMAIL PROTECTED]
> Key: javax.servlet.request.cipher_suite; Class:
> java.lang.String
> Key: org.apache.struts.action.MESSAGE; Class:
> org.apache.struts.util.PropertyMessageResources
> Key: javax.servlet.request.key_size; Class:
> java.lang.Integer
> Key: org.apache.struts.action.mapping.instance;
> Class:
> org.apache.struts.action.ActionMapping
> Key: Logon; Class:
> org.apache.struts.validator.DynaValidatorForm
> Key: edu.columbia.law.gls.opcfg; Class:
> edu.columbia.law.gls.OperationConfig
> Key: NavigatorForm; Class:
> org.apache.struts.action.DynaActionForm
> Key: org.apache.struts.action.MODULE; Class:
> org.apache.struts.config.impl.ModuleConfigImpl
> 
> Similar output of the action chained to:
> 
> 
> Hash code: 4727831
> To string:
> [EMAIL PROTECTED]
> -- it is null
> Key: javax.servlet.request.cipher_suite; Class:
> java.lang.String
> Key: org.apache.struts.action.MESSAGE; Class:
> org.apache.struts.util.PropertyMessageResources
> Key: javax.servlet.request.key_size; Class:
> java.lang.Integer
> Key: org.apache.struts.action.mapping.instance;
> Class:
> org.apache.struts.action.ActionMapping
> Key: org.apache.struts.action.MODULE; Class:
> org.apache.struts.config.impl.ModuleConfigImpl
> 
> As you can see the request and its content is
> changed. Why is that?
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Use html:link and LookupDispatchAction together

2003-07-25 Thread Michael Ruppin
Whoops, I'm going blind, I totally missed the
bean:define.  Must be Friday.

--- Michael Ruppin <[EMAIL PROTECTED]> wrote:
> This can be done, although I'm not using the
> html:link
> tags, nor is my documentaion up-to-date enough to
> include a description of the "action" attribute in
> your tag.  You are, of course, including the
> "parameter" attribute in your struts-config mapping
> for this action, right?  Your use of the paramName
> attribute is also suspect, do you have a String in
> visible scope named "message" containing the value
> to
> associate with the parameter id?
> 
> m
> 
> --- David Jiao <[EMAIL PROTECTED]> wrote:
> > Hello,
> > 
> > I have used the LookupDispatchAction with some
> > buttons and it works
> > quite well. Now I want to submit the form by
> > clicking on a link instead
> > of a button. I've tried something like this in my
> > jsp file but it
> > returns me the error
> > 
> > 
> >   
> > 
> > 
> >  >paramId="method"
> >paramName="message">
> > 
> > 
> > type Status report
> > 
> > message Request[/result] does not contain handler
> > parameter named method
> > 
> > description The request sent by the client was
> > syntactically incorrect
> > (Request[/result] does not contain handler
> parameter
> > named method).
> > 
> > I also tried to use javascript in the onclick
> > attribute of html:link but 
> > it returns the same error.
> > 
> > So my question is, is it possible to use
> > LookupDispatchAction to dispatsh 
> > actions from links at all?
> > If not, what would be proper way to implement
> > similar functionality?
> > Should I discard whole LookupDispatchAction and
> use
> > something else instead
> > of that, or just handle links differently?
> > 
> > Thank you very much!
> > 
> > David
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Use html:link and LookupDispatchAction together

2003-07-25 Thread Michael Ruppin
This can be done, although I'm not using the html:link
tags, nor is my documentaion up-to-date enough to
include a description of the "action" attribute in
your tag.  You are, of course, including the
"parameter" attribute in your struts-config mapping
for this action, right?  Your use of the paramName
attribute is also suspect, do you have a String in
visible scope named "message" containing the value to
associate with the parameter id?

m

--- David Jiao <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I have used the LookupDispatchAction with some
> buttons and it works
> quite well. Now I want to submit the form by
> clicking on a link instead
> of a button. I've tried something like this in my
> jsp file but it
> returns me the error
> 
> 
>   
> 
> 
> paramId="method"
>paramName="message">
> 
> 
> type Status report
> 
> message Request[/result] does not contain handler
> parameter named method
> 
> description The request sent by the client was
> syntactically incorrect
> (Request[/result] does not contain handler parameter
> named method).
> 
> I also tried to use javascript in the onclick
> attribute of html:link but 
> it returns the same error.
> 
> So my question is, is it possible to use
> LookupDispatchAction to dispatsh 
> actions from links at all?
> If not, what would be proper way to implement
> similar functionality?
> Should I discard whole LookupDispatchAction and use
> something else instead
> of that, or just handle links differently?
> 
> Thank you very much!
> 
> David
> 
> 
> 
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: How to create action error with two keys?

2003-07-25 Thread Michael Ruppin
I look up the second key in the MessageResources. 
This can be a hassle, especially in JSPs.  If there's
a better alternative, I'm unaware.

m

--- "White, Joshua A (HTSC, CASD)"
<[EMAIL PROTECTED]> wrote:
> Say I have the following items in my message
> properties file.
> 
> 
> label.name=Your Name
> errors.required={0} is required.
> 
> 
> What is the simplest way for me to end up with "Your
> Name is required."
> 
> The constructor takes a key and a value.  What if
> you have two keys?  
> 
> ActionError(java.lang.String key, java.lang.Object[]
> values)
> 
> 
> Thanks,
> 
> Joshua
> 
> 
> This communication, including attachments, is for
> the exclusive use of 
> addressee and may contain proprietary, confidential
> or privileged 
> information. If you are not the intended recipient,
> any use, copying, 
> disclosure, dissemination or distribution is
> strictly prohibited. If 
> you are not the intended recipient, please notify
> the sender 
> immediately by return email and delete this
> communication and destroy all copies.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: how to do this?? [Tag inside a tag]

2003-07-25 Thread Michael Ruppin
The third example in Kris' post, would do.  For your
JSP, that would translate to:



Where does foo come from, you ask?  I believe this
whould be one of a few possible answers:

<%
String foo = showvalue.getProviderName();
%>

m

--- Sashi Ravipati <[EMAIL PROTECTED]> wrote:
> so how can I set the value in the jsp:param tag
> which is available in
> bean:write.
> 
> Please bear with me as I am learning..
> 
> Thanks
> 
> >>> [EMAIL PROTECTED] 07/25/03 10:43AM >>>
> You can't do that.  See here for more:
> 
>
http://marc.theaimsgroup.com/?l=struts-user&m=105771765327337&w=2
> 
> HTH
> 
> m
> 
> --- Sashi Ravipati <[EMAIL PROTECTED]> wrote:
> > " />
> > 
> > I get the following errors
> > 
> > Error(32): Attribute: showvalue" is not a valid
> > attribute name
> > Error(32): Attribute: property is not a valid
> > attribute name
> > Error(33): Not expecting text inside this tag
> > 
> > Can I give the tag inside a tag?
> > 
> > Thanks
> > 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: how to do this?? [Tag inside a tag]

2003-07-25 Thread Michael Ruppin
You can't do that.  See here for more:

http://marc.theaimsgroup.com/?l=struts-user&m=105771765327337&w=2

HTH

m

--- Sashi Ravipati <[EMAIL PROTECTED]> wrote:
> " />
> 
> I get the following errors
> 
> Error(32): Attribute: showvalue" is not a valid
> attribute name
> Error(32): Attribute: property is not a valid
> attribute name
> Error(33): Not expecting text inside this tag
> 
> Can I give the tag inside a tag?
> 
> Thanks
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: dynamic forward to different pages from ActionClass

2003-07-23 Thread Michael Ruppin
I posted similar code today, just replace
forwardfrommapping.getPath() with your action mapping
path:

http://www.mail-archive.com/struts-user%40jakarta.apache.org/msg74345.html

as did Wendy, yesterday:

http://www.mail-archive.com/struts-user%40jakarta.apache.org/msg74221.html

m

--- Ashish Kulkarni <[EMAIL PROTECTED]>
wrote:
> Hi ,
> 
> Do u have a example code of doing this, it will be a
> great start for me
> 
> Regards
> Ashish
> --- Wendy Smoak <[EMAIL PROTECTED]> wrote:
> > > i want to forward the request to the page from
> > where it came,( i have this
> > > info in session) how can i do it, this must be
> > dynamic
> > 
> > I recently discovered that you can construct your
> > own ActionForward object,
> > you don't have to rely on mapping.findForward() to
> > return one.  If you've
> > got the path you need in the session, use it with
> > one of the ActionForm
> > constructors and return that from your Action's
> > execute method.
> > 
> > I'm not sure this is the best way to do it, but it
> > does work...
> > 
> > -- 
> > Wendy Smoak
> > Applications Systems Analyst, Sr.
> > Arizona State University, PA, IRM 
> > 
> 
> 
> =
> A$HI$H
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: LookupDispatchAction problem

2003-07-23 Thread Michael Ruppin
Great question.  You don't, which is why I did my own
dispatch Action which works off the existence of a
parameters in the request, not their value.  In other
words, I made a different form property for each type
of submission, and I check which are non-null. 
Otherwise, you can't have two buttons with the same
label on a page, and translation of your messages
could cause methods to be unreachable.

There are other alternatives, if JavaScript is an
option for you.  For me, it is not.  Another
possibility is to have many HTML forms, one for each
submission, and put the method="foo" into a hidden. 
This is not always possible, if you need nesting.

m

--- Tim Clotworthy <[EMAIL PROTECTED]> wrote:
> This is really a simple aside, but is there a way to
> have the text
> (label) of the button appear different that the
> value of the submit, and
> if so, how does one do it? Thanks.
> 
> > -Original Message-
> > From: Tim Clotworthy
> [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 23, 2003 5:07 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: LookupDispatchAction problem
> > 
> > Thanks for all help. It is fixed now. God bless
> you, one and all.
> > 
> > > -Original Message-
> > > From: Suzette Daniel [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, July 23, 2003 5:01 PM
> > > To: 'Struts Users Mailing List'
> > > Subject: RE: LookupDispatchAction problem
> > >
> > > No prob, here you go:
> > >
> > >  name="org.apache.struts.action.MESSAGE"
> > > scope="application">
> > > ERROR:  Application resources not loaded --
> check servlet
> > container
> > > logs for error messages.
> > > 
> > >
> > > Suzette
> > >
> > > -Original Message-
> > > From: Tim Clotworthy
> [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, July 23, 2003 5:00 PM
> > > To: 'Struts Users Mailing List'
> > > Subject: RE: LookupDispatchAction problem
> > >
> > >
> > > Thanks, but I switch it to method, and same
> error occurs.
> > >
> > > Again, I wonder if my problem is related to my
> resource bundle, not
> > being
> > > able to find it, etc. How can I simply diagnose
> that the tag
> >  > > key="button.add" /> is being processed properly
> by the ActionServlet
> > > (value
> > > being found, etc.). thanks. Sorry for this going
> on-and-on. Who
> > knew...
> > >
> > >
> > >
> > > > -Original Message-
> > > > From: Suzette Daniel [mailto:[EMAIL PROTECTED]
> > > > Sent: Wednesday, July 23, 2003 4:43 PM
> > > > To: 'Struts Users Mailing List'
> > > > Subject: RE: LookupDispatchAction problem
> > > >
> > > > I received the same error, so I switched to
> using my own property
> > > "method"
> > > > and if fixed that error.
> > > >
> > > > JSP:
> > > >  > > >
> titleKey="verify.order.add.another.button.title">
> > > > 
> > > > 
> > > >
> > > > > Struts-config:
> > > > >   ..
> > > > >  name="monitorInfoForm"
> > > > > input="/pages/verifyorder.jsp"
> parameter="method"
> > > > >
>
type="com.waca.nec.consumer.actions.StoreProductDispatchAction"
> > > > > scope="session">
> > > >
> > > > Suzette
> > > >
> > > > -Original Message-
> > > > From: Tim Clotworthy
> [mailto:[EMAIL PROTECTED]
> > > > Sent: Wednesday, July 23, 2003 4:40 PM
> > > > To: 'Struts Users Mailing List'
> > > > Subject: RE: LookupDispatchAction problem
> > > >
> > > >
> > > > Thanks to all earnest responses. I still have
> a problem, but it
> has
> > > > evolved a little. I have simplified the syntax
> (using husted tip
> > 003),
> > > > so that
> > > my
> > > > jsp has:
> > > >
> > > > 
> > > > 
> > > > 
> > > >
> > > > (as he suggested, using the default name of
> submit that
> corresponds
> > to
> > > the
> > > >  tag, and in my struts-config, I
> now have:
> > > >
> > > >  > > >
> > >
> >
>
type="com.hotapp.fes.presentation.support.action.FESSupportOrgDispatchAc
> > > > tion" name="SupportOrgForm"
> parameter="submit">
> > > >  path="/fes/jsp/FESSupportOrgTable.jsp"/>
> > > > 
> > > >
> > > > and in my action I have:
> > > >
> > > > protected Map getKeyMethodMap() {
> > > >
> > > > Map map = new HashMap();
> > > > map.put("button.selectOrgs", "selectOrgs");
> > > > return map;
> > > > }
> > > >
> > > >
> > > > But alas, I am still getting an error (below).
> I wonder if my
> > resource
> > > > bundled is not being read properly, because
> the button on the form
> > > appears
> > > > with the tag syntax " (obviously red flag
> > something
> > > is
> > > > wrong), rather than the value from the
> properties file. How can I
> > > check
> > > > that
> > > > the property button.selectOrgs is being found
> in the resource
> > bundle,
> > > or,
> > > > for that matter, that the resource bundle is
> being found at all?
> > > >
> > > >
> > > > Thanks so much to all.
> > > >
> > > > javax.servlet.ServletException:
> Request[/SupportOrgDispatchAction]
> > > does
> > > > not
> > > > contain handler parameter named submit
> > > > at
> > > >
> > >
> >
>
org.apache.struts.actions.Lookup

Re: Dynamic ActionMapping params

2003-07-23 Thread Michael Ruppin

--- Jim Kennedy <[EMAIL PROTECTED]> wrote:
> I have created several sites that use the
> "mapping.findForward("BLA") method to forward (or
> redirect) to a relative URL.  This has always been
> statically specified in my struts-config.xml like
> this:
> 
>  redirect="true"/>
> 
> then in code I do:
> 
> mapping.findForward("BLA");   //(simple stuff)
> 
> 
> 
> Now I have a need to forward to a URL that will have
> dynamic parameters like this:
> 
>
/main_layout.jsp?param1=value¶m2=value$param3=value
> 
> Not sure how to pull this off.  Obviously I can't
> use a statically defined forward definition.  I
> guess I could put the params in the request, which
> works fine if I forward, but what if I redirect.  I
> would have to put them in the session.  Not clean
> coding in my opinion.  I would rather specify as
> querystring params.

I'm doing that, with 1.1-rc1:

  ActionForward forwardfrommapping =
mapping.findForward("BLA");
  if (forwardfrommapping != null)
  {
  forward = new
ActionForward(forwardfrommapping.getPath() +
"?param1=" + param1.value(), true);
  }

Of course, beware that getPath() may give you more
than "/main_layout.jsp" when the struts-config changes
;)

m

> Anyone done this?
> 
> I am using Struts v1.02
> 
> 
> 
> Jim Kennedy
> IT Consultant
>
-
> 
> 
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: urgent: Iterate over Array with HashMaps

2003-07-22 Thread Michael Ruppin
Whoops, forgot the property="mapEquipment" in the
iterate tag.

--- Michael Ruppin <[EMAIL PROTECTED]> wrote:
> Your use of the logic:iterate attributes does not
> look
> right
>
(http://jakarta.apache.org/struts/struts-logic.html#iterate).
>  I believe you want 'name="CARVO"', 'id' is supposed
> to be whatever name you want to assign to Objects
> from
> the map (In this special case, the Map.Entry
> Objects).
>  You use that exposed instance for the bean:writes
> inside your iteration, like:
> 
> 
>   
> 
> 
> *Since this is a Map, see the link.  For other
> collections, this would correspond to a getter of
> the
> equipment instance.
> 
> HTH
> 
> m
> 
> --- "news.basebeans.com" <[EMAIL PROTECTED]>
> wrote:
> > Hi there,
> > 
> > does anybody know how to iterate over an Array
> with
> > HashMaps with the
> > logic:terate tag?
> > 
> > I have a VO (CARVO) which contains the following
> > object with getter an
> > setter methods:
> > private Map mapEquipment[] = null;
> > 
> > the JSP page has the following code:
> > 
> >  > class="de.media.car.CarVO"/>
> > 
> > How it is possible to read the Array of Maps?
> > 
> > 
> >  TEST-
> > 
> > 
> > 
> > 
> > Thanks
> > 
> > 
> > 
> > lukas
> > 
> > 
> > 
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: urgent: Iterate over Array with HashMaps

2003-07-22 Thread Michael Ruppin
Your use of the logic:iterate attributes does not look
right
(http://jakarta.apache.org/struts/struts-logic.html#iterate).
 I believe you want 'name="CARVO"', 'id' is supposed
to be whatever name you want to assign to Objects from
the map (In this special case, the Map.Entry Objects).
 You use that exposed instance for the bean:writes
inside your iteration, like:


  


*Since this is a Map, see the link.  For other
collections, this would correspond to a getter of the
equipment instance.

HTH

m

--- "news.basebeans.com" <[EMAIL PROTECTED]>
wrote:
> Hi there,
> 
> does anybody know how to iterate over an Array with
> HashMaps with the
> logic:terate tag?
> 
> I have a VO (CARVO) which contains the following
> object with getter an
> setter methods:
> private Map mapEquipment[] = null;
> 
> the JSP page has the following code:
> 
>  class="de.media.car.CarVO"/>
> 
> How it is possible to read the Array of Maps?
> 
> 
>  TEST-
> 
> 
> 
> 
> Thanks
> 
> 
> 
> lukas
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Dsiplaying forms without validation

2003-07-22 Thread Michael Ruppin
There are probably more ways, too.  Depending on your
design, I'd recommend Mark's suggestion.  Validation
in the Action makes sense particularly when using a
variant of DispatchAction, wherein there will be many
methods for different submissions, only some of which
require validation, and perhaps differing validation.

m

--- "Jens v.P." <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> this question was asked several times before, I also
> asked this 
> questions a week ago. Just have a look at the
> mailing list archive.
> 
> There are two approaches:
> 
> 1) Two actions: "ViewFormFirstTimeAction" with
> validate="false" in the 
> struts-config.xml, and ViewFormAction with
> validate="true"
> 
> 2) Create your own form class (as a subclass of a
> validator form 
> class). Check whether the submit-value is present in
> the quest and, if 
> not, skip super class validation, otherwise call
> super class validation 
> function. Caution: You have to pay attention that in
> the first case 
> your form is not skipped (no error occured and the
> "success" page is 
> forwarded) - you maybe have to add a "firsttime"
> forward or something 
> like this.
> 
> Jens
> 
> BTW: Oh - this question is also listed in the FAQ...
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re:_a_little_question:Please_help_me

2003-07-22 Thread Michael Ruppin
I never define beans on the fly in my jsps, I populate
them in my action classes, and they're there already
in the jsp thanks to my Struts action mappings.  It
should, however, be straightforward from the Struts
bean:define tag
(http://jakarta.apache.org/struts/struts-bean.html#define).
 Here's the scriptlet to do the equivalent without
tags:

<%
String output=null;
MessageResources resources =
(MessageResources)pageContext.getServletContext().getAttribute("org.apache.struts.action.MESSAGE");
if(resources!=null){
  output = resources.getMessage("errors.required");
}
%>
<%=output%>

HTH

m

--- bacco77 <[EMAIL PROTECTED]> wrote:
> ok. it works
> 
> But the System.out shows me the message id in the
> application resource file.(errors.required for
> example)
> 
> How can i print it on the jsp page using a simple
> bean?
> 
> Thank you very much
> 
> You have been very helpful
> 
> 
> 
> -- Initial Header ---
> 
> From  : Michael Ruppin
> To  : Struts Users Mailing List
> Cc  : 
> Date  : Tue, 22 Jul 2003 08:32:00 -0700 (PDT)
> Subject : Re: a_little_question:Please_help_me
> 
> > Try:
> > 
> > org.apache.struts.action.ActionErrors errs =
> >
>
(org.apache.struts.action.ActionErrors)request.getAttribute("org.apache.struts.action.ERROR");
> > if(errs!=null){
> > Iterator i=errs.get();
> > while(i.hasNext()){
> > org.apache.struts.action.ActionError err =
> > (org.apache.struts.action.ActionError)i.next();
> > if (err!=null) {
> >
> > System.out.println("ERROR.key="+err.getKey());
> > }
> > }
> > }
> > 
> > HTH
> > 
> > m
> > 
> > --- bacco77 <[EMAIL PROTECTED]> wrote:
> > > Hi all.
> > > Just a little question.
> > > How can i iterate the ActionErrors errors
> collection
> > > to display messages
> > > into my jsp without using logic tags ot any
> other
> > > tag.
> > > Is ti in the request or in the session scope?
> > > How cani get it?
> > > 
> > > Please help me
> > > 
> > > Thanks
> > > 
> > > Antonio Senatore
> > > 
> > > 
> > >
> >
>
-
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> > http://sitebuilder.yahoo.com
> > 
> >
>
-
> > 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]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: a_little_question:Please_help_me

2003-07-22 Thread Michael Ruppin
Try:

org.apache.struts.action.ActionErrors errs =
(org.apache.struts.action.ActionErrors)request.getAttribute("org.apache.struts.action.ERROR");
if(errs!=null){
Iterator i=errs.get();
while(i.hasNext()){
org.apache.struts.action.ActionError err =
(org.apache.struts.action.ActionError)i.next();
if (err!=null) {
   
System.out.println("ERROR.key="+err.getKey());
}
}
}

HTH

m

--- bacco77 <[EMAIL PROTECTED]> wrote:
> Hi all.
> Just a little question.
> How can i iterate the ActionErrors errors collection
> to display messages
> into my jsp without using logic tags ot any other
> tag.
> Is ti in the request or in the session scope?
> How cani get it?
> 
> Please help me
> 
> Thanks
> 
> Antonio Senatore
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: action mapping 'input' question

2003-07-18 Thread Michael Ruppin
Unless validation suceeds, this looks like an infinite
loop to me:

input="/ForgotPassword.do"
path="/ForgotPassword"> 

m

--- Erez Efrati <[EMAIL PROTECTED]> wrote:
> I am using struts/tiles/validator in my application.
> 
> Using the following configuration works fine, still
> I see that on the
> first invocation the form gets validated and I get
> validation errors. My
> ForgotPasswordAction action is used both for the
> INIT and the SUBMIT
> operations. The only solution I read about is
> putting 'validate'=false
> and control the invocation of the super.validate()
> in my code. Is this
> true?
> 
>type="web.ForgotPasswordAction"  
>   validate="true" 
>   input=".forgotPassword" 
>   scope="request" 
>   path="/ForgotPassword"> 
> 
>redirect="false" />
> 
> 
> If I use the following:
>type="web.ForgotPasswordAction"  
>   validate="true" 
>   input="/ForgotPassword.do" 
>   scope="request" 
>   path="/ForgotPassword"> 
> 
>redirect="false" />
> 
> 
> Then I get the following error: (now it's endless...
> really so sorry :)
> 
> javax.servlet.ServletException: Servlet execution
> threw an exception
>   at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:269)
>   at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:193)
>   at
>
org.securityfilter.filter.SecurityFilter.doFilter(SecurityFilter.java:19
> 9)
>   at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:213)
>   at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:193)
>   at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:256)
>   at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643)
>   at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80)
>   at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:191)
>   at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643)
>   at
>
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
> va:246)
>   at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:641)
>   at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80)
>   at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at
>
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
> 5)
>   at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :180)
>   at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643)
>   at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
> lve.java:171)
>   at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:641)
>   at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :172)
>   at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:641)
>   at
>
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509
> )
>   at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:641)
>   at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80)
>   at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:174)
>   at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643)
>   at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80)
>   at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at
>
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>   at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:59
> 4)
>   at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
> onnection(Http11Protocol.java:392)
>   at
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:56
> 5)
>   at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .java:619)
>   at java.lang.Thread.run(Thread.java:536)
> 
> 
> root cause 
> 
> java.lang.StackOverflowError
>   at
>
org.apache.catalina.core.ApplicationHttpRequest.setAttribute(Application
> HttpRequest.java:247)

Re: Mixing text and Form fields

2003-07-16 Thread Michael Ruppin
Yes, if you switch the  to ,
there will be not  HTML rendered, and therefore
nothing submitted.  Yes, you can use 
followed by  if you need a "normal
string".  Alternatively, consider adding
disabled="true" to your  tags.

m

--- Linus Nikander <[EMAIL PROTECTED]> wrote:
> How do I, at the Jsp level, successfully mix text
> and form fields where the
> data for them stems from the same bean. For example
> I have a Form bean,
> registeredUsersForm which contains a List of
> UserInfo beans. I've got a JSP
> that displays all the information from each bean in
> the list in a pretty
> table. The thing is that I don't want to let ther
> user edit some of the
> fields (registration date for instance). Basically
> I'd like to just output
> it as "normal" text if i could, in the same loop
> that generates the Form. I
> suspect that if I don't include the value as a part
> of the form then it
> won't be submitted to the next step, maybe that
> could be solved by having
> the same field rendered as text and a 
> field at the same time ?
> 
> The interation that generates the form is as
> follows:
> 
>  property="regUserList"
> indexId="i">
>   
>  property="<%=\"registeredUserBean[\" + i +
> \"].ssn\"%>" size="50"   />
>  property="<%=\"registeredUserBean[\" + i +
> \"].isBlacklisted\"%>"  />
>  property="<%=\"registeredUserBean[\" + i +
> \"].dRegistrationDate\"%>"
> size="50"  />
>  property="<%=\"registeredUserBean[\" + i +
> \"].isContactLetterSent\"%>"
> />
>  property="dRegistrationDate"
> />
> 
> 
> 
> In the above I'd like to render the registration
> date as a normal string
> instead of a field, how do I achieve this using the
> same dataobject that is
> populating the form ?
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



link tags and nesting

2003-07-15 Thread Michael Ruppin
Is there a way to accomplish something resembling this
without scriptlet?:




The jsp rendering this is using a nested indexed
ActionForm, and the action mapped via Foo.do uses the
same nested indexed ActionForm.  I'm using the nested
taglib, but it doesn't appear as if there's a way to
automate the "paramId" like one would the "name" for a
tag rendering some  HTML.

m

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: Cancel button not working?

2003-07-08 Thread Michael Ruppin
Odd, I can't reproduce that in 1.1-rc1.  Unless you're
extending something which might override the
isCancelled(HttpServletRequest) method, or the
html:cancel tag is not contained within an html:form
tag, I can't think of anything else.

m

--- Sashi Ravipati <[EMAIL PROTECTED]> wrote:
> This is how I have my cancel tag.
> 
> 
> 
>   
> 
> >>> [EMAIL PROTECTED] 07/08/03 02:27PM >>>
> The complete content of your html:cancel tag is
> probably key to solving this problem.
> 
> m
> 
> --- Sashi Ravipati <[EMAIL PROTECTED]> wrote:
> > 
> >  isCancelled(request) is always returning false
> > (Even when cancel button
> > is clicked)
> > 
> > Need some help...
> > 
> > Thanks
> > 
> > 
> > >>> [EMAIL PROTECTED] 07/08/03 09:10AM >>>
> > I have a  in my jsp page. and in my
> > action I have
> > 
> > if(isCancelled(request)){
> >   return mapping.findForward("index"); 
> > }
> > 
> > 
> > But it is not working. What am I doing wrong here.
> I
> > am using Struts 1.1
> > final
> > 
> > Thanks
> > 
> 
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: Cancel button not working?

2003-07-08 Thread Michael Ruppin
The complete content of your html:cancel tag is
probably key to solving this problem.

m

--- Sashi Ravipati <[EMAIL PROTECTED]> wrote:
> 
>  isCancelled(request) is always returning false
> (Even when cancel button
> is clicked)
> 
> Need some help...
> 
> Thanks
> 
> 
> >>> [EMAIL PROTECTED] 07/08/03 09:10AM >>>
> I have a  in my jsp page. and in my
> action I have
> 
> if(isCancelled(request)){
>   return mapping.findForward("index"); 
> }
> 
> 
> But it is not working. What am I doing wrong here. I
> am using Struts 1.1
> final
> 
> Thanks
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: java.util.ConcurrentModificationException at org.apache.struts.action.ActionMessages.add(ActionMessages.java:185)

2003-06-20 Thread Michael Ruppin
This is occuring from inside an ActionForm validate
method, not an Action class. 

m

--- "Richard J. Duncan" <[EMAIL PROTECTED]> wrote:
> Do you have the ActionErrors instance bound to an
> instance variable in the class:
> 
>   public class MyAction extends Action {
> ..
> private ActionMessages messages;
> 
>   }
> 
> Struts treats each Action class as a singleton -
> there is only one instance ever created. As such an
> instance variable is not thread-safe and if multiple
> threads call the action, they'll be using the same
> ActionMessages instance.  
> 
> Regards,
>  
> Rich
> 
> -Original Message-
> From: Michael Ruppin [mailto:[EMAIL PROTECTED] 
> Sent: Friday, June 20, 2003 12:29 PM
> To: Struts Users Mailing List
> Subject: java.util.ConcurrentModificationException
> at
>
org.apache.struts.action.ActionMessages.add(ActionMessages.java:185)
> 
> I'm getting the following, using 1.1-rc1
> ActionMessages.add(ActionMessages messages):
> 
> [6/20/03 11:15:23:344 CDT]  2d4fa5a WebGroup  E
> SRVE0026E: [Servlet Error]-[AxisPortalServlet]:
> java.util.ConcurrentModificationException
>   at
>
java.util.AbstractList$Itr.checkForComodification(AbstractList.java(Inlined
> Compiled Code))
>   at
>
java.util.AbstractList$Itr.next(AbstractList.java(Compiled
> Code))
>   at
>
org.apache.struts.action.ActionMessages.add(ActionMessages.java:185)
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



java.util.ConcurrentModificationException at org.apache.struts.action.ActionMessages.add(ActionMessages.java:185)

2003-06-20 Thread Michael Ruppin
I'm getting the following, using 1.1-rc1
ActionMessages.add(ActionMessages messages):

[6/20/03 11:15:23:344 CDT]  2d4fa5a WebGroup  E
SRVE0026E: [Servlet Error]-[AxisPortalServlet]:
java.util.ConcurrentModificationException
at
java.util.AbstractList$Itr.checkForComodification(AbstractList.java(Inlined
Compiled Code))
at
java.util.AbstractList$Itr.next(AbstractList.java(Compiled
Code))
at org.apache.struts.action.ActionMessages.add(ActionMessages.java:185)

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Redirect and request attributes

2003-06-04 Thread Michael Ruppin
I'm setting redirect=true on an ActionForward to
remove the request parameters which do not correspond
to the form named in the mapping for the path.  This
works nicely, but it appears as if anything I need to
get into the new form needs to be a request parameter,
as a result.  Is this true?  If I create a new form,
populate it, and make it a request attribute with the
name specified in the mapping, it's used when
redirect=false, but it's ignored when redirect=true.

m

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: Collection Implementation

2003-06-03 Thread Michael Ruppin
Gee, isn't thread safty an issue with Struts?  I
thought I should use synchronized Objects in my
Actions.

--- David Graham <[EMAIL PROTECTED]> wrote:
> Vector was a poorly designed class that has been
> replaced by ArrayList.  New 
> code should not use Vector.  If you need a
> synchronized list do this 
> instead:
> 
> List myList = Collections.synchronizedList(new
> ArrayList());
> 
> David
> 
> >Without checking the archives for specific
> references,
> >I'm still sure I've read on multiple occasions,
> "Don't
> >use Vectors, use ArrayLists".  I was under the
> >impression that this was because Vectors are not
> >synchronized.  After refactoring, today, I read
> here
> >that ArrayLists are not synchronized:
> >
>
>http://java.sun.com/j2se/1.4.1/docs/api/java/util/ArrayList.html
> >
> >Time to refactor again?  I need to be using one of
> the
> >static Collections.synchronized* methods, right?
> >Beyond using Objects that are synchronized, what
> >difference does it make which implementation of
> >Collection I choose?
> >
> >m
> >
> >
> >__
> >Do you Yahoo!?
> >Yahoo! Calendar - Free online calendar with sync to
> Outlook(TM).
> >http://calendar.yahoo.com
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> 
>
_
> Protect your PC - get McAfee.com VirusScan Online  
>
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Collection Implementation

2003-06-03 Thread Michael Ruppin
Without checking the archives for specific references,
I'm still sure I've read on multiple occasions, "Don't
use Vectors, use ArrayLists".  I was under the
impression that this was because Vectors are not
synchronized.  After refactoring, today, I read here
that ArrayLists are not synchronized:

http://java.sun.com/j2se/1.4.1/docs/api/java/util/ArrayList.html

Time to refactor again?  I need to be using one of the
static Collections.synchronized* methods, right? 
Beyond using Objects that are synchronized, what
difference does it make which implementation of
Collection I choose?

m


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: NPE with getResourceAsStream

2003-05-31 Thread Michael Ruppin
What's getServletContext() returning?  null?

m

--- "Raible, Matt" <[EMAIL PROTECTED]>
wrote:
> In a regular servlet, I'm trying to do the
> following:
> 
> InputStream forms =
>  
>
getServletContext().getResourceAsStream("/WEB-INF/validation.xml");
> 
> But it's throwing a NPE, and validation.xml is in my
> WEB-INF folder.  Any
> ideas why this may be happening?
> 
> Thanks,
> 
> Matt
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



RE: Nesting logic tags

2003-05-31 Thread Michael Ruppin
Well, I'm not an expert, but I can try.  First, the
obvious stuff I assume you know.  ansm must be a bean
you've exposed, right?  If so, then it must have a
getter method, getEntryType().  In order for the
contents within logic:equal to appear, this method
must return "subformat" [or "group"].  I *think* that
if the ansm bean were not exposed, or you didn't have
the getter, there'd be an error, so I guess that's not
it.  I would do a  prior to the logic tags, and
see what happens.

m

--- "Kamholz, Keith   (corp-staff) USX"
<[EMAIL PROTECTED]> wrote:
> Hm
> I don't see what would be wrong then.  I'll repost
> my code.
> Any ideas anybody?
> 
> 
>   
>   
>   
>   : 
>   
>   
>   
>write="true"/>
>   
>   
>   
>property="entryType">
>   
>   
>   
>key="app.label.subType"/>: 
>   
>   
>   
>write="true"/>
>   
>   
>   
>   
>   
>   
>   
>   : 
>   
>   
>   
>size="50"
> maxlength="50"/>
>   
>   
>   
>property="entryType">
>   
>   
>   
>key="app.label.typeFormat"/>: 
>   
>   
>   
>size="60" maxlength="60"/>
>   
>   
>   
>   
>   
>key="app.label.tabulatedFormat"/>: 
>   
>   
>   
>property="tabulatedFormat" size="60"
> maxlength="60"/>
>   
>   
>   
>   
>key="app.label.lastUsed"/>: 
>   
>   
>   
>size="30" maxlength="30"/>
>   
>   
>   
>   
> 
> 
> 
> ~ Keith
> 
> http://www.buffalo.edu/~kkamholz
> 
> 
> 
> -Original Message-
> From: Michael Ruppin [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 30, 2003 12:24 PM
> To: Struts Users Mailing List
> Subject: RE: Nesting logic tags
> 
> 
> Struts logic tags work fine "nested" in HTML table
> tags.  Something else must be wrong, perhaps with
> your
> logic tag attributes.  The nested tag library is for
> nested BEANS, not for nested tags.  Unless you have
> Forms which contain Forms, or Forms with Collections
> of Forms, you don't need the nested tab library.
> 
> HTH
> 
> m
> 
> --- "Kamholz, Keith   (corp-staff) USX"
> <[EMAIL PROTECTED]> wrote:
> > The issue isn't getting entryType into the form. 
> > The issue is conditionally
> > displaying a couple rows in the table/form.  I
> > already have the entryType in
> > a hidden input earlier in the form.
> > Input anybody?
> > I'd really appreciate it.
> > 
> > ~ Keith
> > 
> > http://www.buffalo.edu/~kkamholz
> > 
> > 
> > 
> > -Original Message-
> > From: Phillip Qin [mailto:[EMAIL PROTECTED]
> > Sent: Friday, May 30, 2003 11:09 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Nesting logic tags
> > 
> > 
> > If ansm is a member variable of your ActionForm,
> use
> > 
> > 
> > 
> > -Original Message-
> > From: Kamholz, Keith (corp-staff) USX
> > [mailto:[EMAIL PROTECTED] 
> > Sent: May 30, 2003 10:53 AM
> > To: '[EMAIL PROTECTED]'
> > Subject: Nesting logic tags
> > 
> > Hey,
> > I'm using a table to display a form, but there's
> one
> > row that I want to
&

RE: Nesting logic tags

2003-05-31 Thread Michael Ruppin
Struts logic tags work fine "nested" in HTML table
tags.  Something else must be wrong, perhaps with your
logic tag attributes.  The nested tag library is for
nested BEANS, not for nested tags.  Unless you have
Forms which contain Forms, or Forms with Collections
of Forms, you don't need the nested tab library.

HTH

m

--- "Kamholz, Keith   (corp-staff) USX"
<[EMAIL PROTECTED]> wrote:
> The issue isn't getting entryType into the form. 
> The issue is conditionally
> displaying a couple rows in the table/form.  I
> already have the entryType in
> a hidden input earlier in the form.
> Input anybody?
> I'd really appreciate it.
> 
> ~ Keith
> 
> http://www.buffalo.edu/~kkamholz
> 
> 
> 
> -Original Message-
> From: Phillip Qin [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 30, 2003 11:09 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Nesting logic tags
> 
> 
> If ansm is a member variable of your ActionForm, use
> 
> 
> 
> -Original Message-
> From: Kamholz, Keith (corp-staff) USX
> [mailto:[EMAIL PROTECTED] 
> Sent: May 30, 2003 10:53 AM
> To: '[EMAIL PROTECTED]'
> Subject: Nesting logic tags
> 
> Hey,
> I'm using a table to display a form, but there's one
> row that I want to
> hide, depending on a previous user selection.
> Right now, my code is:
> 
> 
>   
>   
>   
>   : 
>   
>   
>   
>write="true"/>
>   
>   
>   
>property="entryType">
>   
>   
>   
>key="app.label.subType"/>: 
>   
>   
>   
>write="true"/>
>   
>   
>   
>   
>   
>   
>   
>   : 
>   
>   
>   
>size="50"
> maxlength="50"/>
>   
>   
>   
>property="entryType">
>   
>   
>   
>key="app.label.typeFormat"/>: 
>   
>   
>   
>size="60" maxlength="60"/>
>   
>   
>   
>   
>   
>key="app.label.tabulatedFormat"/>: 
>   
>   
>   
>property="tabulatedFormat" size="60"
> maxlength="60"/>
>   
>   
>   
>   
>key="app.label.lastUsed"/>: 
>   
>   
>   
>size="30" maxlength="30"/>
>   
>   
>   
>   
> 
> 
> Unfortunately, it doesn't like me nesting the logic
> tags in the table code.
> I've never used the struts nested taglib, would this
> be an appropriate place
> to use it?  If not, does anyone know of a workaround
> I could use?
> 
> Thanks in advance.
> 
> 
> ~ Keith
> 
> http://www.buffalo.edu/~kkamholz
> 
> 
> 
>
-
> 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]
> 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: Forwarding to Action

2003-05-30 Thread Michael Ruppin
Request variables are not lost unless you set
redirect=true in your [editService] mapping, or
construct an ActionForward from scratch, setting
redirect=true.

--- Alex Winston <[EMAIL PROTECTED]> wrote:
> My apologizes for yet another thread on action
> chaining, but I am in a
> bit of a pickle, and the archives have been of
> little help.
> 
> I have the following struts configuration, modified
> for brevity.
> 
>type="org.apache.struts.action.DynaActionForm">
>   
>type="java.lang.String"/>
>type="java.lang.String"/>
>type="java.lang.String"/>
> 
> 
>
>
type="com.christianity.dashboard.struts.action.manager.EditService"
>   name="serviceForm"
>   scope="request"
>   validate="false">
>   
> 
> 
>
>
type="com.christianity.dashboard.struts.action.manager.CreateAspect"
>   name="aspectForm"
>   scope="request"
>   validate="false">
>   
> 
> 
> 
> The problem occurs when I forward from createAspect
> to editService after
> setting request variables. I am setting attributes
> of the serviceForm in
> the request within createAspects execute method, but
> unfortunately no
> values are set when editService checks the
> serviceForm DynaActionForm
> within its execute method.  Am I incorrect in
> assuming that this is
> possible, and if not what am I missing?  Are request
> variables lost when
> forwarding to another action?
> 
> Thanks
> Alex
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: Struts and the infamous IE multiple browser/same session problem

2003-05-30 Thread Michael Ruppin
I guess you could say, "An application where those
footing the bill (Client) demand it".  But, it's not
application specific, and it's not multiple sessions
we're talking about here, it's multiple browsers on
the same session.  Multiple sessions are a non-issue. 
Regardless of what your application is, one of the
following should be true:

  1) You do nothing about multiple browsers on the
same session, and
a) You use no session data
b) You take your chances that session data may
become corrupt
  2) You prevent multiple browsers on the same session
through
a) JavaScript (Risky, since it could be turned
off)
b) Synchronized Tokens?
  3) You do something to segregate the session data
between browsers.

1b is not acceptable to most Clients since their data
is at risk, and when it is acceptable, you still take
the chance that you may have corrupted data to fix.  2
is acceptable for most Clients, data integrity tends
to be a higher priority than keeping the end user
happy.  When, however, the Client insists on data
integrity and optimal ease of use, you're left to
implement 1a or 3.

[OT] If your real question was what "Under what
circumstances would a user want more than one browser
accessing a given application, regardless of whether
or not they have the same session”,  the answers are
many.  How about a warehouse application where the
Customer Service Representatives need to see Orders,
Inventory, and Customer data, at the same time?  It’s
not always acceptable to anticipate what combinations
of data they need to see at the same time, and can it
into a screen.  Nor is it acceptable to tell them they
have to keep navigating from one to another
constantly.  The answer is, they want multiple
browsers viewing whatever datum is of interest to them
at the moment.

m


--- Doug <[EMAIL PROTECTED]> wrote:
> Michael Ruppin wrote:
> > I'm reconsidering my approach to this problem, in
> > favor of something more elegant/more compatible
> with
> > out-of-the-box Struts.  Anyone tackled this yet?
> > 
> > For those not aware, MS IE allows users to launch
> a
> > browser against the same session via
> File/New/Window
> > (Ctrl-N).  The issue is, if you have need to keep
> data
> > in the session (which I do), a submission from one
> > browser could grab and/or overwrite session data
> meant
> > for the other browser.  This can lead to data
> > integrity problems and other weirdness.  Telling
> my
> > user community not to use MS IE or it's Ctrl-N
> feature
> > is not an option.
> > 
> > My current approach is to put a hidden random
> "key"
> > into the HTML, and name the session attribute with
> > that.  When one of the two browsers submits a
> request
> > (Assuming, at this point, they've opened another)
> the
> > session data is pulled by key, assigned a new key,
> a
> > new copy is placed in the session named with the
> new
> > key, and the new key is rendered  in the HTML
> > response.  The old session data may or may not be
> > removed, depending on whether or not it is
> acceptable
> > for the browser with the old key to [gracefully]
> fail,
> > how we choose to expire session data, and whether
> or
> > not a means of dealing with stale data is
> supported by
> > the model.
> > 
> > This works fine, but in doing so I've had to write
> my
> > own methods for populating collections of forms
> which
> > would have otherwise been taken care of for me by
> > specifying session scope in struts-config.  Am I
> > missing a better way?
> > 
> > m
> 
> Out of curiosity, what kind of application do you
> have where you really 
> *need* to support someone having multiple different
> sessions active at 
> the same time?  I'm not necessarily saying that you
> don't need this - 
> I'm just wondering.  You may be bending over
> backwards to solve a 
> problem that real users (as opposed to testers)
> won't have.
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: Action Chaining - how to avoid?

2003-05-30 Thread Michael Ruppin
My jsps currently assume use of the form specified in
the mapping from .  I
suppose it's not a problem to always include the name
property in my tags, and assign that the generic form
bean name.  It's a little bothersome though that the
action writer needs to know what kind of object to
create where for each local forward, and that pulling
the data from the model is now duplicated in this
action and in the generic form.  My current design
forwards with the UID of the data as a request
parameter, the form is created for me, I populate it
from the model in the reset method, then the other
request paramters are populated for me, just like when
the generic form is submitted.  Seems a lot more
straightforward, and I can still use a local forward
to keep the navigation contained in the struts-config,
and avoid form population anomalies, if I do this:

forward = new
ActionForward((mapping.findForward("forward")).getName()+"?UID="+UID,true);

Is there really a problem with this approach?My jsps
currently assume use of the form specified in the
mapping from .  I suppose
it's not a problem to always include the name property
in my tags, and assign that the generic form bean
name.  It's a little bothersome though that the action
writer needs to know what kind of object to create
where for each local forward, and that pulling the
data from the model is now duplicated in this action
and in the generic form.  My current design forwards
with the UID of the data as a request parameter, the
form is created for me, I populate it from the model
in the reset method, then the other request parameters
are populated for me, just like when the generic form
is submitted.  Seems a lot more straightforward, and I
can still use a local forward to keep the navigation
contained in the struts-config, and avoid form
population anomalies, if I do this:

forward = new
ActionForward((mapping.findForward("forward")).getName()+"?UID="+UID,true);

Are there problems I need to be aware of, with this
approach?


--- David Graham <[EMAIL PROTECTED]> wrote:
> >You have to take that relationship on faith. 
> Perhaps
> >it's not the best example, but suffice it to say
> that
> >I have many-to-many types of relationships in my
> data,
> >and that the Forms are best segregated for re-use. 
> It
> >is highly inefficient for me to make a separate
> form
> >for each combination of data relationship.
> >Futhermore, there are many levels involved here.
> >Distributions have Shipments, Shipments have
> Orders,
> >Orders Have Items, Items have Tasks, Tasks have
> >TaskDetails.  Are you really suggesting I put all
> this
> >in one Form?  If I make a screen to query for
> >TaskDetails which then uses the same jsp to display
> >the results as the one that is linked to by the
> Task
> >screen, then I must use this giant Form with mostly
> >inconsequential fields, and add my TaskDetail query
> >screen specifics to it, too.
> 
> If you have a generic query result page then you
> need to supply it with a 
> generic result bean to display the data.  Your
> TaskDetailQueryForm object is 
> handled by your TaskDetailQueyAction which then puts
> your generic result 
> bean in the request and forwards to the result page.
>  I don't see why you 
> would need action chaining here.
> 
> David
> 
> >Where does it end?  My
> >other options are to make a new jsp, or make a jsp
> >with some really nasty scriptlet in it to handle
> >different forms.  Right?
> >
> >
> >--- David Graham <[EMAIL PROTECTED]> wrote:
> > >
> > > >There are, however, situations where the second
> > > screen
> > > >really has nothing to do with the first.  For
> > > example,
> > > >an Order screen and an OrderItem screen.  When
> > > >navigating from Order to OrderItem, I should
> not go
> > > >directly to OrderItem.jsp for two reasons.  The
> > > >OrderItemForm is unrelated to the OrderForm and
> > > should
> > > >not be part of the OrderForm object.  Given
> this,
> > > it
> > > >*could* still be ok to go to OrderItem.jsp when
> it
> > > >uses it's own Form object, but not if you need
> to
> > > pass
> > > >through OrderItemAction to verify the user is
> > > logged
> > > >in.  The other options are action chaining from
> the
> > > >OrderAction to the OrderItem mapping, or
> linking
> > > from
> > > >the Order.jsp to the OrderItem mapping, both of
> > > which
> > > >are considered bad.  What else is there?
> > >
> > > Why is an order unrelated to its items?  I would
> > > have one class called
> > > OrderForm that contained a List or array of all
> the
> > > items being ordered.
> > > One ActionForm object does not necessarily map
> to
> > > one HTML form.  You can
> > > split up the view however you like but store all
> the
> > > data in one form
> > > object.
> > >
> > > David
> > >
> > > >
> > > >m
> > > >
> > > >
> > > >--- David Graham <[EMAIL PROTECTED]>
> wrote:
> > > > > >So if I understand what you're suggesting,
> I
> > > put
> > > > > >multiple html forms into editPage.jsp, one
> of
> > > w

Re: Action Chaining - how to avoid?

2003-05-30 Thread Michael Ruppin
You have to take that relationship on faith.  Perhaps
it's not the best example, but suffice it to say that
I have many-to-many types of relationships in my data,
and that the Forms are best segregated for re-use.  It
is highly inefficient for me to make a separate form
for each combination of data relationship. 
Futhermore, there are many levels involved here. 
Distributions have Shipments, Shipments have Orders,
Orders Have Items, Items have Tasks, Tasks have
TaskDetails.  Are you really suggesting I put all this
in one Form?  If I make a screen to query for
TaskDetails which then uses the same jsp to display
the results as the one that is linked to by the Task
screen, then I must use this giant Form with mostly
inconsequential fields, and add my TaskDetail query
screen specifics to it, too.  Where does it end?  My
other options are to make a new jsp, or make a jsp
with some really nasty scriptlet in it to handle
different forms.  Right?


--- David Graham <[EMAIL PROTECTED]> wrote:
> 
> >There are, however, situations where the second
> screen
> >really has nothing to do with the first.  For
> example,
> >an Order screen and an OrderItem screen.  When
> >navigating from Order to OrderItem, I should not go
> >directly to OrderItem.jsp for two reasons.  The
> >OrderItemForm is unrelated to the OrderForm and
> should
> >not be part of the OrderForm object.  Given this,
> it
> >*could* still be ok to go to OrderItem.jsp when it
> >uses it's own Form object, but not if you need to
> pass
> >through OrderItemAction to verify the user is
> logged
> >in.  The other options are action chaining from the
> >OrderAction to the OrderItem mapping, or linking
> from
> >the Order.jsp to the OrderItem mapping, both of
> which
> >are considered bad.  What else is there?
> 
> Why is an order unrelated to its items?  I would
> have one class called 
> OrderForm that contained a List or array of all the
> items being ordered.  
> One ActionForm object does not necessarily map to
> one HTML form.  You can 
> split up the view however you like but store all the
> data in one form 
> object.
> 
> David
> 
> >
> >m
> >
> >
> >--- David Graham <[EMAIL PROTECTED]> wrote:
> > > >So if I understand what you're suggesting, I
> put
> > > >multiple html forms into editPage.jsp, one of
> which
> > > >maps to ConfirmEditAction.  Not bad, although,
> what
> > > I
> > > >have in this form now is a drop down for the
> user
> > > to
> > > >specify what they intend to do.
> > >
> > > Sorry, I think the steps would actually be like
> > > this:
> > > GetEditPageAction --> editPage.jsp -->
> > > GetConfirmPageAction --> confirm.jsp
> > > --> SaveFormAction --> index.jsp
> > >
> > > Just use different submit buttons for different
> > > actions like Update and
> > > Delete.  Your SaveFormAction will perform
> different
> > > operations based on
> > > which button they pressed.
> > >
> > > >Also, if I want to use
> > > >this single, generic, confirmation page in
> multiple
> > > >places, which I do, I'll have to use scriptlet
> > > rather
> > > >than the html:form tag to render the correct
> action
> > > >attribute to take them back to the edit they
> came
> > > >from, right?
> > >
> > > Then you will also need a generic SaveFormAction
> to
> > > save the data from your
> > > generic confirm page.  You might look at using
> > > DispatchAction to use one
> > > action to route to different pages based on a
> > > request parameter.
> > >
> > > David
> > >
> > > >
> > > >m
> > > >
> > > >--- David Graham <[EMAIL PROTECTED]>
> wrote:
> > > > > >If my need, for example, is to go from
> > > > > >an "Edit X" screen, to a "Confirm X
> deletion"
> > > > > screen,
> > > > > >how is this related to business logic, and
> how
> > > > > would I
> > > > > >refactor?
> > > > >
> > > > > GetEditPageAction --> editPage.jsp -->
> > > > > ConfirmEditAction --> index.jsp
> > > > >
> > > > >
> > > > > David
> > > > >
> > > > >
> > >
> >
>
>_
> > > > > Help STOP SPAM with the new MSN 8 and get 2
> > > months
> > > > > FREE*
> > > > > http://join.msn.com/?page=features/junkmail
> > > > >
> > > > >
> > > > >
> > >
> >
>
>-
> > > > > To unsubscribe, e-mail:
> > > > > [EMAIL PROTECTED]
> > > > > For additional commands, e-mail:
> > > > > [EMAIL PROTECTED]
> > > > >
> > > >
> > > >
> > > >__
> > > >Do you Yahoo!?
> > > >The New Yahoo! Search - Faster. Easier. Bingo.
> > > >http://search.yahoo.com
> > > >
> > >
> >
>
>-
> > > >To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > >For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > >
> > >
> > >
>
>_
> > > Tired of spam? Get advanced junk mail protection
> > > with MSN 8.
> > > http://join.msn.com/?page=features/junkmail
> > 

Re: Action Chaining - how to avoid?

2003-05-30 Thread Michael Ruppin
Sorry to be a pain about this, but I'm still missing
something here.  The suggestion below was not so bad,
for a confirmation screen.  It's acceptable for all
forms needing confirmation to extend a ConfirmForm.

There are, however, situations where the second screen
really has nothing to do with the first.  For example,
an Order screen and an OrderItem screen.  When
navigating from Order to OrderItem, I should not go
directly to OrderItem.jsp for two reasons.  The
OrderItemForm is unrelated to the OrderForm and should
not be part of the OrderForm object.  Given this, it
*could* still be ok to go to OrderItem.jsp when it
uses it's own Form object, but not if you need to pass
through OrderItemAction to verify the user is logged
in.  The other options are action chaining from the
OrderAction to the OrderItem mapping, or linking from
the Order.jsp to the OrderItem mapping, both of which
are considered bad.  What else is there?

m


--- David Graham <[EMAIL PROTECTED]> wrote:
> >So if I understand what you're suggesting, I put
> >multiple html forms into editPage.jsp, one of which
> >maps to ConfirmEditAction.  Not bad, although, what
> I
> >have in this form now is a drop down for the user
> to
> >specify what they intend to do.
> 
> Sorry, I think the steps would actually be like
> this:
> GetEditPageAction --> editPage.jsp -->
> GetConfirmPageAction --> confirm.jsp 
> --> SaveFormAction --> index.jsp
> 
> Just use different submit buttons for different
> actions like Update and 
> Delete.  Your SaveFormAction will perform different
> operations based on 
> which button they pressed.
> 
> >Also, if I want to use
> >this single, generic, confirmation page in multiple
> >places, which I do, I'll have to use scriptlet
> rather
> >than the html:form tag to render the correct action
> >attribute to take them back to the edit they came
> >from, right?
> 
> Then you will also need a generic SaveFormAction to
> save the data from your 
> generic confirm page.  You might look at using
> DispatchAction to use one 
> action to route to different pages based on a
> request parameter.
> 
> David
> 
> >
> >m
> >
> >--- David Graham <[EMAIL PROTECTED]> wrote:
> > > >If my need, for example, is to go from
> > > >an "Edit X" screen, to a "Confirm X deletion"
> > > screen,
> > > >how is this related to business logic, and how
> > > would I
> > > >refactor?
> > >
> > > GetEditPageAction --> editPage.jsp -->
> > > ConfirmEditAction --> index.jsp
> > >
> > >
> > > David
> > >
> > >
>
>_
> > > Help STOP SPAM with the new MSN 8 and get 2
> months
> > > FREE*
> > > http://join.msn.com/?page=features/junkmail
> > >
> > >
> > >
>
>-
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > >
> >
> >
> >__
> >Do you Yahoo!?
> >The New Yahoo! Search - Faster. Easier. Bingo.
> >http://search.yahoo.com
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> 
>
_
> Tired of spam? Get advanced junk mail protection
> with MSN 8. 
> http://join.msn.com/?page=features/junkmail
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



RE: Struts and the infamous IE multiple browser/same session problem

2003-05-29 Thread Michael Ruppin
Well, I'm not sure exactly how to implement your
solutions 1 and 3.  Perhaps 1 is what I am doing?  2
might be nice, but it's not considered good to hit the
model on every submission, and there’s more to persist
than just the model.  For 4, when you say "Check it
for each update request and reject the update if the
session numbers don't match", I assume you mean reject
the update if the *version* numbers don't match.  The
problems with this are scenarios like the following:

Browsers 1 & 2 are on the same session, with version 1
of a form object with property Checkbox=false. 
Checkbox is not part of the model.  Let's assume the
form is session scoped.  Browser 1 checks the checkbox
and submits a “Delete checked” request.  This
navigates them to a confirmation screen.  Meanwhile,
browser 2 submits something like “Refresh”.  Struts
calls the reset method on this form, where, of course,
I default Checked=false.  Browser 1 now submits “OK”,
to confirm the delete.  The delete method finds the
form’s checkbox unchecked, and does nothing.

This situation is not so bad, but there are many
others which may be.  I do a lot of nested indexed
forms.  It may actually be good, if one form refreshes
the session data from the model for another, but is it
appropriate for one browser to entirely alter the list
of another, or it’s non-model components?  This will
cause a lot of confusion, at minimum.  My solution is
to name the session data based a number unique to each
browser.  The version is still implemented, to cover
the DB issues.  The problem with this solution is, I
have to do a lot of the work Struts would normally do
for me, myself.

Based on posts I’ve read concerning disabling a
browser’s Back button, it sounds like I might be able
to make use of  Action token methods to prevent
“duplicate” submissions.  However, as you say,
enforcing that each browser has it’s own session is
not “convenient for the user”, and some clients insist
that we support the multiple browser / same session
scenario.  Other ideas, anyone?

m

 
m

--- Steve Raeburn <[EMAIL PROTECTED]> wrote:
> Forgive me if I'm misunderstanding something here
> because I am unaware of
> the background and previous discussions on this
> topic.
> 
> This doesn't seem to just be a issue with IE.
> Mozilla and Opera both keep
> the same session if you have multiple browser
> windows open. It doesn't
> matter whether you open a new window in a separate
> tab or browser, it still
> maintains the same session.
> 
> Why would you even want a browser that enforced
> separate sessions if you
> open a new window. I may want to accomplish several
> tasks or refer to
> information while I'm updating something else. There
> are any number of
> reasons why I would want multiple windows. If you
> enforced separate sessions
> then I would have to login each time I opened a
> window. Not exactly
> convenient for the user!
> 
> Why is this considered a problem? The session
> represents the state for the
> user, not for a particular browser window. Each
> window is just a view of the
> model so it should not matter how many different
> views are active at any
> time. If you need to guard against inconsistent data
> then you need to be
> aware that the session is not thread safe and ensure
> that you do your own
> synchronization on any objects that you place in it.
> 
> Surely, this is no more a bug than the database bug
> where data gets out of
> sync when you don't use transactions? ;-)
> 
> Anyway, to avoid any problems here's a few options:
> 1. Synchronize objects that you use in the session
> 2. Don't use the session at all. Store your
> 'session' information in a
> database. Some distributed session managers do this
> for you.
> 3. Synchronize on some other session 'locking'
> object if you need to update
> multiple session objects in a transaction.
> 4. Consider using an optimistic locking system for
> your session objects. Add
> a version number property to the objects you're
> going to place in the
> session. Check it for each update request and reject
> the update if the
> session numbers don't match. (You'll still need to
> synchronize for updates
> but not for reads).
> 
> Don't shoot me if the last option doesn't work. It
> just occurred to me while
> I was thing about database transactions :-)
> 
> Like I said, if I've misunderstood then please
> (gently) point out of the
> error of my ways.
> 
> Steve
> 
> 
> > -Original Message-
> > From: Michael Ruppin [mailto:[EMAIL PROTECTED]
> > Sent: May 28, 2003 1:47 PM
> > To: Struts Users Mailing List
> > Subject: Struts and the infamous IE m

RE: Struts and the infamous IE multiple browser/same session problem

2003-05-29 Thread Michael Ruppin
I'm not sure if this is a response to me, or to Gourav
Pani.  As far as my current solution goes, I don't see
how _any_ caching by the client can break it. 
Depending on the level of support chosen for this, if
the client submits a form with an "old" key, the
important data in the session has either

a) Been removed from the session by the server,
causing the jsp to render HTML with no data.

or

b) Contains a "version" originating from the model
(crude but effective?).  Presuming the submission from
the first browser actually changed the model data, the
version number will have changed such that if this
"old" session data is passed to the model it responds
with "Stale Data".

I'm still unhappy with my solution though, since I
waste a lot of time explaining it to my team, and
potentially to new developers.

m

--- "Paananen, Tero" <[EMAIL PROTECTED]> wrote:
> > I'm reconsidering my approach to this problem, in
> > favor of something more elegant/more compatible
> with
> > out-of-the-box Struts.  Anyone tackled this yet?
> 
> Wait till you find out that MSIE, in its default
> configuration, will happily cache even dynamicly
> generated pages, so your token key approach will
> break just as easily.
> 
>   -TPP - oxymoron of the day: Microsoft standards
> 
> -
> This email may contain confidential and privileged
> material for the sole use of the intended
> recipient(s). Any review, use, retention,
> distribution or disclosure by others is strictly
> prohibited. If you are not the intended recipient
> (or authorized to receive for the recipient), please
> contact the sender by reply email and delete all
> copies of this message.  Also, email is susceptible
> to data corruption, interception, tampering,
> unauthorized amendment and viruses. We only send and
> receive emails on the basis that we are not liable
> for any such corruption, interception, tampering,
> amendment or viruses or any consequence thereof.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



RE: Struts and the infamous IE multiple browser/same session problem

2003-05-29 Thread Michael Ruppin

Thanks, but I should have mentioned, no JavaScript
allowed here.  At least not for something this mission
critical.

m

http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&msgNo=73921

--- Mike Thompson <[EMAIL PROTECTED]> wrote:
> Everyone's favorite!!! ;)
> 
> you can always disable control-N via JavaScript ;)
> 
> in an onkeydown handler probably for a body tag.
> 
> //check for control n
> if (window.event.ctrlKey && window.event.keyCode
> == 78)
> {
> window.event.returnValue = false;
> return false;
> }
> 
> 
>   --m
> 
> -Original Message-
> From: Pani, Gourav
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 28, 2003 3:50 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Struts and the infamous IE multiple
> browser/same session
> problem
> 
> 
> have you considered creating a unique token to do
> session related updates?
> i don't think tokens can be transferred from one
> browser window to another
> though i could be wrong.
> 
> -Original Message-
> From: Michael Ruppin [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 28, 2003 3:47 PM
> To: Struts Users Mailing List
> Subject: Struts and the infamous IE multiple
> browser/same session
> problem
> 
> 
> I'm reconsidering my approach to this problem, in
> favor of something more elegant/more compatible with
> out-of-the-box Struts.  Anyone tackled this yet?
> 
> For those not aware, MS IE allows users to launch a
> browser against the same session via File/New/Window
> (Ctrl-N).  The issue is, if you have need to keep
> data
> in the session (which I do), a submission from one
> browser could grab and/or overwrite session data
> meant
> for the other browser.  This can lead to data
> integrity problems and other weirdness.  Telling my
> user community not to use MS IE or it's Ctrl-N
> feature
> is not an option.
> 
> My current approach is to put a hidden random "key"
> into the HTML, and name the session attribute with
> that.  When one of the two browsers submits a
> request
> (Assuming, at this point, they've opened another)
> the
> session data is pulled by key, assigned a new key, a
> new copy is placed in the session named with the new
> key, and the new key is rendered  in the HTML
> response.  The old session data may or may not be
> removed, depending on whether or not it is
> acceptable
> for the browser with the old key to [gracefully]
> fail,
> how we choose to expire session data, and whether or
> not a means of dealing with stale data is supported
> by
> the model.
> 
> This works fine, but in doing so I've had to write
> my
> own methods for populating collections of forms
> which
> would have otherwise been taken care of for me by
> specifying session scope in struts-config.  Am I
> missing a better way?
> 
> m
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to
> Outlook(TM).
> http://calendar.yahoo.com
> 
>
-
> 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]
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Struts and the infamous IE multiple browser/same session problem

2003-05-29 Thread Michael Ruppin
I'm reconsidering my approach to this problem, in
favor of something more elegant/more compatible with
out-of-the-box Struts.  Anyone tackled this yet?

For those not aware, MS IE allows users to launch a
browser against the same session via File/New/Window
(Ctrl-N).  The issue is, if you have need to keep data
in the session (which I do), a submission from one
browser could grab and/or overwrite session data meant
for the other browser.  This can lead to data
integrity problems and other weirdness.  Telling my
user community not to use MS IE or it's Ctrl-N feature
is not an option.

My current approach is to put a hidden random "key"
into the HTML, and name the session attribute with
that.  When one of the two browsers submits a request
(Assuming, at this point, they've opened another) the
session data is pulled by key, assigned a new key, a
new copy is placed in the session named with the new
key, and the new key is rendered  in the HTML
response.  The old session data may or may not be
removed, depending on whether or not it is acceptable
for the browser with the old key to [gracefully] fail,
how we choose to expire session data, and whether or
not a means of dealing with stale data is supported by
the model.

This works fine, but in doing so I've had to write my
own methods for populating collections of forms which
would have otherwise been taken care of for me by
specifying session scope in struts-config.  Am I
missing a better way?

m


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



RE: Submit Value

2003-05-29 Thread Michael Ruppin
For what it's worth, you could alternatively do this:

MessageResources resources = getResources(request);
if(form.getButton().equals(resources.getMessage("your.ok.key"))){
}
if(form.getButton().equals(resources.getMessage("your.cancel.key"))){
}

However, there could later be unreachable code if
someone translates your properties files and makes two
keys equate to the same text.  I broke down and made
different form properties for each submit button:

if(form.getOkButton()!=null){
}
if(form.getCancelButton()!=null){
}

I'll bet LookupDispatchAction is a better solution.

m

--- Brandon Goodin <[EMAIL PROTECTED]> wrote:
> In that case use the LookupDispatchAction
> 
> Brandon Goodin
> 
> -Original Message-
> From: Kamholz, Keith (corp-staff) USX
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 28, 2003 11:39 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Submit Value
> 
> 
> Alright, I think I basically understand how this
> works, but doesn't this
> interfere with internationalization?
> If we want to use a message from Application
> Resources for the button label,
> and if we check for that value in our action, won't
> the internationalization
> get completely messed up?
> 
> - Keith
> 
> www.buffalo.edu/~kkamholz
> 
> 
> -Original Message-
> From: Josh McCulloch [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 28, 2003 1:39 PM
> To: Struts Users Mailing List
> Subject: Re: Submit Value
> 
> 
> A submit button is supposed to submit a parameter
> when selected.
> i.e.
> 
>  value="Delete">
> 
> should send /xxx.do?submitButton=Delete
> 
> This should correspond to a member of your
> ActionForm.
> 
> You should also look into DispatchAction and
> LookupDispatchAction.
> They can call different "execute" methods depending
> on a parameter from
> the form post.
> 
> HTH,
> Josh
> 
> 
> [EMAIL PROTECTED] wrote:
> 
> >Ok... Does anyone have a good alternative then?
> >
> >
> >
> >-Original Message-
> >From: Phillip Qin [mailto:[EMAIL PROTECTED]
> >Sent: Wednesday, May 28, 2003 1:14 PM
> >To: 'Struts Users Mailing List'
> >Subject: RE: Submit Value
> >
> >
> >Don't bother trying it. Only Mozilla gives you the
> value, while IE doesn't.
> >
> >-Original Message-
> >From: Kamholz, Keith (corp-staff) USX
> [mailto:[EMAIL PROTECTED]
> >Sent: May 28, 2003 1:01 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: Submit Value
> >
> >Quick question...
> >
> >I'm using 2 submit buttons in the same form, so
> that I can do 1 of 2
> things,
> >with the same input data.
> >(You can do that, right?)
> >I have the value attribute for one of them set to
> 'delete'.  What I'm
> >wondering is how to get the value of the submit
> button that was clicked
> from
> >within the action class.
> >
> >Thanx a million.
> >
> >- Keith
> >
> >www.buffalo.edu/~kkamholz
> >
> >
>
>-
> >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]
> >
> >
> >
> 
> --
> Your favorite stores, helpful shopping tools and
> great gift ideas.
> Experience the convenience of buying online with
> [EMAIL PROTECTED]
> http://shopnow.netscape.com/
> 
> 
> 
>
-
> 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]
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



error bean properties

2003-03-20 Thread Michael Ruppin
I'm interested in using logic tags to react
differently to different errors.  In an effort to
determine what properties of the error bean I could
use in my logic, I tried (Note this behaved as
expected, without the property attribute):

  
  
  

Which causes a stack trace claiming:

  javax.servlet.jsp.JspException: No getter method for
property key of bean error

I see that ActionError extends ActionMessage, and that
ActionMessage has a getKey() method.  Is the error
bean not an ActionError?  How do I determine what
properties are available for the error bean?

m

__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

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



Re: Problem with html:message

2003-03-17 Thread Michael Ruppin
I believe it's the struts-bean.tld write attribute
which actually does the work here, the
struts-html.tld's messages attribute just iterates. 
Where's the prefix associated with the struts-bean.tld
in your snippet, that is, one would expect to see
something like:

  <%@ taglib uri="struts-bean" prefix="NNN" %>
  ...
  

where you have:

  <:write name="message"/>

Mike

--- Ryan Cuprak <[EMAIL PROTECTED]> wrote:
>  
> 
> Hello,
> 
>  While I have had no problems getting errors to
> display I am unable to
> get messages displayed.
> 
>  
> 
>  In my jsp page I have the following:
> 
> 
> 
>  id="message">
> 
> <:write
> name="message"/>
> 
> 
> 
> 
> 
> 
> 
> and in the action which loads this pages I have:
> 
> if (
> !authenticate.authenticate(userID,password) ) {
> 
> if ( authenticate.isLocked() ) {
> 
>
> errors.add(ActionErrors.GLOBAL_ERROR,new
> ActionError("login.locked"));
> 
> } else {
> 
>
> messages.add(ActionMessages.GLOBAL_MESSAGE,new
> ActionMessage("login.failure"));
> 
> }
> 
> saveErrors(request,errors);
> 
> saveMessages(request,messages);
> 
> return ( new
> ActionForward(mapping.getInput()));
> 
>  
> 
> Does anyone know why the html:message tag isn't
> displaying the messages?
> The only time it will display a bullet (without any
> text) is if there is
> an error (huh?). Otherwise my message never gets
> displayed. Resources
> are setup properly as I am able to retrieve the
> 'login.failure' text via
> bean:message.I am using the RC1.1 candidate. Is this
> a bug?
> 
>  
> 
>  Thanks,
> 
>   Ryan
> 
>  
> 
>  
> 
>  
> 
> 


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

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



resource attribute of validator msg element

2003-03-14 Thread Michael Ruppin
Is anyone successfully using the resource attribute
[set to false] in a msg element?  resource="false"
works fine for me in arg elements, but in a msg
element it has no effect.  My documentation indicates
this can be done, and it's defined in the 1.1-rc1
validator_1_0.dtd, but I can't get it to work.

Regards,
Mike

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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



extends attribute

2003-03-13 Thread Michael Ruppin
For an exercise, I decided to try using a JSP for my
definitions, as opposed to XML.  All went fine until I
tried to implement a definition with an extends
attribute.  It works fine in XML, but in a JSP I
get:javax.servlet.ServletException: Can't get
definitions factory from context.  Both my JSP and XML
tests used the same struts-1.1-rc1 jars, in Tomcat
4.1.18. Can this not be done?  I've never seen an
example, but all the documentation I've found
indicates this is a valid tag attribute.  My war
files:
http://snow.prohosting.com/mruppin/tilesxml.war
http://snow.prohosting.com/mruppin/tilesjsp.war


__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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