greetings & a newbie question

2004-03-24 Thread dasa
hi,

just joined the list, and i have a newbie question about struts design.

this is where i am at. i have looked at struts about a year back, and rolled
my own version of mvc web architecture, stealing several basic ideas from
struts.  at the time, it appeared that many features of struts were not
apparently applicable to the project, so the overhead of configuring struts
didn't seem justifiable.  now the need for many of the struts features has
become pretty concrete, and so i am in process of incorporating struts
rather than re-inventing the wheels (and axels and cupholders, etc).

while adapting the code base to use struts, i get the sense that:
these are the classes/packages; for many, you can configure/adapt it to your
needs via config files; in other aspects, you may want/need to subclass and
override some of the classes to fit your needs.

for the later category of adaptation (subclassing/overriding), the best way
seems to be to look into the source to ascertain the default behavior and to
ensure the overriding implementation is proper.

to put it simply, struts' interface doesn't seem to be clearly defined.  by
"clearly defined" interface, i mean programming/usage could/should be
via/against the interface without delving into implementation details.  if
not, pointer(s) to the authoritative interface defnitions would be much
appreciated (i told you i'm a newbie).  but if so, is this deliberate?  and
the reasoning behind?  some obvious (generic) arguments i could see are:

1. it's advantageous in order to provide greater flexibility, struts being a
development framework
2. struts (and web app requirements) are progressing rapidly, so loose
interface may serve the purpose better

are there more specific reasons other than these?  or perhaps it is simply a
documentation issue?

thanx for any insight/info,

dasa

ps: i am sending this to both the user and dev lists, thinking the subject
is of interest to both.  perhaps you'll correct me.  again, a newbie here.







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



Re: collection of strings (newbie question)

2004-03-09 Thread Daniel H. F. e Silva
Hi all,

  Other possibility is to check whether 'myBean' exists in some scope. 

Cheers,
 Daniel Silva.


--- Daniel Henrique Alves Lima <[EMAIL PROTECTED]> wrote:
>Have you import logic taglibs ?
> 
> steve hazelwood wrote:
> 
> >I have an action that creates a bean. That bean has a
> >property myStrings that returns a collection of String
> >objects.
> >
> >On a jsp, I want to list the strings. If my jsp has
> >this:
> >
> > >property="myStrings">
> >  
> >
> >
> >Then I get an exception "Cannot find bean myId in any
> >scope".
> >
> >I can understand that cos myId is a String not a bean.
> >What should I use instead of bean:write ?
> >
> >Steve
> >
> >
> >
> > 
> > 
> > 
> >___
> >Yahoo! Messenger - Communicate instantly..."Ping" 
> >your friends today! Download Messenger Now 
> >http://uk.messenger.yahoo.com/download/index.html
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >  
> >
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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



Re: collection of strings (newbie question)

2004-03-09 Thread steve hazelwood
Solved, well done.

I'm glad I put 'newbie' in the subject line now :-)

Thanks,
Steve


On 9 Mar 2004 at 11:03, Daniel Henrique Alves Lima
wrote:

   Have you import logic taglibs ?

steve hazelwood wrote:

>I have an action that creates a bean. That bean has a
>property myStrings that returns a collection of
String
>objects.
>
>On a jsp, I want to list the strings. If my jsp has
>this:
>
>property="myStrings">
>  
>
>
>Then I get an exception "Cannot find bean myId in any
>scope".
>
>I can understand that cos myId is a String not a
bean.
>What should I use instead of bean:write ?
>
>Steve
>






___
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

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



Re: collection of strings (newbie question)

2004-03-09 Thread Daniel Henrique Alves Lima
  Have you import logic taglibs ?

steve hazelwood wrote:

I have an action that creates a bean. That bean has a
property myStrings that returns a collection of String
objects.
On a jsp, I want to list the strings. If my jsp has
this:

 

Then I get an exception "Cannot find bean myId in any
scope".
I can understand that cos myId is a String not a bean.
What should I use instead of bean:write ?
Steve



	
	
		
___
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

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


collection of strings (newbie question)

2004-03-09 Thread steve hazelwood
I have an action that creates a bean. That bean has a
property myStrings that returns a collection of String
objects.

On a jsp, I want to list the strings. If my jsp has
this:


  


Then I get an exception "Cannot find bean myId in any
scope".

I can understand that cos myId is a String not a bean.
What should I use instead of bean:write ?

Steve






___
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

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



Re: Newbie question

2004-03-03 Thread James Mitchell
>From the main page of Struts (the one you clicked past to subscribe to this
list)

  http://jakarta.apache.org/struts/learning.html




--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
MSN: [EMAIL PROTECTED]



- Original Message -
From: "Satya Narayan Dash" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 03, 2004 9:31 AM
Subject: Newbie question


Hi,

I am new to struts. I found a number of simple tutorials (with examples) to
understand struts-1.0, but there seems to none for struts-1.1. I have gone
through one struts-1.0 tutorial given at jspfinder.com, which is good.

Can you please recommend for struts-1.1 (with examples)?

Thanks,
Satya





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



Newbie question

2004-03-03 Thread Satya Narayan Dash
Hi,

I am new to struts. I found a number of simple tutorials (with examples) to understand 
struts-1.0, but there seems to none for struts-1.1. I have gone through one struts-1.0 
tutorial given at jspfinder.com, which is good.

Can you please recommend for struts-1.1 (with examples)? 

Thanks,
Satya



RE: ActionForm boolean properties - Newbie question

2004-01-20 Thread Andrew Hill
If its a primitive , it will look for 'is' , but for the Boolean object it
will look for 'get' (same as any other object).

-Original Message-
From: Renato Romano [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 20 January 2004 23:00
To: 'Struts Users Mailing List'
Subject: ActionForm boolean properties - Newbie question


I have some trouble using a boolean (the primitive type) property inside
an ActionForm. What I'd like to know is if Struts looks for a
getProperty method or isProperty method... It seems Struts always calls
the getProperty, but as I know it should call the isProperty!!
Is the behavior with a Boolean (Object type) property the same ?
Thanks everyone
Renato


Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_




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



ActionForm boolean properties - Newbie question

2004-01-20 Thread Renato Romano
I have some trouble using a boolean (the primitive type) property inside
an ActionForm. What I'd like to know is if Struts looks for a
getProperty method or isProperty method... It seems Struts always calls
the getProperty, but as I know it should call the isProperty!!
Is the behavior with a Boolean (Object type) property the same ?
Thanks everyone
Renato


Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_




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



Re: newbie question : cannot resolve symbol when compiling an Action class

2004-01-19 Thread lixin chu
yes, I changed to :
public class MYABC {

  public void MYABC () {

}

  

}

still the same thing..

--- e-denton Java Programmer
<[EMAIL PROTECTED]> wrote:
> First, your class name should begin with a capital
> letter by convention. The
> error is saying that no constructor an be found that
> matches "myABC
> (..)". So, be sure there is such a constructor.
> 
> 
> - Original Message - 
> From: "lixin chu" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, January 19, 2004 10:04 AM
> Subject: newbie question : cannot resolve symbol
> when compiling an Action
> class
> 
> 
> > sorry for this newbie question, tried, googled,
> but
> > can not find an anwser:
> >
> > I have a Action class (myAction) and a utility
> class
> > (myABC class), in myAction, I try to instantiate
> it:
> >
> >   myABC abc = new myABC (..);
> >
> > when compiling, error msg:
> > ~~~
> > cannot reolve symbol
> > symbol: constructor myABC
> > location : class com.util.myABC
> > 
> >
> > what's wrong ?
> >
> > thanks !
> > li xin
> >
> > __
> > Do you Yahoo!?
> > Yahoo! Hotjobs: Enter the "Signing Bonus"
> Sweepstakes
> > http://hotjobs.sweepstakes.yahoo.com/signingbonus
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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



Re: newbie question : cannot resolve symbol when compiling an Action class

2004-01-19 Thread e-denton Java Programmer
First, your class name should begin with a capital letter by convention. The
error is saying that no constructor an be found that matches "myABC
(..)". So, be sure there is such a constructor.


- Original Message - 
From: "lixin chu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 19, 2004 10:04 AM
Subject: newbie question : cannot resolve symbol when compiling an Action
class


> sorry for this newbie question, tried, googled, but
> can not find an anwser:
>
> I have a Action class (myAction) and a utility class
> (myABC class), in myAction, I try to instantiate it:
>
>   myABC abc = new myABC (..);
>
> when compiling, error msg:
> ~~~
> cannot reolve symbol
> symbol: constructor myABC
> location : class com.util.myABC
> 
>
> what's wrong ?
>
> thanks !
> li xin
>
> __
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
>
> -
> 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]



newbie question : cannot resolve symbol when compiling an Action class

2004-01-19 Thread lixin chu
sorry for this newbie question, tried, googled, but
can not find an anwser:

I have a Action class (myAction) and a utility class
(myABC class), in myAction, I try to instantiate it:

  myABC abc = new myABC (..);

when compiling, error msg:
~~~
cannot reolve symbol
symbol: constructor myABC
location : class com.util.myABC


what's wrong ?

thanks !
li xin

__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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



RE: [other] newbie question/problem

2003-12-22 Thread Noel E. Lecaros
How about your struts.jar?  You might have multiple copies of it, and the
one being picked up happens to be an older copy.

-Original Message-
From: Jim Anderson [mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003 2:23 PM
To: Struts Users Mailing List
Cc: Jim Anderson
Subject: [other] newbie question/problem


I've been trying to modify the logon app from "Struts in Action" to use
the new features in Struts 1.1 but am having a problem I haven't be
able to solve. I replaced  in Logon.jsp with


   


and get the following error:

org.apache.jasper.JasperException: /pages/Logon.jsp(7,0) No such tag
messages in the tag library imported with prefix html

Of course it looks like I'm somehow referencing the 1.0 version of
struts-html, but I don't see how that can be.

In web.xml I've got:

   
 /tags/struts-html
 /WEB-INF/lib/struts-html.tld
   

and the struts-html.tld in /WEB-INF/lib contains:

http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd";>
...

messages
org.apache.struts.taglib.html.MessagesTag
org.apache.struts.taglib.html.MessagesTei
...

Any ideas???


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



newbie question/problem

2003-12-22 Thread Jim Anderson
I've been trying to modify the logon app from "Struts in Action" to use 
the new features in Struts 1.1 but am having a problem I haven't be 
able to solve. I replaced  in Logon.jsp with


  

and get the following error:

org.apache.jasper.JasperException: /pages/Logon.jsp(7,0) No such tag 
messages in the tag library imported with prefix html

Of course it looks like I'm somehow referencing the 1.0 version of 
struts-html, but I don't see how that can be.

In web.xml I've got:

  
/tags/struts-html
/WEB-INF/lib/struts-html.tld
  
and the struts-html.tld in /WEB-INF/lib contains:

http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd";>
...

messages
org.apache.struts.taglib.html.MessagesTag
org.apache.struts.taglib.html.MessagesTei
...

Any ideas???

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


Re: Utter Newbie Question

2003-11-12 Thread Arne Brutschy
Wednesday, November 12, 2003, 11:03:15 AM, you wrote:
JH> Why stop a storing a Boolean in the session to determine "logged-inness"?

JH> Why not just store the (validated) "User" object in the session and check for
JH> it's presence? That way, if it's there, one can utilize the data in the User
JH> object for whatever sordid little purpose said developer comes up with.

That excactly what I'm doing. At the login, the business logic checks
if the credentials supplied were right. If so, the user object will be
stored in the session. In that way, I can easily access all the user's
properties without doing a lookup all the time. You might run into
memory problems if you have a lot of simultanous logged in users
and/or big user objects. But that not the case for me. Additionally,
I'm storing a list of the users group membership in the session. So I
can do fast permission checks based on this list (always doing a
lookup for every groups is expensive).


JH> I mean using bean:write tags of the "User" object seems straightforward
JH> enough, but what about the List of "Children" objects that is part of
JH> the "User" object?

I don't really understand. I'm using code like this to access the
user object:


  <%-- check if the users object is stored in the session--%>
  
<%-- it's not, present a "you're not logged in" message --%>

  

  <%-- the user is logged in --%>
  
<%-- present a welcome message like "Welcome, John Doe." --%>
, ${sessionScope.user.name}.

<%-- display the logout form --%>

  
  <%-- the requested page parameter is used to return to this page 
after logout --%>
  
  

  


As you can see, I read and display the user's name with
${sessionScope.user.name}.

But I have to warn you, I'm a struts newbie too.. :)

Regards,
Arne Brutschy


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



Utter Newbie Question

2003-11-12 Thread Joe Hertz

I'm making using struts for more or less than first time.

I read the FAQ on how to handle logins to an application and I'm left with 
one question:

Why stop a storing a Boolean in the session to determine "logged-inness"? 

Why not just store the (validated) "User" object in the session and check for 
it's presence? That way, if it's there, one can utilize the data in the User 
object for whatever sordid little purpose said developer comes up with.

Is this a good idea?

If so, how do I go about doing this in the view? (I told you I was a newbie!).

I mean using bean:write tags of the "User" object seems straightforward 
enough, but what about the List of "Children" objects that is part of 
the "User" object?

TIA

-Joe

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



Re: Newbie question....redirect

2003-11-05 Thread Nicolas De Loof
excuse me for mistake.

You should read "response.sendRedirect()"
http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/HttpServletResponse.html#sendRedirect(java.lang.String)

Nico.

- Original Message - 
From: "Marcella Turner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 05, 2003 4:06 PM
Subject: Re: Newbie questionredirect


> Nicolas,
>
> I think your reply will help me with my post too -> trying to switch web
> modules - help
> but I don't see a sendRedirect() method of the requestDispatcher object.
> How can I call this sendRedirect() - sounds like the solution to my problem!
>
> Thanks
>
>
> >From: "Nicolas De Loof" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Re: Newbie questionredirect
> >Date: Wed, 5 Nov 2003 14:22:47 +0100
> >
> >
> >contextRelative is used to define a forward that is relative to the
> >application context and not to the module context
> >(default).
> >
> >You cannot redirect to an URL outside your app using struts-config
> >. Use a requestDispatcher in your action and
> >call sendRedirect(), or create a new JSP with a  >href="http://www.yahoo.com";> tag
> >
> >Nico.
> >
> >
> >- Original Message -
> >From: "Mathieu Grimault" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Sent: Wednesday, November 05, 2003 2:16 PM
> >Subject: Newbie questionredirect
> >
> >
> >Hi all !
> >
> >Sorry, about a such stupid question but I try to have my application
> >redirects to an external web site with some
> >parameters.
> >
> >Here is an exemple : http://payOnline/$cashAmout/$name
> >
> >For the moment i'm just try to redirect to an external website like yahoo
> >but the search path is always
> >"/context/http://www.yahoo.fr";. What's wrong ?
> >
> >Here is a snipet from struts-config.xml :
> >
> > >
> >type = "BonjourAction"
> >
> >name = "BonjourForm"
> >
> >scope = "request"
> >
> >input = "/index.jsp"
> >
> >validate = "true"
> >
> > >
> >
> > http://www.yahoo.fr"; contextRelative="false"
> >redirect="true"/>
> >
> >
> >
> >
> >
> >Environment : struts 1.1, tomcat 4.1.27, jdk 1.4.2_02
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> Is your computer infected with a virus?  Find out with a FREE computer virus
> scan from McAfee.  Take the FreeScan now!
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
>
> -
> 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: Newbie question....redirect

2003-11-05 Thread Marcella Turner
Nicolas,

I think your reply will help me with my post too -> trying to switch web 
modules - help
but I don't see a sendRedirect() method of the requestDispatcher object.  
How can I call this sendRedirect() - sounds like the solution to my problem!

Thanks


From: "Nicolas De Loof" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: Newbie questionredirect
Date: Wed, 5 Nov 2003 14:22:47 +0100
contextRelative is used to define a forward that is relative to the 
application context and not to the module context
(default).

You cannot redirect to an URL outside your app using struts-config 
. Use a requestDispatcher in your action and
call sendRedirect(), or create a new JSP with a http://www.yahoo.com";> tag

Nico.

- Original Message -
From: "Mathieu Grimault" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 05, 2003 2:16 PM
Subject: Newbie questionredirect
Hi all !

Sorry, about a such stupid question but I try to have my application 
redirects to an external web site with some
parameters.

Here is an exemple : http://payOnline/$cashAmout/$name

For the moment i'm just try to redirect to an external website like yahoo 
but the search path is always
"/context/http://www.yahoo.fr";. What's wrong ?

Here is a snipet from struts-config.xml :



type = "BonjourAction"

name = "BonjourForm"

scope = "request"

input = "/index.jsp"

validate = "true"

>

http://www.yahoo.fr"; contextRelative="false" 
redirect="true"/>





Environment : struts 1.1, tomcat 4.1.27, jdk 1.4.2_02

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Is your computer infected with a virus?  Find out with a FREE computer virus 
scan from McAfee.  Take the FreeScan now! 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


Re: Newbie question....redirect

2003-11-05 Thread Nicolas De Loof

contextRelative is used to define a forward that is relative to the application 
context and not to the module context
(default).

You cannot redirect to an URL outside your app using struts-config . Use a 
requestDispatcher in your action and
call sendRedirect(), or create a new JSP with a http://www.yahoo.com";> tag

Nico.


- Original Message - 
From: "Mathieu Grimault" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 05, 2003 2:16 PM
Subject: Newbie questionredirect


Hi all !

Sorry, about a such stupid question but I try to have my application redirects to an 
external web site with some
parameters.

Here is an exemple : http://payOnline/$cashAmout/$name

For the moment i'm just try to redirect to an external website like yahoo but the 
search path is always
"/context/http://www.yahoo.fr";. What's wrong ?

Here is a snipet from struts-config.xml :



http://www.yahoo.fr"; contextRelative="false" 
redirect="true"/>





Environment : struts 1.1, tomcat 4.1.27, jdk 1.4.2_02


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



Newbie question....redirect

2003-11-05 Thread Mathieu Grimault
Hi all !

Sorry, about a such stupid question but I try to have my application redirects to an 
external web site with some parameters. 

Here is an exemple : http://payOnline/$cashAmout/$name

For the moment i'm just try to redirect to an external website like yahoo but the 
search path is always "/context/http://www.yahoo.fr";. What's wrong ?

Here is a snipet from struts-config.xml :



http://www.yahoo.fr"; contextRelative="false" 
redirect="true"/>





Environment : struts 1.1, tomcat 4.1.27, jdk 1.4.2_02


Newbie question: how to reload the struts config file without rebooting tomcat?

2003-10-29 Thread Geert Van Landeghem
Hello all,

how do I reload changes to the struts config file without rebooting
tomcat?

kind regards,
Geert

-Original Message-
From: Frers Michael [mailto:[EMAIL PROTECTED]
Sent: woensdag 29 oktober 2003 9:49
To: Struts Users Mailing List
Subject: Re: a query regarding 


Hello
on my first look:
shouldnt u use 


i think there is a missing "s"


- Original Message - 
From: "Mahin Jeyachandran" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, October 29, 2003 4:57 AM
Subject: a query regarding 


good day all,

I'm new to struts frame work...

I'm using a property file names "languages.properties" instead of
"ApplicationResources.properties"
Also I have an entry in my "struts-config.xml" like the following...



I also placed the property file in "WEB-INF/classes/"
but it seems that the property file "languages.properties" is not detected.

shld I make any changes or any entry in the "web.xml" to make my new
property file visible 

I'm using web-logic6.1.

pls help..

Regards,
Mahin




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


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



Struts newbie question

2003-10-22 Thread Nathan Maves
I have a form that has two select boxes.  One need to be pre-populated 
on load.  The second will be populated when a use selects one of the 
elements in the first list.

Can this be accomplished and if so how?

I would really like to use DynaActionForms if possible.

Nathan

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


hashtable newbie question

2003-10-14 Thread Peng, Meimin
Hi, 
I want to define a bean name called "myBean" which contains "view"
hashtable. 
How can I approach it in jsp file? 
like this?

??


Thanks in advance.
--Zoe

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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



RE: newbie question: results display on same page?

2003-10-14 Thread jagadeesh kumar movva
Hi,

Though I am also a newbie, when I faced a similar
problem, I used . I am not
very sure whether it will work for you. I tried a few
other options before finally getting the result, as
none answered my question on struts user list...

I only can hope it helps...not sure anhow..

good luck
jag

 --- mobile q <[EMAIL PROTECTED]> wrote: >
thankyou for your reply.
> 
> I did put results bean into request. The problem is:
> it
> even does not display search form now if I put
> results
> display block after  since user has not
> pressed "get" button. Here is my display code:
> 
> 
>   
>..
>   
>  
> 
> I only use bean:write tag to output individual table
> data.
> 
> I also tried to put the above code inside html:form
> tag,
> and use logic:present to chech if results bean is
> present. I still could not display search form and
> got
> "null":
> 
>  property="resultsBean" scope="session">
> 
> 
> 
> According to api, if resultsBean is not present, it
> should check non-null results, and let search form
> dislay, right? 
> 
> dun know why it did not work..
> 
> --- "Nicholson, Robb"
> <[EMAIL PROTECTED]> wrote:
> > The logic:iterate tag does not have to live within
> a
> > form. Chances are your
> > error is because the Collection you are trying to
> > iterate over is not in the
> > request (or whatever session you happen to be
> > using).
> > 
> > What we normally do for a situation like this is
> to
> > create a JSP with the
> > search form, and another with the results
> iterator.
> > Then use TILES to pull
> > them together on one page. It's flexible enough so
> > you can reuse one or more
> > component elsewhere, or change your mind and
> > separate them later, etc.
> > 
> > -Original Message-
> > From: mobile q [mailto:[EMAIL PROTECTED]
> > Sent: Monday, October 13, 2003 2:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: newbie question: results display on same
> > page?
> > 
> > 
> > Hi,
> > 
> > 
> > I am working on a page which has a user search
> form,
> > the results should be displayed at the bottom of
> the
> > page once user clicks on "get" button. 
> > 
> > I try to use logic:iterate tag to do the job. My
> > problem:
> > if I include this display loop inside html:form,
> it
> > tells me the results are null when I navigate to
> > this
> > page since user has not pushed "get" button. If I
> > put
> > results dipslay code right after , it
> > tells me "Cannot find bean
> > org.apache.struts.taglib.html.BEAN in any scope"
> > since
> > logic:iterate tag is not used inside html:form
> tag.
> > 
> > I do not know how to resolve this conflict. Should
> I
> > use multiple forms to do this? Not really sure.
> > Really
> > need your wise advices.
> > 
> > __
> > Do you Yahoo!?
> > The New Yahoo! Shopping - with improved product
> > search
> > http://shopping.yahoo.com
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product
> search
> http://shopping.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>  


Yahoo! India Matrimony: Find your partner online.
Go to http://yahoo.shaadi.com

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



RE: newbie question: results display on same page?

2003-10-13 Thread mobile q
thankyou for your reply.

I did put results bean into request. The problem is:
it
even does not display search form now if I put results
display block after  since user has not
pressed "get" button. Here is my display code:


  
   ..
  
 

I only use bean:write tag to output individual table
data.

I also tried to put the above code inside html:form
tag,
and use logic:present to chech if results bean is
present. I still could not display search form and got
"null":





According to api, if resultsBean is not present, it
should check non-null results, and let search form
dislay, right? 

dun know why it did not work..

--- "Nicholson, Robb"
<[EMAIL PROTECTED]> wrote:
> The logic:iterate tag does not have to live within a
> form. Chances are your
> error is because the Collection you are trying to
> iterate over is not in the
> request (or whatever session you happen to be
> using).
> 
> What we normally do for a situation like this is to
> create a JSP with the
> search form, and another with the results iterator.
> Then use TILES to pull
> them together on one page. It's flexible enough so
> you can reuse one or more
> component elsewhere, or change your mind and
> separate them later, etc.
> 
> -Original Message-
> From: mobile q [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 13, 2003 2:04 PM
> To: [EMAIL PROTECTED]
> Subject: newbie question: results display on same
> page?
> 
> 
> Hi,
> 
> 
> I am working on a page which has a user search form,
> the results should be displayed at the bottom of the
> page once user clicks on "get" button. 
> 
> I try to use logic:iterate tag to do the job. My
> problem:
> if I include this display loop inside html:form, it
> tells me the results are null when I navigate to
> this
> page since user has not pushed "get" button. If I
> put
> results dipslay code right after , it
> tells me "Cannot find bean
> org.apache.struts.taglib.html.BEAN in any scope"
> since
> logic:iterate tag is not used inside html:form tag.
> 
> I do not know how to resolve this conflict. Should I
> use multiple forms to do this? Not really sure.
> Really
> need your wise advices.
> 
> __
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product
> search
> http://shopping.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


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

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



RE: newbie question: results display on same page?

2003-10-13 Thread Nicholson, Robb
The logic:iterate tag does not have to live within a form. Chances are your
error is because the Collection you are trying to iterate over is not in the
request (or whatever session you happen to be using).

What we normally do for a situation like this is to create a JSP with the
search form, and another with the results iterator. Then use TILES to pull
them together on one page. It's flexible enough so you can reuse one or more
component elsewhere, or change your mind and separate them later, etc.

-Original Message-
From: mobile q [mailto:[EMAIL PROTECTED]
Sent: Monday, October 13, 2003 2:04 PM
To: [EMAIL PROTECTED]
Subject: newbie question: results display on same page?


Hi,


I am working on a page which has a user search form,
the results should be displayed at the bottom of the
page once user clicks on "get" button. 

I try to use logic:iterate tag to do the job. My
problem:
if I include this display loop inside html:form, it
tells me the results are null when I navigate to this
page since user has not pushed "get" button. If I put
results dipslay code right after , it
tells me "Cannot find bean
org.apache.struts.taglib.html.BEAN in any scope" since
logic:iterate tag is not used inside html:form tag.

I do not know how to resolve this conflict. Should I
use multiple forms to do this? Not really sure. Really
need your wise advices.

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

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


newbie question: results display on same page?

2003-10-13 Thread mobile q
Hi,


I am working on a page which has a user search form,
the results should be displayed at the bottom of the
page once user clicks on "get" button. 

I try to use logic:iterate tag to do the job. My
problem:
if I include this display loop inside html:form, it
tells me the results are null when I navigate to this
page since user has not pushed "get" button. If I put
results dipslay code right after , it
tells me "Cannot find bean
org.apache.struts.taglib.html.BEAN in any scope" since
logic:iterate tag is not used inside html:form tag.

I do not know how to resolve this conflict. Should I
use multiple forms to do this? Not really sure. Really
need your wise advices.

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

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



RE: html tag newbie question

2003-10-08 Thread Peng, Meimin
Hi, 
I still don't know how to do it. 
I try to avoid hard code anything, have any logic, have html tag, and have
javascripts in jsp file.
Overall, jsp file will just display whatever I got from properties or beans.

Is there a way to do like this for example: ">images
then link.yahoo will be http://www.yahoo.com/
any ideas? Thanks.
 

-Original Message-
have a look at html:link tag documentation ...And try to use the struts tags
as much as possible...
-Original Message-
Hi, 
I am very new in struts and facing a problem now. Please help. 
What I want to do is when user click a image, it will link to yahoo.com
which is defined as link.yahoo in the config property 
file. How can I approach this? 
After it generate the html source codes, it will be like
http://www.yahoo.com";>

Right now, I am doing a wrong way to combine struts and html even though
it's working fine. 
--in property file--
link.yahoo=http://www.yahoo.com"/>
image.yahoo=../images/yahoo.gif
image.yahoo.alt=Yahoo
--in jsp --
">


CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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



RE: html tag newbie question

2003-10-08 Thread shirishchandra.sakhare
have a look at html:link tag documentation ...And try to use the struts tags as much 
as possible...

-Original Message-
From: Peng, Meimin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 08, 2003 5:23 PM
To: 'Struts Users Mailing List'
Subject: html tag newbie question


Hi, 
I am very new in struts and facing a problem now. Please help. 
What I want to do is when user click a image, it will link to yahoo.com
which is defined as link.yahoo in the config property 
file. How can I approach this? 
After it generate the html source codes, it will be like
http://www.yahoo.com";>

Right now, I am doing a wrong way to combine struts and html even though
it's working fine. 
--in property file--
link.yahoo=http://www.yahoo.com"/>
image.yahoo=../images/yahoo.gif
image.yahoo.alt=Yahoo
--in jsp --
">

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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



html tag newbie question

2003-10-08 Thread Peng, Meimin
Hi, 
I am very new in struts and facing a problem now. Please help. 
What I want to do is when user click a image, it will link to yahoo.com
which is defined as link.yahoo in the config property 
file. How can I approach this? 
After it generate the html source codes, it will be like
http://www.yahoo.com";>

Right now, I am doing a wrong way to combine struts and html even though
it's working fine. 
--in property file--
link.yahoo=http://www.yahoo.com"/>
image.yahoo=../images/yahoo.gif
image.yahoo.alt=Yahoo
--in jsp --
">

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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



RE: newbie question: how to handle two dispatchAction methods in a jsp page?

2003-09-12 Thread Jerome Devost
If you need to change the action of the form, you can do this in the onclick
event : 

document.formName.action = "/delete.do"  

If you change the action, you probably won't need the method parameter then.

Be sure that you do not have an element in your form called 'action',
otherwise it will confuse Internet Explorer.

-Original Message-
From: victor gusz [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 12, 2003 14:04
To: Struts Users Mailing List
Subject: RE: newbie question: how to handle two dispatchAction methods in a
jsp page?


Hi, Jerome:

Thanks for helping. 

I tried out your code. Strangely, if I click on either
save button, or delete button, now they both forward
to
save page. It seems action still forwards to save
method
even I clicks on delete button.

Any idea?

regards,



--- Jerome Devost <[EMAIL PROTECTED]> wrote:
> Hi Victor,
> 
> If you have both 
> and buttons in the same
> form, both method are submitted when you pressed
> either button. You could
> change the value with javascript code before
> submitting the form. Something
> like this might work :
> 
> 
> 
>   
> 
> 
> 
>   
> 
> 
> 
> 
> -Original Message-
> From: victor gusz [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 12, 2003 13:33
> To: [EMAIL PROTECTED]
> Subject: newbie question: how to handle two
> dispatchAction methods in a jsp
> page?
> 
> 
> Hi, guys:
> 
> I have two methods in a DispatchAction class: save,
> delete
> 
> and I have two buttons in a jsp page: save, delete.
> 
> In order to successfully save and then forward to
> another
> page, I can do the following:
> 
>  key="button.save"/>
> 
> 
> This works fine. But if I add code related with
> delete
> method just following the above code:  key="button.delete"/>
> 
> 
> Everything fails.
> 
> I am wondering how I can handle multiple
> DispatchAction methods in a jsp page?
> 
> regards,
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


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

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


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



RE: newbie question: how to handle two dispatchAction methods in a jsp page?

2003-09-12 Thread victor gusz
Hi, Jerome:

Thanks for helping. 

I tried out your code. Strangely, if I click on either
save button, or delete button, now they both forward
to
save page. It seems action still forwards to save
method
even I clicks on delete button.

Any idea?

regards,



--- Jerome Devost <[EMAIL PROTECTED]> wrote:
> Hi Victor, 
> 
> If you have both 
> and buttons in the same
> form, both method are submitted when you pressed
> either button. You could
> change the value with javascript code before
> submitting the form. Something
> like this might work :
> 
> 
> 
>   
> 
> 
>  onclick="document.formName.method.value='delete'">
>   
> 
> 
> 
> 
> -Original Message-
> From: victor gusz [mailto:[EMAIL PROTECTED] 
> Sent: Friday, September 12, 2003 13:33
> To: [EMAIL PROTECTED]
> Subject: newbie question: how to handle two
> dispatchAction methods in a jsp
> page?
> 
> 
> Hi, guys:
> 
> I have two methods in a DispatchAction class: save,
> delete
> 
> and I have two buttons in a jsp page: save, delete.
> 
> In order to successfully save and then forward to
> another
> page, I can do the following:
> 
>  key="button.save"/>
> 
> 
> This works fine. But if I add code related with
> delete
> method just following the above code:
>  key="button.delete"/>
> 
> 
> Everything fails.
> 
> I am wondering how I can handle multiple
> DispatchAction methods in a jsp page?
> 
> regards,
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


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

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



RE: newbie question: how to handle two dispatchAction methods in a jsp page?

2003-09-12 Thread Jerome Devost
Hi Victor, 

If you have both  and buttons in the same
form, both method are submitted when you pressed either button. You could
change the value with javascript code before submitting the form. Something
like this might work :



  



  




-Original Message-
From: victor gusz [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 12, 2003 13:33
To: [EMAIL PROTECTED]
Subject: newbie question: how to handle two dispatchAction methods in a jsp
page?


Hi, guys:

I have two methods in a DispatchAction class: save,
delete

and I have two buttons in a jsp page: save, delete.

In order to successfully save and then forward to
another
page, I can do the following:




This works fine. But if I add code related with delete
method just following the above code: 


Everything fails.

I am wondering how I can handle multiple
DispatchAction methods in a jsp page?

regards,


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

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


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



newbie question: how to handle two dispatchAction methods in a jsp page?

2003-09-12 Thread victor gusz
Hi, guys:

I have two methods in a DispatchAction class: save,
delete

and I have two buttons in a jsp page: save, delete.

In order to successfully save and then forward to
another
page, I can do the following:




This works fine. But if I add code related with delete
method just following the above code:



Everything fails.

I am wondering how I can handle multiple
DispatchAction methods in a jsp page?

regards,


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

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



Re: newbie question

2003-08-27 Thread Bryce Fischer
> Now I want to call sicpage1.jsp directly without first calling
> sicpage0.jsp.
> 
> But sicpage1.jsp is not getting populated with data since the action
> class is not getting called.

create a global forward to the action, and call the forward.
-- 
Bryce Fischer <[EMAIL PROTECTED]>


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



newbie question

2003-08-27 Thread Venkat Jambulingam
I have two jsp pages. sicpage0.jsp and sicpage1.jsp

sicpage0 is a static page. when I submit sicpage0, it calls an action
class which populates sicpage1.jsp with data.

Now I want to call sicpage1.jsp directly without first calling
sicpage0.jsp.

But sicpage1.jsp is not getting populated with data since the action
class is not getting called.

Can someone help me please?

TIA,
Venkat

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



Newbie question: Testing if collection is != null before iterating

2003-08-14 Thread Todor Sergueev Petkov
How can I test if a collection is not null before iterating through it?
Does the  tag do this ckeck and skip the iteration if the
collection is null?

Thanks a lot,
Todor

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



RE: Newbie question: Testing if collection is != null before iterating

2003-08-11 Thread Alex Shneyderman
Check logic:notEmpty tag

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Todor
> Sergueev Petkov
> Sent: Saturday, August 09, 2003 12:32 PM
> To: Struts Users Mailing List
> Subject: Newbie question: Testing if collection is != null before
> iterating
> 
> How can I test if a collection is not null before iterating through
it?
> Does the  tag do this ckeck and skip the iteration if
the
> collection is null?
> 
> Thanks a lot,
>   Todor
> 
> -
> 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]



Newbie question, dynamic select boxes

2003-08-04 Thread Jose Maria Fernandez
Hi you all, i'm starting with struts and after reading and testing a bit, i
have a  question.

Suppose I create a form where the user should choose a car model, for
example, lets say model1, model2 and model3. Suppose that i need to get that
models of a database. And suppose too that after the user choose the model i
want to store that reference in my database. Which is the best way to
implement such things? Where should i retrieve the values from the database?
maybe in the form bean?

Really, i think my question is: what to do when I need to show in a form
dynamic data coming directly from the storage medium?

Sorry if the question it's quite obvious but i'm a bit lost :)


--
 Saludos,
 Chema.



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



RE: newbie-question: validation across multiple pages

2003-07-31 Thread Yansheng Lin
You might want to use session to store all the values entered in page=1.
Then when there is an error in page=2 or page=3, and forward the control 
back to page=1.  Since all the values are session scope, you can access them
in your page=1.  Remember you have to clean the session though:).

if(! errors.isEmpty()) {
...
return (new ActionForward("page1"));
}


-Original Message-
From: Sebastian F. Martin [mailto:[EMAIL PROTECTED] 
Sent: July 30, 2003 10:29 AM
To: [EMAIL PROTECTED]
Subject: newbie-question: validation across multiple pages


Hi all,

I've been studying the mailing list but couldn't find anything that
would help me. I'd be grateful if someone could give me a hint on this:

I am collecting user input across multiple pages and validate it in the
validate() method of the ActionForm. If an input field on the second or
the third page is empty after submit, the framework will take me back to
the first page. How can I make him turn me back to the page where the
input field was left blank?

Greetings
Sebastian



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



newbie-question: validation across multiple pages

2003-07-30 Thread Sebastian F. Martin
Hi all,

I've been studying the mailing list but couldn't find anything that
would help me. I'd be grateful if someone could give me a hint on this:

I am collecting user input across multiple pages and validate it in the
validate() method of the ActionForm. If an input field on the second or
the third page is empty after submit, the framework will take me back to
the first page. How can I make him turn me back to the page where the
input field was left blank?

Greetings
Sebastian



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



RE: Newbie question about form name

2003-07-30 Thread Alex Shneyderman
Your action is configured with a form name.

Lookup action element in your struts-config.xml, 
Attribute of interest there is 'name' is the name of the form.
When you specify action in your html:form Struts connects the 
dots for you.

That form will be used to populate values of  -Original Message-
> From: MaFai [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 30, 2003 8:01 AM
> To: [EMAIL PROTECTED]
> Subject: Newbie question about form name
> 
> Hello, struts-user,
> 
> Sth make me confused while reading the type.jsp,one of examples in
Tomcat
> Strut struts-validator.war.
> 
> The following is the souce code.
> 
>   
> 
> My question:
> why the form doesn't need the form name and form type.
> 
> For my limited skill,I would write this code:
>name="myform"
>   type="my.TypeForm2">
> 
> Do the form name has default name? But I think the type should
hardcode in
> the jsp page.
> 
> In strut-config.xml
> 
> 
> type="org.apache.struts.webapp.validator.TypeAction"
>name="typeForm"
>scope="request"
>validate="true"
>input="/type2.jsp">
>
> 
> 
> The form type (TypeForm object) doesn't contain the form type,but the
> action form type is specified.
> 
> 
> 
> 
> Best regards.
> 
> MaFai
> [EMAIL PROTECTED]
> 2003-07-30



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



Newbie question about form name

2003-07-30 Thread MaFai
Hello, struts-user,

Sth make me confused while reading the type.jsp,one of examples in Tomcat Strut 
struts-validator.war.

The following is the souce code.

  

My question:
why the form doesn't need the form name and form type.

For my limited skill,I would write this code:


Do the form name has default name? But I think the type should hardcode in the jsp 
page.

In strut-config.xml



   


The form type (TypeForm object) doesn't contain the form type,but the action form type 
is specified.




Best regards. 

MaFai
[EMAIL PROTECTED]
2003-07-30

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

RE: Newbie question :Rendering buttons of type submit and button

2003-07-29 Thread Hajratwala, Nayan (N.)
http://jakarta.apache.org/struts/userGuide/struts-html.html#submit



in struts becomes:




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



in struts becomes:




Hope this helps!

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


-Original Message-
From: Jitesh Sinha [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 29, 2003 12:24 PM
To: Struts Users Mailing List
Subject: Newbie question :Rendering buttons of type submit and button


Hi all,
How do you render following html with the help of struts-html tld :




I don't have any other info like other parameters to include on pressing any
of the buttons .

Thanks,
Jitesh


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



Newbie question :Rendering buttons of type submit and button

2003-07-29 Thread Jitesh Sinha
Hi all,
How do you render following html with the help of struts-html tld :




I don't have any other info like other parameters to include on pressing any
of the buttons .

Thanks,
Jitesh


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



Re: newbie question!

2003-07-28 Thread Samanth Athrey
Hi,
There are no exceptions at all! Once the
FormBean is executed the control is not passed on to the Servlet!

Regards,
Samanth Athrey

"Alen Ribic" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi
>
> I couldn't spot anything wrong below, did you get any runtime exceptions?
> If so, show a snippet.
>
> --Alen
>
>
>
>
>
>
> Hello,
>
> This question probably might have been asked many a times. But I searched
> the archive (though not fully) but could not find this. So, if anybody has
a
> solution please do let me know.
>
> I have developed a sample application, which takes in an input and based
on
> that displays either a success page or failure page. The problem am facing
> is the servlet is not being called. Below is the sturts.config.xml, b.xml
> and index.jsp. Am using jdk1.4.0 and tomcat 4.1.12.
>
> The java class files are under WEB-INF\classes\myapp package.
>
> Thanx for you help.
>
> == index.jsp
> <%@ page language="java"%>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> 
>  
>\First Struts Application
>  
> 
>
>   name="lookupForm"
>  type="myapp.LookupForm">
>  Symbol    
>   
>   
>   
>
> 
> 
> 
> ==
>
> = web.xml
> 
>
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>
>
> 
> 
>  action
>  
>  org.apache.struts.action.ActionServlet
>  
>  
>  config
>  /WEB-INF/struts-config.xml
>  
>  1
> 
>
>
> 
> 
>  action
>  *.do
> 
>
> 
>  /WEB-INF/struts-html.tld
>  /WEB-INF/struts-html.tld
> 
>
> 
>
> 
>
> == struts-config.xml
> 
>  PUBLIC
> "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
> "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
>
> 
>
>   parameter="myapp.ApplicationResources"/>
>
> 
>  
> 
>
> 
> name="lookupForm"
>   type="myapp.LookupAction"
>   input="/index.jsp">
>
>   
>   
>
>  
> 
>
> 
>
> 
>
>
> --
> Regards,
> Samanth Athrey,
> Azikewe Systems,
> www.azikewe.com
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




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



Re: newbie question!

2003-07-28 Thread Alen Ribic
Hi

I couldn't spot anything wrong below, did you get any runtime exceptions?
If so, show a snippet.

--Alen






Hello,

This question probably might have been asked many a times. But I searched
the archive (though not fully) but could not find this. So, if anybody has a
solution please do let me know.

I have developed a sample application, which takes in an input and based on
that displays either a success page or failure page. The problem am facing
is the servlet is not being called. Below is the sturts.config.xml, b.xml
and index.jsp. Am using jdk1.4.0 and tomcat 4.1.12.

The java class files are under WEB-INF\classes\myapp package.

Thanx for you help.

== index.jsp
<%@ page language="java"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

 
   \First Struts Application
 



 Symbol    
  
  
  
   



==

= web.xml


http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>



 action
 
 org.apache.struts.action.ActionServlet
 
 
 config
 /WEB-INF/struts-config.xml
 
 1





 action
 *.do



 /WEB-INF/struts-html.tld
 /WEB-INF/struts-html.tld






== struts-config.xml

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






 



 

  
  

 







--
Regards,
Samanth Athrey,
Azikewe Systems,
www.azikewe.com




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



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



newbie question!

2003-07-27 Thread Samanth Athrey
Hello,

This question probably might have been asked many a times. But I searched
the archive (though not fully) but could not find this. So, if anybody has a
solution please do let me know.

I have developed a sample application, which takes in an input and based on
that displays either a success page or failure page. The problem am facing
is the servlet is not being called. Below is the sturts.config.xml, b.xml
and index.jsp. Am using jdk1.4.0 and tomcat 4.1.12.

The java class files are under WEB-INF\classes\myapp package.

Thanx for you help.

== index.jsp
<%@ page language="java"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

 
   \First Struts Application
 



 Symbol    
  
  
  
   



==

= web.xml


http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>



 action
 
 org.apache.struts.action.ActionServlet
 
 
 config
 /WEB-INF/struts-config.xml
 
 1





 action
 *.do



 /WEB-INF/struts-html.tld
 /WEB-INF/struts-html.tld






== struts-config.xml

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






 



 

  
  

 







--
Regards,
Samanth Athrey,
Azikewe Systems,
www.azikewe.com




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



Re: newbie question: Java array to JavaScript Array

2003-07-25 Thread Kris Schneider
So it's still not working? Can you post some of the generated 
JavaScript? I was shooting for something like this:

var products = new Array();
var productBeans0 = new Array();
productBeans0[0] = ["name0", "id0"];
productBeans0[1] = ["name1", "id1"];
...
products[0] = productBeans0;
var productBeans1 = new Array();
productBeans1[0] = ["name0", "id0"];
productBeans1[1] = ["name1", "id1"];
...
products[1] = productBeans1;
...
Rick Col wrote:
Hahahahaha.Kris, yes this is sickening. More so
after trying all possible solutions. This ruined my
Friday :((.
regards,

Rick  

--- Kris Schneider <[EMAIL PROTECTED]> wrote:

Man, this is really sick ;-). If I'm understanding
you, maybe this will work (or
maybe not...):
var products = new Array();

indexId="i">
 var productBeans = new
Array();
 
name="productBeans" indexId="j">
   productBeans[
name="j"/>] = ["
name="productBean" property="productName"/>",
   
"
name="productBean" property="productId"/>"];
 
 products[] =
productBeans;


Quoting Rick Col <[EMAIL PROTECTED]>:


Hi,

I did the following, but the results were not
displayed.
Whats wrong with my code?
products is a collection of ArrayLists, every
arrayList contains
a list of ProductBeans, ProductBean has
productName

and productId properties.

products are retrieved in action class and are put
into session scope:
session.setAttribute("products", products);
var productsArray = new Array();

indexId

= "idx">
	
indexId = "index">
		productsArray[<%=idx%>][<%=index%>] 
			= new Array(
property = "productName"/>,
			   
property = "productId"/>);
	


Thanks in advance.

rick



--- Rick Col <[EMAIL PROTECTED]> wrote:

More questions about the following:

1) It says in logic tags reference:
id: "The name of a page scope JSP bean that will
contain the current element of the collection on
each
iteration, if it is not null."
So, it means myList ArrayList should conform
to JavaBean routines, is that right? For
example:

If I have a List4Js class, it has to have
getters/seters
for getting/setting ArrayLists:
ArrayList myList = List4J.getResultList();

And the elements of an ArrayList should be a
bean

too.

2) If I want to get a collection of arraylists,
I

can
use the  tag as following:
name="listForJavaScript"

indexId="idx">
   
indexId="index">
   jsArray[<%=idx%>][<%=index%>] = 
<%=myBean.getYourValue()%>;
   	
		

Since JavaScript Array usually has the following
form:
 myArray = new Array("sample", 1);
Do I need to conform to the above routine to
create

an

JavaScript Array element in order to correctly
display
the results?
regards,

rick





--- James Childers <[EMAIL PROTECTED]> wrote:

You'll need to do a couple of things:

1) (Assuming you're using Struts, of course.)
Create

your Java array/collection/whatever in the
Action

that gets hit before your JSP page:
List myList = new ArrayList();
// populate the list, la la la
request.addAttribute("listForJavascript",
myList);

	return mapping.findForward("success"); 	//
Takes

you to, say, bongabonga.jsp

2) In bongabonga.jsp:


var jsArray = new Array();  // Do you have

to


init

this? I don't remember.

jsArray[<%=idx%>] =

<%=jsList.getYourValue()%>;


  


3) Debug. This is all from memory. I'm sure
there

are some glaring errors here, but this is the
general flow.
-= J
--
Kris Schneider 
D.O.Tech   
--
Kris Schneider 
D.O.Tech   


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


RE: newbie question: Java array to JavaScript Array

Hahahahaha.Kris, yes this is sickening. More so
after trying all possible solutions. This ruined my
Friday :((.

regards,

Rick  


--- Kris Schneider <[EMAIL PROTECTED]> wrote:
> Man, this is really sick ;-). If I'm understanding
> you, maybe this will work (or
> maybe not...):
> 
> var products = new Array();
>  indexId="i">
>   var productBeans = new
> Array();
>name="productBeans" indexId="j">
> productBeans[ name="j"/>] = [" name="productBean" property="productName"/>",
> 
>  " name="productBean" property="productId"/>"];
>   
>   products[] =
> productBeans;
> 
> 
> 
> Quoting Rick Col <[EMAIL PROTECTED]>:
> 
> > Hi,
> > 
> > I did the following, but the results were not
> > displayed.
> > Whats wrong with my code?
> > 
> > >>
> > products is a collection of ArrayLists, every
> > arrayList contains
> > a list of ProductBeans, ProductBean has
> productName
> > and productId properties.
> > 
> > products are retrieved in action class and are put
> > into session scope:
> > session.setAttribute("products", products);
> > 
> > var productsArray = new Array();
> > 
> >  indexId
> > = "idx">
> >  > indexId = "index">
> > productsArray[<%=idx%>][<%=index%>] 
> > = new Array( > property = "productName"/>,
> > > property = "productId"/>);
> > 
> > 
> > >
> > 
> > Thanks in advance.
> > 
> > rick
> > 
> > 
> > 
> > --- Rick Col <[EMAIL PROTECTED]> wrote:
> > > More questions about the following:
> > > 
> > > 1) It says in logic tags reference:
> > > id: "The name of a page scope JSP bean that will
> > > contain the current element of the collection on
> > > each
> > > iteration, if it is not null."
> > > 
> > > So, it means myList ArrayList should conform
> > > to JavaBean routines, is that right? For
> example:
> > > 
> > > If I have a List4Js class, it has to have
> > > getters/seters
> > > for getting/setting ArrayLists:
> > > 
> > > ArrayList myList = List4J.getResultList();
> > > 
> > > And the elements of an ArrayList should be a
> bean
> > > too.
> > > 
> > > 2) If I want to get a collection of arraylists,
> I
> > > can
> > > use the  tag as following:
> > > 
> > >   name="listForJavaScript"
> > >  indexId="idx">
> > >  > >  indexId="index">
> > > jsArray[<%=idx%>][<%=index%>] = 
> > >  <%=myBean.getYourValue()%>;
> > >   
> > >   
> > >  
> > > Since JavaScript Array usually has the following
> > > form:
> > >   myArray = new Array("sample", 1);
> > > 
> > > Do I need to conform to the above routine to
> create
> > > an
> > > 
> > > JavaScript Array element in order to correctly
> > > display
> > > the results?
> > > 
> > > regards,
> > > 
> > > rick
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > --- James Childers <[EMAIL PROTECTED]> wrote:
> > > > You'll need to do a couple of things:
> > > > 
> > > > 1) (Assuming you're using Struts, of course.)
> > > Create
> > > > your Java array/collection/whatever in the
> Action
> > > > that gets hit before your JSP page:
> > > > List myList = new ArrayList();
> > > > // populate the list, la la la
> > > > request.addAttribute("listForJavascript",
> > > myList);
> > > > return mapping.findForward("success");  //
> Takes
> > > > you to, say, bongabonga.jsp
> > > > 
> > > > 2) In bongabonga.jsp:
> > > > 
> > > > 
> > > > var jsArray = new Array();  // Do you have
> to
> > > init
> > > > this? I don't remember.
> > > >  > > > name="listForJavaScript" indexId="idx">
> > > > jsArray[<%=idx%>] =
> <%=jsList.getYourValue()%>;
> > > > 
> > > > 
> > > > 
> > > > 3) Debug. This is all from memory. I'm sure
> there
> > > > are some glaring errors here, but this is the
> > > > general flow.
> > > > 
> > > > -= J
> 
> -- 
> Kris Schneider 
> D.O.Tech   
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


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

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



RE: newbie question: Java array to JavaScript Array

Man, this is really sick ;-). If I'm understanding you, maybe this will work (or
maybe not...):

var products = new Array();

  var productBeans = new Array();
  
productBeans[] = ["",
  ""];
  
  products[] = productBeans;



Quoting Rick Col <[EMAIL PROTECTED]>:

> Hi,
> 
> I did the following, but the results were not
> displayed.
> Whats wrong with my code?
> 
> >>
> products is a collection of ArrayLists, every
> arrayList contains
> a list of ProductBeans, ProductBean has productName
> and productId properties.
> 
> products are retrieved in action class and are put
> into session scope:
> session.setAttribute("products", products);
> 
> var productsArray = new Array();
> 
>  = "idx">
>indexId = "index">
>   productsArray[<%=idx%>][<%=index%>] 
>   = new Array( property = "productName"/>,
>   property = "productId"/>);
>   
> 
> >
> 
> Thanks in advance.
> 
> rick
> 
> 
> 
> --- Rick Col <[EMAIL PROTECTED]> wrote:
> > More questions about the following:
> > 
> > 1) It says in logic tags reference:
> > id: "The name of a page scope JSP bean that will
> > contain the current element of the collection on
> > each
> > iteration, if it is not null."
> > 
> > So, it means myList ArrayList should conform
> > to JavaBean routines, is that right? For example:
> > 
> > If I have a List4Js class, it has to have
> > getters/seters
> > for getting/setting ArrayLists:
> > 
> > ArrayList myList = List4J.getResultList();
> > 
> > And the elements of an ArrayList should be a bean
> > too.
> > 
> > 2) If I want to get a collection of arraylists, I
> > can
> > use the  tag as following:
> > 
> >   >  indexId="idx">
> >  >  indexId="index">
> > jsArray[<%=idx%>][<%=index%>] = 
> >  <%=myBean.getYourValue()%>;
> > 
> > 
> >  
> > Since JavaScript Array usually has the following
> > form:
> >   myArray = new Array("sample", 1);
> > 
> > Do I need to conform to the above routine to create
> > an
> > 
> > JavaScript Array element in order to correctly
> > display
> > the results?
> > 
> > regards,
> > 
> > rick
> > 
> > 
> > 
> > 
> > 
> > 
> > --- James Childers <[EMAIL PROTECTED]> wrote:
> > > You'll need to do a couple of things:
> > > 
> > > 1) (Assuming you're using Struts, of course.)
> > Create
> > > your Java array/collection/whatever in the Action
> > > that gets hit before your JSP page:
> > >   List myList = new ArrayList();
> > >   // populate the list, la la la
> > >   request.addAttribute("listForJavascript",
> > myList);
> > >   return mapping.findForward("success");  // Takes
> > > you to, say, bongabonga.jsp
> > > 
> > > 2) In bongabonga.jsp:
> > >   
> > >   
> > >   var jsArray = new Array();  // Do you have to
> > init
> > > this? I don't remember.
> > >    > > name="listForJavaScript" indexId="idx">
> > >   jsArray[<%=idx%>] = <%=jsList.getYourValue()%>;
> > >   
> > >   
> > >   
> > > 3) Debug. This is all from memory. I'm sure there
> > > are some glaring errors here, but this is the
> > > general flow.
> > > 
> > > -= J

