Multiple forms with same format and validation problem.

2003-03-08 Thread Jason Long
I have an application that creates hundreds of jsp/struts form pages in xml
format.  All pages have the same input fields, except that there is a
varying number of checkbox fields.  I specified the following action:



  


The problem is that there are many pages name itemConfig_X.jsp, but with
this setup it is constantly redirected to itemConfig_0.jsp when validation
fails.  I need to know how to make each page use itself for input.  I would
appreciate any advice.  This project is already running behind schedule, so
I need to resolve this problem quickly.

Thank you for your time,

Jason Long - CEO and Chief Software Engineer
Supernova Software - supernovasoftware.com
BS Physics, MS  Chemical Engineering



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



Re: MonkeyTree problem - In RC1

2003-03-08 Thread Arron Bates
Dan,

> You are my hero
>

well... i didn't want to be the one to say it.

:P


> Can't wait to see RC2.
> 
> Is the fix in the nightly built yet?

Yup.
If you can promptly report any problems you may have so when next release day
comes around we can have it nice and stable.

Happy nesting.



Arron.


> 
> -Dan
> 
> - Original Message -
> From: "Arron Bates" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, March 07, 2003 11:20 PM
> Subject: Re: MonkeyTree problem - In RC1
> 
> > Dan,
> >
> > I'm presuming Tomcat 4.1.18?...
> >
> > Get this jar...
> >
> > http://keyboardmonkey.com/downloads/km-nested-v2.03.jar
> >
> > ...and throw it into the WEB-INF/lib directory, and restart the app.
> With
> > any luck it should work. Nested tags were only fixed in new Tomcat 4.1.X
> after
> > RC1, it'll be in the RC2 release.
> >
> >
> > Arron.
> >
> >
> > > Hi is there anyone successfully got MonkeyTree example to work in RC1.
> > >
> > > I have tree displayed like this
> > >
> > > Root
> > >SubDir1
> > >SubDir1   <- instead of SubDir2
> > >SubDir1  <---instead of SubDir3
> > >
> > >
> > >
> > > Any help is greatly appreciated.
> > >
> > > -Dan
> >
> >
> >
> >
> > -
> > 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]



invalidate session

2003-03-08 Thread Mohan Radhakrishnan
Hi,
My actions are all extended from a base action. 

How do I invalidate the previous session and start afresh ?

 I know about the API method to invalidate a session. But where do I call
it. Is it in the constructor of the the  super class at the highest level?

  I used to invalidate the session after the user logs in. But this makes my
login page expire even before the user logs in. 

It is not CMS. I think I am lacking a bit of understanding about
sessions that are automatically created when one invokes certain methods of
the struts API.

Mohan

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



RE: [Design Pattern]FormBean in Model Layer

2003-03-08 Thread Jaye Bass
Use fascades or adapters to move from model to view or visa versa...

-Original Message-
From: harish krishnaswamy [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 08, 2003 9:09 PM
To: Struts Users Mailing List
Subject: Re: [Design Pattern]FormBean in Model Layer

In our project, we have designed our model facade
objects to take in a map and let the facade copy the
map to the appropriate business objects using
BeanUtils. We have customized the form-bean config to
map the form-bean properties to the model properties.
This way the model objects will be independent of the
view/controller.

-Harish


--- David Graham <[EMAIL PROTECTED]> wrote:
> That is a terrible idea.  Form beans should never
> make it out of the 
> Struts/view layer.  You will tie your application to
> Struts and make it 
> impossible to reuse the logic in another application
> or even to stop using 
> Struts in the future.
> 
> David
> 
> 
> 
> >From: "Puneet Agarwal" <[EMAIL PROTECTED]>
> >Reply-To: "Puneet Agarwal"
> <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> >Subject: [Design Pattern]FormBean in Model Layer
> >Date: Sun, 9 Mar 2003 02:45:15 -
> >
> >We are in the stage of finalizing the design
> pattern for our project.
> >
> >While discussing the design patterns with my
> colleagues,
> >somebody came with an idea to pass the FormBean as
> it is,
> >to the Session Bean or sometimes even to the Value
> List handler Block
> >Later I thought this can actually be a good idea.
> >
> >I understand that this is against underlying
> layered MVC pattern itself, 
> >but
> >avoids a lot of headache. Can someone say what
> could be other disadvantage
> >of this.
> >
> >
> >
> >
> >-->
> >"Struts"..."Action"..."Struts in Action"..."Action
> in
> >Struts"...[possibly]"Action with Struts"..."Action
> over Struts"...?
> >
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
_
> Protect your PC - get McAfee.com VirusScan Online  
>
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.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]



quick log4j question

2003-03-08 Thread Dan Allen
I promise you I researched this, hence why you will find that this
is an intelligible question.

If I make a log4j.properties file and I want to place it in the
WEB-INF/classes/resources directory (in the spirit of Ted Husted) do
I have to then create a custom servlet Log4jInit to load this
properties file and define it in the web.xml file?  I found
information on the custom servlet in the Log4j manual and it looks
to be the same exact servlet that is used to initialize Torque in
the stocktrack application in the Struts KickStart book.

In short, it would seem to me that if I move the file from 

WEB-INF/classes

to

WEB-INF/classes/resources

I have to make a custom servlet.  Is this an incorrect assumption
and if not, how do I tell the web container where to find it (surely
it doesn't go hunting throughout the whole classpath).

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Rumour has it that bad dreams about Windows can be ended by 
putting on a pair of Tux slippers and clicking your heels 
together 3 times while saying. 
"There's no place like /home." 
"There's no place like /home." 
"There's no place like /home."
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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



Re: multiple select handling in Action

2003-03-08 Thread Dan Allen
> You have to cast the result:
> 
>   String[] mySelect = (String[]) form.get("mySelect");
> 
> Because BeanUtils and PropertyUtils know how to deal with DynaBeans, you
> can also use them, for example:
> 
>   String[] mySelect = PropertyUtils.getProperty(form, "mySelect");

Thank you!!!  Just what I was looking for, finally!

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"This is a test of the Emergency Broadcast System.  If this had 
been an actual emergency, do you really think we'd stick around 
to tell you?"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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



RE: JSF

2003-03-08 Thread Jacob Hookom
I apologize Craig.  I should have ended my statement with "... for me".

>From the Sun Forums, I can see that others are having the same problem.
I was told to "stay tuned" for a fix with the Digester issue-- without a
solid work around.  I've tried swapping the packaged jars with JSF with
newer versions and older versions, but it did not fix the issue.

-Jacob

> No problems downloading, but wait for EA4, EA3 has a major bug in it
and
> won't even initialize on tomcat 4.18+
>

Jacob, that is a *very* presumptious statement when it works fine for
most
people :-).  The appropriate next step is to identify what's different
about the installations where it fails, so that we can fix it, instead
of
making incorrect generalizations.

