RE: Server detection of Javascript enabled?

2003-02-14 Thread Alvarado, Juan (c)
There is a getJavaScriptEnabled method in that component that will tell you
if javascript is enabled or not. It definetely does have to send some
javascript to the browser in order to perform some tests and detect if it is
enabled. But the bottom line is it tells you if javascript is enabled or
not.

-Original Message-
From: Michael Hanisch [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 14, 2003 8:44 AM
To: Struts Users Mailing List
Subject: RE: Server detection of Javascript enabled?


On Fri, 2003-02-14 at 03:50, Aaron Oathout wrote:
> Take a look at browserhawk. http://www.cyscape.com/ 
> We used it at the last company I worked for, tells you alot about the 
> browser.
Yeah, but all it does is invoke some Javascript in the user's browser...
so we're back where we started :-(

Michael.


-- 
Michael Hanisch  [EMAIL PROTECTED]
Red Hat - RH Interchange Inc., Orleansstrasse 4,  D-81669 Munich/Germany
phone: +49 (0)89 206058-53  fax: +49 (0)89 206058-88


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

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




RE: Server detection of Javascript enabled?

2003-02-13 Thread Alvarado, Juan (c)
These people http://www.browserhawk.com/ have some products that will do
what you want. I'm not sure if you're willing to fork out the $$$, but I
thought I'd run it by you anyways.

If you don't want to spend the dough, I think the suggestion James Childers
gave you might be an approach to take.

Good luck.

-Original Message-
From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 4:34 PM
To: Struts User
Subject: Server detection of Javascript enabled?


Without using Javascript on the client, can the server detect if the client
has Javascript enabled?  Is there something in the HTTP request header that
indicates this?

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




RE: How to link to an Action which has no Form.

2003-02-13 Thread Alvarado, Juan (c)
1.1 B3 does take a definition name in the parameter attribute. We've tested
and it worked for us.

-Original Message-
From: Peterkofsky, Don [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 2:37 PM
To: 'Struts Users Mailing List'
Subject: RE: How to link to an Action which has no Form.


Actually, as of 1.1b2 this action does *not* take a Tiles definition as a
parameter; it is not "Tiles-aware".

Tiles provided an action class to mimic this functionality:
org.apache.struts.tiles.actions.NoOpAction

If the ForwardAction behavior has changed in 1.1b3, I'd be interested to
know (it is not documented as such).

-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 11:27 AM
To: 'Struts Users Mailing List'
Subject: RE: How to link to an Action which has no Form.


Use the ActionForward built-in class:

 

You can specify a JSP or a tiles' definition as the parameter.

HTH,

Matt

> -Original Message-
> From: Bert Catsburg [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 13, 2003 12:26 PM
> To: Struts Users Mailing List
> Subject: How to link to an Action which has no Form.
> 
> 
> Hello,
> 
> How do you include a link in your code which triggers an Action
> which has no Form. The Action class will activate a global
> forward.
> I hope somebody can help me since I am on this problem for
> two days now and have search the whole list, docs and both
> Struts-books.
> A simple direction where to look any further would be of much
> help.
> 
> Thank you,
> 
> Bert Catsburg
> 
> 
> 
> Code samples:
> 
> JSP with the link:
> --
>Petrol
> 
> Struts Config
> -
>  
> 
>  
> 
>  
>   type="senktar.PetrolAction"
> scope="request" />
> 
> PetrolAction.java
> -
>package senktar
>public class PetrolAction extends Action {
>  public ActionForward execute(ActionMapping mapping,
>  HttpServletRequest request,
>  HttpServletResponse response)
>  throws Exception {
> 
>. // Lines of code
> 
>return mapping.findForward("index");
>  }
> }
> 
> 
> 
> -
> 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]

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




RE: Cache

2003-02-13 Thread Alvarado, Juan (c)
Oh yeah that would be a problem. Can't you upgrade?? It's suppose to be
backwards compatible.

-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 12:18 PM
To: Struts Users Mailing List
Subject: Re: Cache


I think I'm out of luck cause I'm using Struts 1.0.2, and the 
RequestProcessor is not part of that version.

-Gus
Alvarado, Juan (c) wrote:

>Yeah sure I apologize for not being more detailed.
>
>It goes in your struts-config file. I have mine right after the action
>mappings, but it might not matter where you put it.
>
>Your subclass would be a subclass of
>org.apache.struts.action.RequestProcessor. The subclass doesn't have to do
>anything initially, but in the event you ever need to implement some of the
>methods in it in your application, you have a class ready for it.
>
>I would suggest you read the javadoc on this class.
>
>Good luck.
>
>-Original Message-
>From: ajTreece [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, February 13, 2003 11:55 AM
>To: Struts Users Mailing List
>Subject: Re: Cache
>
>
>Juan
>
>Could you be a little more specific... I'm not familiar with ...>. Where does it actually go and what would my processor subclass be?
>
>Thanks...
>
>
>
>Alvarado, Juan (c) wrote:
>
>  
>
>>We have used the following as a means of expiring pages. This way when the
>>user hits the back button they will get a page has expired message.
>>
>>>processorClass="your.processor.subclass">
>>
>>-Original Message-
>>From: Gus Delgado [mailto:[EMAIL PROTECTED]]
>>Sent: Thursday, February 13, 2003 10:54 AM
>>To: Struts Users Mailing List
>>Subject: Cache
>>
>>
>>Is there any way to clean the cache from an Action. I have a 
>>LogoutAction that gets all of the Attributes in the session by name and 
>>removes all of them + it invalidates the session, but I also want to 
>>clear the cache so that when the user hits the back button nothing will 
>>be there.
>>
>>Is there any way to do this?
>>
>>-thanks
>>Gus
>>
>>
>>-
>>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]
>
>-
>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]




RE: Cache

2003-02-13 Thread Alvarado, Juan (c)
Yeah sure I apologize for not being more detailed.

It goes in your struts-config file. I have mine right after the action
mappings, but it might not matter where you put it.

Your subclass would be a subclass of
org.apache.struts.action.RequestProcessor. The subclass doesn't have to do
anything initially, but in the event you ever need to implement some of the
methods in it in your application, you have a class ready for it.

I would suggest you read the javadoc on this class.

Good luck.

-Original Message-
From: ajTreece [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 11:55 AM
To: Struts Users Mailing List
Subject: Re: Cache


Juan

Could you be a little more specific... I'm not familiar with . Where does it actually go and what would my processor subclass be?

Thanks...



Alvarado, Juan (c) wrote:

>We have used the following as a means of expiring pages. This way when the
>user hits the back button they will get a page has expired message.
>
>processorClass="your.processor.subclass">
>
>-Original Message-
>From: Gus Delgado [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, February 13, 2003 10:54 AM
>To: Struts Users Mailing List
>Subject: Cache
>
>
>Is there any way to clean the cache from an Action. I have a 
>LogoutAction that gets all of the Attributes in the session by name and 
>removes all of them + it invalidates the session, but I also want to 
>clear the cache so that when the user hits the back button nothing will 
>be there.
>
>Is there any way to do this?
>
>-thanks
>Gus
>
>
>-
>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]

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




RE: Cache

2003-02-13 Thread Alvarado, Juan (c)
We have used the following as a means of expiring pages. This way when the
user hits the back button they will get a page has expired message.



-Original Message-
From: Gus Delgado [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 10:54 AM
To: Struts Users Mailing List
Subject: Cache


Is there any way to clean the cache from an Action. I have a 
LogoutAction that gets all of the Attributes in the session by name and 
removes all of them + it invalidates the session, but I also want to 
clear the cache so that when the user hits the back button nothing will 
be there.

Is there any way to do this?

-thanks
Gus


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

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




RE: LookupDispatchAction Question

2003-02-11 Thread Alvarado, Juan (c)
I wasn't 100% sure but after thinking about it, that's the only thing I
could come up with.

-Original Message-
From: Brandon Goodin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 5:00 PM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction Question


:-D

Juan,
You were quite preceptive in reading what the anonymous Mr Avexus was trying
to accomplish before he clearly explained it. Do you do psychic
readings? JUAN THE PSYCHIC PROGRAMMER. You could market yourself as the
consultant who knows what you need before you ask.

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


-Original Message-----
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 2:54 PM
To: 'Struts Users Mailing List'
Subject: RE: LookupDispatchAction Question


Yeah I've never chained them either. But it looks like our friend at Avexus
Inc. has plenty of use for it.

-Original Message-
From: Brandon Goodin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 4:51 PM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction Question


He means that you should NEVER chain actions. This is an ongoing debate that
usually results in everyone giving room for exceptional cases. Personally, I
have never chained actions and have found no need too. I use more "standard"
ways to accomplish processing chains in the biz logic. But, there are those
out there that do find need for it. Until I am in there shoes I'll say, "To
each his own".

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


-Original Message-
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 2:34 PM
To: 'Struts Users Mailing List'
Subject: RE: LookupDispatchAction Question


> -1.
> You allways do that, like I have processed this page, go to another page.
> .V

What exactly do you mean by this comment Vic.

-Juan

-Original Message-
From: Vic Cekvenich [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 4:11 PM
To: [EMAIL PROTECTED]
Subject: Re: LookupDispatchAction Question




Alvarado, Juan (c) wrote:
> From a design point of view, forwarding from one action to another action
> should be examined closely. It should be the exception rather than the
rule.
>

-1.
You allways do that, like I have processed this page, go to another page.
.V

>
> I would suggest you do the following. From your login action just forward
to
> your JSP; don't forward to the LookupDispatchAction. This should solve
your
> problem.
>
>
> -Original Message-
> From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 3:48 PM
> To: Struts Users Mailing List
> Subject: RE: LookupDispatchAction Question
>
>
> should be nothing wrong with that. i do that all the time, except this is
> the first time that i've tried to use LookupDispatchAction as I just came
> across it.
>
>  Brandon Goodin <[EMAIL PROTECTED]> wrote::-D :-D :-D
>
> Juan was right. Why are you forwarding to another action from an action.
> I'll get out of this discussion cuz I think Juan has got it.
>
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
>
>
> -Original Message-
> From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 1:33 PM
> To: 'Struts Users Mailing List'
> Subject: RE: LookupDispatchAction Question
>
>
> Can you show me the snippet of code you are using to forward to the JSP
from
> the login action.
>
> -Original Message-
> From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 3:25 PM
> To: Struts Users Mailing List
> Subject: RE: LookupDispatchAction Question
>
>
>
> My login IS NOT a LookupDispatchAction. It is an Action. It is the page
that
> login forwards to that is a LookupDispatchAction. But that page never
> displays because there is no value for the "submit" parameter in this
case.
>
> "Alvarado, Juan (c)" wrote:Okay this is
> one way of doing this:
>
> Your login action in this case should not be a LookupDispatchAction. It
> should be a sub-class of the struts Action class. LookupDispatchAction has
> another intended usage.
>
> When your user is authenticated (from the login action), you will forward
to
> the jsp that is suppose to contain all the submit buttons. Assuming
> everything else is configured properly, your JSP should then display
> properly.
>
>
> -Original Message-
> From: Avexus Incorporated [mailto:[EMAIL PROTECTED]

RE: LookupDispatchAction Question

2003-02-11 Thread Alvarado, Juan (c)
Yeah I've never chained them either. But it looks like our friend at Avexus
Inc. has plenty of use for it.

-Original Message-
From: Brandon Goodin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 4:51 PM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction Question


He means that you should NEVER chain actions. This is an ongoing debate that
usually results in everyone giving room for exceptional cases. Personally, I
have never chained actions and have found no need too. I use more "standard"
ways to accomplish processing chains in the biz logic. But, there are those
out there that do find need for it. Until I am in there shoes I'll say, "To
each his own".

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


-----Original Message-
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 2:34 PM
To: 'Struts Users Mailing List'
Subject: RE: LookupDispatchAction Question


> -1.
> You allways do that, like I have processed this page, go to another page.
> .V

What exactly do you mean by this comment Vic.

-Juan

-Original Message-
From: Vic Cekvenich [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 4:11 PM
To: [EMAIL PROTECTED]
Subject: Re: LookupDispatchAction Question




Alvarado, Juan (c) wrote:
> From a design point of view, forwarding from one action to another action
> should be examined closely. It should be the exception rather than the
rule.
>

-1.
You allways do that, like I have processed this page, go to another page.
.V

>
> I would suggest you do the following. From your login action just forward
to
> your JSP; don't forward to the LookupDispatchAction. This should solve
your
> problem.
>
>
> -Original Message-
> From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 3:48 PM
> To: Struts Users Mailing List
> Subject: RE: LookupDispatchAction Question
>
>
> should be nothing wrong with that. i do that all the time, except this is
> the first time that i've tried to use LookupDispatchAction as I just came
> across it.
>
>  Brandon Goodin <[EMAIL PROTECTED]> wrote::-D :-D :-D
>
> Juan was right. Why are you forwarding to another action from an action.
> I'll get out of this discussion cuz I think Juan has got it.
>
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
>
>
> -Original Message-
> From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 1:33 PM
> To: 'Struts Users Mailing List'
> Subject: RE: LookupDispatchAction Question
>
>
> Can you show me the snippet of code you are using to forward to the JSP
from
> the login action.
>
> -Original Message-
> From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 3:25 PM
> To: Struts Users Mailing List
> Subject: RE: LookupDispatchAction Question
>
>
>
> My login IS NOT a LookupDispatchAction. It is an Action. It is the page
that
> login forwards to that is a LookupDispatchAction. But that page never
> displays because there is no value for the "submit" parameter in this
case.
>
> "Alvarado, Juan (c)" wrote:Okay this is
> one way of doing this:
>
> Your login action in this case should not be a LookupDispatchAction. It
> should be a sub-class of the struts Action class. LookupDispatchAction has
> another intended usage.
>
> When your user is authenticated (from the login action), you will forward
to
> the jsp that is suppose to contain all the submit buttons. Assuming
> everything else is configured properly, your JSP should then display
> properly.
>
>
> -Original Message-
> From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 3:11 PM
> To: Struts Users Mailing List
> Subject: RE: LookupDispatchAction Question
>
>
>
> After the user logs on they are supposed to go to a "lookup" page. This
page
> will have no data on it when it is first displayed. This page, which is a
> JSP of course, will have a form and more than 1 submit button.
> The problem is that the page can't even be displayed because when Struts
> calls my Action class (which extends LookupDispatchAction), there is no
> value for the "submit" button. That is, Struts doesn't know which of my
> methods to invoke and throws an exception (the error message from my first
> email). This is because the user hasn't clicked any of the submit buttons
> yet -- they haven't even seen the page.
> How do I get the page to display initia

RE: LookupDispatchAction Question

2003-02-11 Thread Alvarado, Juan (c)
> -1.
> You allways do that, like I have processed this page, go to another page.
> .V

What exactly do you mean by this comment Vic.

-Juan

-Original Message-
From: Vic Cekvenich [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 4:11 PM
To: [EMAIL PROTECTED]
Subject: Re: LookupDispatchAction Question




Alvarado, Juan (c) wrote:
> From a design point of view, forwarding from one action to another action
> should be examined closely. It should be the exception rather than the
rule.
> 

-1.
You allways do that, like I have processed this page, go to another page.
.V

> 
> I would suggest you do the following. From your login action just forward
to
> your JSP; don't forward to the LookupDispatchAction. This should solve
your
> problem.
> 
> 
> -Original Message-
> From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 3:48 PM
> To: Struts Users Mailing List
> Subject: RE: LookupDispatchAction Question
> 
> 
> should be nothing wrong with that. i do that all the time, except this is
> the first time that i've tried to use LookupDispatchAction as I just came
> across it.
>  
>  Brandon Goodin <[EMAIL PROTECTED]> wrote::-D :-D :-D
> 
> Juan was right. Why are you forwarding to another action from an action.
> I'll get out of this discussion cuz I think Juan has got it.
> 
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
> 
> 
> -Original Message-
> From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 1:33 PM
> To: 'Struts Users Mailing List'
> Subject: RE: LookupDispatchAction Question
> 
> 
> Can you show me the snippet of code you are using to forward to the JSP
from
> the login action.
> 
> -Original Message-
> From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 3:25 PM
> To: Struts Users Mailing List
> Subject: RE: LookupDispatchAction Question
> 
> 
> 
> My login IS NOT a LookupDispatchAction. It is an Action. It is the page
that
> login forwards to that is a LookupDispatchAction. But that page never
> displays because there is no value for the "submit" parameter in this
case.
> 
> "Alvarado, Juan (c)" wrote:Okay this is
> one way of doing this:
> 
> Your login action in this case should not be a LookupDispatchAction. It
> should be a sub-class of the struts Action class. LookupDispatchAction has
> another intended usage.
> 
> When your user is authenticated (from the login action), you will forward
to
> the jsp that is suppose to contain all the submit buttons. Assuming
> everything else is configured properly, your JSP should then display
> properly.
> 
> 
> -Original Message-
> From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 3:11 PM
> To: Struts Users Mailing List
> Subject: RE: LookupDispatchAction Question
> 
> 
> 
> After the user logs on they are supposed to go to a "lookup" page. This
page
> will have no data on it when it is first displayed. This page, which is a
> JSP of course, will have a form and more than 1 submit button.
> The problem is that the page can't even be displayed because when Struts
> calls my Action class (which extends LookupDispatchAction), there is no
> value for the "submit" button. That is, Struts doesn't know which of my
> methods to invoke and throws an exception (the error message from my first
> email). This is because the user hasn't clicked any of the submit buttons
> yet -- they haven't even seen the page.
> How do I get the page to display initially?
> "Alvarado, Juan (c)" wrote:Okay can you
> please tell me what exactly it is you're trying to
> accomplish??? I don't quite get what your ultimate goal is.
> 
> Thanks
> 
> -Original Message-
> From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 3:01 PM
> To: Struts Users Mailing List
> Subject: RE: LookupDispatchAction Question
> 
> 
> 
> I looked at that site. That is where I found out about
LookupDispatchAction.
> But there is nothing that I can find that tells me how to initially
display
> a page that will subsequently use a dispatch action. In fact, I can't
figure
> out how to do it in Struts at all without either having a plain .html page
> as the inital page or having 2 .jsp pages. Niether solution is good.
> "Alvarado, Juan (c)" wrote:I would suggest
> you read up on the usage of the LookupDispatchAction again.
> It was not designed to to be 

RE: LookupDispatchAction Question

2003-02-11 Thread Alvarado, Juan (c)
>From a design point of view, forwarding from one action to another action
should be examined closely. It should be the exception rather than the rule.


I would suggest you do the following. From your login action just forward to
your JSP; don't forward to the LookupDispatchAction. This should solve your
problem.


-Original Message-
From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 3:48 PM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction Question


should be nothing wrong with that. i do that all the time, except this is
the first time that i've tried to use LookupDispatchAction as I just came
across it.
 
 Brandon Goodin <[EMAIL PROTECTED]> wrote::-D :-D :-D

Juan was right. Why are you forwarding to another action from an action.
I'll get out of this discussion cuz I think Juan has got it.

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


-Original Message-----
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 1:33 PM
To: 'Struts Users Mailing List'
Subject: RE: LookupDispatchAction Question


Can you show me the snippet of code you are using to forward to the JSP from
the login action.

-Original Message-
From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 3:25 PM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction Question



My login IS NOT a LookupDispatchAction. It is an Action. It is the page that
login forwards to that is a LookupDispatchAction. But that page never
displays because there is no value for the "submit" parameter in this case.

"Alvarado, Juan (c)" wrote:Okay this is
one way of doing this:

Your login action in this case should not be a LookupDispatchAction. It
should be a sub-class of the struts Action class. LookupDispatchAction has
another intended usage.

When your user is authenticated (from the login action), you will forward to
the jsp that is suppose to contain all the submit buttons. Assuming
everything else is configured properly, your JSP should then display
properly.


-Original Message-
From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 3:11 PM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction Question



After the user logs on they are supposed to go to a "lookup" page. This page
will have no data on it when it is first displayed. This page, which is a
JSP of course, will have a form and more than 1 submit button.
The problem is that the page can't even be displayed because when Struts
calls my Action class (which extends LookupDispatchAction), there is no
value for the "submit" button. That is, Struts doesn't know which of my
methods to invoke and throws an exception (the error message from my first
email). This is because the user hasn't clicked any of the submit buttons
yet -- they haven't even seen the page.
How do I get the page to display initially?
"Alvarado, Juan (c)" wrote:Okay can you
please tell me what exactly it is you're trying to
accomplish??? I don't quite get what your ultimate goal is.

Thanks

-Original Message-
From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 3:01 PM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction Question



I looked at that site. That is where I found out about LookupDispatchAction.
But there is nothing that I can find that tells me how to initially display
a page that will subsequently use a dispatch action. In fact, I can't figure
out how to do it in Struts at all without either having a plain .html page
as the inital page or having 2 .jsp pages. Niether solution is good.
"Alvarado, Juan (c)" wrote:I would suggest
you read up on the usage of the LookupDispatchAction again.
It was not designed to to be used in the way you are trying to use them.

Take a look at this site http://husted.com/struts/index.html. It has some
good suggestions on the correct usage of the action classes that come with
struts.

-Original Message-
From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 2:46 PM
To: [EMAIL PROTECTED]
Subject: LookupDispatchAction Question



I am new to Struts and am trying to use the LookupDispatchAction class to
display a page for the first time (i.e. the user is being navigated to this
page from another page).

I have everything setup fine in my struts_config.xml and Struts attempts to
display my page, but was giving the following error:

Request[/lookup] does not contain handler parameter named submit

After researching on the archives, I realized that this message is due to
the fact that the user has not yet clicked any of the "submit" button on
this page (the page hasn't even been displayed yet). The suggestion

RE: LookupDispatchAction Question

2003-02-11 Thread Alvarado, Juan (c)
Can you show me the snippet of code you are using to forward to the JSP from
the login action.

-Original Message-
From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 3:25 PM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction Question



My login IS NOT a LookupDispatchAction. It is an Action. It is the page that
login forwards to that is a LookupDispatchAction. But that page never
displays because there is no value for the "submit" parameter in this case.
 
 "Alvarado, Juan (c)" <[EMAIL PROTECTED]> wrote:Okay this is
one way of doing this:

Your login action in this case should not be a LookupDispatchAction. It
should be a sub-class of the struts Action class. LookupDispatchAction has
another intended usage. 

When your user is authenticated (from the login action), you will forward to
the jsp that is suppose to contain all the submit buttons. Assuming
everything else is configured properly, your JSP should then display
properly.


-Original Message-
From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 3:11 PM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction Question



After the user logs on they are supposed to go to a "lookup" page. This page
will have no data on it when it is first displayed. This page, which is a
JSP of course, will have a form and more than 1 submit button.
The problem is that the page can't even be displayed because when Struts
calls my Action class (which extends LookupDispatchAction), there is no
value for the "submit" button. That is, Struts doesn't know which of my
methods to invoke and throws an exception (the error message from my first
email). This is because the user hasn't clicked any of the submit buttons
yet -- they haven't even seen the page.
How do I get the page to display initially?
"Alvarado, Juan (c)" wrote:Okay can you
please tell me what exactly it is you're trying to
accomplish??? I don't quite get what your ultimate goal is.

Thanks

-Original Message-
From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 3:01 PM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction Question



I looked at that site. That is where I found out about LookupDispatchAction.
But there is nothing that I can find that tells me how to initially display
a page that will subsequently use a dispatch action. In fact, I can't figure
out how to do it in Struts at all without either having a plain .html page
as the inital page or having 2 .jsp pages. Niether solution is good.
"Alvarado, Juan (c)" wrote:I would suggest
you read up on the usage of the LookupDispatchAction again.
It was not designed to to be used in the way you are trying to use them.

Take a look at this site http://husted.com/struts/index.html. It has some
good suggestions on the correct usage of the action classes that come with
struts.

-Original Message-
From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 2:46 PM
To: [EMAIL PROTECTED]
Subject: LookupDispatchAction Question



I am new to Struts and am trying to use the LookupDispatchAction class to
display a page for the first time (i.e. the user is being navigated to this
page from another page).

I have everything setup fine in my struts_config.xml and Struts attempts to
display my page, but was giving the following error:

Request[/lookup] does not contain handler parameter named submit

After researching on the archives, I realized that this message is due to
the fact that the user has not yet clicked any of the "submit" button on
this page (the page hasn't even been displayed yet). The suggestion on the
archive is to implement something similar to the following in the Action
class which extends LookupDispatchAction:

public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse)
throws Exception
{
if (httpServletRequest.getParameter(actionMapping.getParameter()) == null)
{
return defaultMethod();
}
else
{
return super.execute(actionMapping, actionForm, httpServletRequest,
httpServletResponse);
}
}


My question is what do I return from "defaultMethod"? I have to return an
ActionForward but I don't want to forward the user anywhere -- I want to
display the page. How do I do this? I guess I could have 2 pages and 2
actions -- one to display the page initially and one to process the page
upon "submit" -- but that is ugly and I hope not the only solution.





-
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

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

RE: LookupDispatchAction Question

2003-02-11 Thread Alvarado, Juan (c)
Okay this is one way of doing this:

Your login action in this case should not be a LookupDispatchAction. It
should be a sub-class of the struts Action class. LookupDispatchAction has
another intended usage. 

When your user is authenticated (from the login action), you will forward to
the jsp that is suppose to contain all the submit buttons. Assuming
everything else is configured properly, your JSP should then display
properly.


-Original Message-
From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 3:11 PM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction Question



After the user logs on they are supposed to go to a "lookup" page. This page
will have no data on it when it is first displayed. This page, which is a
JSP of course, will have a form and more than 1 submit button.
The problem is that the page can't even be displayed because when Struts
calls my Action class (which extends LookupDispatchAction), there is no
value for the "submit" button. That is, Struts doesn't know which of my
methods to invoke and throws an exception (the error message from my first
email).  This is because the user hasn't clicked any of the submit buttons
yet -- they haven't even seen the page.
How do I get the page to display initially?
 "Alvarado, Juan (c)" <[EMAIL PROTECTED]> wrote:Okay can you
please tell me what exactly it is you're trying to
accomplish??? I don't quite get what your ultimate goal is.

Thanks

-Original Message-
From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 3:01 PM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction Question



I looked at that site. That is where I found out about LookupDispatchAction.
But there is nothing that I can find that tells me how to initially display
a page that will subsequently use a dispatch action. In fact, I can't figure
out how to do it in Struts at all without either having a plain .html page
as the inital page or having 2 .jsp pages. Niether solution is good.
"Alvarado, Juan (c)" wrote:I would suggest
you read up on the usage of the LookupDispatchAction again.
It was not designed to to be used in the way you are trying to use them.

Take a look at this site http://husted.com/struts/index.html. It has some
good suggestions on the correct usage of the action classes that come with
struts.

-Original Message-
From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 2:46 PM
To: [EMAIL PROTECTED]
Subject: LookupDispatchAction Question



I am new to Struts and am trying to use the LookupDispatchAction class to
display a page for the first time (i.e. the user is being navigated to this
page from another page).

I have everything setup fine in my struts_config.xml and Struts attempts to
display my page, but was giving the following error:

Request[/lookup] does not contain handler parameter named submit

After researching on the archives, I realized that this message is due to
the fact that the user has not yet clicked any of the "submit" button on
this page (the page hasn't even been displayed yet). The suggestion on the
archive is to implement something similar to the following in the Action
class which extends LookupDispatchAction:

public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse)
throws Exception
{
if (httpServletRequest.getParameter(actionMapping.getParameter()) == null)
{
return defaultMethod();
}
else
{
return super.execute(actionMapping, actionForm, httpServletRequest,
httpServletResponse);
}
}


My question is what do I return from "defaultMethod"? I have to return an
ActionForward but I don't want to forward the user anywhere -- I want to
display the page. How do I do this? I guess I could have 2 pages and 2
actions -- one to display the page initially and one to process the page
upon "submit" -- but that is ugly and I hope not the only solution.





-
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

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



-
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

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



-
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

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




RE: LookupDispatchAction Question

2003-02-11 Thread Alvarado, Juan (c)
Okay can you please tell me what exactly it is you're trying to
accomplish??? I don't quite get what your ultimate goal is.

Thanks

-Original Message-
From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 3:01 PM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction Question



I looked at that site. That is where I found out about LookupDispatchAction.
But there is nothing that I can find that tells me how to initially display
a page that will subsequently use a dispatch action. In fact, I can't figure
out how to do it in Struts at all without either having a plain .html page
as the inital page or having 2 .jsp pages. Niether solution is good.
 "Alvarado, Juan (c)" <[EMAIL PROTECTED]> wrote:I would suggest
you read up on the usage of the LookupDispatchAction again.
It was not designed to to be used in the way you are trying to use them.

Take a look at this site http://husted.com/struts/index.html. It has some
good suggestions on the correct usage of the action classes that come with
struts.

-Original Message-
From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 2:46 PM
To: [EMAIL PROTECTED]
Subject: LookupDispatchAction Question



I am new to Struts and am trying to use the LookupDispatchAction class to
display a page for the first time (i.e. the user is being navigated to this
page from another page).

I have everything setup fine in my struts_config.xml and Struts attempts to
display my page, but was giving the following error:

Request[/lookup] does not contain handler parameter named submit

After researching on the archives, I realized that this message is due to
the fact that the user has not yet clicked any of the "submit" button on
this page (the page hasn't even been displayed yet). The suggestion on the
archive is to implement something similar to the following in the Action
class which extends LookupDispatchAction:

public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse)
throws Exception
{
if (httpServletRequest.getParameter(actionMapping.getParameter()) == null)
{
return defaultMethod();
}
else
{
return super.execute(actionMapping, actionForm, httpServletRequest,
httpServletResponse);
}
}


My question is what do I return from "defaultMethod"? I have to return an
ActionForward but I don't want to forward the user anywhere -- I want to
display the page. How do I do this? I guess I could have 2 pages and 2
actions -- one to display the page initially and one to process the page
upon "submit" -- but that is ugly and I hope not the only solution.





-
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

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



-
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

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




RE: LookupDispatchAction Question

2003-02-11 Thread Alvarado, Juan (c)
I would suggest you read up on the usage of the LookupDispatchAction again.
It was not designed to to be used in the way you are trying to use them.

Take a look at this site http://husted.com/struts/index.html. It has some
good suggestions on the correct usage of the action classes that come with
struts.

-Original Message-
From: Avexus Incorporated [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 2:46 PM
To: [EMAIL PROTECTED]
Subject: LookupDispatchAction Question



I am new to Struts and am trying to use the LookupDispatchAction class to
display a page for the first time (i.e. the user is being navigated to this
page from another page).

I have everything setup fine in my struts_config.xml and Struts attempts to
display my page, but was giving the following error:

Request[/lookup] does not contain handler parameter named submit

After researching on the archives, I realized that this message is due to
the fact that the user has not yet clicked any of the "submit" button on
this page (the page hasn't even been displayed yet). The suggestion on the
archive is to implement something similar to the following in the Action
class which extends LookupDispatchAction:

 public ActionForward execute(ActionMapping actionMapping,
 ActionForm actionForm,
 HttpServletRequest httpServletRequest,
 HttpServletResponse httpServletResponse)
   throws Exception
 {
  if (httpServletRequest.getParameter(actionMapping.getParameter()) == null)
  {
   return defaultMethod();
  }
  else
  {
   return super.execute(actionMapping, actionForm, httpServletRequest,
 httpServletResponse);
  }
 }


My question is what do I return from "defaultMethod"? I have to return an
ActionForward but I don't want to forward the user anywhere -- I want to
display the page. How do I do this? I guess I could have 2 pages and 2
actions -- one to display the page initially and one to process the page
upon "submit" -- but that is ugly and I hope not the only solution.

 



-
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

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




Nested tags -- Again

2003-02-07 Thread Alvarado, Juan (c)
I am using an action to prepopulate my action form with the data it needs.
Im my jsp I am using the nested tags to render the nested elements of the
form.

However when I submit the form, I was getting an exception having to do with
BeanUtils. My work around to that problem was to add the following method to
my form bean and call it from the constructor:

public void populateTestUser(){
System.out.println("Entered populateTestUser()");
//create three empty objects
for(int i = 0; i < 3; i++){
TestUser tu = new TestUser();
testUser.add(tu);
}
}

As you can see it basically recreates 3 TestUser and adds it to testUser
which is an ArrayList. The number 3 is important because that is the number
of objects that are created in the action that prepopulates the form. In a
real world application we don't necessarily know the amount of objects that
could be created by a prepopulation action.

My reset looks like this:

public void reset( ActionMapping mapping, HttpServletRequest request ) {
System.out.println("Entered reset method on form bean");

if( this.testUser != null ){
System.out.println("testUser is not null");
System.out.println("The size of testUser is " +
testUser.size() );
for(int i = 0; i < testUser.size(); i++){
List cars =
((TestUser)testUser.get(i)).getCarsList();
for( int j = 0; j < cars.size(); j++){
CarBean car = (CarBean)cars.get(j);
car.setSelected(false);
}
}
}
else{
System.out.println("testUser is null");
}
}

Can anyone tell me why this won't work without the populateTestUser method
(shown above). I am not always going to know how many objects could exist in
an ArrayList so therefore I don't feel this is an elegant solution to this
problem.

Thanks in advance







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




Problem with nested tag libs in 1.1 beta 3

2003-02-07 Thread Alvarado, Juan (c)
I am populating my form bean in an action as is suggested in some mailing
list posts I read:

execute method on action that sets up the form:

TestNested nestedForm = new TestNested();
nestedForm.setTestUser(populateTestUser());

request.setAttribute("nestedForm", nestedForm);
System.out.println("Set form in request scope");

return mapping.findForward("test.nested.page"); 

on my JSP I can display the contents of the form bean:




First Name:   
Last Name









However when I submit the form, I get a javax.servlet.ServletException:
BeanUtils.populate exception. I won't include the whole stack trace.
I have the following in my reset method of my form bean:
public void reset( ActionMapping mapping, HttpServletRequest request ) {
System.out.println("Entered reset method on form bean");

if( this.testUser != null ){
System.out.println("testUser is not null");
System.out.println("The size of testUser is " +
testUser.size() );
for(int i = 0; i < testUser.size(); i++){
List cars =
((TestUser)testUser.get(i)).getCarsList();
for( int j = 0; j < cars.size(); j++){
CarBean car = (CarBean)cars.get(j);
car.setSelected(false);
}
}
}
else{
System.out.println("testUser is null");
}

If anyone can tell me if they've had a similar problem and what their
solution has been I would appreciate it.

Thanks




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




struts-user@jakarta.apache.org

2003-02-05 Thread Alvarado, Juan (c)
Can anyone tell me how I can prepend the context path to the following
example:



The output of the above is: 


Your help is greatly appreciated.

Thanks




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




RE: Where should database select go for select dropdown

2003-02-04 Thread Alvarado, Juan (c)
Be careful about putting database access code right in your action. This
would not constitute a proper design of an application. If you are new to
struts and are in the process of learning, then you should get in the habit
of doing things right from the get go.

A more correct approach is to have your action call a business delegate
object which will then make calls to your data store.


-Original Message-
From: Eric C. Hein [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 1:46 PM
To: Struts Users Mailing List
Subject: Re: Where should database select go for select dropdown


In yourAction class.

- Original Message -
From: "Huw Jones" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 04, 2003 10:22 AM
Subject: Where should database select go for select dropdown


> Sorry if this is trivial - but I'm new to the framework and I'm finding
the
> documentation confusing.
> Just want to create an html select object with options set to the contents
> of a database table - i.e. visualise
> a  lookup table. So when the form is first displayed the dropdown appears
> with data from a database table.
> I'm confused where the database access should go - in the JSP or the
> FormBean. Is there an example which
> someone could point me to
>
> Thanks
>
>
>
>
> -
> 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]




Multiple struts-config files

2003-01-23 Thread Alvarado, Juan (c)
Folks:

I am trying to take advantage of using multiple configuration files and I
can't get past this simple step. -- Below is a snippet of web.xml


action
 
org.apache.struts.action.ActionServlet

config
 
/WEB-INF/struts-config.xml


config/marketbreaks
 
/WEB-INF/struts-marketbreaks-config.xml


debug
2


detail
2


validate
true

2
  


I am purposely breaking the syntax on struts-marketbreaks-config.xml so that
Tomcat will complain when it tries to load it, and that isn't happening. So
basically I am assuming that the struts-marketbreaks-config.xml is not even
being picked up by struts. Even if it does, then I have a problem with 

Access Rights where
accessrights is a global forward in struts-marketbreaks-config.xml






and I get this error when I go to the page:

javax.servlet.ServletException: Cannot create rewrite URL:
java.net.MalformedURLException: Cannot retrive ActionForward named
accessrights 

It appears that the index.jsp which is trying to use the regular
struts-config.xml and not the one for the module it is in.


If anyone can pitch in on this I'd appreciate it.






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




Use of multiple struts-config files -- HELP

2003-01-23 Thread Alvarado, Juan (c)
I have the following configuration in my web.xml:


action
 
org.apache.struts.action.ActionServlet

config
 
/WEB-INF/struts-config.xml


config/marketbreaks
 
/WEB-INF/struts-marketbreaks-config.xml


debug
2


detail
2


validate
true

2


in struts-marketbreaks-config.xml I have the following: 





And in a JSP I want to do the following: 

Access Rights

When I do this, I get the following error:
javax.servlet.ServletException: Cannot create rewrite URL:
java.net.MalformedURLException: Cannot retrive ActionForward named
accessrights
The problem is that the framework is not reading the
struts-marketbreaks-config.xml.  Can anyone tell me if they spot anythign I
am doing wrong.
I am new to the concept of multiple configuration files and I didn't find
anything on the archives.
Thanks in advance





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




RE: Making a Form non-editable

2003-01-21 Thread Alvarado, Juan (c)
No as far as I know the form tag doesn't have that type of attribute. Be
careful using the disabled attribute on the other html tags because I
believe that any form element with disabled=true will not be submitted with
the form submission.

I have used javascript in the past to accomplish this sort of thing and
still maintain my form fields in the request when the form is submitted.

-Original Message-
From: Curtney Jacobs [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 5:15 AM
To: Struts Users Mailing List
Subject: Making a Form non-editable


Greetings!!

Is there a way to make an entirre html form non-editable in struts? Meaning,

all inputs, select, and radio fields would be disabled.

I am aware that the individual fields can be disabled by setting the
disabled 
attribute to true for those fields. However, I would like to
programmatically 
disable the entire form.

If the user has read-ony access, I would like the entire form to be
disabled.

As far as I can see, the  tag does not have a disabled
attribute.

Any suggestions or comments are greatly appreciated.

_CJ
-- 
U-Interface.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: server side validation

2003-01-16 Thread Alvarado, Juan (c)
http://home.earthlink.net/~dwinterfeldt/ -- Read the very first sentence.

One word of advise: Before you post to this list, make sure that you do some
research into what you are looking for and that you are not looking to be
spoon fed the answers to your questions.

If you bother to do a search on google (struts validator) you would have had
the answer to your question.

-Original Message-
From: Ginger Cheng [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 4:24 PM
To: [EMAIL PROTECTED]
Subject: server side validation


Hello,
can some tell me what package (from where) to download to make the
server 
side validation works? for struts-1.1. Thank you.
ginger


--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: LookupDispatchAction

2003-01-15 Thread Alvarado, Juan (c)
I think the forward is a better way, but I'm not sure if it applies to your
situation Pat since you mentioned you must do something in the onchange
event of a field in your form.

One thing that you should avoid is naming the parameter in the action of
your struts-config as "action". That will break your form in any javascript
in which you change the action property in the form.

-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 15, 2003 2:50 PM
To: 'Struts Users Mailing List'
Subject: RE: LookupDispatchAction


Yep - just do:



or whatever you button's value is in your ApplicationResources.properties
file.

A better way is to add a forward that has this path and use 

HTH,

Matt

-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 15, 2003 12:46 PM
To: [EMAIL PROTECTED]
Subject: RE: LookupDispatchAction


Ok so how do i map the href submit to its relevant method in
getKeyMethodMap(). I send a paramter and map it in this method???






>From: "Alvarado, Juan (c)" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: LookupDispatchAction
>Date: Wed, 15 Jan 2003 14:38:50 -0500
>
>The only way I can think of submitting a form without actually having the
>user click on a submit button is to have some type of javascript on the
>page.
>
>You can avoid the scriptlets with jstl I'm pretty sure.
>
>-Original Message-
>From: Pat Quinn [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, January 15, 2003 2:32 PM
>To: [EMAIL PROTECTED]
>Subject: RE: LookupDispatchAction
>
>
>I'm also using the lookupDispatch action... is it possible to use HREF to
>submit a form using this approach... if so whats the cleanest way to do it
>please personally i try to avoid javascript and scriptlet code in my
>jsp's
>
>Any ideas guys
>
>
>
>
>
>
> >From: "Alvarado, Juan (c)" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> >Subject: RE: LookupDispatchAction
> >Date: Wed, 15 Jan 2003 12:01:50 -0500
> >
> >This is something I have done from an onchange event in my forms:
> >
> >function loadCompanyInfoByContract(objForm){
> >
> > objForm.userAction.value = " >key='prompt.load.contracts'/>";
> > objForm.action = "<%= request.getContextPath()
> >%>/selectContractForOrder.do?userAction="+objForm.userAction.value;
> > objForm.submit();
> >
> >}
> >
> >Let me know if that helps.
> >
> >
> >-Original Message-
> >From: Cook, Graham [mailto:[EMAIL PROTECTED]]
> >Sent: Wednesday, January 15, 2003 11:09 AM
> >To: '[EMAIL PROTECTED]'
> >Subject: LookupDispatchAction
> >
> >
> >Hi
> >
> >Is there anyway to use LookupDispatchAction with onChange events on the
> >JSP.
> >Basically, I want to call my LookupDispatchAction (when a user changes a
> >HTML field) and return either an error, or update one of the fields in 
>the
> >form bean.  In my config file I have a parameter defined as doaction and
> >all
> >the HTML buttons call the LookupDispatchAction okay.
> >
> >Im only having a problem when simulating the doaction field through
> >JavaScript. Ideally, I would like to do this with no JavaScript but I 
>dont
> >think thats going to be possible.? Any thoughts
> >
> >
>
>***
>*
> >
> >" This message contains information that may be privileged or 
>confidential
> >and
> >is the property of the Cap Gemini Ernst & Young Group. It is intended 
>only
> >for
> >the person to whom it is addressed. If you are not the intended 
>recipient,
> >you
> >are not authorized to read, print, retain, copy, disseminate, distribute,
> >or
> >use
> >this message or any part thereof. If you receive this message in error,
> >please
> >notify the sender immediately and delete all copies of this message ".
>
>***
>*
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >
> >
&

RE: LookupDispatchAction

2003-01-15 Thread Alvarado, Juan (c)
You send a parameter which is configured in struts-config.xml (I'm sure you
knew that) and make sure the value of that parameter matches with one of the
values of the map in getKeyMethodMap(). That should call the desired method
for you.


Ex:

/**
 * Implementation of getKeyMethodMap
 */
protected Map getKeyMethodMap(){

Map map = new HashMap();
map.put("button.add.record", "addRecord");

return map; 
}

In your properties file you will have a key:
button.add.record=Add Record

When you submit the form, you make sure that the value of the parameter you
configured in struts-config.xml for that action has a value of 'Add Record'.
The framework will do a reverse lookup on that value of the parameter and
know that it belongs to the key button.add.record and it will know that for
that key it has to call the addRecord method.

Let me know how it goes...

-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 15, 2003 2:46 PM
To: [EMAIL PROTECTED]
Subject: RE: LookupDispatchAction


Ok so how do i map the href submit to its relevant method in
getKeyMethodMap(). I send a paramter and map it in this method???






>From: "Alvarado, Juan (c)" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: LookupDispatchAction
>Date: Wed, 15 Jan 2003 14:38:50 -0500
>
>The only way I can think of submitting a form without actually having the
>user click on a submit button is to have some type of javascript on the
>page.
>
>You can avoid the scriptlets with jstl I'm pretty sure.
>
>-Original Message-
>From: Pat Quinn [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, January 15, 2003 2:32 PM
>To: [EMAIL PROTECTED]
>Subject: RE: LookupDispatchAction
>
>
>I'm also using the lookupDispatch action... is it possible to use HREF to
>submit a form using this approach... if so whats the cleanest way to do it
>please personally i try to avoid javascript and scriptlet code in my
>jsp's
>
>Any ideas guys
>
>
>
>
>
>
> >From: "Alvarado, Juan (c)" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> >Subject: RE: LookupDispatchAction
> >Date: Wed, 15 Jan 2003 12:01:50 -0500
> >
> >This is something I have done from an onchange event in my forms:
> >
> >function loadCompanyInfoByContract(objForm){
> >
> > objForm.userAction.value = " >key='prompt.load.contracts'/>";
> > objForm.action = "<%= request.getContextPath()
> >%>/selectContractForOrder.do?userAction="+objForm.userAction.value;
> > objForm.submit();
> >
> >}
> >
> >Let me know if that helps.
> >
> >
> >-Original Message-
> >From: Cook, Graham [mailto:[EMAIL PROTECTED]]
> >Sent: Wednesday, January 15, 2003 11:09 AM
> >To: '[EMAIL PROTECTED]'
> >Subject: LookupDispatchAction
> >
> >
> >Hi
> >
> >Is there anyway to use LookupDispatchAction with onChange events on the
> >JSP.
> >Basically, I want to call my LookupDispatchAction (when a user changes a
> >HTML field) and return either an error, or update one of the fields in 
>the
> >form bean.  In my config file I have a parameter defined as doaction and
> >all
> >the HTML buttons call the LookupDispatchAction okay.
> >
> >Im only having a problem when simulating the doaction field through
> >JavaScript. Ideally, I would like to do this with no JavaScript but I 
>dont
> >think thats going to be possible.? Any thoughts
> >
> >
>
>***
>*
> >
> >" This message contains information that may be privileged or 
>confidential
> >and
> >is the property of the Cap Gemini Ernst & Young Group. It is intended 
>only
> >for
> >the person to whom it is addressed. If you are not the intended 
>recipient,
> >you
> >are not authorized to read, print, retain, copy, disseminate, distribute,
> >or
> >use
> >this message or any part thereof. If you receive this message in error,
> >please
> >notify the sender immediately and delete all copies of this message ".
>
>

RE: LookupDispatchAction

2003-01-15 Thread Alvarado, Juan (c)
The only way I can think of submitting a form without actually having the
user click on a submit button is to have some type of javascript on the
page. 

You can avoid the scriptlets with jstl I'm pretty sure.

-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 15, 2003 2:32 PM
To: [EMAIL PROTECTED]
Subject: RE: LookupDispatchAction


I'm also using the lookupDispatch action... is it possible to use HREF to 
submit a form using this approach... if so whats the cleanest way to do it 
please personally i try to avoid javascript and scriptlet code in my 
jsp's

Any ideas guys






>From: "Alvarado, Juan (c)" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: LookupDispatchAction
>Date: Wed, 15 Jan 2003 12:01:50 -0500
>
>This is something I have done from an onchange event in my forms:
>
>function loadCompanyInfoByContract(objForm){
>
>   objForm.userAction.value = "key='prompt.load.contracts'/>";
>   objForm.action = "<%= request.getContextPath()
>%>/selectContractForOrder.do?userAction="+objForm.userAction.value;
>   objForm.submit();
>
>}
>
>Let me know if that helps.
>
>
>-Original Message-
>From: Cook, Graham [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, January 15, 2003 11:09 AM
>To: '[EMAIL PROTECTED]'
>Subject: LookupDispatchAction
>
>
>Hi
>
>Is there anyway to use LookupDispatchAction with onChange events on the 
>JSP.
>Basically, I want to call my LookupDispatchAction (when a user changes a
>HTML field) and return either an error, or update one of the fields in the
>form bean.  In my config file I have a parameter defined as doaction and 
>all
>the HTML buttons call the LookupDispatchAction okay.
>
>Im only having a problem when simulating the doaction field through
>JavaScript. Ideally, I would like to do this with no JavaScript but I dont
>think thats going to be possible.? Any thoughts
>
>
>***
*
>
>" This message contains information that may be privileged or confidential
>and
>is the property of the Cap Gemini Ernst & Young Group. It is intended only
>for
>the person to whom it is addressed. If you are not the intended recipient,
>you
>are not authorized to read, print, retain, copy, disseminate, distribute, 
>or
>use
>this message or any part thereof. If you receive this message in error,
>please
>notify the sender immediately and delete all copies of this message ".
>***
*
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>


_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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




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




RE: LookupDispatchAction

2003-01-15 Thread Alvarado, Juan (c)
This is something I have done from an onchange event in my forms:

function loadCompanyInfoByContract(objForm){

objForm.userAction.value = "";
objForm.action = "<%= request.getContextPath()
%>/selectContractForOrder.do?userAction="+objForm.userAction.value;
objForm.submit();   

}

Let me know if that helps.


-Original Message-
From: Cook, Graham [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 15, 2003 11:09 AM
To: '[EMAIL PROTECTED]'
Subject: LookupDispatchAction


Hi

Is there anyway to use LookupDispatchAction with onChange events on the JSP.
Basically, I want to call my LookupDispatchAction (when a user changes a
HTML field) and return either an error, or update one of the fields in the
form bean.  In my config file I have a parameter defined as doaction and all
the HTML buttons call the LookupDispatchAction okay.

Im only having a problem when simulating the doaction field through
JavaScript. Ideally, I would like to do this with no JavaScript but I dont
think thats going to be possible.? Any thoughts




" This message contains information that may be privileged or confidential
and 
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for 
the person to whom it is addressed. If you are not the intended recipient,
you 
are not authorized to read, print, retain, copy, disseminate, distribute, or
use 
this message or any part thereof. If you receive this message in error,
please 
notify the sender immediately and delete all copies of this message ".




--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: LookupDispatchAction

2003-01-14 Thread Alvarado, Juan (c)
using your example you'd want to check your request parameter (Make sure you
use the same name as in struts-config.xml for that action) and make sure the
value is either add or delete. This insures your methods get called.

This has come in handy for me whenever I want to display a link to a user to
let them pull up a record they want to edit and at the same time re-use a
related action.

-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 3:49 PM
To: [EMAIL PROTECTED]
Subject: RE: LookupDispatchAction


So i guess all i need do is check the request object for my parameter as set

in the URL of the href???

protected Map getKeyMethodMap(ActionMapping mapping,
ActionForm form,
HttpServletRequest request) {


  Map map = new HashMap();
  map.put("button.add", "add");
  map.put("button.delete", "delete");
  return map;
}








>From: "Alvarado, Juan (c)" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: LookupDispatchAction
>Date: Tue, 14 Jan 2003 15:42:58 -0500
>
>Yes I've done it that way many times and it works.
>
>-Original Message-
>From: Pat Quinn [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, January 14, 2003 3:42 PM
>To: [EMAIL PROTECTED]
>Subject: LookupDispatchAction
>
>
>Hi Guys,
>
>Can i submit a page using a html HREF (i.e. myLookupAction.do?offset=10)
>when using a LookupDispatchAction. Up until now i submitted the page using
>the following format:
>
>key='label.update'/>
>
>Cheers
>
>Pat
>
>
>
>
>_
>STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
>http://join.msn.com/?page=features/junkmail
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>


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


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




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




RE: LookupDispatchAction

2003-01-14 Thread Alvarado, Juan (c)
Yes I've done it that way many times and it works.

-Original Message-
From: Pat Quinn [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 3:42 PM
To: [EMAIL PROTECTED]
Subject: LookupDispatchAction


Hi Guys,

Can i submit a page using a html HREF (i.e. myLookupAction.do?offset=10) 
when using a LookupDispatchAction. Up until now i submitted the page using 
the following format:



Cheers

Pat




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


--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: Validator

2003-01-14 Thread Alvarado, Juan (c)
FYI... A colleague of mine came up with this: ^\d{5}$|^\d{5}-\d{4}$

That does what I want.

Thanks to everyone who replied.

-Original Message-
From: Durham David Cntr 805CSS/SCBE [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 11:57 AM
To: Struts Users Mailing List
Subject: RE: Validator


Forgot second part, try something like ^\d{5}(-\d{4})?$

> -Original Message-
> From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 14, 2003 10:49 AM
> To: 'Struts Users Mailing List'
> Subject: Validator
> 
> 
> Can anyone explain to me what this regular expression means:
> 
> ^\d{5}\d*$ -- Zip validation that comes with the validator
> 
> I thought it meant you could only type in a five digit zip 
> code. Ex: 33634
> 
> However, I am allowed to type: 3363455 and that works.
> 
> Of course, since I am no expert on regular expressions, I am sure I am
> missing something. 
> 
> What I basically need to accomplish is to allow a user to be 
> able to type in
> a zip code in two formats and only those two formats:
> 
> 33634-6661 OR 33634
> 
> Any help is greatly appreciated.
> 
> Thanks
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 

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




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




Validator

2003-01-14 Thread Alvarado, Juan (c)
Can anyone explain to me what this regular expression means:

^\d{5}\d*$ -- Zip validation that comes with the validator

I thought it meant you could only type in a five digit zip code. Ex: 33634

However, I am allowed to type: 3363455 and that works.

Of course, since I am no expert on regular expressions, I am sure I am
missing something. 

What I basically need to accomplish is to allow a user to be able to type in
a zip code in two formats and only those two formats:

33634-6661 OR 33634

Any help is greatly appreciated.

Thanks




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




RE: It lives....

2003-01-13 Thread Alvarado, Juan (c)
I had already wondered a few times what happened to you.

Glad to have you back...

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 11:36 AM
To: 'Struts Users Mailing List'
Subject: It lives


Hey guys!  Been away from the list for awhile.  Got sick of working in a
warehouse after the water main break on the T-Mobile/VoiceStream project and
split.  Now I'm the Senior Applications Engineer for QAT (www.qat.com) doing
systems integration using BizFlo (www.handysoft.com) and Java web services.
What an opportunity to spread the Struts faith!  I see the list is as active
as ever - been subscribed for 10 minutes and got 15 msgs

BTW: That was a pretty funny ACK in "Programming Jakarta Struts," Chuck!  It
was truly my pleasure to help.  I got Ted's book, too ("Struts in Action"),
and it is a good one!  Both are much better than "Mastering Jakarta Struts,"
though that's not to say the latter is bad

So, when's the next release, and did anybody ever get this stuff to run with
Flash???


Mark



--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: ActionErrors question

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


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

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

thx

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


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

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


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

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

In the JSP I display the errors...


However, this displays nothing _unless_ I do 

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

This is with Struts 1.1b2.

thx
andy



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




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



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




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




RE: ActionErrors question

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

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


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

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

In the JSP I display the errors...


However, this displays nothing _unless_ I do 

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

This is with Struts 1.1b2.

thx
andy



--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: Validator and LookupDispatchAction

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

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


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

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



--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: Model Layer question.. where to put BeanUtils.copyProperties (sort of long)

2003-01-08 Thread Alvarado, Juan (c)
Can you register the exceptions that beanutils throws in the struts
config???

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 4:57 PM
To: Struts List
Cc: model struts
Subject: Model Layer question.. where to put BeanUtils.copyProperties
(sort of long)


After purchasing and reading Chuck's "Jakarta Struts" (O'Reilly -great
book also) I was made aware of being able to declare Exceptions for
your Actions in the struts-config file. Now that I'm aware that I
could do that, it's possible to avoid the try/catch blocks that most
of my dispatch action methods have.

The question I have though is where to best do the form/DTO conversion
provided by BeanUtils.copyProperties(). To give you some background my
current architecture looks like this (using JDBC)...

JSP ---

   dispatch Action ---

  calls a Service class method such as updateEmployee ---

 Service class gets appropriate DAO and calls
 DAO method (ie updateEmployee( DTO ) )( this really
 isn't a true DAO just mostly jdbc stuff in here)

 return to action and forward

Before realizing about the handling Exceptions in the struts-config
file, my DispatchAction methods usually all ended up with a try/catch
block, including a generic Exception catch. If anything got in there
it changed the forward name to the appropriate error page along with
the resource message key to display the "Some problem message."

Also in my dispatch Action method I would take the actionForm and
convert it to the appropriate DTO by the use of
BeanUtils.copyProperties. I then called the appropriate service method
passing in this DTO. (ie service.updateEmployee( employeeDTO ) ).
Problem is now that copyProperties throws two Exceptions which didn't
seem to bother me as much before since I always had a try/catch in the
action anyway. Now I'm starting to think that I should move the
BeanUtils.copyProperties outside of the Action and do that somewhere
else.

I don't really like the idea of passing the ActionForm into the
service layer since that couples the service layer to Struts, although
maybe that's not too big of a deal.

I'm starting to think maybe the best idea would be to create a
separate class that calls the BeanUtils.copyProperties() and also
throws it's own Exception that I can declare in the struts-config
file. Something like...

PropertyCoverter {
   copyProperties( Object a, Object b) throws MyException {
 try {
 BeanUtils.copyProperties( a, b );
 }
 catch(Exception e ) {
 //log error
 throw new MyException();
 }
   }
}

I was thinking if I do the above I could get the error handling I need
without the try/catch in the Action necessary for coverting the form
to the DTO?

Thanks for any comments.

-- 

Rick
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: Can you change the form action??

2002-12-20 Thread Alvarado, Juan (c)
You are a perfect candidate for either DispatchAction or
LookupDispatchAction. LookupDispatchAction will allow you to avoid
javascript.

I suggest you take a look at Ted's site http://husted.com (I think) and
review his tips on the two actions mentioned above.

This post will also help you:

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg51209.html

-Original Message-
From: awc [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 11:15 AM
To: Struts Users Mailing List
Subject: Can you change the form action??


Hi All,

Can you change the value of  by inspecting a incoming
variable??

I have a four action classes : AddAction, DeleteAction, UpdateAction and
LoadAction and one form => The userForm.

If incoming parameter action=New, I want to change the form action to
.

If incoming parameter action=Update, I want to change the form action to
.

Is there anyway to do this without using JavaScript??  This way I will
have four action classes and one form for each business objects.

Thanks in advance for any hints.

Anil


--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: How does LookupDispatchAction lookup.

2002-12-20 Thread Alvarado, Juan (c)
I have had the same issues you are having, and I just went with
LookupDispatchAction. I'm not 100% sure if the way I do my apps is the 100%
correct way, but what I do is for any button that has white space as its
value, I store a key in my ApplicationResources.properties and use that key
in conjunction with LookupDispatchAction.

I like the LookupDispatchAction because I avoid having to use javascript on
my client.

-Original Message-
From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 10:45 AM
To: 'Struts Users Mailing List'
Subject: RE: How does LookupDispatchAction lookup.


> I think you are missing the point of what 
> LookupDispatchAction is about.
> It solves a specific problem with i18n'd button labels.
> 
> It sounds like you might be more interested in DispatchAction.

Ted says that JavaScript is needed  with Dispatch Action.
My problem with DispatchAction is that the name of the
java method IS the value of a request parameter.
At the moment, the only parameter I can use is the one
of the submit button clicked by the user. And the value
of that submit contains whitespaces.


So is there a solution?
Am i stuck with LookupDispatchAction and .properties ?

This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: How does LookupDispatchAction lookup.

2002-12-20 Thread Alvarado, Juan (c)
take a look at this posting. It explains to you how it works.

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg51209.html

-Original Message-
From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 9:28 AM
To: '[EMAIL PROTECTED]'
Subject: How does LookupDispatchAction lookup.


I want to use LookupDispatchAction.
Reading one of Ted's tips, it seems that the value returned by my
submit buttons MUST be stored in a .properties file, and looked up
inside my JSP:


 


There's no way to have a hard-coded value? or a value
coming from somewhere else?
Then how do I code the getKeyMethodMap?

I would have liked to return such a map:
 "Add Item" => "add"
"Delete Item" => "delete"

Is it possible?



---cut here---


This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: DynaActionForm problem -> IllegalArgumentException: No bean specified

2002-12-10 Thread Alvarado, Juan (c)
I don't believe DynaActionForm supports java.util.Collection.

Please correct me if I'm wrong.

Thanks

-Original Message-
From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 11:27 AM
To: Struts User
Subject: DynaActionForm problem -> IllegalArgumentException: No bean
specified


Oh Struts masters,

I get an exception when Struts populates my DynaActionForm from request
parameters.  With DEBUG logging on I see the following:

INFO  org.apache.struts.action.RequestProcessor  - Processing a 'POST' for
path '/changeLocale' DEBUG org.apache.struts.util.RequestUtils  -  Looking
for ActionForm bean instance in scope 'session' under attribute key
'localeForm' DEBUG org.apache.struts.util.RequestUtils  -  Recycling
existing DynaActionForm instance of type 'localeForm' DEBUG
org.apache.struts.util.RequestUtils  -  -->
DynaActionForm[dynaClass=localeForm,locales={en_US,es_MX},selectedLocale=en_
US] DEBUG org.apache.struts.action.RequestProcessor  -  Storing ActionForm
bean instance in scope 'session' under attribute key 'localeForm' DEBUG
org.apache.struts.action.RequestProcessor  -  Populating bean properties
from this request DEBUG org.apache.commons.beanutils.BeanUtils  -
BeanUtils.populate(DynaActionForm[dynaClass=localeForm,locales=,select
edLocale=], {selectedLocale.localeString=[Ljava.lang.String;@d0})
DEBUG org.apache.commons.beanutils.BeanUtils  -
setProperty(DynaActionForm[dynaClass=localeForm,locales=,selectedLocal
e=], selectedLocale.localeString, [es_MX]) DEBUG
org.apache.commons.beanutils.BeanUtils  - Target bean = null DEBUG
org.apache.commons.beanutils.BeanUtils  - Target name = localeString

Looks like RequestUtils is getting the correct DynaActionForm from the
session (logs 2,3,4).  But then I don't understand why the BeanUtils logs
show the properties to be NULL (logs 7,8,9).

My DynaActionForm contains two properties.  One is a JavaBean and the other
is a Collection of JavaBeans.


 
 


The element type of property locales is also com.blah.LocaleBean.

com.blah.LocaleBean is very simple.  It contains only one property called
localeString which is a java.lang.String.

Am I doing something wrong???

Environment:

Struts 1.1b2
BeanUtils 1.5 (also tried 1.3)
Tomcat 4.0.6


--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: LookupDispatchAction onchange

2002-12-10 Thread Alvarado, Juan (c)
The LookupDispatchAction was designed with the intention of not having to
use javascript to work with multiple submit buttons in one form. 

Since what you need is a submit from an onChange event in a text field which
is a somewhat not often seen operation (at least from my experiences), you
have no choice but to do the javascript in this case.

Just our of curiosity, what requirement in your application do you have that
needs the form to be submitted when a text field changes???

-Original Message-
From: Cook, Graham [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 10:50 AM
To: 'Struts Users Mailing List'
Subject: RE: LookupDispatchAction onchange


Thanks Andrew & Juan, thats very helpful. 

Its is a shame that I have to use JavaScript to achieve a submit from a text
field. The other buttons on the screen use the  tag, 





obviously theres no Javascript there, shame there isnt some way of doing
this with a tag rather than having javascript code to do the submit.

Thanks you for your help.




-Original Message-
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
Sent: 10 December 2002 15:25
To: 'Struts Users Mailing List'
Subject: RE: LookupDispatchAction onchange


If I remember correctly the LookupDispatchAction does a reverse lookup on
your resource bundle in order to determine which method to call in the
class.

Example:

if you have a key in your ApplicationResources.properties called:

textfield.changed=submit form

then you would obviously need something like the following in the
getKeyMethodMap:

map.put("textfield.changed", "textFieldChangedMethod");

So when your text field changes, you will need to submit the parameter you
configured for your LookupDispatchAction in struts-config.xml with the a
value of 'submit form'

What the action should do is do a reverse lookup on the ApplicationResources
file and look for a value of 'submit form'. 'submit form' is associated with
the key textfield.changed and it will cause the textFieldChangedMethod to be
called in your class.

Also, make sure you follow Andrew's suggestion about not using 'action' as
the parameter name. This has the potential to cause your form to behave in a
very weird manner. It caused me lots of headaches in the past until I
figured out it was the parameter name I used was 'action'.

If you need any more help on this let me know.

Take care

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 9:54 AM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction onchange


Should be possible.
You may need to do something like appending a parameter to your forms action
url with a bit of javascript to simulate whats submitted by a button. Can't
remember the details for LookupDispatchAction since I havent used it, but
heres some js that will play with your forms action and append a parameter
named 'method' with value defined by useMethod.
Adapt as required. (nb: its modified from a similar script (which works with
DispatchAction rather than LookupDispatchAction) of mine for the purposes of
this reply and thus untested!)


function submitBlah(useMethod)
{
document.forms[0].action =
appendParameter(document.forms[0].action,'method',useMethod);
document.forms[0].submit();
  }
}

function appendParameter(url, parameter, value)
{
  var delimeter = url.indexOf('?') == -1 ? '?' : '&';
  return url + delimeter + parameter + '=' + value;
}


Having said all that I should point out that you might be able achieve a
similar effect using an appropriate hidden field too. Much simpler (though
doesnt work too well with multipart forms submitting to a DispatchAction).
If you try that be careful you dont submit 2 values for your property when a
button is clicked.

btw: Just looking at the javadocs for LDA. I see they use 'action' as the
name of their example parameter. Bad idea naming anything on a form
'action'. It will shadow the form.action property (which means above script
wont work for one thing). Same reason that naming a button 'submit' will
lead you into trouble when you later try to add a call to javascripts
form.submit() method...



-Original Message-
From: Cook, Graham [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 22:27
To: '[EMAIL PROTECTED]'
Subject: LookupDispatchAction onchange


Is it possible to use an onchange event on a text input field to submit the
form to a LookupDispatchAction?

I have numerous buttons on the JSP page which submit the form to my
LookupDispatchAction, and work depending on what the value of the action is,
but i would like to also call my LookupDispatchAction from an onchange event
of a text field?

Anyone done this?



RE: LookupDispatchAction onchange

2002-12-10 Thread Alvarado, Juan (c)
If I remember correctly the LookupDispatchAction does a reverse lookup on
your resource bundle in order to determine which method to call in the
class.

Example:

if you have a key in your ApplicationResources.properties called:

textfield.changed=submit form

then you would obviously need something like the following in the
getKeyMethodMap:

map.put("textfield.changed", "textFieldChangedMethod");

So when your text field changes, you will need to submit the parameter you
configured for your LookupDispatchAction in struts-config.xml with the a
value of 'submit form'

What the action should do is do a reverse lookup on the ApplicationResources
file and look for a value of 'submit form'. 'submit form' is associated with
the key textfield.changed and it will cause the textFieldChangedMethod to be
called in your class.

Also, make sure you follow Andrew's suggestion about not using 'action' as
the parameter name. This has the potential to cause your form to behave in a
very weird manner. It caused me lots of headaches in the past until I
figured out it was the parameter name I used was 'action'.

If you need any more help on this let me know.

Take care

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 9:54 AM
To: Struts Users Mailing List
Subject: RE: LookupDispatchAction onchange


Should be possible.
You may need to do something like appending a parameter to your forms action
url with a bit of javascript to simulate whats submitted by a button. Can't
remember the details for LookupDispatchAction since I havent used it, but
heres some js that will play with your forms action and append a parameter
named 'method' with value defined by useMethod.
Adapt as required. (nb: its modified from a similar script (which works with
DispatchAction rather than LookupDispatchAction) of mine for the purposes of
this reply and thus untested!)


function submitBlah(useMethod)
{
document.forms[0].action =
appendParameter(document.forms[0].action,'method',useMethod);
document.forms[0].submit();
  }
}

function appendParameter(url, parameter, value)
{
  var delimeter = url.indexOf('?') == -1 ? '?' : '&';
  return url + delimeter + parameter + '=' + value;
}


Having said all that I should point out that you might be able achieve a
similar effect using an appropriate hidden field too. Much simpler (though
doesnt work too well with multipart forms submitting to a DispatchAction).
If you try that be careful you dont submit 2 values for your property when a
button is clicked.

btw: Just looking at the javadocs for LDA. I see they use 'action' as the
name of their example parameter. Bad idea naming anything on a form
'action'. It will shadow the form.action property (which means above script
wont work for one thing). Same reason that naming a button 'submit' will
lead you into trouble when you later try to add a call to javascripts
form.submit() method...



-Original Message-
From: Cook, Graham [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 22:27
To: '[EMAIL PROTECTED]'
Subject: LookupDispatchAction onchange


Is it possible to use an onchange event on a text input field to submit the
form to a LookupDispatchAction?

I have numerous buttons on the JSP page which submit the form to my
LookupDispatchAction, and work depending on what the value of the action is,
but i would like to also call my LookupDispatchAction from an onchange event
of a text field?

Anyone done this?




" This message contains information that may be privileged or confidential
and
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for
the person to whom it is addressed. If you are not the intended recipient,
you
are not authorized to read, print, retain, copy, disseminate, distribute, or
use
this message or any part thereof. If you receive this message in error,
please
notify the sender immediately and delete all copies of this message ".




--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: ApplicationResources.properties not reloading added keys

2002-11-26 Thread Alvarado, Juan (c)
Thanks for your suggestions.

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 4:33 PM
To: Struts Users Mailing List
Subject: RE: ApplicationResources.properties not reloading added keys


Yes, in these cases, it would probably be quicker to manually check (from
your
source all the way to the deployed application) that the file exists and was
updated.

If all else fails, blow away JBoss' work directory:
$JBOSS_HOME/server/default/tmp/deploy/server/default/deploy/{yourapp.war}

Hope that helps.


--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org

"If you were plowing a field, which would you rather use? Two strong oxen or
1024 chickens?"
- Seymour Cray (1925-1996), father of supercomputing


> -Original Message-
> From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 26, 2002 4:25 PM
> To: 'Struts Users Mailing List'
> Subject: RE: ApplicationResources.properties not reloading added keys
>
>
> The way I'm working is as follows:
>
> We have an ant task that will build an ear file.
> What we then do is through some ant tasks, extract the ear file into the
> deploy folder of jboss. Another task then extracts the war file into the
> deploy folder also. So what I end up with is as follows:
>
> $JBOSS_DEPLOY_DIRECTORY/$EAR_DIRECTORY
> $JBOSS_DEPLOY_DIRECTORY/$WAR_DIRECTORY
>
> Inside the $EAR_DIRECTORY is your typical J2EE stuff, and inside the
> $WAR_DIRECTORY is the web-app.
>
> Whenever I make a change to the properties file, I have an ant task that
> will touch the web.xml of the web-app, but this doesn't work. Shutting
down
> and restarting jboss from scratch does not do the trick either. Pretty
> weird
>
> Thanks for the quick reply.
>
> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 26, 2002 4:14 PM
> To: Struts Users Mailing List
> Subject: RE: ApplicationResources.properties not reloading added keys
>
>
> Please describe how you are working
>
> a, b, c, or some other way:
>
> a) building .war and deploy/redeploy
> b) changing the files in place (I don't think this is possible)
> c) working right in the deploy directory
>
> If a, are you sure you are not adding it to the .properties that gets
> overwritten when building?
> If c, the app will not redeploy itself when a property file changes (at
> least
> not last time I checked)
>
>
>
> --
> James Mitchell
> Software Engineer/Struts Evangelist
> http://www.open-tools.org
>
> "If you were plowing a field, which would you rather use? Two strong oxen
or
> 1024 chickens?"
> - Seymour Cray (1925-1996), father of supercomputing
>
>
> > -Original Message-
> > From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, November 26, 2002 4:04 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: ApplicationResources.properties not reloading added keys
> >
> >
> > Hi:
> >
> > I am using jboss-3.03 with tomcat 4.05 and I cannot get my
> > ApplicationResources.properties to display newly added keys. I have
> > restarted jboss and still no luck. All I get is a message like this:
> > ???en_US.prompt.application.url???
> > I know that the file ApplicationResources.properties  is under
> > WEB-INF/classes and it does have the prompt.application.url key.
> >
> > If anyone has any idea how to solve this under the environment described
> > above, I'd appreciate if you could share them with me.
> >
> > Thanks in advance
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


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




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




RE: ApplicationResources.properties not reloading added keys

2002-11-26 Thread Alvarado, Juan (c)
The way I'm working is as follows:

We have an ant task that will build an ear file.
What we then do is through some ant tasks, extract the ear file into the
deploy folder of jboss. Another task then extracts the war file into the
deploy folder also. So what I end up with is as follows:

$JBOSS_DEPLOY_DIRECTORY/$EAR_DIRECTORY
$JBOSS_DEPLOY_DIRECTORY/$WAR_DIRECTORY

Inside the $EAR_DIRECTORY is your typical J2EE stuff, and inside the
$WAR_DIRECTORY is the web-app.

Whenever I make a change to the properties file, I have an ant task that
will touch the web.xml of the web-app, but this doesn't work. Shutting down
and restarting jboss from scratch does not do the trick either. Pretty
weird

Thanks for the quick reply.

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 4:14 PM
To: Struts Users Mailing List
Subject: RE: ApplicationResources.properties not reloading added keys


Please describe how you are working

a, b, c, or some other way:

a) building .war and deploy/redeploy
b) changing the files in place (I don't think this is possible)
c) working right in the deploy directory

If a, are you sure you are not adding it to the .properties that gets
overwritten when building?
If c, the app will not redeploy itself when a property file changes (at
least
not last time I checked)



--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org

"If you were plowing a field, which would you rather use? Two strong oxen or
1024 chickens?"
- Seymour Cray (1925-1996), father of supercomputing


> -Original Message-----
> From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 26, 2002 4:04 PM
> To: '[EMAIL PROTECTED]'
> Subject: ApplicationResources.properties not reloading added keys
>
>
> Hi:
>
> I am using jboss-3.03 with tomcat 4.05 and I cannot get my
> ApplicationResources.properties to display newly added keys. I have
> restarted jboss and still no luck. All I get is a message like this:
> ???en_US.prompt.application.url???
> I know that the file ApplicationResources.properties  is under
> WEB-INF/classes and it does have the prompt.application.url key.
>
> If anyone has any idea how to solve this under the environment described
> above, I'd appreciate if you could share them with me.
>
> Thanks in advance
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


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




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




ApplicationResources.properties not reloading added keys

2002-11-26 Thread Alvarado, Juan (c)
Hi:

I am using jboss-3.03 with tomcat 4.05 and I cannot get my
ApplicationResources.properties to display newly added keys. I have
restarted jboss and still no luck. All I get is a message like this:
???en_US.prompt.application.url???
I know that the file ApplicationResources.properties  is under
WEB-INF/classes and it does have the prompt.application.url key.

If anyone has any idea how to solve this under the environment described
above, I'd appreciate if you could share them with me.

Thanks in advance




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




HELP with controller class please!!!!

2002-11-26 Thread Alvarado, Juan (c)
I've looked all over the archives and cannot find any help with the
following and the tiles documentation...well there is really no
documentation.

I have a controller url class that does the following:

public void perform(ComponentContext context,
   HttpServletRequest request,
   HttpServletResponse response,
   ServletContext
servletContext)
throws
ServletException, IOException{

Logger logger =
Logger.getLogger(GetApplicationsAction.class);
logger.debug("perform on GetApplicationsAction was
called...");
String test = "TEST";
context.putAttribute( "test", test);
}

my tiles definiton looks as follows:






and in addApplication.jsp I have:


The problem is that I get the following error:
[ServletException in:/jsps/addApplication.jsp] Error - tag importAttribute :
property 'test' not found in context. Check tag syntax' 

Even though I set the variable into the component context, I cannot get the
page to pick it up.

What am I missing

Thanks






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




Controller class in tiles

2002-11-26 Thread Alvarado, Juan (c)
My definition looks as follows:






my controller class extends TilesAction and implements Controller. The
execute method is below:

public ActionForward execute( ComponentContext context,
 ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
  throws IOException, ServletException{

Logger logger = Logger.getLogger(GetApplications.class);
logger.debug("execuite on GetApplications was called...");
context.putAttribute( "TEST", "TEST");
return null;
}

In my JSP I have the following:



The problem I have is that the controller action class is not getting
called. All I want for now is to be able to print the value of TEST to make
sure everything is working.

Can someone tell me if I've missed anything in my configuration. I've looked
at the samples, but I can't figure out how exactly you get your controller
to get called.

Thanks in advance




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




Help with custom validation please

2002-11-21 Thread Alvarado, Juan (c)
I've written a simple custom validator that is working just fine. However,
when the validation returns back to the page to display the error message to
the user, all I get is the following:

???en_US.errors.ordersearch??? 
I know that key errors.ordersearch is in the ApplicationResources.properties
file for sure.

The rest of my configuration for this custom validator is as follows:




 








All I have in my method at the present time is this:

public static boolean validateOrderSearch(Object bean,

ValidatorAction va,

Field field,

ActionErrors errors,

HttpServletRequest request,

ServletContext context){


errors.add(field.getKey(),
StrutsValidatorUtil.getActionError(request, va, field));
return false;

If anyone has run across this issue and has a possible solution, please let
me know.

Thanks in advance




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




RE: How to use

2002-11-18 Thread Alvarado, Juan (c)
have you looked at the struts-el stuff.I think that has everything you
need. If not look at the JSTL stuff. That for sure has it

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 7:07 PM
To: Struts Users Mailing List
Subject: Re: How to use   type="java.lang.Object[]">

ZK> 
as you are iterating (assuming the Object[] array in this example
is something meaningful to display (like a String or even an int).
If it's an array of beans use..



-- 

Rick
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




RE: JSP Debug / IDE's

2002-11-14 Thread Alvarado, Juan (c)
Why would you ever want to debug a JSP. I see the need to debug action
classes and back end components, but not JSPs.

-Original Message-
From: edgar [mailto:edgar@;blue-moose.net]
Sent: Thursday, November 14, 2002 12:58 PM
To: 'Struts Users Mailing List'
Subject: RE: JSP Debug / IDE's


If I am understanding you correctly, you can debug the java code, but
not the jsp code simply by connecting to the webserver daemon.

Thanks, I'll give it another go.

Edgar

-Original Message-
From: Karr, David [mailto:david.karr@;attws.com] 
Sent: Thursday, November 14, 2002 12:39 PM
To: 'Struts Users Mailing List'
Subject: RE: JSP Debug / IDE's


I've been able to use Netbeans to debug web applications in Tomcat,
simply by using the "remote debugger" feature, allowing me to "attach"
to a java process started with the correct parameters to assume remote
debugging.  I just mount my source trees and set breakpoints.  This will
work with other application servers that allow you to just use a script
to run "java" on a class to start the appserver.  Other debuggers also
use the same feature.

Now if you want to directly debug JSP pages, or you want to use the
"embedded" appserver in a debugger, that gets complicated, and is pretty
different with debugger/appserver combination.

> -Original Message-
> From: edgar [mailto:edgar@;blue-moose.net]
> 
> I know this is not exactly the place for this question but most of you

> have a opionions and experience on this issue.
> 
> If you have a standalone piece of Java code with a 'main'
> debugging is a
> piece of cake.  If you are triing to run an iteractive debugger on the
> browser / jsp / java combination it is not so straight forward.
> 
> I have tried with Codeguide and Eclipse (I am using Resin as my
> webserver) and I can't get it to do anything approaching
> usefullness.  

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:





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