-- 
Kris Schneider 
D.O.Tech   

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



RE: newbie question: Java array to JavaScript Array

Hi,

I did the following, but the results were not
displayed.
Whats wrong with my code?

>>
products is a collection of ArrayLists, every
arrayList contains
a list of ProductBeans, ProductBean has productName
and productId properties.

products are retrieved in action class and are put
into session scope:
session.setAttribute("products", products);

var productsArray = new Array();



productsArray[<%=idx%>][<%=index%>] 
= new Array(,
   );


>

Thanks in advance.

rick



--- Rick Col <[EMAIL PROTECTED]> wrote:
> More questions about the following:
> 
> 1) It says in logic tags reference:
> id: "The name of a page scope JSP bean that will
> contain the current element of the collection on
> each
> iteration, if it is not null."
> 
> So, it means myList ArrayList should conform
> to JavaBean routines, is that right? For example:
> 
> If I have a List4Js class, it has to have
> getters/seters
> for getting/setting ArrayLists:
> 
> ArrayList myList = List4J.getResultList();
> 
> And the elements of an ArrayList should be a bean
> too.
> 
> 2) If I want to get a collection of arraylists, I
> can
> use the  tag as following:
> 
>indexId="idx">
>   indexId="index">
> jsArray[<%=idx%>][<%=index%>] = 
>  <%=myBean.getYourValue()%>;
>   
>   
>  
> Since JavaScript Array usually has the following
> form:
>   myArray = new Array("sample", 1);
> 
> Do I need to conform to the above routine to create
> an
> 
> JavaScript Array element in order to correctly
> display
> the results?
> 
> regards,
> 
> rick
> 
> 
> 
> 
> 
> 
> --- James Childers <[EMAIL PROTECTED]> wrote:
> > You'll need to do a couple of things:
> > 
> > 1) (Assuming you're using Struts, of course.)
> Create
> > your Java array/collection/whatever in the Action
> > that gets hit before your JSP page:
> > List myList = new ArrayList();
> > // populate the list, la la la
> > request.addAttribute("listForJavascript",
> myList);
> > return mapping.findForward("success");  // Takes
> > you to, say, bongabonga.jsp
> > 
> > 2) In bongabonga.jsp:
> > 
> > 
> > var jsArray = new Array();  // Do you have to
> init
> > this? I don't remember.
> >  > name="listForJavaScript" indexId="idx">
> > jsArray[<%=idx%>] = <%=jsList.getYourValue()%>;
> > 
> > 
> > 
> > 3) Debug. This is all from memory. I'm sure there
> > are some glaring errors here, but this is the
> > general flow.
> > 
> > -= J
> > 
> 
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


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

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