Craig McClanahan (who has personally run EA3 out-of-the-box on Tomcat
4.1.18 out-of-the-box on Windows, Linux, and Solaris systems)


-
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: multiple select handling in Action

2003-03-08 Thread Craig R. McClanahan


On Sat, 8 Mar 2003, Dan Allen wrote:

> Date: Sat, 8 Mar 2003 19:28:40 -0600
> From: Dan Allen <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: multiple select handling in Action
>
>
> David Graham ([EMAIL PROTECTED]) wrote:
>
> > Multiple selects return an array of strings so your form bean should have a
> > String[] multiSelect member with accessors:
> > String[] getMultiSelect()
> > void setMultiSelect(String[])
>
> Right, but if the method get() is defined as
>
> public Object get()
>
> then how do you do
>
> String[] mySelect = form.get("mySelect");
>
> ???  The compiler won't accept it.
>
> Note that I have no form class and I am just using the get() and
> set() methods from the DynaValidatorActionForm
>

You have to cast the result:

  String[] mySelect = (String[]) form.get("mySelect");

Because BeanUtils and PropertyUtils know how to deal with DynaBeans, you
can also use them, for example:

  String[] mySelect = PropertyUtils.getProperty(form, "mySelect");

This has the advantage that you could change your mind later and create a
real ActionForm subclass if you wanted to, but it will also run a little
slower.

> Dan

Craig

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



Re: [Design Pattern]FormBean in Model Layer

2003-03-08 Thread harish krishnaswamy
In our project, we have designed our model facade
objects to take in a map and let the facade copy the
map to the appropriate business objects using
BeanUtils. We have customized the form-bean config to
map the form-bean properties to the model properties.
This way the model objects will be independent of the
view/controller.

-Harish


--- David Graham <[EMAIL PROTECTED]> wrote:
> That is a terrible idea.  Form beans should never
> make it out of the 
> Struts/view layer.  You will tie your application to
> Struts and make it 
> impossible to reuse the logic in another application
> or even to stop using 
> Struts in the future.
> 
> David
> 
> 
> 
> >From: "Puneet Agarwal" <[EMAIL PROTECTED]>
> >Reply-To: "Puneet Agarwal"
> <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> >Subject: [Design Pattern]FormBean in Model Layer
> >Date: Sun, 9 Mar 2003 02:45:15 -
> >
> >We are in the stage of finalizing the design
> pattern for our project.
> >
> >While discussing the design patterns with my
> colleagues,
> >somebody came with an idea to pass the FormBean as
> it is,
> >to the Session Bean or sometimes even to the Value
> List handler Block
> >Later I thought this can actually be a good idea.
> >
> >I understand that this is against underlying
> layered MVC pattern itself, 
> >but
> >avoids a lot of headache. Can someone say what
> could be other disadvantage
> >of this.
> >
> >
> >
> >
> >-->
> >"Struts"..."Action"..."Struts in Action"..."Action
> in
> >Struts"...[possibly]"Action with Struts"..."Action
> over Struts"...?
> >
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
_
> Protect your PC - get McAfee.com VirusScan Online  
>
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Re: [Design Pattern]FormBean in Model Layer

2003-03-08 Thread Dave Newton
On Sat, 2003-03-08 at 21:50, David Graham wrote:
> [...] stop using Struts in the future.

Why on earth would we want to do that?

;)

I second David, though; if you need the properties of an ActionForm
outside of the Struts framework you should definitely copy them to a
bean or other transfer object, and make sure that all business logic is
decoupled from anything Strutsish.

Dave



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



Re: [Design Pattern]FormBean in Model Layer

2003-03-08 Thread David Graham
That is a terrible idea.  Form beans should never make it out of the 
Struts/view layer.  You will tie your application to Struts and make it 
impossible to reuse the logic in another application or even to stop using 
Struts in the future.

David



From: "Puneet Agarwal" <[EMAIL PROTECTED]>
Reply-To: "Puneet Agarwal" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: [Design Pattern]FormBean in Model Layer
Date: Sun, 9 Mar 2003 02:45:15 -
We are in the stage of finalizing the design pattern for our project.

While discussing the design patterns with my colleagues,
somebody came with an idea to pass the FormBean as it is,
to the Session Bean or sometimes even to the Value List handler Block
Later I thought this can actually be a good idea.
I understand that this is against underlying layered MVC pattern itself, 
but
avoids a lot of headache. Can someone say what could be other disadvantage
of this.



-->
"Struts"..."Action"..."Struts in Action"..."Action in
Struts"...[possibly]"Action with Struts"..."Action over Struts"...?
-
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]


[Design Pattern]FormBean in Model Layer

2003-03-08 Thread Puneet Agarwal
We are in the stage of finalizing the design pattern for our project.

While discussing the design patterns with my colleagues,
somebody came with an idea to pass the FormBean as it is,
to the Session Bean or sometimes even to the Value List handler Block
Later I thought this can actually be a good idea.

I understand that this is against underlying layered MVC pattern itself, but
avoids a lot of headache. Can someone say what could be other disadvantage
of this.




-->
"Struts"..."Action"..."Struts in Action"..."Action in
Struts"...[possibly]"Action with Struts"..."Action over Struts"...?


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



Re: multiple select handling in Action

2003-03-08 Thread Dan Allen
> > Multiple selects return an array of strings so your form bean should have a 
> > String[] multiSelect member with accessors:
> > String[] getMultiSelect()
> > void setMultiSelect(String[])
> 
> Right, but if the method get() is defined as
> 
> public Object get()
> 
> then how do you do
> 
> String[] mySelect = form.get("mySelect");
> 
> ???  The compiler won't accept it.
> 
> Note that I have no form class and I am just using the get() and
> set() methods from the DynaValidatorActionForm

After a bit more research I noticed the toString() method for the
DynaValidatorActionForm class and by examining that I see that you
can work with an array like:

 Object value = form.get("mySelect");
 if (value.getClass().isArray())
 {
 int len = Array.getLength(value);
 if (int j = 0; j < len; j++)
 {
 System.out.println(Array.get(value, j));
 }
 }
 ... (similar for List and Map)

But how do I know when it is an array, a list or a Map as all of
those types are considered in the toString() method.

Assume my form is like

 
 first
 second
 

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
It is not enough to succeed.  Others must fail.  
 -- Gore Vidal
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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



Re: [Q] Indexing properties via bean values

2003-03-08 Thread Jeff Smith
Obviously, keeping everything in the bean would be simpler. But I have two
problems with that approach:

1) It complicates localization. If I keep everything in the properties file
I18N is much cleaner.
2) This is just one example of places where database-resident information is
going to be presented to the user. You could also imagine having the same
problem with product names, user roles and a whole whack of other things.
Sooner or later, I'm going to have to tackle bean-based indexing. Might as
well figure it out now.

Jefficus
- Original Message -
From: "Rick Reumann" <[EMAIL PROTECTED]>
>
> I haven't had to tackle this issue, but I was wondering if maybe a
> better approach would be to let the DB handle the proper language names
> as well for the different codes. Then based on whatever locale being
> used your query would make sure to select the appropriate country codes
> and names. In another words I was thinking you'd have a typical bean:
>
> Country {
>   String id; //CA
>   String description; //Canada
> }
>
> But your business logic that would return your Collection of these might
> take a Locale as a parameter so that it would return the Collection of
> Country objects populated with the proper language for the description
> field.
>
> Not sure if this is the best approach to take or not so I'm interested
> to hear what you finally go with.
>
> --
> Rick
>
>


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



Re: multiple select handling in Action

2003-03-08 Thread Dan Allen

David Graham ([EMAIL PROTECTED]) wrote:

> Multiple selects return an array of strings so your form bean should have a 
> String[] multiSelect member with accessors:
> String[] getMultiSelect()
> void setMultiSelect(String[])

Right, but if the method get() is defined as

public Object get()

then how do you do

String[] mySelect = form.get("mySelect");

???  The compiler won't accept it.

Note that I have no form class and I am just using the get() and
set() methods from the DynaValidatorActionForm

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Hey, somebody, sometime, somewhere, said something I think that 
just maybe might have been true but I think that I maybe 
didn't like it. 
 
F^CK IT, I'm suing everybody. 
 -- slashdot member in response to 
petswarehouse.com sueing google.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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



Re: multiple select handling in Action

2003-03-08 Thread David Graham
Multiple selects return an array of strings so your form bean should have a 
String[] multiSelect member with accessors:
String[] getMultiSelect()
void setMultiSelect(String[])

David



From: Dan Allen <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: multiple select handling in Action
Date: Sat, 8 Mar 2003 19:06:57 -0600
Okay, I realize that this list is flooded with questions about
multiple selects, but they are just dang confusing as all hell.
If I have a DynaForm and I want to have a multiple-select, what do I
put as the type attribute in the form-bean definition and when I use
the get() method, what does it return?

  

??? = form.get("selectElement")

Dan

--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"I am the GOD.the GOD...of house!"
 -- Leeloo
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

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


multiple select handling in Action

2003-03-08 Thread Dan Allen
Okay, I realize that this list is flooded with questions about
multiple selects, but they are just dang confusing as all hell.

If I have a DynaForm and I want to have a multiple-select, what do I
put as the type attribute in the form-bean definition and when I use
the get() method, what does it return?


  


??? = form.get("selectElement")

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"I am the GOD.the GOD...of house!" 
 -- Leeloo
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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



RE: how to catch exception using tiles thrown by e.g. org.apache.struts.tiles.TilesUtilStrutsModulesImpl.doInclude

2003-03-08 Thread Jörg Maurer
Wondering why i have no chance to catch any exception i did some
investigation on that topic , so i consulted the java logic of your
insert tag. it is that ~good~ shielded against any exception bubbling,
that my own error handler logic never gets a chance because ALL
EXCEPTIONS HAVE BEEN CAUGTH AND NEVER RETHROWN. next is snip from your
Insert Tag(commented out is your code, underneath that is what i want -
throw new JspException(ex.getMessage())) : 

} catch (ServletException ex) {
Throwable realEx = ex;
if (ex.getRootCause() != null) {
realEx = ex.getRootCause();
}
//  processException(
//  realEx,
//  "[ServletException in:" + page +
"] " + realEx.getMessage() + "'");
throw new JspException(ex.getMessage());
} catch (Exception ex) {
//  processException(ex, "[Exception in:" +
page + "] " + ex.getMessage());
throw new JspException(ex.getMessage());
} finally {
// restore old context
// done only if currentContext not null
(bug with Silverstream ?; related by Arvindra Sehmi 20010712)
if (currentContext != null)
pageContext.setAttribute(

ComponentConstants.COMPONENT_CONTEXT,
currentContext,

pageContext.REQUEST_SCOPE);

}
return EVAL_PAGE;

Looking at Geary´s template insert tag, he always chose to do "throw new
JspException(ex.getMessage());".

Your logic displays by default a simple stack trace(Exception type and
exception message) of where the tile should be. I dont want to show that
to my customer, but as i said, i have no change to display my  jsp-error
page instead.  

So if that "feature" is not here for any other reason, i consider that
being a unlucky design for me, because i have to at least vesion my own
tiles.jar or do some dirty subclassing your tag.

I would appreciate your comment.

Greets Jörg



-Original Message-
From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 06. März 2003 11:57
To: Struts Users Mailing List
Subject: Re: how to catch exception using tiles thrown by e.g.
org.apache.struts.tiles.TilesUtilStrutsModulesImpl.doInclude




Jörg Maurer wrote:

>>>Cedric 
>>>  
>>>
>exactly as you said,  is used. despite the big try-catch block
>approach, its unclear to me why error-page in web.xml doesn#t get a
try.
>
>Additionally i searched for similar behaviour and all i found was
>following 
>"page 52 of the JSP 1.2 spec : 
>Note: if autoFlush=true then if the contents of the initial Jsp-
>Writer has been flushed to the ServletResponse output stream
>then any subsequent attempt to dispatch an uncaught
>exception from the offending page to an errorPage may fail.
>When an error page is also indicated in the web.xml
>descriptor, the JSP error page applies first, then the web.xml
>page.".
>
>You as a more experienced one than myself, does it make some sense to
>the issue?
>
  This make sense: Your page is made of several tiles. The first ones 
have already been compute, and so some outputs have been flushed. Then, 
one of the  throw an exception. This exception is not catched

by the jsp mechanism because the output stream has already been flushed
...

   Cedric

>
>-Original Message-
>From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]
>Sent: Dienstag, 04. März 2003 18:35
>To: Struts Users Mailing List
>Subject: Re: how to catch exception using tiles thrown by e.g.
>org.apache.struts.tiles.TilesUtilStrutsModulesImpl.doInclude
>
>
>
>  I suppose that your exception is thrown by a  tag
in
>
>a jsp.
>  This exception is thrown by the tiles framework, which know nothing 
>about the struts exception mechanism, so it can't be used. The
exception
>
>is then propagated by the tag handler and reach the jsp page (the tile 
>jsp). If there is an exception handler associated to the jsp, it is 
>called, if there is no handler, the exception is propagated to parent 
>page inserting this one. If the parent page have inserted the child
page
>
>with an , then the  catch the exception and show
it.
>
>Normally, the jsp exception handling should work, but it appear that it