Newbie Question: Dyanamic JavaScript Array <-> Form Bean]

Hey everyone,

I'm new to Struts and was wondering if anyone has ever attempted to create a dynamic 
HTML table (using JavaScript) that gets and sets values contained in a form bean from 
a JavaScript array when rows in the table are being added or deleted and upon the form 
being submitted.

Thanks in advance



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



RE: newbie question: Java array to JavaScript Array

More questions about the following:

1) It says in logic tags reference:
id: "The name of a page scope JSP bean that will
contain the current element of the collection on each
iteration, if it is not null."

So, it means myList ArrayList should conform
to JavaBean routines, is that right? For example:

If I have a List4Js class, it has to have
getters/seters
for getting/setting ArrayLists:

ArrayList myList = List4J.getResultList();

And the elements of an ArrayList should be a bean too.

2) If I want to get a collection of arraylists, I can
use the  tag as following:

 

jsArray[<%=idx%>][<%=index%>] = 
 <%=myBean.getYourValue()%>;


 
Since JavaScript Array usually has the following form:
  myArray = new Array("sample", 1);

Do I need to conform to the above routine to create an

JavaScript Array element in order to correctly display
the results?

regards,

rick






--- James Childers <[EMAIL PROTECTED]> wrote:
> You'll need to do a couple of things:
> 
> 1) (Assuming you're using Struts, of course.) Create
> your Java array/collection/whatever in the Action
> that gets hit before your JSP page:
>   List myList = new ArrayList();
>   // populate the list, la la la
>   request.addAttribute("listForJavascript", myList);
>   return mapping.findForward("success");  // Takes
> you to, say, bongabonga.jsp
> 
> 2) In bongabonga.jsp:
>   
>   
>   var jsArray = new Array();  // Do you have to init
> this? I don't remember.
>    name="listForJavaScript" indexId="idx">
>   jsArray[<%=idx%>] = <%=jsList.getYourValue()%>;
>   
>   
>   
> 3) Debug. This is all from memory. I'm sure there
> are some glaring errors here, but this is the
> general flow.
> 
> -= J
> 


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

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