>is not always the case.
>
>  A workaround is to put a big try/catch in the jsp throwing the 
>exception ;-(. This will be improved in future versions.
>
> Cedric
>
>Jörg Maurer wrote:
>
>  
>
>>Hi struts people!
>>
>>I have really defined everywhere i think i can put an exception
handler
>>for servlet exception : 
>>1.) in my base layout

RE: Database datasource runtime configuration

2003-03-08 Thread Marco Tedone
You could create an XML configuration file and then parse it with
commons-digester(filling a Java Object with the XML relevant information). I
used this technique creating a class as a Struts PlugIn which parse an XML
configuration file and fill the resource my application needs.

Regards,

Marco

> -Original Message-
> From: Joao Araujo [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, March 08, 2003 3:52 AM
> To: [EMAIL PROTECTED]
> Subject: Database datasource runtime configuration
> 
> 
> 
> Hi,
> 
> 
>   I am using the configuration of the datasource/database 
> inside the 
> struts-config.xml file.
>   That 's been giving me some backwards. For example I 
> wish to change the 
> hostname
>   after installing the whole software. I, then, need to 
> open the file and 
> change the configuration
>   for this.
> 
>   I wish I could put this in another file and set the 
> configuration at run 
> time. Does anyone know
>   how to do that?
> 
>   SAMPLE CONFIGURATION
>   
>   
>type="org.apache.commons.dbcp.BasicDataSource">
>  
> value="oracle.jdbc.driver.OracleDriver" />
>  
> value="jdbc:oracle:thin:@db.db1.com:1521:"
>value="system" />
>value="manager" />
>value="select 1 from dual" />
>value="DBTEST Data Source 
> Configuration"/>
>   
>   
>value="false"/>
>   
>   
> 
>   Thanks,
> 
> Joao, 
> 
> 

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



RE: nested:checkbox fail to set the property to false

2003-03-08 Thread Jörg Maurer
despite the fact doing some research in that issue anywhere(gives 100+
q&a) which might give you better explanation than mine, flaw is in http
protocol, not sending name-value pairs of unchecked checkboxes back.

-Original Message-
From: Joao Araujo [mailto:[EMAIL PROTECTED]
Sent: Samstag, 08. März 2003 04:33
To: [EMAIL PROTECTED]
Subject: nested:checkbox fail to set the property to false


Hi,

I am using nested:checkbox for  a boolean property.
Unfortunately, struts is not setting the property of the
formbean
to false when I unchecked it on the screen. On the other hand
when I check the box , struts set the property correctly. Any
clue?


ENVIRONMENT.
1. Struts 1.1b2
2. Tomcat 4.1.12

Thanks a lot for the attention provided.

Joao, 


-
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: Database datasource runtime configuration

2003-03-08 Thread Jörg Maurer
use database pooling dbcp from jakarta commons instead - has connection
pooling and works like a charm + super setup description(despite some
flaws, but no problem for us being experienced ones ;-) ).

-Original Message-
From: Joao Araujo [mailto:[EMAIL PROTECTED]
Sent: Samstag, 08. März 2003 04:52
To: [EMAIL PROTECTED]
Subject: Database datasource runtime configuration



Hi,


I am using the configuration of the datasource/database inside
the 
struts-config.xml file.
That 's been giving me some backwards. For example I wish to
change the 
hostname
after installing the whole software. I, then, need to open the
file and 
change the configuration
for this.

I wish I could put this in another file and set the
configuration at run 
time. Does anyone know
how to do that?

SAMPLE CONFIGURATION














Thanks,

Joao, 


-
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: xslt in jsp

2003-03-08 Thread Jörg Maurer
definitly give JSTL a try! Myself not applied it, but read book by Bayer
Shawn - devoted taglibs to xml and xml transformation for usage in jsp. 

-Original Message-
From: bobd [mailto:[EMAIL PROTECTED]
Sent: Samstag, 08. März 2003 20:02
To: [EMAIL PROTECTED]
Subject: xslt in jsp


I have a jsp that needs to retrieve XML from a bean
(stored in the session) and then execute a
transformation.  

what is the easiest way to do this?  Having difficulty
using , as well as locating documentation
on this.  

thanks,
-b

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.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: Validator- List/Map-backed property validation

2003-03-08 Thread James Mitchell
The same developers on the dev list are also on the user list.


--
James Mitchell
Software Developer/Struts Evangelist
http://jakarta.apache.org/struts

"People demand freedom of speech to make up for the freedom of thought
which they avoid."
- Soren Aabye Kierkegaard (1813-1855)




> -Original Message-
> From: harish krishnaswamy [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, March 08, 2003 2:02 PM
> To: Struts Users Mailing List
> Subject: Re: Validator- List/Map-backed property validation
> 
> 
> I had already tried the struts-user list several times
> on this one and thought may be the developers would
> know.
> 
> -Harish
> 
> --- David Graham <[EMAIL PROTECTED]> wrote:
> > Please do not cross post.  This is a struts-user
> > question.
> > 
> > David
> > 
> > 
> > 
> > >From: harish krishnaswamy <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List"
> > <[EMAIL PROTECTED]>
> > >To: [EMAIL PROTECTED],
> > [EMAIL PROTECTED]
> > >Subject: Validator- List/Map-backed property
> > validation
> > >Date: Sat, 8 Mar 2003 09:54:28 -0800 (PST)
> > >
> > >Is there a way to validate a list/map-backed
> > property
> > >using validator in a generic fashion? For ex. i
> > would
> > >like to something like the following to validate
> > all
> > >the lastName fileds in the list/map:
> > >
> > >
> > >> >  property="lastName[*]"
> > >depends="required">
> > >  
> > >   
> > >
> > >
> > >-Harish
> > >
> > >__
> > >Do you Yahoo!?
> > >Yahoo! Tax Center - forms, calculators, tips, more
> > >http://taxes.yahoo.com/
> > >
> >
> >-
> > >To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > >For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> >
> _
> > Protect your PC - get McAfee.com VirusScan Online  
> >
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> > 
> > 
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.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: Validator- List/Map-backed property validation

2003-03-08 Thread harish krishnaswamy
I had already tried the struts-user list several times
on this one and thought may be the developers would
know.

-Harish

--- David Graham <[EMAIL PROTECTED]> wrote:
> Please do not cross post.  This is a struts-user
> question.
> 
> David
> 
> 
> 
> >From: harish krishnaswamy <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED],
> [EMAIL PROTECTED]
> >Subject: Validator- List/Map-backed property
> validation
> >Date: Sat, 8 Mar 2003 09:54:28 -0800 (PST)
> >
> >Is there a way to validate a list/map-backed
> property
> >using validator in a generic fashion? For ex. i
> would
> >like to something like the following to validate
> all
> >the lastName fileds in the list/map:
> >
> >
> >>  property="lastName[*]"
> >depends="required">
> >  
> >   
> >
> >
> >-Harish
> >
> >__
> >Do you Yahoo!?
> >Yahoo! Tax Center - forms, calculators, tips, more
> >http://taxes.yahoo.com/
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
_
> Protect your PC - get McAfee.com VirusScan Online  
>
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



xslt in jsp

2003-03-08 Thread bobd
I have a jsp that needs to retrieve XML from a bean
(stored in the session) and then execute a
transformation.  

what is the easiest way to do this?  Having difficulty
using , as well as locating documentation
on this.  

thanks,
-b

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



RE: nested:checkbox fail to set the property to false

2003-03-08 Thread Sri Sankaran


> -Original Message-
> From: Joao Araujo [mailto:[EMAIL PROTECTED] 
> Sent: Friday, March 07, 2003 10:33 PM
> To: [EMAIL PROTECTED]
> Subject: nested:checkbox fail to set the property to false
> 
> 
> Hi,
> 
>   I am using nested:checkbox for  a boolean property.
>   Unfortunately, struts is not setting the property of 
> the formbean
>   to false when I unchecked it on the screen. On the other hand
>   when I check the box , struts set the property 
> correctly. Any clue?
> 

A value for a checkbox is sent by the browser to the server only when it is checked.  
This is how HTTP works and has nothing to do with Struts.  Please read the docs at 
http://jakarta.apache.org/struts/userGuide/struts-html.html#checkbox for how to handle 
checkboxes ( is just an extension of  
>   ENVIRONMENT.
>   1. Struts 1.1b2
>   2. Tomcat 4.1.12
> 
>   Thanks a lot for the attention provided.
> 
> Joao, 
> 

Sri

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



RE: basic question

2003-03-08 Thread Sri Sankaran

> 1)The question I have is where will the JSP's reside.
> will they be deployed on the web-server or the
> application server.
> 

JavaServer Pages (JSPs) help build the HTML that will be rendered on the client 
(browser).  Since one person's application server is not in another's lexicon, let me 
say that JSPs must reside in the environment of a servlet container (such as Tomcat).  

A plain web-server (such as IIS or Apache) wouldn't know that to do with them.  A 
web-server deals only with HTML artifacts.  JSPs on the other hand can be comprised of 
HTML tags, specialized tags and Java code.  Everything get converted (I am glossing 
over the details here) into HTML before getting routed back to the client.  Some 
servlet engines (such as Tomcat) serve dual roles -- as web-server and as a servlet 
engine.

> 2)where will struts reside,I think anwser to the first
> question should answer this.
> 

Needs a servlet container.

> Thanks
> Gopi
> 

Sri

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



Re: Validator- List/Map-backed property validation

2003-03-08 Thread David Graham
Please do not cross post.  This is a struts-user question.

David



From: harish krishnaswamy <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Validator- List/Map-backed property validation
Date: Sat, 8 Mar 2003 09:54:28 -0800 (PST)
Is there a way to validate a list/map-backed property
using validator in a generic fashion? For ex. i would
like to something like the following to validate all
the lastName fileds in the list/map:

  
 
  

-Harish

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

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


RE: JSF

2003-03-08 Thread Craig R. McClanahan


On Fri, 7 Mar 2003, Jacob Hookom wrote:

> Date: Fri, 7 Mar 2003 19:20:54 -0600
> From: Jacob Hookom <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED]
> Subject: RE: JSF
>
> No problems downloading, but wait for EA4, EA3 has a major bug in it and
> won't even initialize on tomcat 4.18+
>

Jacob, that is a *very* presumptious statement when it works fine for most
people :-).  The appropriate next step is to identify what's different
about the installations where it fails, so that we can fix it, instead of
making incorrect generalizations.

Craig McClanahan (who has personally run EA3 out-of-the-box on Tomcat
4.1.18 out-of-the-box on Windows, Linux, and Solaris systems)


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



Re: Validator- List/Map-backed property validation

2003-03-08 Thread Matt Raible
> Is there a way to validate a list/map-backed property
> using validator in a generic fashion? For ex. i would
> like to something like the following to validate all
> the lastName fileds in the list/map:
> 
> 
> property="lastName[*]"
>depends="required">
>  
>   
> 
> 
> -Harish
> 

Not currently, but IMO - there should be! ;0)


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



Validator- List/Map-backed property validation

2003-03-08 Thread harish krishnaswamy
Is there a way to validate a list/map-backed property
using validator in a generic fashion? For ex. i would
like to something like the following to validate all
the lastName fileds in the list/map:


  
 
  


-Harish

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Re: Help: Using for editable fields.

2003-03-08 Thread harish krishnaswamy


<%
String ln = "lastName(ln-" + idx + ")";
String add = "address(ad-" + idx + ")";
%>

<%="ln: " + ln%>
<%="add: " + add%>

Last Name:





Address:  




I have used a map-backed property instead of an
array/list. This is because if you have a missing
address, using an array/list would mess the
relationship between the fields. Also, note that I
have used a rowids list that is used behind the scenes
to maintain the relationships between the fields.

Harish


--- Samit Goyal <[EMAIL PROTECTED]> wrote:
> 
> 
> 
> > Hi All,
> >
> >
> > I have three String Arrays (wiz firstName and
> lastName) in my form bean.
> > Each array contains 3 elements. I want to display
> them in my jsp in form
> of
> > 3 rows and each row shall contain both
> fields.Something like this:-
> >
> > row 1 > firstName lastName
> > row 2 > firstName lastName
> > row 3 > firstName lastName
> >
> > Also i want that , upon submission of the form the
> struts shall set the
> > values in the respective String[] fields
> automatically
> > My problem is that I dont know that on which array
> shall i Iterate using
> >  tag? If i use three
>  tags, one for each
> > field, then i am not able to show them in a Row.
> >
> >  property="firstName" name="myFormBean">
> >   
> > 
> >  property="firstName"
> > value="<%=strFirstName.toString()%>" />
> > 
> > 
> > 
> >
> >  property="lastName" name="myFormBean">
> >   
> > 
> >  property="lastName"
> > value="<%=strLastName.toString()%>" />
> > 
> > 
> > 
> >
> > For this kind of functionality what is the best
> way. I want that struts
> > shall iterate over a collection for displaying
> records and shall populate
> > them automatically upon submission of form. Also i
> want to retain the
> > presentation in the above metioned fashion.
> >
> >  Please help...
> >
> > Regards,
> > Samit
> > > > > > > > -Original Message-
> > > > > > > > From: David Graham
> [mailto:[EMAIL PROTECTED]
> > > > > > > > Sent: Wednesday, March 05, 2003 11:32
> PM
> > > > > > > > To: [EMAIL PROTECTED]
> > > > > > > > Subject: Re: Can  be
> used for editable fields?
> > > > > > > >
> > > > > > > >
> > > > > > > > You're not disturbing anyone on the
> list :-).  We're here
> > > > > > > > because we want
> > > > > > > > to, not because we have to.
> > > > > > > >
> > > > > > > > David
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > >From: "Samit Goyal"
> <[EMAIL PROTECTED]>
> > > > > > > > >Reply-To: "Struts Users Mailing List"
> > > > > > > > <[EMAIL PROTECTED]>
> > > > > > > > >To: "Struts Users Mailing List"
> > > > <[EMAIL PROTECTED]>
> > > > > > > > >Subject: Re: Can  be
> used for editable fields?
> > > > > > > > >Date: Thu, 6 Mar 2003 10:10:11 +0530
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >Thanks a lot David . You solved my
> big problem.
> > > > > > > > >
> > > > > > > > >I will try this out...hope i wont
> need to disturb
> > > > you again :-)
> > > > > > > > >
> > > > > > > > >Thanks again.,
> > > > > > > > >Samit
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >- Original Message -
> > > > > > > > >From: "David Graham"
> <[EMAIL PROTECTED]>
> > > > > > > > >To: <[EMAIL PROTECTED]>
> > > > > > > > >Sent: Thursday, March 06, 2003 9:48
> AM
> > > > > > > > >Subject: Re: Can  be
> used for editable fields?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > > Simply put an  tag
> inside your iteration.  All
> > > > > > > > your text
> > > > > > > > >inputs
> > > > > > > > > > will be the same name so you need
> a String[] variable in
> > > > > > > > your form bean
> > > > > > > > >to
> > > > > > > > > > hold all of the entries.
> > > > > > > > > >
> > > > > > > > > > David
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > >From: "Samit Goyal"
> <[EMAIL PROTECTED]>
> > > > > > > > > > >Reply-To: "Struts Users Mailing
> List"
> > > > > > > > <[EMAIL PROTECTED]>
> > > > > > > > > > >To: "strtus list"
> <[EMAIL PROTECTED]>
> > > > > > > > > > >Subject: Can  be
> used for editable fields?
> > > > > > > > > > >Date: Thu, 6 Mar 2003 09:57:25
> +0530
> > > > > > > > > > >
> > > > > > > > > > >Hi all,
> > > > > > > > > > >
> > > > > > > > > > >I am forwarding again this mail
> to you all, Since i
> > > > > > > > didnt get any
> > > > > > > > >reply.
> > > > > > > > > > >May
> > > > > > > > > > >be that my problem was not clear.
> I am putting this
> > > > > > again in a
> > > > > > > > >different
> > > > > > > > > > >way.
> > > > > > > > > > >
> > > > > > > > > > >I konw how to display the list of
> un-editable
> > > > fields by using
> > > > > > > > > > > but i want to
> display list of Editable
> > > > > > > > fields, so that
> > > > > > > > >upon
> > > > > > > > > > >submission of the form, all the
> user enterd values shall
> > 