RE: newbie question: Java array to JavaScript Array

James:

Thanks for your nice presentation. I will try it out
right away. 

regards,

rick 


--- James Childers <[EMAIL PROTECTED]> wrote:
> You'll need to do a couple of things:
> 
> 1) (Assuming you're using Struts, of course.) Create
> your Java array/collection/whatever in the Action
> that gets hit before your JSP page:
>   List myList = new ArrayList();
>   // populate the list, la la la
>   request.addAttribute("listForJavascript", myList);
>   return mapping.findForward("success");  // Takes
> you to, say, bongabonga.jsp
> 
> 2) In bongabonga.jsp:
>   
>   
>   var jsArray = new Array();  // Do you have to init
> this? I don't remember.
>    name="listForJavaScript" indexId="idx">
>   jsArray[<%=idx%>] = <%=jsList.getYourValue()%>;
>   
>   
>   
> 3) Debug. This is all from memory. I'm sure there
> are some glaring errors here, but this is the
> general flow.
> 
> -= J
> 


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

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



RE: newbie question: Java array to JavaScript Array

You'll need to do a couple of things:

1) (Assuming you're using Struts, of course.) Create your Java 
array/collection/whatever in the Action that gets hit before your JSP page:
List myList = new ArrayList();
// populate the list, la la la
request.addAttribute("listForJavascript", myList);
return mapping.findForward("success");  // Takes you to, say, bongabonga.jsp

2) In bongabonga.jsp:


var jsArray = new Array();  // Do you have to init this? I 
don't remember.
<logic:iterate id="jsList" name="listForJavaScript" indexId="idx">
jsArray[<%=idx%>] = <%=jsList.getYourValue()%>;
</logic:iterate>


3) Debug. This is all from memory. I'm sure there are some glaring errors here, but 
this is the general flow.

-= J