Re: [Q] Indexing properties via bean values

2003-03-08 Thread Rick Reumann
On Fri, Mar 07,'03 (09:54 PM GMT-0700), Jeff wrote: 

> In my database, I have country codes. CA for Canada, US for the
> States, DE for Germany, etc.
> 
> I'd like to have "friendly" names associated with each, and I'd like
> to put them in the application.properties so that they can be
> localized for different languages.
> 
> So I put some entries into the resources file like so:
> countryname.CA=Canada
> countryname.DE=Germany
> countryname.US=United States

I haven't had to tackle this issue, but I was wondering if maybe a
better approach would be to let the DB handle the proper language names
as well for the different codes. Then based on whatever locale being
used your query would make sure to select the appropriate country codes
and names. In another words I was thinking you'd have a typical bean:

Country {
  String id; //CA
  String description; //Canada
}

But your business logic that would return your Collection of these might
take a Locale as a parameter so that it would return the Collection of
Country objects populated with the proper language for the description
field. 

Not sure if this is the best approach to take or not so I'm interested
to hear what you finally go with.

-- 
Rick

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



basic question

2003-03-08 Thread Gopinath Akula
Hi Guys,
I am kind of new to the web-development. 

1)The question I have is where will the JSP's reside.
will they be deployed on the web-server or the
application server.

2)where will struts reside,I think anwser to the first
question should answer this.

Thanks
Gopi

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Re: PropertyUtils.copyProperties and DynaActionForm concepts

2003-03-08 Thread Joseph Fifield
What about BeanUtils.copyProperties? AFAIK, PropertyUtils.copyProperties
assumes the source and destination properties are the same datatype and no
conversion is done, but BeanUtils.copyProperties handles conversions to a
different datatype using the help of ConvertUtils. Maybe this is the
problem...?

Joe

- Original Message -
From: "Joao Araujo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 07, 2003 10:46 PM
Subject: PropertyUtils.copyProperties and DynaActionForm concepts


> Hi,
>
> Nowadays I use PropertyUtils.copyProperties to make the copy of property
from
> the form to the database Bean easier. But, I realized that I cant use it
> the same
> way with DynaActionForm. What have you guys been using in this situation.
>
> Ex. of using propertyUtils.
> PropertyUtils.copyProperties(device, deviceForm);
>
>
> Thanks in advance.
>
> Joao,
>
>
> -
> 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]



Help: Using for editable fields.

2003-03-08 Thread Samit Goyal



> Hi All,
>
>
> I have three String Arrays (wiz firstName and lastName) in my form bean.
> Each array contains 3 elements. I want to display them in my jsp in form
of
> 3 rows and each row shall contain both fields.Something like this:-
>
> row 1 > firstName lastName
> row 2 > firstName lastName
> row 3 > firstName lastName
>
> Also i want that , upon submission of the form the struts shall set the
> values in the respective String[] fields automatically
> My problem is that I dont know that on which array shall i Iterate using
>  tag? If i use three  tags, one for each
> field, then i am not able to show them in a Row.
>
> 
>   
> 
>  value="<%=strFirstName.toString()%>" />
> 
> 
> 
>
> 
>   
> 
>  value="<%=strLastName.toString()%>" />
> 
> 
> 
>
> For this kind of functionality what is the best way. I want that struts
> shall iterate over a collection for displaying records and shall populate
> them automatically upon submission of form. Also i want to retain the
> presentation in the above metioned fashion.
>
>  Please help...
>
> Regards,
> Samit
> > > > > > > -Original Message-
> > > > > > > From: David Graham [mailto:[EMAIL PROTECTED]
> > > > > > > Sent: Wednesday, March 05, 2003 11:32 PM
> > > > > > > To: [EMAIL PROTECTED]
> > > > > > > Subject: Re: Can  be used for editable fields?
> > > > > > >
> > > > > > >
> > > > > > > You're not disturbing anyone on the list :-).  We're here
> > > > > > > because we want
> > > > > > > to, not because we have to.
> > > > > > >
> > > > > > > David
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > >From: "Samit Goyal" <[EMAIL PROTECTED]>
> > > > > > > >Reply-To: "Struts Users Mailing List"
> > > > > > > <[EMAIL PROTECTED]>
> > > > > > > >To: "Struts Users Mailing List"
> > > <[EMAIL PROTECTED]>
> > > > > > > >Subject: Re: Can  be used for editable fields?
> > > > > > > >Date: Thu, 6 Mar 2003 10:10:11 +0530
> > > > > > > >
> > > > > > > >
> > > > > > > >Thanks a lot David . You solved my big problem.
> > > > > > > >
> > > > > > > >I will try this out...hope i wont need to disturb
> > > you again :-)
> > > > > > > >
> > > > > > > >Thanks again.,
> > > > > > > >Samit
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >- Original Message -
> > > > > > > >From: "David Graham" <[EMAIL PROTECTED]>
> > > > > > > >To: <[EMAIL PROTECTED]>
> > > > > > > >Sent: Thursday, March 06, 2003 9:48 AM
> > > > > > > >Subject: Re: Can  be used for editable fields?
> > > > > > > >
> > > > > > > >
> > > > > > > > > Simply put an  tag inside your iteration.  All
> > > > > > > your text
> > > > > > > >inputs
> > > > > > > > > will be the same name so you need a String[] variable in
> > > > > > > your form bean
> > > > > > > >to
> > > > > > > > > hold all of the entries.
> > > > > > > > >
> > > > > > > > > David
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > >From: "Samit Goyal" <[EMAIL PROTECTED]>
> > > > > > > > > >Reply-To: "Struts Users Mailing List"
> > > > > > > <[EMAIL PROTECTED]>
> > > > > > > > > >To: "strtus list" <[EMAIL PROTECTED]>
> > > > > > > > > >Subject: Can  be used for editable fields?
> > > > > > > > > >Date: Thu, 6 Mar 2003 09:57:25 +0530
> > > > > > > > > >
> > > > > > > > > >Hi all,
> > > > > > > > > >
> > > > > > > > > >I am forwarding again this mail to you all, Since i
> > > > > > > didnt get any
> > > > > > > >reply.
> > > > > > > > > >May
> > > > > > > > > >be that my problem was not clear. I am putting this
> > > > > again in a
> > > > > > > >different
> > > > > > > > > >way.
> > > > > > > > > >
> > > > > > > > > >I konw how to display the list of un-editable
> > > fields by using
> > > > > > > > > > but i want to display list of Editable
> > > > > > > fields, so that
> > > > > > > >upon
> > > > > > > > > >submission of the form, all the user enterd values shall
> > > > > > > be stored in
> > > > > > > >some
> > > > > > > > > >form bean variable!
> > > > > > > > > >
> > > > > > > > > >What's the easiest way out. i dont want to create a
> > > > > > > different variable
> > > > > > > >in
> > > > > > > > > >the form bean for each individual text field displayed
> > > > > > > on the screen.
> > > > > > > > > >
> > > > > > > > > >Please excuse me for what may be a stupid question for
> > > > > > > you! but I am
> > > > > > > >new
> > > > > > > >to
> > > > > > > > > >the struts and desperately looking for the solution.
> > > > > > > > > >
> > > > > > > > > >Regards,
> > > > > > > > > >Samit
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > Hi all,
> > > > > > > > > > >
> > > > > > > > > > > I am having a JSP which contains 12 rows of editable
> > > > > > > fields. The
> > > > > > > >each
> > > > > > > > > >row
> > > > > > > > > > > contains same type of editable fields.
> > > > > > > > > > >
> > > > > > > > > > > Now, how

FW: Commons Logging Configuration

2003-03-08 Thread Marco Tedone