> -Original Message-
> From: Rick Col [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 25, 2003 9:56 AM
> To: [EMAIL PROTECTED]
> Subject: newbie question: Java array to JavaScript Array
> 
> 
> Hi,
> 
> I did not put my question in a nice method previously.
> 
> 
> I am trying to retrieve data from database and pass
> data into a JavaScript function as an Array and
> display it on my JSP page. 
> 
> If I have to write a Scriptlet inside JavaScript code
> to get data from db, what kind of Java data form
> (ArrayList, Vector, Enemeration, List, Collection?) I
> can use to directly pass it into javascript function?
> If the above cannot work, How can I transform a Java
> array (a array of strings) into a JavaScript Array?
> Thank you in advance.
> 
> regards,
> 
> rick
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



newbie question: Java array to JavaScript Array

Hi,

I did not put my question in a nice method previously.


I am trying to retrieve data from database and pass
data into a JavaScript function as an Array and
display it on my JSP page. 

If I have to write a Scriptlet inside JavaScript code
to get data from db, what kind of Java data form
(ArrayList, Vector, Enemeration, List, Collection?) I
can use to directly pass it into javascript function?
If the above cannot work, How can I transform a Java
array (a array of strings) into a JavaScript Array?
Thank you in advance.

regards,

rick

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

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



RE: newbie question: how to get context path?

Oooops... thanks!

Regards,
Daniel


-Original Message-
From: Mike Whittaker [mailto:[EMAIL PROTECTED]
Sent: Friday, 25 July, 2003 5:54 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: newbie question: how to get context path?


>-Original Message-
>From: Daniel Joshua [mailto:[EMAIL PROTECTED]
>Sent: 25 July 2003 10:48
>To: 'Struts Users Mailing List'
>Subject: newbie question: how to get context path?
>
>
>Sorry for the newbie question... my brain not responding...
>
>Using mapping.findForward(xxx).getPath(), I am able to to get the the
>context-relative path.
>
>But how do I get the full path, eg. http://localhost:8080/myApp/xxx.do ?
>

HttpServletRequest.getRequestURL()

--
Mike W


-
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: newbie question: how to get context path?

>-Original Message-
>From: Daniel Joshua [mailto:[EMAIL PROTECTED]
>Sent: 25 July 2003 10:48
>To: 'Struts Users Mailing List'
>Subject: newbie question: how to get context path?
>
>
>Sorry for the newbie question... my brain not responding...
>
>Using mapping.findForward(xxx).getPath(), I am able to to get the the
>context-relative path.
>
>But how do I get the full path, eg. http://localhost:8080/myApp/xxx.do ?
>

HttpServletRequest.getRequestURL()

--
Mike W


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



newbie question: how to get context path?

Sorry for the newbie question... my brain not responding...

Using mapping.findForward(xxx).getPath(), I am able to to get the the
context-relative path.

But how do I get the full path, eg. http://localhost:8080/myApp/xxx.do ?


Regards,
Daniel


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



Re: Newbie question about form variables.

session scope

or hidden fields on each page.

sandeep
--- "Norr, Peter" <[EMAIL PROTECTED]> wrote:
> I am developing a wizard style form..
> 
> How do I obtain the value submitted in the previous
> page of a form from the
> jsp page?
> 
> For example, in step2.jsp I need to know what was
> selected in step1.jsp.
> 
> Thanks!
> 
> Peter
> 
>
--
> This message is intended only for the personal and
> confidential use of the
> designated recipient(s) named above.  If you are not
> the intended recipient of
> this message you are hereby notified that any
> review, dissemination,
> distribution or copying of this message is strictly
> prohibited.  This
> communication is for information purposes only and
> should not be regarded as
> an offer to sell or as a solicitation of an offer to
> buy any financial
> product, an official confirmation of any
> transaction, or as an official
> statement of Lehman Brothers.  Email transmission
> cannot be guaranteed to be
> secure or error-free.  Therefore, we do not
> represent that this information is
> complete or accurate and it should not be relied
> upon as such.  All
> information is subject to change without notice.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


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

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



RE: Newbie question about form variables.

If my form bean is DynaActionForm..

How do I do something like this...





-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 17, 2003 3:28 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.


In answer to your second query

If the actions that forward to step1.jsp and step2.jsp both share the same
formBean. Step1 submits a form which populates your formbean, step2 is then
forwarded to, and since that action shares the sameFormBean, step2 can
access it's contents.  It's just sharing a JavaBean, and saving you the work
of instantiating it and putting it in the session under a specific name, as
well as populating it from a form.

HTH,
Mike Jasnowski

-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 3:20 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.


It doesn't matter, a DynaActionForm has a name just like other action forms.

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 3:18 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie question about form variables.


Yes!  But I am using DynaActionForm.

I would also like to query the value submitted from step1.jsp..





-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 3:14 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.


You would use one of the Struts or JSTL or whatever JSP tag you want to
access the FormBean. When a JSP is forwarded to from an Action, a formBean
mapped to that action is stuffed into the session by the name you specified
in your struts config. .  So for example if your formbean had a property
named "state", with a getState() accessor:



Would write out the value of the "state" property

Is this what you meant?

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 3:02 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie question about form variables.


Yes I understand.

But how do I acces the Form Bean from the jsp page?

Peter



-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:40 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.


one way is to have both pages share a formbean, the first page populates the
formBean with what was entered so the second page can access it.

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:35 PM
To: 'Struts Users Mailing List'
Subject: Newbie question about form variables.


I am developing a wizard style form..

How do I obtain the value submitted in the previous page of a form from the
jsp page?

For example, in step2.jsp I need to know what was selected in step1.jsp.

Thanks!

Peter


--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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



--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should 

RE: Newbie question about form variables.

In answer to your second query

If the actions that forward to step1.jsp and step2.jsp both share the same
formBean. Step1 submits a form which populates your formbean, step2 is then
forwarded to, and since that action shares the sameFormBean, step2 can
access it's contents.  It's just sharing a JavaBean, and saving you the work
of instantiating it and putting it in the session under a specific name, as
well as populating it from a form.

HTH,
Mike Jasnowski

-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 3:20 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.


It doesn't matter, a DynaActionForm has a name just like other action forms.

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 3:18 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie question about form variables.


Yes!  But I am using DynaActionForm.

I would also like to query the value submitted from step1.jsp..





-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 3:14 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.


You would use one of the Struts or JSTL or whatever JSP tag you want to
access the FormBean. When a JSP is forwarded to from an Action, a formBean
mapped to that action is stuffed into the session by the name you specified
in your struts config. .  So for example if your formbean had a property
named "state", with a getState() accessor:



Would write out the value of the "state" property

Is this what you meant?

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 3:02 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie question about form variables.


Yes I understand.

But how do I acces the Form Bean from the jsp page?

Peter



-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:40 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.


one way is to have both pages share a formbean, the first page populates the
formBean with what was entered so the second page can access it.

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:35 PM
To: 'Struts Users Mailing List'
Subject: Newbie question about form variables.


I am developing a wizard style form..

How do I obtain the value submitted in the previous page of a form from the
jsp page?

For example, in step2.jsp I need to know what was selected in step1.jsp.

Thanks!

Peter


--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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



--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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



---

RE: Newbie question about form variables.

It doesn't matter, a DynaActionForm has a name just like other action forms.

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 3:18 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie question about form variables.


Yes!  But I am using DynaActionForm.

I would also like to query the value submitted from step1.jsp..





-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 3:14 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.


You would use one of the Struts or JSTL or whatever JSP tag you want to
access the FormBean. When a JSP is forwarded to from an Action, a formBean
mapped to that action is stuffed into the session by the name you specified
in your struts config. .  So for example if your formbean had a property
named "state", with a getState() accessor:



Would write out the value of the "state" property

Is this what you meant?

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 3:02 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie question about form variables.


Yes I understand.

But how do I acces the Form Bean from the jsp page?

Peter



-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:40 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.


one way is to have both pages share a formbean, the first page populates the
formBean with what was entered so the second page can access it.

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:35 PM
To: 'Struts Users Mailing List'
Subject: Newbie question about form variables.


I am developing a wizard style form..

How do I obtain the value submitted in the previous page of a form from the
jsp page?

For example, in step2.jsp I need to know what was selected in step1.jsp.

Thanks!

Peter


--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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



--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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



--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product

RE: Newbie question about form variables.

Yes!  But I am using DynaActionForm.

I would also like to query the value submitted from step1.jsp..





-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 17, 2003 3:14 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.


You would use one of the Struts or JSTL or whatever JSP tag you want to
access the FormBean. When a JSP is forwarded to from an Action, a formBean
mapped to that action is stuffed into the session by the name you specified
in your struts config. .  So for example if your formbean had a property
named "state", with a getState() accessor:



Would write out the value of the "state" property

Is this what you meant?

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 3:02 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie question about form variables.


Yes I understand.

But how do I acces the Form Bean from the jsp page?

Peter



-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:40 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.


one way is to have both pages share a formbean, the first page populates the
formBean with what was entered so the second page can access it.

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:35 PM
To: 'Struts Users Mailing List'
Subject: Newbie question about form variables.


I am developing a wizard style form..

How do I obtain the value submitted in the previous page of a form from the
jsp page?

For example, in step2.jsp I need to know what was selected in step1.jsp.

Thanks!

Peter


--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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



--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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


--
This message is intended only for the personal and confidential use of the designated 
recipient(s) named above.  If you are not the intended recipient of this message you 
are hereby notified that any review, dissemination, distribution or copying of this 
message is strictly prohibited.  This communication is for information purposes only 
and should not be regarded as an offer to sell or as a solicitation of an offer to buy 
any financial product, an official confirmation of any transaction, or as an official 
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or 
error-free.  Therefore, we do not represent that this information is complete or 
accurate and it should not be relied upon as such

RE: Newbie question about form variables.

yes, 1.1 comes with some of the older struts tags revamped to use JSTL (look 
in the contrib dir).  apache also has the jstl implementation for download.

 you use them like any other tags. just with JSTL syntax.

From: "Norr, Peter" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: Newbie question about form variables.
Date: Thu, 17 Jul 2003 15:12:33 -0400
Does Struts 1.1 come with JSTL implementation?

If so How do I use it?

Peter

-Original Message-
From: Adam Levine [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 3:05 PM
To: [EMAIL PROTECTED]
Subject: RE: Newbie question about form variables.
scriptlets (bad choice)
custom tags (flexible choice)
jstl, accessing the implicit session (you did store the form in the session,
didn't you...) and form key name



From: "Norr, Peter" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: Newbie question about form variables.
Date: Thu, 17 Jul 2003 15:02:11 -0400
Yes I understand.

But how do I acces the Form Bean from the jsp page?

Peter



-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:40 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.
one way is to have both pages share a formbean, the first page populates the
formBean with what was entered so the second page can access it.
-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:35 PM
To: 'Struts Users Mailing List'
Subject: Newbie question about form variables.
I am developing a wizard style form..

How do I obtain the value submitted in the previous page of a form from the
jsp page?
For example, in step2.jsp I need to know what was selected in step1.jsp.

Thanks!

Peter


--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.
-
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]

--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
This message is intended only for the personal and confidential use of the 
designated recipient(s) named above.  If you are not the intended recipient 
of this message you are hereby notified that any review, dissemination, 
distribution or copying of this message is strictly prohib

RE: Newbie question about form variables.

You would use one of the Struts or JSTL or whatever JSP tag you want to
access the FormBean. When a JSP is forwarded to from an Action, a formBean
mapped to that action is stuffed into the session by the name you specified
in your struts config. .  So for example if your formbean had a property
named "state", with a getState() accessor:



Would write out the value of the "state" property

Is this what you meant?

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 3:02 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie question about form variables.


Yes I understand.

But how do I acces the Form Bean from the jsp page?

Peter



-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:40 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.


one way is to have both pages share a formbean, the first page populates the
formBean with what was entered so the second page can access it.

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:35 PM
To: 'Struts Users Mailing List'
Subject: Newbie question about form variables.


I am developing a wizard style form..

How do I obtain the value submitted in the previous page of a form from the
jsp page?

For example, in step2.jsp I need to know what was selected in step1.jsp.

Thanks!

Peter


--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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



--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


-
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: Newbie question about form variables.

Does Struts 1.1 come with JSTL implementation?

If so How do I use it?

Peter


-Original Message-
From: Adam Levine [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 17, 2003 3:05 PM
To: [EMAIL PROTECTED]
Subject: RE: Newbie question about form variables.


scriptlets (bad choice)
custom tags (flexible choice)
jstl, accessing the implicit session (you did store the form in the session,

didn't you...) and form key name




From: "Norr, Peter" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: Newbie question about form variables.
Date: Thu, 17 Jul 2003 15:02:11 -0400

Yes I understand.

But how do I acces the Form Bean from the jsp page?

Peter



-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:40 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.


one way is to have both pages share a formbean, the first page populates the
formBean with what was entered so the second page can access it.

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:35 PM
To: 'Struts Users Mailing List'
Subject: Newbie question about form variables.


I am developing a wizard style form..

How do I obtain the value submitted in the previous page of a form from the
jsp page?

For example, in step2.jsp I need to know what was selected in step1.jsp.

Thanks!

Peter


--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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



--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient 
of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information 
is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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

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


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


--
This message is intended only for the personal and confidential use of the designated 
recipient(s) named above.  If you are not the intended recipient of this message you 
are hereby notified that any review, dissemination, distribution or copying of this 
message is strictly prohibited.  This communication is for information purposes only 
and should not be regarded as an offer to sell or as a solicitation of an offer to buy 
any financial product, an official confirmation of any transaction, or as an official 
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or 
error-free.  Therefore, we do not represent that this information is complete or 
accurate and it should not be r

RE: Newbie question about form variables.

scriptlets (bad choice)
custom tags (flexible choice)
jstl, accessing the implicit session (you did store the form in the session, 
didn't you...) and form key name



From: "Norr, Peter" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: Newbie question about form variables.
Date: Thu, 17 Jul 2003 15:02:11 -0400
Yes I understand.

But how do I acces the Form Bean from the jsp page?

Peter



-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:40 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.
one way is to have both pages share a formbean, the first page populates the
formBean with what was entered so the second page can access it.
-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:35 PM
To: 'Struts Users Mailing List'
Subject: Newbie question about form variables.
I am developing a wizard style form..

How do I obtain the value submitted in the previous page of a form from the
jsp page?
For example, in step2.jsp I need to know what was selected in step1.jsp.

Thanks!

Peter


--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.
-
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]
--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient 
of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information 
is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


RE: Newbie question about form variables.

Yes I understand. 

But how do I acces the Form Bean from the jsp page?

Peter



-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 17, 2003 2:40 PM
To: Struts Users Mailing List
Subject: RE: Newbie question about form variables.


one way is to have both pages share a formbean, the first page populates the
formBean with what was entered so the second page can access it.

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:35 PM
To: 'Struts Users Mailing List'
Subject: Newbie question about form variables.


I am developing a wizard style form..

How do I obtain the value submitted in the previous page of a form from the
jsp page?

For example, in step2.jsp I need to know what was selected in step1.jsp.

Thanks!

Peter


--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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


--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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



RE: Newbie question about form variables.

one way is to have both pages share a formbean, the first page populates the
formBean with what was entered so the second page can access it.

-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 2:35 PM
To: 'Struts Users Mailing List'
Subject: Newbie question about form variables.


I am developing a wizard style form..

How do I obtain the value submitted in the previous page of a form from the
jsp page?

For example, in step2.jsp I need to know what was selected in step1.jsp.

Thanks!

Peter


--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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



Newbie question about form variables.

I am developing a wizard style form..

How do I obtain the value submitted in the previous page of a form from the
jsp page?

For example, in step2.jsp I need to know what was selected in step1.jsp.

Thanks!

Peter

--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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



Re: newbie question - setting form parameter in Javascript

Okay man..If you mail me your form bean, action class, jsp and struts 
config i'll take a look.. Just to double check here's the stuff I'm 
pretty confident should work..

I wouldn't have action as a form bean property (thus no need to define 
getAction in your form bean), its not really part of you form more of a 
mechanism for selecting a dispatch action.

//jsp

function lookup(form) {
form.elements['action'].value = 'lookup';
form.submit();
}




...



//action servlet
public final class MyAction extends DispatchAction {
/**
*Is called when paramater named action has the value of 'lookup'
*/
public final ActionForward lookup(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)

  throws Exception {

...
}
/**
*Is called when paramater named action has the value of 'submit'
*/
public final ActionForward submit(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)

  throws Exception {

...
	}

}

///struts config


On Saturday, July 12, 2003, at 11:11 PM, Shyam A wrote:

Mark,

Thanks a lot for your mails. I have used "action" as a form bean 
property and not as a parameter in struts-config. Unfortunately, the 
Javascript function doesn't seem to work...it does not set the value 
of the ActionForm property, "action".
 When I tried to print out the value of the "action" property in my 
ActionClass,
I got a null value.

I tried the following code in my Action class and I got a null value.
String action = ((ActionForm) form).getAction();
Wonder if I have missed something.

Shyam

Mark Lowe <[EMAIL PROTECTED]> wrote:
Its better that this is posted to the list as well, after all its a
good question and hopefully an adequate answer.
function lookup(form) {
form.elements['action'].value = "lookup";
form.submit();
}
//-->




...



 [input]





//struts config

name="myForm" redirect="false" parameter=""action" />

The only thing you'd have to watch would be if the client didn't
support javascript then you'd lose lookup, this would make a case for
having action as a form bean property and have some relevantly named
form elements in noscript tags. If lookup isn't mission critical then i
guess you could let this slide.


On Friday, July 11, 2003, at 08:44 PM, Shyam A wrote:

Mark,

Thanks for your mail. I understand that DispatchAction class includes
multiple execute methods for different actions. However, I still have
some doubts.
You mentioned using tags in JSP:



Are these used instead of using "Submit" buttons ?
i.e use and in conjunction instead
of  ?  Can
be used for a drop- down?
I guess my problem is still unresolved. As I mentioned in my earlier
mail, I have a drop-down associated with an ActionForm property "crn"
.
   None

I would like to trigger an action called "Lookup" when the drop-down
is clicked .i.e, associate the clicking of the drop-down with the
"action" property of the ActionForm class. I don't know how to set the
"action" property of the ActionForm class  when the drop-down is
selected, based on which appropriate method of the DispatchAction
class would be executed.
Any help would be greatly appreciated.

Thanks,
Shyam


Mark Lowe wrote:
check out dispatch actions..
you can have multiple execute methods with dispatch action ...

Your Action class extends DispatchAction instead of action (check the
docs)
public final ActionForward submit(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
...
}
public final ActionForward lookup(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
...
}
in struts config the parameter attibute need to know the name of the
parameter your about to send, the value of which is your execute 
method
name..

scope="request" parameter="action">
...
and then in jsp





HTH Mark

On Friday, July 11, 2003, at 08:00 PM, Shyam A wrote:

James,

Thanks for your mail. I guess I need to elaborate a little bit. My
HTML form can be submitted in 2ways.
1. Clicking the "Submit" button.
2. Clicking the drop-down
Clicking the drop-down triggers a different action than clicking the
"Submit" button.
Selecting a value in the drop-down would submit the form and populate
some of the other fields in the form. This is done before the
"Submit"
button is clicked. So, I need to distinguish the action of clicking
the drop-do

Re: newbie question - setting form parameter in Javascript

Mark,
 
Thanks a lot for your mails. I have used "action" as a form bean property and not as a 
parameter in struts-config. Unfortunately, the Javascript function doesn't seem to 
work...it does not set the value of the ActionForm property, "action". 
 When I tried to print out the value of the "action" property in my ActionClass,
I got a null value.
 
I tried the following code in my Action class and I got a null value.
String action = ((ActionForm) form).getAction();
 
Wonder if I have missed something.
 
Shyam

Mark Lowe <[EMAIL PROTECTED]> wrote:
Its better that this is posted to the list as well, after all its a 
good question and hopefully an adequate answer.


function lookup(form) {
form.elements['action'].value = "lookup";
form.submit();
}
//-->






...



 [input] 





//struts config

name="myForm" redirect="false" parameter=""action" />


The only thing you'd have to watch would be if the client didn't 
support javascript then you'd lose lookup, this would make a case for 
having action as a form bean property and have some relevantly named 
form elements in noscript tags. If lookup isn't mission critical then i 
guess you could let this slide.



On Friday, July 11, 2003, at 08:44 PM, Shyam A wrote:

> Mark,
>  
> Thanks for your mail. I understand that DispatchAction class includes 
> multiple execute methods for different actions. However, I still have 
> some doubts.
>  
> You mentioned using tags in JSP:
>  
> 
>
> 
> Are these used instead of using "Submit" buttons ?
> i.e use and in conjunction instead 
> of  ?  Can 
> be used for a drop- down?
>  
> I guess my problem is still unresolved. As I mentioned in my earlier 
> mail, I have a drop-down associated with an ActionForm property "crn" 
> > .
> 
>None  
> 
>   
> I would like to trigger an action called "Lookup" when the drop-down 
> is clicked .i.e, associate the clicking of the drop-down with the 
> "action" property of the ActionForm class. I don't know how to set the 
> "action" property of the ActionForm class  when the drop-down is 
> selected, based on which appropriate method of the DispatchAction 
> class would be executed.
>  
> Any help would be greatly appreciated.
>  
> Thanks,
> Shyam
>  
>  
>
>
> Mark Lowe wrote:
> check out dispatch actions..
>
> you can have multiple execute methods with dispatch action ...
>
> Your Action class extends DispatchAction instead of action (check the
> docs)
>
> public final ActionForward submit(
> ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response)
>
> throws Exception {
> ...
> }
>
> public final ActionForward lookup(
> ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response)
>
> throws Exception {
> ...
> }
>
> in struts config the parameter attibute need to know the name of the
> parameter your about to send, the value of which is your execute method
> name..
>
>
> scope="request" parameter="action">
> ...
>
> and then in jsp
>
>
>
>
>
>
> HTH Mark
>
>
> On Friday, July 11, 2003, at 08:00 PM, Shyam A wrote:
>
> > James,
> >
> > Thanks for your mail. I guess I need to elaborate a little bit. My
> > HTML form can be submitted in 2ways.
> > 1. Clicking the "Submit" button.
> > 2. Clicking the drop-down
> >
> > Clicking the drop-down triggers a different action than clicking the
> > "Submit" button.
> > Selecting a value in the drop-down would submit the form and populate
> > some of the other fields in the form. This is done before the 
> "Submit"
> > button is clicked. So, I need to distinguish the action of clicking
> > the drop-down from clicking the "Submit" button and I called it
> > "Lookup".
> >
> > Both actions would be identified with a single property in the
> > ActionForm class - action.
> >
> > eg:
> >
> >
> > I would like to set this "action" property value to "Lookup" on
> > clicking the drop-down using Javascript. I guess a hidden field would
> > not serve the purpose as I already have "action" property defined for
> > the Submit button.
> >
> > Look forward to your help/suggestions.
> >
> > Thanks,
> > Shyam
> >
> > James Mitchell wrote:
> >
> > You will need to create a hidden field named "action", with a value 
> of
> > "Lookup":
> >
> >
> >
> > My question to you iswhy "Lookup"? What does that have to do with
> > your
> > form?
> >
> >
> > Here's a sample:
> >
> >
> > function submitForm(form) {
> > form.action.value="Lookup";
> > form.submit();
> > return true;
> > }
> >
> >
> >
> > [input]
> > Test Test2
> >
> >
> >
> > On Friday 11 July 2003 14:15, Shyam A wrote:
> >> Hi,
> >>
> >> I have an HTML form with Submit and Cancel buttons, and a drop down
> >> list,
> >> which when clicked submits the form. I use Javascript to submit the
> >> form
> >> when the dropdown list is clicked. I have a property called "action"
> >> defined in my ActionForm class that identifies the Submit and Cancel
> >> buttons in the HTML form. When

Re: newbie question - setting form parameter in Javascript

  
> > My Javascript function is given below:
> >
> > 
> >
> > 

Re: newbie question - setting form parameter in Javascript

probably you can not see the javascript error, because the form submits in
the function, remove the submit(); in the function and see the error, and
also I recommend you not to use onclick event, try onchange, it's better in
this situation.

F.

- Original Message -
From: "Shyam A" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 11, 2003 9:15 PM
Subject: newbie question - setting form parameter in Javascript


> Hi,
>
> I have an HTML form with Submit and Cancel buttons, and a drop down list,
which when clicked submits the form. I use Javascript to submit the form
when the dropdown list is clicked.
> I have a property called "action" defined in my ActionForm class that
identifies the Submit and Cancel buttons in the HTML form. When the
drop-down is clicked, I would like to set the value of this "action"
property to "Lookup".
>
> My Javascript function is given below:
>
> 
>
> 

Re: newbie question - setting form parameter in Javascript

opps my action in struts config is wrong... But you should still have 
the right idea..

On Saturday, July 12, 2003, at 12:45 AM, Mark Lowe wrote:

Its better that this is posted to the list as well, after all its a 
good question and hopefully an adequate answer.







...







//struts config



The only thing you'd have to watch would  be if the client didn't 
support javascript then you'd lose lookup, this would make a case for 
having action as a form bean property and have some relevantly named 
form elements in noscript tags. If lookup isn't mission critical then 
i guess you could let this slide.



On Friday, July 11, 2003, at 08:44 PM, Shyam A wrote:

Mark,
 
Thanks for your mail. I understand that DispatchAction class includes 
multiple execute methods for different actions. However, I still have 
some doubts.
 
You mentioned using  tags in JSP:
 



Are these used instead of using "Submit" buttons ?
i.e use  and  in conjunction instead 
of  ?  Can  
be used for a drop- down?
 
I guess my problem is still unresolved. As I mentioned in my earlier 
mail, I have a drop-down associated with an ActionForm property "crn" 
> .

   None  
    
  
I would like to trigger an action called "Lookup" when the drop-down 
is clicked .i.e, associate the clicking of the drop-down with the 
"action" property of the ActionForm class. I don't know how to set 
the "action" property of the ActionForm class  when the drop-down is 
selected, based on which appropriate method of the DispatchAction 
class would be executed.
 
Any help would be greatly appreciated.
 
Thanks,
Shyam
 
 

Mark Lowe <[EMAIL PROTECTED]> wrote:
check out dispatch actions..
you can have multiple execute methods with dispatch action ...

Your Action class extends DispatchAction instead of action (check the
docs)
public final ActionForward submit(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
...
}
public final ActionForward lookup(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
...
}
in struts config the parameter attibute need to know the name of the
parameter your about to send, the value of which is your execute 
method
name..

scope="request" parameter="action">
...
and then in jsp





HTH Mark

On Friday, July 11, 2003, at 08:00 PM, Shyam A wrote:

> James,
>
> Thanks for your mail. I guess I need to elaborate a little bit. My
> HTML form can be submitted in 2ways.
> 1. Clicking the "Submit" button.
> 2. Clicking the drop-down
>
> Clicking the drop-down triggers a different action than clicking the
> "Submit" button.
> Selecting a value in the drop-down would submit the form and 
populate
> some of the other fields in the form. This is done before the 
"Submit"
> button is clicked. So, I need to distinguish the action of clicking
> the drop-down from clicking the "Submit" button and I called it
> "Lookup".
>
> Both actions would be identified with a single property in the
> ActionForm class - action.
>
> eg:
>
>
> I would like to set this "action" property value to "Lookup" on
> clicking the drop-down using Javascript. I guess a hidden field 
would
> not serve the purpose as I already have "action" property defined 
for
> the Submit button.
>
> Look forward to your help/suggestions.
>
> Thanks,
> Shyam
>
> James Mitchell wrote:
>
> You will need to create a hidden field named "action", with a value 
of
> "Lookup":
>
>
>
> My question to you iswhy "Lookup"? What does that have to do 
with
> your
> form?
>
>
> Here's a sample:
>
>
> function submitForm(form) {
> form.action.value="Lookup";
> form.submit();
> return true;
> }
>
>
>
> [input]
> Test Test2
>
>
>
> On Friday 11 July 2003 14:15, Shyam A wrote:
>> Hi,
>>
>> I have an HTML form with Submit and Cancel buttons, and a drop down
>> list,
>> which when clicked submits the form. I use Javascript to submit the
>> form
>> when the dropdown list is clicked. I have a property called 
"action"
>> defined in my ActionForm class that identifies the Submit and 
Cancel
>> buttons in the HTML form. When the drop-down is clicked, I would 
like
>> to
>> set the value of this "action" property to "Lookup".
>>
>> My Javascript function is given below:
>>
>> 
>>
>>
>> function submitForm(form)
>> {
>> form.action.value="Lookup";
>> form.submit();
>> return true;
>> }
>> #
>>
>> and I invoke this function in my HTML form as shown below:
>>
>> #
>>
>> Test
>>
>> ###
>>
>> But, the value of the property "action" is not set to "Lookup".
>>
>> Any help would be greatly appreciated.
>>
>> Thanks,
>> Shyam
>>
>>
>> -
>> Do you Yahoo!?
>> SBC Yahoo! DSL - Now only $29.95 per month!
>
> --
> James Mitchell
> Software Developer/Struts 

Re: newbie question - setting form parameter in Javascript

Its better that this is posted to the list as well, after all its a 
good question and hopefully an adequate answer.







...







//struts config



The only thing you'd have to watch would  be if the client didn't 
support javascript then you'd lose lookup, this would make a case for 
having action as a form bean property and have some relevantly named 
form elements in noscript tags. If lookup isn't mission critical then i 
guess you could let this slide.



On Friday, July 11, 2003, at 08:44 PM, Shyam A wrote:

Mark,
 
Thanks for your mail. I understand that DispatchAction class includes 
multiple execute methods for different actions. However, I still have 
some doubts.
 
You mentioned using  tags in JSP:
 



Are these used instead of using "Submit" buttons ?
i.e use  and  in conjunction instead 
of  ?  Can  
be used for a drop- down?
 
I guess my problem is still unresolved. As I mentioned in my earlier 
mail, I have a drop-down associated with an ActionForm property "crn" 
> .

   None  
    
  
I would like to trigger an action called "Lookup" when the drop-down 
is clicked .i.e, associate the clicking of the drop-down with the 
"action" property of the ActionForm class. I don't know how to set the 
"action" property of the ActionForm class  when the drop-down is 
selected, based on which appropriate method of the DispatchAction 
class would be executed.
 
Any help would be greatly appreciated.
 
Thanks,
Shyam
 
 

Mark Lowe <[EMAIL PROTECTED]> wrote:
check out dispatch actions..
you can have multiple execute methods with dispatch action ...

Your Action class extends DispatchAction instead of action (check the
docs)
public final ActionForward submit(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
...
}
public final ActionForward lookup(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
...
}
in struts config the parameter attibute need to know the name of the
parameter your about to send, the value of which is your execute method
name..
scope="request" parameter="action">
...
and then in jsp





HTH Mark

On Friday, July 11, 2003, at 08:00 PM, Shyam A wrote:

> James,
>
> Thanks for your mail. I guess I need to elaborate a little bit. My
> HTML form can be submitted in 2ways.
> 1. Clicking the "Submit" button.
> 2. Clicking the drop-down
>
> Clicking the drop-down triggers a different action than clicking the
> "Submit" button.
> Selecting a value in the drop-down would submit the form and populate
> some of the other fields in the form. This is done before the 
"Submit"
> button is clicked. So, I need to distinguish the action of clicking
> the drop-down from clicking the "Submit" button and I called it
> "Lookup".
>
> Both actions would be identified with a single property in the
> ActionForm class - action.
>
> eg:
>
>
> I would like to set this "action" property value to "Lookup" on
> clicking the drop-down using Javascript. I guess a hidden field would
> not serve the purpose as I already have "action" property defined for
> the Submit button.
>
> Look forward to your help/suggestions.
>
> Thanks,
> Shyam
>
> James Mitchell wrote:
>
> You will need to create a hidden field named "action", with a value 
of
> "Lookup":
>
>
>
> My question to you iswhy "Lookup"? What does that have to do with
> your
> form?
>
>
> Here's a sample:
>
>
> function submitForm(form) {
> form.action.value="Lookup";
> form.submit();
> return true;
> }
>
>
>
> [input]
> Test Test2
>
>
>
> On Friday 11 July 2003 14:15, Shyam A wrote:
>> Hi,
>>
>> I have an HTML form with Submit and Cancel buttons, and a drop down
>> list,
>> which when clicked submits the form. I use Javascript to submit the
>> form
>> when the dropdown list is clicked. I have a property called "action"
>> defined in my ActionForm class that identifies the Submit and Cancel
>> buttons in the HTML form. When the drop-down is clicked, I would 
like
>> to
>> set the value of this "action" property to "Lookup".
>>
>> My Javascript function is given below:
>>
>> 
>>
>>
>> function submitForm(form)
>> {
>> form.action.value="Lookup";
>> form.submit();
>> return true;
>> }
>> #
>>
>> and I invoke this function in my HTML form as shown below:
>>
>> #
>>
>> Test
>>
>> ###
>>
>> But, the value of the property "action" is not set to "Lookup".
>>
>> Any help would be greatly appreciated.
>>
>> Thanks,
>> Shyam
>>
>>
>> -
>> Do you Yahoo!?
>> SBC Yahoo! DSL - Now only $29.95 per month!
>
> --
> James Mitchell
> Software Developer/Struts Evangelist
> http://www.struts-atlanta.org
> 678-910-8017
> AIM:jmitchtx
>
>
>
> -
> To 

Re: newbie question - setting form parameter in Javascript

I think I see where you are goingtry setting the form action instead:


function submitForm(form) {
document.frm.action="lookup.do";   //  <--Change this to not be hard-coded
form.submit();
return true;
}



 
 
   Test   
   Test2   
 







On Friday 11 July 2003 15:00, Shyam A wrote:
> James,
>
> Thanks for your mail. I guess I need to elaborate a little bit. My HTML
> form can be submitted in 2ways. 1. Clicking the "Submit" button.
> 2. Clicking the drop-down
>
> Clicking the drop-down triggers a different action than clicking the
> "Submit" button. Selecting a value in the drop-down would submit the form
> and populate some of the other fields in the form. This is done before the
> "Submit" button is clicked. So, I need to distinguish the action of
> clicking the drop-down from clicking the "Submit" button and I called it
> "Lookup".
>
> Both actions would be identified with a single property in the ActionForm
> class - action.
>
> eg:
>  
>
> I would like to set this "action" property value to "Lookup" on clicking
> the drop-down using Javascript. I guess a hidden field would not serve the
> purpose as I already have "action" property defined for the Submit button.
>
> Look forward to your help/suggestions.
>
> Thanks,
> Shyam
>
> James Mitchell <[EMAIL PROTECTED]> wrote:
>
> You will need to create a hidden field named "action", with a value of
> "Lookup":
>
>
>
> My question to you iswhy "Lookup"? What does that have to do with your
> form?
>
>
> Here's a sample:
>
>
> function submitForm(form) {
>  form.action.value="Lookup";
>  form.submit();
>  return true;
> }
>
>
>
>  [input]
>  Test Test2
>
> On Friday 11 July 2003 14:15, Shyam A wrote:
> > Hi,
> >
> > I have an HTML form with Submit and Cancel buttons, and a drop down list,
> > which when clicked submits the form. I use Javascript to submit the form
> > when the dropdown list is clicked. I have a property called "action"
> > defined in my ActionForm class that identifies the Submit and Cancel
> > buttons in the HTML form. When the drop-down is clicked, I would like to
> > set the value of this "action" property to "Lookup".
> >
> > My Javascript function is given below:
> >
> > 
> >
> >
> > function submitForm(form)
> > {
> > form.action.value="Lookup";
> > form.submit();
> > return true;
> > }
> > #
> >
> > and I invoke this function in my HTML form as shown below:
> >
> > #
> >
> >Test
> >
> > ###
> >
> > But, the value of the property "action" is not set to "Lookup".
> >
> > Any help would be greatly appreciated.
> >
> > Thanks,
> > Shyam
> >
> >
> > -
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!

-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
678-910-8017
AIM:jmitchtx



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



Re: newbie question - setting form parameter in Javascript

check out dispatch actions..

you can have multiple execute methods with dispatch action ...

Your Action class extends DispatchAction instead of action (check the 
docs)

public final ActionForward submit(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)

  throws Exception {
...
}
public final ActionForward lookup(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)

  throws Exception {
...
}
in struts config the parameter attibute need to know the name of the 
parameter your about to send, the value of which is your execute method 
name..


...

and then in jsp





HTH Mark

On Friday, July 11, 2003, at 08:00 PM, Shyam A wrote:

James,

Thanks for your mail. I guess I need to elaborate a little bit. My 
HTML form can be submitted in 2ways.
1. Clicking the "Submit" button.
2. Clicking the drop-down

Clicking the drop-down triggers a different action than clicking the 
"Submit" button.
Selecting a value in the drop-down would submit the form and populate 
some of the other fields in the form. This is done before the "Submit" 
button is clicked. So, I need to distinguish the action of clicking 
the drop-down from clicking the "Submit" button and I called it 
"Lookup".

Both actions would be identified with a single property in the 
ActionForm class - action.

eg:
 
I would like to set this "action" property value to "Lookup" on 
clicking the drop-down using Javascript. I guess a hidden field would 
not serve the purpose as I already have "action" property defined for 
the Submit button.

Look forward to your help/suggestions.

Thanks,
Shyam
James Mitchell <[EMAIL PROTECTED]> wrote:

You will need to create a hidden field named "action", with a value of
"Lookup":


My question to you iswhy "Lookup"? What does that have to do with 
your
form?

Here's a sample:

function submitForm(form) {
 form.action.value="Lookup";
 form.submit();
 return true;
}


 [input]
 Test Test2


On Friday 11 July 2003 14:15, Shyam A wrote:
Hi,

I have an HTML form with Submit and Cancel buttons, and a drop down 
list,
which when clicked submits the form. I use Javascript to submit the 
form
when the dropdown list is clicked. I have a property called "action"
defined in my ActionForm class that identifies the Submit and Cancel
buttons in the HTML form. When the drop-down is clicked, I would like 
to
set the value of this "action" property to "Lookup".

My Javascript function is given below:



function submitForm(form)
{
form.action.value="Lookup";
form.submit();
return true;
}
#
and I invoke this function in my HTML form as shown below:

#

   Test

###

But, the value of the property "action" is not set to "Lookup".

Any help would be greatly appreciated.

Thanks,
Shyam
-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
678-910-8017
AIM:jmitchtx


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


-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!


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


Re: newbie question - setting form parameter in Javascript

James,
 
Thanks for your mail. I guess I need to elaborate a little bit. My HTML form can be 
submitted in 2ways.
1. Clicking the "Submit" button.
2. Clicking the drop-down
 
Clicking the drop-down triggers a different action than clicking the "Submit" button.
Selecting a value in the drop-down would submit the form and populate some of the 
other fields in the form. This is done before the "Submit" button is clicked. So, I 
need to distinguish the action of clicking the drop-down from clicking the "Submit" 
button and I called it "Lookup".
 
Both actions would be identified with a single property in the ActionForm class - 
action.
 
eg:
  
 
I would like to set this "action" property value to "Lookup" on clicking the drop-down 
using Javascript. I guess a hidden field would not serve the purpose as I already have 
"action" property defined for the Submit button.
 
Look forward to your help/suggestions.
 
Thanks,
Shyam

James Mitchell <[EMAIL PROTECTED]> wrote:

You will need to create a hidden field named "action", with a value of 
"Lookup":



My question to you iswhy "Lookup"? What does that have to do with your 
form?


Here's a sample:


function submitForm(form) {
 form.action.value="Lookup";
 form.submit();
 return true;
}



 [input] 
 Test Test2



On Friday 11 July 2003 14:15, Shyam A wrote:
> Hi,
>
> I have an HTML form with Submit and Cancel buttons, and a drop down list,
> which when clicked submits the form. I use Javascript to submit the form
> when the dropdown list is clicked. I have a property called "action"
> defined in my ActionForm class that identifies the Submit and Cancel
> buttons in the HTML form. When the drop-down is clicked, I would like to
> set the value of this "action" property to "Lookup".
>
> My Javascript function is given below:
>
> 
>
>
> function submitForm(form)
> {
> form.action.value="Lookup";
> form.submit();
> return true;
> }
> #
>
> and I invoke this function in my HTML form as shown below:
>
> #
>  
>Test
>
> ###
>
> But, the value of the property "action" is not set to "Lookup".
>
> Any help would be greatly appreciated.
>
> Thanks,
> Shyam
>
>
> -
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!

-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
678-910-8017
AIM:jmitchtx



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

 


-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Re: newbie question - setting form parameter in Javascript


You will need to create a hidden field named "action", with a value of 
"Lookup":



My question to you iswhy "Lookup"?  What does that have to do with your 
form?


Here's a sample:


function submitForm(form) {
 form.action.value="Lookup";
 form.submit();
 return true;
}



 
 
   Test   
   Test2   
 



On Friday 11 July 2003 14:15, Shyam A wrote:
> Hi,
>
> I have an HTML form with Submit and Cancel buttons, and a drop down list,
> which when clicked submits the form. I use Javascript to submit the form
> when the dropdown list is clicked. I have a property called "action"
> defined in my ActionForm class that identifies the Submit and Cancel
> buttons in the HTML form. When the drop-down is clicked, I would like to
> set the value of this "action" property to "Lookup".
>
> My Javascript function is given below:
>
> 
>
> 

newbie question - setting form parameter in Javascript

Hi,
 
I have an HTML form with Submit and Cancel buttons, and a drop down list, which when 
clicked submits the form. I use Javascript to submit the form when the dropdown list 
is clicked.
I have a property called "action" defined in my ActionForm class that identifies the 
Submit and Cancel buttons in the HTML form. When the drop-down is clicked, I would 
like to set the value of this "action" property to "Lookup".
 
My Javascript function is given below:
 



Newbie question: DispatchAction subclassing

Hi, I am currently developing a webapp with Struts 1.1 and I have decided to
use the DispatchAction to group functionality, instead of having a large
bunch of single Action classes.
Now I face the following problem: I want to have some pre-processing generic
code invoked for every action, but I'd rather have it in, say, a
GenericDispatchAction than duplicate it in the subclasses.
As I see, each of my subclasses would have its methodName executed against
requests (instead of the traditional execute() method of the Action class).
Where should I put this generic invocations (for example, for session, login
checking, exception handling, authorization, etc.)?
Could I override the DispatchAction execute() method in my
"GenericDispatchAction" for example to do exception handling? Could I do
common processing in the dispatchMethod() method instead?
Please help!




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



RE: what setters do i implement in an indexed tag--NewBie question

John

Made few changes and code worked fine. 

Would like to extend this so that it will work for handling  Dynamic
table situation-- Let me explain

If u see in Action form reset method I initialized it to 5 (num="5 "for
testing) so the page loads with five empty rows, But we have a
requirement where the user can add more rows to the table and click
submit.

1. Action form code:

private ArrayList personList;

  public void reset(ActionMapping mapping, HttpServletRequest request){
 this.personList = new ArrayList();
   // String num = request.getParameter("personListLength");
 String num ="5";
try {
if (num != null) {
int len = Integer.parseInt(num);
for (int i = 0; i < len; i++)
this.personList.add(new PersonBean());
}
}catch (NumberFormatException e) {
   e.printStackTrace();
}
}
  public PersonBean getPerson(int ndx) {
return (PersonBean) personList.get(ndx);
}
  public void setPersonList(int ndx, PersonBean p) {
personList.set(ndx, p);
}
  public ArrayList getPersonList(){
return this.personList;
  }

2. jsp


   


  

   




  


  


3.PersonBean:
public class PersonBean implements Serializable
{
  String firstName;
  String phoneNo;

  public PersonBean()
  {
super();
  }

  public String getFirstName()
  {
return firstName;
  }

  public void setFirstName(String newFirstName)
  {
firstName = newFirstName;
  }

  public String getPhoneNo()
  {
return phoneNo;
  }

  public void setPhoneNo(String newPhoneNo)
  {
phoneNo = newPhoneNo;
  }
}

Let me know if u need any further info.

Thanks


>>> [EMAIL PROTECTED] 06/12/03 01:57PM >>>
I believe indexed attributes were first, then Arron contributed nested
and life got easier. Stick with it and don't go backwards.

-john

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 11:52 PM
To: Struts Users Mailing List
Subject: Re: what setters do i implement in an indexed tag --NewBie
question


Sashi, your person bean must have getName(), setName() and getPhoneNo(),

setPhoneNo().

Everybody: I haven't come across the html:taglib indexed property 
before. This seems to do what nested: tags do - is this functional
overlap?

Generally with JST taglib as well, there seems to be a wide choice of 
taglibs to use - is this going to consolidate at some point in struts' 
development?

Adam


Sashi Ravipati wrote:
> Can some body help in as how to define get and set methods when we use
indexed tags.
> 
> eg:
> 
> 
>   
> 
>   
>   
> 
> 
>   
> 
>   
> 
> 
> What will be the get and set methods. 
> 
> 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]


RE: what setters do i implement in an indexed tag --NewBie question

I believe indexed attributes were first, then Arron contributed nested
and life got easier. Stick with it and don't go backwards.

-john

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 11:52 PM
To: Struts Users Mailing List
Subject: Re: what setters do i implement in an indexed tag --NewBie
question


Sashi, your person bean must have getName(), setName() and getPhoneNo(),

setPhoneNo().

Everybody: I haven't come across the html:taglib indexed property 
before. This seems to do what nested: tags do - is this functional
overlap?

Generally with JST taglib as well, there seems to be a wide choice of 
taglibs to use - is this going to consolidate at some point in struts' 
development?

Adam


Sashi Ravipati wrote:
> Can some body help in as how to define get and set methods when we use
indexed tags.
> 
> eg:
> 
> 
>   
> 
>   
>   
> 
> 
>   
> 
>   
> 
> 
> What will be the get and set methods. 
> 
> 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]



RE: Newbie Question: Multiple User Input Screen

Hint: Search for "Wizard"

-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:20 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Newbie Question: Multiple User Input Screen


Yes, if you go to the Struts pages on Jakarta there is an archive.  This
particular topic has been discussed several times over :)

http://nagoya.apache.org/eyebrowse/SummarizeList?listId=42

-Original Message-
From: Tuan T [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:14 AM
To: [EMAIL PROTECTED]
Subject: Newbie Question: Multiple User Input Screen



Sorry, if this question has been posted before (I just joined the
group) Is there anyway to browse thru all the group messages on the web?

I am trying to implement multiple input pages where the user will enter
input data from one page to the next by using the next button.
How do I capture all input on these 3 pages at the end when user hit submit
button.
By using session bean? link to any code examples greatly appreciated!

Any thoughts?



___
No banners. No pop-ups. No kidding.
Introducing My Way - http://www.myway.com

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



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



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



RE: Newbie Question: Multiple User Input Screen

Yes, if you go to the Struts pages on Jakarta there is an archive.  This
particular topic has been discussed several times over :)

http://nagoya.apache.org/eyebrowse/SummarizeList?listId=42

-Original Message-
From: Tuan T [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:14 AM
To: [EMAIL PROTECTED]
Subject: Newbie Question: Multiple User Input Screen



Sorry, if this question has been posted before (I just joined the
group) Is there anyway to browse thru all the group messages on the web?

I am trying to implement multiple input pages where the user will enter
input data from one page to the next by using the next button.
How do I capture all input on these 3 pages at the end when user hit submit
button.
By using session bean? link to any code examples greatly appreciated!

Any thoughts?



___
No banners. No pop-ups. No kidding.
Introducing My Way - http://www.myway.com

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



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



Newbie Question: Multiple User Input Screen


Sorry, if this question has been posted before (I just joined the
group) Is there anyway to browse thru all the group messages on the web?

I am trying to implement multiple input pages where the user will enter input data 
from one page to the next by using the next button.
How do I capture all input on these 3 pages at the end when user hit submit button.
By using session bean? link to any code examples greatly appreciated!

Any thoughts?



___
No banners. No pop-ups. No kidding.
Introducing My Way - http://www.myway.com

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



Re: what setters do i implement in an indexed tag --NewBie question

Sashi, your person bean must have getName(), setName() and getPhoneNo(), 
setPhoneNo().

Everybody: I haven't come across the html:taglib indexed property 
before. This seems to do what nested: tags do - is this functional overlap?

Generally with JST taglib as well, there seems to be a wide choice of 
taglibs to use - is this going to consolidate at some point in struts' 
development?

Adam

Sashi Ravipati wrote:
Can some body help in as how to define get and set methods when we use indexed tags.

eg:


  

  
  


  

  

What will be the get and set methods. 

Thanks



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


RE: Newbie Question: Tiles and html:link how to make it work.


Believe me there are many ways to do it and I am not the best but I like to
treat any JSP defined in the tiles def xml and any JSPs that are like
templates as in classic_layout.jsp which assembles all of the other JSPs as
the equivalent of an abstract class and I don't forward to any of those. I
will extend (in the tiles def xml file) the doc.classicLayout, which uses
classic_layout.jsp to assemble the look of the page, and those extended defs
are what I forward to.  So Tiles is doing all my assembly.

"doc.umHome" extends doc.classicLayout and then I forward to doc.umHome if
that is where I want to go.

In posts from yesterday or the day before I posted exactly how I do it for a
concrete example.

-Original Message-
From: Davidson, Glenn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2003 4:48 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie Question: Tiles and html:link how to make it work.

Shane,
You have been most helpful and correct. Please bear with me for one more
moment. When I do my links I link to a forward and not directly to a JSP. I
agree that the best way to handle the "is logged in" question is by sub
classing the ActionServlet (Ted Husted's Book has a nice example of this).
What I have working is this:

I create a link to a forward, the forward is mapped to a JSP, within the JSP
is a tiles include definition. If I have an action the forward of the action
mapping is taking the tiles definition and working correctly. Is this the
correct way of handling this?

Thanks

Glenn

-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 3:19 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie Question: Tiles and html:link how to make it work.



Like I said. Don't link to any JSPs from a JSP.  So you need to look into
things a little more or you will have problems in the long run.  If you
really don't need to do any type of preparation for the display of a JSP
(i.e. nothing put in the request,session,etc. for the JSP to pull out) then
use:



Most of the time you will want to go to a real action and do something.
Especially a check for login (already authenticated).  You shouldn't do it
in every JSP (that's what it sounds like you are doing).  I suggest to
subclass the ActionServlet to do a login check.

I hope this helps but you really should learn more before doing your
implementation of struts.

I feel I have the basics of struts decently but learn something all the time
on this forum.



-Original Message-
From: Davidson, Glenn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2003 2:45 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie Question: Tiles and html:link how to make it work.

Thanks for the quick response!

Lets say I have a "menu item" that I want to use to call another jsp page.
This new jsp page is defined as a new tile. 

More detail:

Lets say I have a welcome page (which is defined in tiles-defs.xml). In the
header.jsp I look to see if the user is logged in. If they are logged in I
display a greeting in the header. If they are not logged in I print "Please
logon" in the menu.jsp and I when they click on that I would like to jump to
the logon page which is defined in the tiles-defs.xml. The logon page has a
different menu.jsp and body.jsp defined. 

Thanks

Glenn 

-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 2:25 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie Question: Tiles and html:link how to make it work.



Your forward path can be a Tiles Def in the struts-config. You don't want to
ever link directly to a Def (or JSP) so it sounds like you are fine.  Need
more detail otherwise.


-Original Message-
From: Davidson, Glenn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2003 2:22 PM
To: 'Struts Users Mailing List'
Subject: Newbie Question: Tiles and html:link how to make it work.

I am new to Struts and Tiles and am trying to make it work. I have written a
simple web site that uses the  section of the struts-config.xml I have looked at the
documentation on line and it is a little shy on this. I also have Ted
Husted's book which is really great but I am still having a problem. Can
anyone get me some guidance here? 

Thanks

Glenn Davidson

-
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: Newbie Question: Tiles and html:link how to make it work.

Shane,
You have been most helpful and correct. Please bear with me for one more
moment. When I do my links I link to a forward and not directly to a JSP. I
agree that the best way to handle the "is logged in" question is by sub
classing the ActionServlet (Ted Husted's Book has a nice example of this).
What I have working is this:

I create a link to a forward, the forward is mapped to a JSP, within the JSP
is a tiles include definition. If I have an action the forward of the action
mapping is taking the tiles definition and working correctly. Is this the
correct way of handling this?

Thanks

Glenn

-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 3:19 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie Question: Tiles and html:link how to make it work.



Like I said. Don't link to any JSPs from a JSP.  So you need to look into
things a little more or you will have problems in the long run.  If you
really don't need to do any type of preparation for the display of a JSP
(i.e. nothing put in the request,session,etc. for the JSP to pull out) then
use:



Most of the time you will want to go to a real action and do something.
Especially a check for login (already authenticated).  You shouldn't do it
in every JSP (that's what it sounds like you are doing).  I suggest to
subclass the ActionServlet to do a login check.

I hope this helps but you really should learn more before doing your
implementation of struts.

I feel I have the basics of struts decently but learn something all the time
on this forum.



-Original Message-
From: Davidson, Glenn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2003 2:45 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie Question: Tiles and html:link how to make it work.

Thanks for the quick response!

Lets say I have a "menu item" that I want to use to call another jsp page.
This new jsp page is defined as a new tile. 

More detail:

Lets say I have a welcome page (which is defined in tiles-defs.xml). In the
header.jsp I look to see if the user is logged in. If they are logged in I
display a greeting in the header. If they are not logged in I print "Please
logon" in the menu.jsp and I when they click on that I would like to jump to
the logon page which is defined in the tiles-defs.xml. The logon page has a
different menu.jsp and body.jsp defined. 

Thanks

Glenn 

-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 2:25 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie Question: Tiles and html:link how to make it work.



Your forward path can be a Tiles Def in the struts-config. You don't want to
ever link directly to a Def (or JSP) so it sounds like you are fine.  Need
more detail otherwise.


-Original Message-
From: Davidson, Glenn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2003 2:22 PM
To: 'Struts Users Mailing List'
Subject: Newbie Question: Tiles and html:link how to make it work.

I am new to Struts and Tiles and am trying to make it work. I have written a
simple web site that uses the  section of the struts-config.xml I have looked at the
documentation on line and it is a little shy on this. I also have Ted
Husted's book which is really great but I am still having a problem. Can
anyone get me some guidance here? 

Thanks

Glenn Davidson

-
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: Newbie Question: Tiles and html:link how to make it work.


Like I said. Don't link to any JSPs from a JSP.  So you need to look into
things a little more or you will have problems in the long run.  If you
really don't need to do any type of preparation for the display of a JSP
(i.e. nothing put in the request,session,etc. for the JSP to pull out) then
use:



Most of the time you will want to go to a real action and do something.
Especially a check for login (already authenticated).  You shouldn't do it
in every JSP (that's what it sounds like you are doing).  I suggest to
subclass the ActionServlet to do a login check.

I hope this helps but you really should learn more before doing your
implementation of struts.

I feel I have the basics of struts decently but learn something all the time
on this forum.



-Original Message-
From: Davidson, Glenn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2003 2:45 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie Question: Tiles and html:link how to make it work.

Thanks for the quick response!

Lets say I have a "menu item" that I want to use to call another jsp page.
This new jsp page is defined as a new tile. 

More detail:

Lets say I have a welcome page (which is defined in tiles-defs.xml). In the
header.jsp I look to see if the user is logged in. If they are logged in I
display a greeting in the header. If they are not logged in I print "Please
logon" in the menu.jsp and I when they click on that I would like to jump to
the logon page which is defined in the tiles-defs.xml. The logon page has a
different menu.jsp and body.jsp defined. 

Thanks

Glenn 

-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 2:25 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie Question: Tiles and html:link how to make it work.



Your forward path can be a Tiles Def in the struts-config. You don't want to
ever link directly to a Def (or JSP) so it sounds like you are fine.  Need
more detail otherwise.


-Original Message-
From: Davidson, Glenn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2003 2:22 PM
To: 'Struts Users Mailing List'
Subject: Newbie Question: Tiles and html:link how to make it work.

I am new to Struts and Tiles and am trying to make it work. I have written a
simple web site that uses the  section of the struts-config.xml I have looked at the
documentation on line and it is a little shy on this. I also have Ted
Husted's book which is really great but I am still having a problem. Can
anyone get me some guidance here? 

Thanks

Glenn Davidson

-
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: Newbie Question: Tiles and html:link how to make it work.

Thanks for the quick response!

Lets say I have a "menu item" that I want to use to call another jsp page.
This new jsp page is defined as a new tile. 

More detail:

Lets say I have a welcome page (which is defined in tiles-defs.xml). In the
header.jsp I look to see if the user is logged in. If they are logged in I
display a greeting in the header. If they are not logged in I print "Please
logon" in the menu.jsp and I when they click on that I would like to jump to
the logon page which is defined in the tiles-defs.xml. The logon page has a
different menu.jsp and body.jsp defined. 

Thanks

Glenn 

-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 2:25 PM
To: 'Struts Users Mailing List'
Subject: RE: Newbie Question: Tiles and html:link how to make it work.



Your forward path can be a Tiles Def in the struts-config. You don't want to
ever link directly to a Def (or JSP) so it sounds like you are fine.  Need
more detail otherwise.


-Original Message-
From: Davidson, Glenn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2003 2:22 PM
To: 'Struts Users Mailing List'
Subject: Newbie Question: Tiles and html:link how to make it work.

I am new to Struts and Tiles and am trying to make it work. I have written a
simple web site that uses the  section of the struts-config.xml I have looked at the
documentation on line and it is a little shy on this. I also have Ted
Husted's book which is really great but I am still having a problem. Can
anyone get me some guidance here? 

Thanks

Glenn Davidson

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


RE: Newbie Question: Tiles and html:link how to make it work.


Your forward path can be a Tiles Def in the struts-config. You don't want to
ever link directly to a Def (or JSP) so it sounds like you are fine.  Need
more detail otherwise.


-Original Message-
From: Davidson, Glenn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2003 2:22 PM
To: 'Struts Users Mailing List'
Subject: Newbie Question: Tiles and html:link how to make it work.

I am new to Struts and Tiles and am trying to make it work. I have written a
simple web site that uses the  section of the struts-config.xml I have looked at the
documentation on line and it is a little shy on this. I also have Ted
Husted's book which is really great but I am still having a problem. Can
anyone get me some guidance here? 

Thanks

Glenn Davidson

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



Newbie Question: Tiles and html:link how to make it work.

I am new to Struts and Tiles and am trying to make it work. I have written a
simple web site that uses the  section of the struts-config.xml I have looked at the
documentation on line and it is a little shy on this. I also have Ted
Husted's book which is really great but I am still having a problem. Can
anyone get me some guidance here? 

Thanks

Glenn Davidson


RE: Newbie question: how does MyAction class handle Exceptions?


How about catching the database exception in the middle
tier and throwing a more middle tier like Exception (so
your front tier - any of the struts classes - don't have
to deal with anything with SQL in it) that you define like
UserExistsException or InvalidSomethingException or
ThisHappenedException and then in the struts config have 

  

  

  

I like keeping the try catches out of my Action class.


-Original Message-
From: Leon [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 27, 2003 3:33 PM
To: Struts Users Mailing List
Subject: Re: Newbie question: how does MyAction class handle Exceptions?

I should forward an ApplicationException to MyAction class and then,
MyAction finds an appropriate jsp based on the message in
ApplicationException. But, how can I know the SQLException thrown by
persistance tire is duplicate entery SQLException or other SQLException?
Thanks.


- Original Message -
From: "Mike Jasnowski" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 2:45 PM
Subject: RE: Newbie question: how does MyAction class handle Exceptions?


> Return a forward appropriate to the exception caught?
>
> -Original Message-
> From: Leon [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 27, 2003 2:45 PM
> To: Struts Users Mailing List
> Subject: Newbie question: how does MyAction class handle Exceptions?
>
>
> Hi,
>
> I have DataAccessException thrown by DAO class and catched by
> BusinessDeligate class. ApplicationException thrown by BusinessDeligate
> class and catched by MyAction class. I want to send a jsp to clients to
> display a message that the clients submit a duplicate entry in their
> request. What should I do for this?
> Thanx.
>
> Leon
>
> -
> 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: Newbie question: how does MyAction class handle Exceptions?



Leon wrote:
I should forward an ApplicationException to MyAction class and then,
MyAction finds an appropriate jsp based on the message in
ApplicationException. But, how can I know the SQLException thrown by
persistance tire is duplicate entery SQLException or other SQLException?
Put an informative message in the DAO code that constructs the SQLException.

Some people then generate an email from the exception message and send 
it to the administrator email account.  Other people might do something 
more technical such as send a JMS message that there is a problem.  Or 
even open a socket and fire a simple XML message to some web service 
containing the contents of the exception.  These ideas require you to 
have established a facility to receive and store such messages (JMS or 
web service), and might not be worth the added complexity.

Other people don't care if the user sees the exception message and they 
just print a message like "Please copy the contents of this stack trace 
into an email and send it to the admin".  This is the easy, if ugly, 
solution.

Erik

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


Re: Newbie question: how does MyAction class handle Exceptions?

I should forward an ApplicationException to MyAction class and then,
MyAction finds an appropriate jsp based on the message in
ApplicationException. But, how can I know the SQLException thrown by
persistance tire is duplicate entery SQLException or other SQLException?
Thanks.


- Original Message -
From: "Mike Jasnowski" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 2:45 PM
Subject: RE: Newbie question: how does MyAction class handle Exceptions?


> Return a forward appropriate to the exception caught?
>
> -Original Message-
> From: Leon [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 27, 2003 2:45 PM
> To: Struts Users Mailing List
> Subject: Newbie question: how does MyAction class handle Exceptions?
>
>
> Hi,
>
> I have DataAccessException thrown by DAO class and catched by
> BusinessDeligate class. ApplicationException thrown by BusinessDeligate
> class and catched by MyAction class. I want to send a jsp to clients to
> display a message that the clients submit a duplicate entry in their
> request. What should I do for this?
> Thanx.
>
> Leon
>
> -
> 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: Newbie question: how does MyAction class handle Exceptions?

Return a forward appropriate to the exception caught? 

-Original Message-
From: Leon [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 2:45 PM
To: Struts Users Mailing List
Subject: Newbie question: how does MyAction class handle Exceptions?


Hi,

I have DataAccessException thrown by DAO class and catched by
BusinessDeligate class. ApplicationException thrown by BusinessDeligate
class and catched by MyAction class. I want to send a jsp to clients to
display a message that the clients submit a duplicate entry in their
request. What should I do for this?
Thanx.

Leon

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



  1   2   3   4   5   >