-Original Message-
From: ashokd [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 08, 2002 3:57 AM
To: Marco Tedone
Subject: Re: Commons Logging Configuration


Hi Marco,

Thanks for your help. Their is any documentation on this?
Your mail helps me a lot.

Thanks & Regards,
Ashok.D
- Original Message -
From: "Marco Tedone" <[EMAIL PROTECTED]>
To: "'ashokd'" <[EMAIL PROTECTED]>
Sent: Saturday, March 08, 2003 3:35 AM
Subject: RE: Commons Logging Configuration


> Hi, I put a commons-logging.properties file under WEB-INF/classes
directory
> with the following content:
>
>
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4jCategory
> Log
>
> Then, you still need to configure the log4j properties file or xml 
> file. Here there is an example of what I've done:
>
> 
> 
>
> 
>
>   
> 
>   
> 
>   
>
>   
>   
> 
>   
> 
>   
>
>   
> 
> 
> 
> 
> 
>   
> 
>   
>
>   
>  class="org.jboss.logging.appender.DailyRollingFileAppender">
> 
> 
> 
>
> 
> 
>
> 
>
> 
> 
>
> 
> 
>
> 
> 
>
>
>
>   
> 
> 
> 
> 
>   
>
> 
>
>
>
> I then have a Service Factory(configured as a Struts PlugIn) to which 
> I
ask
> any service I need: in the case of the logger I created the following
> method:
>
> /**
> * Returns an instance of the commons-logging Log logger
> * @return An instance of the commons logger
> */
> public Log getLoggerService(Object client) {
>
> String prefix = 
> getActionServlet().getServletContext().getRealPath("/");
> //The Logger Configuration Location is passed as a PlugIn property in 
> the struts-config.xml file String file = getLoggerConfigLocation();
>
>
> // since we have not yet set up our log4j environment,
> // we will use System.err for some basic information 
> System.out.println("Using properties file: " + prefix + file);
>
>
> // Set system property to set the destination dir for log files
> System.setProperty("log4j.log.dir", prefix);
>
> if(file== null || file.length() == 0){
> // || !(new File(file)).isFile()){
>
> System.err.println(
> "ERROR: Cannot read the configuration file. " +
> "Please check the path of the config init param in
> web.xml");
> }
> else {
> DOMConfigurator.configure(prefix+file);
> }
>
> return LogFactory.getLog(client.getClass());
> }
>
> Hope it will help
>
> > -Original Message-
> > From: ashokd [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 07, 2002 6:45 AM
> > To: Struts Users Mailing List
> > Subject: Commons Logging Configuration
> >
> >
> > Hi,
> >
> > I have a question regarding configuration of  Commons Logging 
> > (for Log4j). Where I need to place this configuration property file. 
> > Their is any user guide to configure commons Logging.
> >
> > Thanks & Regards,
> > Ashok.D
> >
> >
>

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



[Q] Indexing properties via bean values

2003-03-08 Thread Jeff Smith
In my database, I have country codes. CA for Canada, US for the States, DE for 
Germany, etc.

I'd like to have "friendly" names associated with each, and I'd like to put them in 
the application.properties so that they can be localized for different languages.

So I put some entries into the resources file like so:
countryname.CA=Canada
countryname.DE=Germany
countryname.US=United States

And in a request-scope arraylist bean, called countrycodes, I have the list: CA, DE, 
US...

I'd like to be able to populate a selection list that displays friendly names, and 
returns the countrycodes as values.

Now I'm trying to figure out how to construct the struts-bean message key to access 
the long names.

I've tried several approaches and have only succeeded in crashing the servlet compiler.

Have I painted myself into a corner with this approach, or is it doable?

Jefficus

Indirect page tiles

2003-03-08 Thread Jeff Smith
I have a master template that lays out my standard screen. Most of the display pages 
that I show are built from that template. But a bunch of the pages I show are 
"message"-type pages. Screens like: You have logged in successfully. Click here to 
continue. " or "You are not authorized to view that page. Please click here to return 
to the main page."

Since these message pages may include graphics and links, I have been creating 
individual tiles for each one, rather than just using message properties. But the 
problem is that I am also having to create individual wrapper pages for each, simply 
because I don't know how to create an indirect page. 

I want to invoke MessagePage.jsp, and pass it some parameter that tells it to load 
message=LogonSuccessTile.jsp or UnauthorizedUserTile.jsp.

I'm pretty sure this is trivial, but I haven't been able to figure it out.

Thanks,
Jefficus

displaying rows of editable fields using String[] for each field in the form Bean

2003-03-08 Thread Samit Goyal
Hi All,


I have three String Arrays (wiz firstName and lastName) in my form bean.
Each array contains 3 elements. I want to display them in my jsp in form of
3 rows and each row shall contain both fields.Something like this:-

row 1 > firstName lastName
row 2 > firstName lastName
row 3 > firstName lastName

Also i want that , upon submission of the form the struts shall set the
values in the respective String[] fields automatically
My problem is that I dont know that on which array shall i Iterate using
 tag? If i use three  tags, one for each
field, then i am not able to show them in a Row.


  







  






For this kind of functionality what is the best way. I want that struts
shall iterate over a collection for displaying records and shall populate
them automatically upon submission of form. Also i want to retain the
presentation in the above metioned fashion.

 Please help...

Regards,
Samit
> > > > > > -Original Message-
> > > > > > From: David Graham [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Wednesday, March 05, 2003 11:32 PM
> > > > > > To: [EMAIL PROTECTED]
> > > > > > Subject: Re: Can  be used for editable fields?
> > > > > >
> > > > > >
> > > > > > You're not disturbing anyone on the list :-).  We're here
> > > > > > because we want
> > > > > > to, not because we have to.
> > > > > >
> > > > > > David
> > > > > >
> > > > > >
> > > > > >
> > > > > > >From: "Samit Goyal" <[EMAIL PROTECTED]>
> > > > > > >Reply-To: "Struts Users Mailing List"
> > > > > > <[EMAIL PROTECTED]>
> > > > > > >To: "Struts Users Mailing List"
> > <[EMAIL PROTECTED]>
> > > > > > >Subject: Re: Can  be used for editable fields?
> > > > > > >Date: Thu, 6 Mar 2003 10:10:11 +0530
> > > > > > >
> > > > > > >
> > > > > > >Thanks a lot David . You solved my big problem.
> > > > > > >
> > > > > > >I will try this out...hope i wont need to disturb
> > you again :-)
> > > > > > >
> > > > > > >Thanks again.,
> > > > > > >Samit
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >- Original Message -
> > > > > > >From: "David Graham" <[EMAIL PROTECTED]>
> > > > > > >To: <[EMAIL PROTECTED]>
> > > > > > >Sent: Thursday, March 06, 2003 9:48 AM
> > > > > > >Subject: Re: Can  be used for editable fields?
> > > > > > >
> > > > > > >
> > > > > > > > Simply put an  tag inside your iteration.  All
> > > > > > your text
> > > > > > >inputs
> > > > > > > > will be the same name so you need a String[] variable in
> > > > > > your form bean
> > > > > > >to
> > > > > > > > hold all of the entries.
> > > > > > > >
> > > > > > > > David
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > >From: "Samit Goyal" <[EMAIL PROTECTED]>
> > > > > > > > >Reply-To: "Struts Users Mailing List"
> > > > > > <[EMAIL PROTECTED]>
> > > > > > > > >To: "strtus list" <[EMAIL PROTECTED]>
> > > > > > > > >Subject: Can  be used for editable fields?
> > > > > > > > >Date: Thu, 6 Mar 2003 09:57:25 +0530
> > > > > > > > >
> > > > > > > > >Hi all,
> > > > > > > > >
> > > > > > > > >I am forwarding again this mail to you all, Since i
> > > > > > didnt get any
> > > > > > >reply.
> > > > > > > > >May
> > > > > > > > >be that my problem was not clear. I am putting this
> > > > again in a
> > > > > > >different
> > > > > > > > >way.
> > > > > > > > >
> > > > > > > > >I konw how to display the list of un-editable
> > fields by using
> > > > > > > > > but i want to display list of Editable
> > > > > > fields, so that
> > > > > > >upon
> > > > > > > > >submission of the form, all the user enterd values shall
> > > > > > be stored in
> > > > > > >some
> > > > > > > > >form bean variable!
> > > > > > > > >
> > > > > > > > >What's the easiest way out. i dont want to create a
> > > > > > different variable
> > > > > > >in
> > > > > > > > >the form bean for each individual text field displayed
> > > > > > on the screen.
> > > > > > > > >
> > > > > > > > >Please excuse me for what may be a stupid question for
> > > > > > you! but I am
> > > > > > >new
> > > > > > >to
> > > > > > > > >the struts and desperately looking for the solution.
> > > > > > > > >
> > > > > > > > >Regards,
> > > > > > > > >Samit
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > > Hi all,
> > > > > > > > > >
> > > > > > > > > > I am having a JSP which contains 12 rows of editable
> > > > > > fields. The
> > > > > > >each
> > > > > > > > >row
> > > > > > > > > > contains same type of editable fields.
> > > > > > > > > >
> > > > > > > > > > Now, how shall i handle it in the Form Bean.
> > > > Shall i create 12
> > > > > > >different
> > > > > > > > > > fields for each row or can I use Array/List for that.
> > > > > > > > > >
> > > > > > > > > > Will struts set the fields in the Array Object of
> > > > form bean
> > > > > > > > >automatically??
> > > > > > > > > >
> > > > > > > > > > Thanks in Advance.
> > > > >

[HK] BeanUtils - copy map of maps to bean of maps

2003-03-08 Thread harish krishnaswamy
Is there a way to copy a map of maps to a bean of maps
using BeanUtils?

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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