struts tags in pages

2002-03-05 Thread rob

I've seen several examples of this in the mail archives but for some reason
I'm unable to make it work.

I have a base page foo.jsp


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







and an included page that contains a bunch of things amongst them a usage of
the struts iterator tag



">page


unfortunately it doesn't work I get complaints about an attribute having no
value.  (presumably the path
attribute)

I've also tried the <%@include .. static include without success.  I know
I'm not using the struts html:link
tag here (because I can't use mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 




Re: Multiple submit buttons solution

2002-03-05 Thread Peter Severin

Hi Keith,

Yes you can use links but sometimes you need to submit the form for each
action. I'll give you an example:




Question name
Question text


Re: Multiple submit buttons solution

2002-03-05 Thread Peter Severin

Hi Oliver,

Submit input tag value is actualy the label you see in the browser. So it should be 
something like Edit,Delete etc. And don't forget i18n issues.

Regards,
Peter.
- Original Message -

why not use :

or


olivier





smime.p7s
Description: S/MIME Cryptographic Signature


Re: simper-NeXt

2002-03-05 Thread Arron Bates

Almost.
NeXt is only working off of Bean properties, and as with all beans, it 
doesn't care as to what goes on behind those method definitions. The 
constructor is one of those details it cares not about.

So as long as the simper beans have bean property conformity (eg: 
getMyProperty, setMyProperty) then the beans are ready to go with NeXt 
as they are wihout mods. I'd be very surprised if it needed mods, 
really. You can use Castor types straight up because the properties are 
valid bean properties.

A nested bean is simply one object that is returned by the method of 
another. As each property getter method has "get" on the front of it, 
we're laughin'. At the point of changing a property, you'll need that 
"set" on the front of it, naturally. For example, to get the nesting 
level deeper in my Monkey examples, I had a "fake" nested property that 
returned "this".

eg:
public MonkeyBean getOtherMonkey() { return this; }

To the internals of BeanUtils (the part of Struts that makes it all 
happen), it's treated as an entirely different object. It makes no other 
assumptions, rightly so. The system is that explicit.

Just give it a bash. Run a simper model through the NeXt tags. I lay my 
money on it working as-is.

Arron.


John Menke wrote:

> I'm working through the Simper examples and the NeXt examples and 
> trying to
> understand how I can use both together. Here is what I have so far:
>
>
> In the NeXt you associate nested beans with a parent and children
> relationship by inserting a private member variable to the parent bean 
> the
> will create a new child bean:
>
> ie.
>
> 
>
> private BunchBean bunchBean = new BunchBean();
>
>
> This will give us a new instance of the BunchBean when this MonkeyBean is
> created. Just what we want. Now we need to provide the getter method 
> to the
> bean under the property name "pickedBunch". This will create a getter 
> which
> will look something like this example...
>
> Example...
>public BunchBean getPickedBunch() {
>  return this.bunchBean;
>
> 
>
> This enables you to make forms like this:
>
> 
>
> 
>Monkey Name: 
>Monkey Age: 
>
>
>  Bunch Size: 
>  Bunch Weight: 
>  Bunch Price: 
>
>
>
>Submit Form
>  
>
> 
>
> In order to use the NeXt with Simper it looks like the SimperBeans 
> will need
> to include methods like those above in order to establish the 
> relationship.
>
> Is this correct? If so, Simper will not work with the NeXt in it's 
> current
> form.
>
> I think if this can be coded Simper should be able to dynamically 
> update the
> contents of a database since the nested beans have their Set methods 
> called
> automatically since they are nested within the ActionForm bean?  
> (Aaron is
> this correct?)
>
> Inserts into the database will require creation of a new bean and can be
> handled by logic in the Action that will create a SimperBean with
> information obtained from the ActionForm.
>
> It says in the Simper source code comments that deletes happen
> automatically.  I'm not sure at the moment how this is going to work.  I
> think you could call the Simper delete method from an Action but not sure
> how the automatic part effects this.  Does the automatic feature of 
> deletes
> in Simper just mean that you don't have to call the writechanges() 
> method in
> Simper?
>
>
> Any comments and additions will be appreciated.  In my opinion, the
> integration of these two struts additions could be extremely useful.
>
> Bryan, (If we have to) do you think it's worth adding some code to 
> Simper to
> integrate with the NeXt?
>
> -john 




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




Re: simper-NeXt

2002-03-05 Thread Arron Bates

Almost.
NeXt is only working off of Bean properties, and as with all beans, it 
doesn't care as to what goes on behind those method definitions. The 
constructor is one of those details it cares not about.

So as long as the simper beans have bean property conformity (eg: 
getMyProperty, setMyProperty) then the beans are ready to go with NeXt 
as they are wihout mods. I'd be very surprised if it needed mods, 
really. You can use Castor types straight up because the properties are 
valid bean properties.

A nested bean is simply one object that is returned by the method of 
another. As each property getter method has "get" on the front of it, 
we're laughin'. At the point of changing a property, you'll need that 
"set" on the front of it, naturally. For example, to get the nesting 
level deeper in my Monkey examples, I had a "fake" nested property that 
returned "this".

eg:
public MonkeyBean getOtherMonkey() { return this; }

To the internals of BeanUtils (the part of Struts that makes it all 
happen), it's treated as an entirely different object. It makes no other 
assumptions, rightly so. The system is that explicit.

Just give it a bash. Run a simper model through the NeXt tags. I lay my 
money on it working as-is.

Arron.


John Menke wrote:

>I'm working through the Simper examples and the NeXt examples and trying to
>understand how I can use both together. Here is what I have so far:
>
>
>In the NeXt you associate nested beans with a parent and children
>relationship by inserting a private member variable to the parent bean the
>will create a new child bean:
>
>ie.
>
>
>
>private BunchBean bunchBean = new BunchBean();
>
>
>This will give us a new instance of the BunchBean when this MonkeyBean is
>created. Just what we want. Now we need to provide the getter method to the
>bean under the property name "pickedBunch". This will create a getter which
>will look something like this example...
>
>Example...
>public BunchBean getPickedBunch() {
>  return this.bunchBean;
>
>
>
>This enables you to make forms like this:
>
>
>
>
>Monkey Name: 
>Monkey Age: 
>
>
>  Bunch Size: 
>  Bunch Weight: 
>  Bunch Price: 
>
>
>
>Submit Form
>  
>
>
>
>In order to use the NeXt with Simper it looks like the SimperBeans will need
>to include methods like those above in order to establish the relationship.
>
>Is this correct? If so, Simper will not work with the NeXt in it's current
>form.
>
>I think if this can be coded Simper should be able to dynamically update the
>contents of a database since the nested beans have their Set methods called
>automatically since they are nested within the ActionForm bean?  (Aaron is
>this correct?)
>
>Inserts into the database will require creation of a new bean and can be
>handled by logic in the Action that will create a SimperBean with
>information obtained from the ActionForm.
>
>It says in the Simper source code comments that deletes happen
>automatically.  I'm not sure at the moment how this is going to work.  I
>think you could call the Simper delete method from an Action but not sure
>how the automatic part effects this.  Does the automatic feature of deletes
>in Simper just mean that you don't have to call the writechanges() method in
>Simper?
>
>
>Any comments and additions will be appreciated.  In my opinion, the
>integration of these two struts additions could be extremely useful.
>
>Bryan, (If we have to) do you think it's worth adding some code to Simper to
>integrate with the NeXt?
>
>-john
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



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




simper-NeXt

2002-03-05 Thread John Menke

I'm working through the Simper examples and the NeXt examples and trying to
understand how I can use both together. Here is what I have so far:


In the NeXt you associate nested beans with a parent and children
relationship by inserting a private member variable to the parent bean the
will create a new child bean:

ie.



private BunchBean bunchBean = new BunchBean();


This will give us a new instance of the BunchBean when this MonkeyBean is
created. Just what we want. Now we need to provide the getter method to the
bean under the property name "pickedBunch". This will create a getter which
will look something like this example...

Example...
public BunchBean getPickedBunch() {
  return this.bunchBean;



This enables you to make forms like this:




Monkey Name: 
Monkey Age: 


  Bunch Size: 
  Bunch Weight: 
  Bunch Price: 



Submit Form
  



In order to use the NeXt with Simper it looks like the SimperBeans will need
to include methods like those above in order to establish the relationship.

Is this correct? If so, Simper will not work with the NeXt in it's current
form.

I think if this can be coded Simper should be able to dynamically update the
contents of a database since the nested beans have their Set methods called
automatically since they are nested within the ActionForm bean?  (Aaron is
this correct?)

Inserts into the database will require creation of a new bean and can be
handled by logic in the Action that will create a SimperBean with
information obtained from the ActionForm.

It says in the Simper source code comments that deletes happen
automatically.  I'm not sure at the moment how this is going to work.  I
think you could call the Simper delete method from an Action but not sure
how the automatic part effects this.  Does the automatic feature of deletes
in Simper just mean that you don't have to call the writechanges() method in
Simper?


Any comments and additions will be appreciated.  In my opinion, the
integration of these two struts additions could be extremely useful.

Bryan, (If we have to) do you think it's worth adding some code to Simper to
integrate with the NeXt?

-john



























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




RE: Poolman is gone, I hardly knew ya

2002-03-05 Thread Matt Raible

I use the one that is built in with Tomcat - it's called Tyrex and can be
obtained from http://tyrex.exolab.org (same folks that make Castor!) - or just
use what's already provided by tomcat.  It has worked real slick for me, and
I'd be more than happy to help anyone figure out how to use it.

Uses JNDI to do lookups and seems to work just fine.

Matt

--- "Robert D. Morse" <[EMAIL PROTECTED]> wrote:
> Check out Torque.  It works great for me, although it may be overkill for
> just a connection pool.  Doesn't the PoolMan stuff come with source?
> Connection pools aren't rocket science.
> 
> http://jakarta.apache.org/turbine/torque/index.html
> 
> 
> -Original Message-
> From: Satish Jeejula [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 6:35 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Poolman is gone, I hardly knew ya
> 
> 
> I had my application working with PoolMan and put it in  production too just
> TODAY.
> 
> I cannot break this news to my higher-ups. So is there any good connection
> pooling software.
> 
> thanks,
> satish
> 
> -Original Message-
> From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 8:50 PM
> To: Struts Users Mailing List
> Subject: Poolman is gone, I hardly knew ya
> 
> 
> According to the website:
> 
> http://www.codestudio.com/
> 
> Poolman is no more. What a bummer for me as I just learned it and
> deployed it on a new project less than a week ago!
> 
> Previously, I was using the pooling mechanism built into Struts, but due
> to many folks refering to it as "not industrial strength", I moved on
> (to Poolman).
> 
> So what else are people using? Is there one built into Tomcat now? I
> read that somewhere, I think in a mailing list message here, but I can't
> seem to find any docs on it (looking at the Tomcat 4.0 docs).
> 
> Is there a mature one in the Jakarta Commons? I see a "dbcp" but I'm not
> sure of it's status, if people are using it, etc.
> 
> Opinions appreciated!
> 
> Bryan
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




Re: Are there any patters for pager design with EntityBeansproviding access to the database?

2002-03-05 Thread Barry Glasco

Fast Lane reader and page iterator pattern's using JDBC 2.0 and
a tag that you can find by searching the archives.


- Original Message -
From: "Bryan Field-Elliot" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "'Struts Users'" <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 11:18 PM
Subject: Re: Are there any patters for pager design with
EntityBeansproviding access to the database?


> The best approach is to use a database-specific extension (since paging
> is not part of SQL standard syntax).
>
> I use PostgreSQL which has very nice and easy paging support (using
> LIMIT and OFFSET keywords).
>
> I've tried to do it once before using Oracle but had some trouble (as I
> recall the "rownum" didn't work as intuitively as you would hope or
> expect).
>
> The fallback position is to load the whole resultset into memory and
> store it as a session variable. This is a bad practice if the resultset
> can be large (a thousand rows or more for example).
>
> Bryan
>
> On Tue, 2002-03-05 at 21:12, Alex Paransky wrote:
>
> I was wondering how people are implementing paging capability in
struts.  In
> other words, if the result set comes back with 2000 rows, how do you
display
> page 4 of 100 with 20 results per page?
>
> Is writing custom SQL commands to depend on ROWNUM or something of
that sort
> always required?  Are there any easy mechanism to do paging?  Would
this be
> a good place to use a Statefull Session Bean and store it in to the
session?
>
> Thanks.
>
> -AP_
> http://www.alexparansky.com
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>
>


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




Re: Are there any patters for pager design with EntityBeansproviding access to the database?

2002-03-05 Thread Bryan Field-Elliot

The best approach is to use a database-specific extension (since paging
is not part of SQL standard syntax).

I use PostgreSQL which has very nice and easy paging support (using
LIMIT and OFFSET keywords).

I've tried to do it once before using Oracle but had some trouble (as I
recall the "rownum" didn't work as intuitively as you would hope or
expect).

The fallback position is to load the whole resultset into memory and
store it as a session variable. This is a bad practice if the resultset
can be large (a thousand rows or more for example).

Bryan

On Tue, 2002-03-05 at 21:12, Alex Paransky wrote:

I was wondering how people are implementing paging capability in struts.  In
other words, if the result set comes back with 2000 rows, how do you display
page 4 of 100 with 20 results per page?

Is writing custom SQL commands to depend on ROWNUM or something of that sort
always required?  Are there any easy mechanism to do paging?  Would this be
a good place to use a Statefull Session Bean and store it in to the session?

Thanks.

-AP_
http://www.alexparansky.com


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





Re: Simper with MySQL

2002-03-05 Thread Bryan Field-Elliot

It's LONGVARCHAR (== java.sql.Types value of -1). Two lines of code to
be added to Simper to support this... Will be doing another checking (to
sf) in the short term.

FYI, the "null" type is 0. And just what the heck does that mean? I've
never heard of a column type of null (as opposed to a column which
allows nulls, which is totally different).

Bryan


On Tue, 2002-03-05 at 20:47, Ted Husted wrote:

It's probably null. I've noticed that different pools handle this
differently. I believe Resin returns zero instead.

Bryan Field-Elliot wrote:
> 
> Yes,
> 
> There are two functions with Simper where we do mapping of
> java.sql.Types to Java classes, and vice versa.
> 
> The error you're getting is that the functions mentioned above don't yet
> understand java.sql.Type of -1. Do you know offhand what type that is?
> It can be added easily to Simper, I can make the change and commit to
> sourceforge CVS in a flash.
> 
> Bryan
> 
> On Tue, 2002-03-05 at 05:11, Matt Raible wrote:
> 
> I'm trying to get Simper working with MySQL and I'm getting the following 
error
> when I try to access http://localhost/simper (Tomcat 4.x running on port 80).
> 
> 
> javax.servlet.ServletException: Exception while Simper.initEverything tried 
to
> invoke user-supplied initializer: java.lang.IllegalStateException: Invalid
> sqlType: -1
> at org.netmeme.simper.Simper.initEverything(Simper.java:260)
> at org.netmeme.simper.Simper.doFilter(Simper.java:158)
> 
> 
> 
> java.lang.IllegalStateException: Invalid sqlType: -1
> at org.netmeme.simper.Simper.getClassFromSQLType(Simper.java:401)
> at org.netmeme.simper.Simper.registerTable(Simper.java:294)
> at org.netmeme.simper.demo.DemoInit.init(DemoInit.java:41)
> at org.netmeme.simper.Simper.initEverything(Simper.java:258)
> at org.netmeme.simper.Simper.doFilter(Simper.java:158)
> 
> 
> SQL Script I used to load MySQL:
> 
> --
> -- SQL commands to generate the simperdemo database
> --
> 
> CREATE TABLE IF NOT EXISTS authors (
> id int NOT NULL,
> name text,
> email text,
> Constraint authors_pkey Primary Key (id)
> );
> 
> CREATE TABLE IF NOT EXISTS  books (
> id int NOT NULL,
> id_author integer,
> title text,
> publishdate timestamp,
> Constraint books_pkey Primary Key (id)
> );
> 
> CREATE TABLE IF NOT EXISTS  next_id_table (
> table_name text,
> next_id int
> );
> 
> --INSERT INTO next_id_table (table_name, next_id) values ('authors', 0);
> 
> --INSERT INTO next_id_table (table_name, next_id) values ('books', 0);
> 
> 
> --
> -- Create a foreign key relationship (books.id_author to authors.id)
> -- To my knowledge, MySQL does not support referential integrety...
> 
> alter table books add constraint fk_books_authors foreign key (id_author)
> references authors (id)
> 
> 
> 
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - doFilter
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - initEverything
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  -
> initClassName=org.netmeme.simper.demo.Demo
> Init
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.demo.DemoInit  - init
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - registerDataSource
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - 
registerTable(books)
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - column name: id,
> type: class java.lang.Int
> eger
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - column name:
> id_author, type: class java.l
> ang.Integer
> 
> 
> Any ideas?
> 
> Matt
> 
> __
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 
> 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-> Web: http://husted.com/about/services

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





Are there any patters for pager design with EntityBeans providingaccess to the database?

2002-03-05 Thread Alex Paransky

I was wondering how people are implementing paging capability in struts.  In
other words, if the result set comes back with 2000 rows, how do you display
page 4 of 100 with 20 results per page?

Is writing custom SQL commands to depend on ROWNUM or something of that sort
always required?  Are there any easy mechanism to do paging?  Would this be
a good place to use a Statefull Session Bean and store it in to the session?

Thanks.

-AP_
http://www.alexparansky.com


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




Re: Poolman is gone, I hardly knew ya

2002-03-05 Thread Ted Husted

Personally, I wouldn't overreact. Poolman has always been an excellent
product, and the fact that the original maintainer isn't working on
further improvements won't change that. I'd snag the 2.0.4 release from
sourceforge and park it on a CD for safekeeping. Once it's running, it
will just keep running, and you can let it be. 

And, hey, software doesn't die, it just stops growing. And in the
forseeable future, poolman's already way big enough for me =:o)

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Bryan Field-Elliot wrote:
> 
> According to the website:
> 
> http://www.codestudio.com/
> 
> Poolman is no more. What a bummer for me as I just learned it and
> deployed it on a new project less than a week ago!
> 
> Previously, I was using the pooling mechanism built into Struts, but due
> to many folks refering to it as "not industrial strength", I moved on
> (to Poolman).
> 
> So what else are people using? Is there one built into Tomcat now? I
> read that somewhere, I think in a mailing list message here, but I can't
> seem to find any docs on it (looking at the Tomcat 4.0 docs).
> 
> Is there a mature one in the Jakarta Commons? I see a "dbcp" but I'm not
> sure of it's status, if people are using it, etc.
> 
> Opinions appreciated!
> 
> Bryan

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




Re: Simper with MySQL

2002-03-05 Thread Ted Husted

It's probably null. I've noticed that different pools handle this
differently. I believe Resin returns zero instead.

Bryan Field-Elliot wrote:
> 
> Yes,
> 
> There are two functions with Simper where we do mapping of
> java.sql.Types to Java classes, and vice versa.
> 
> The error you're getting is that the functions mentioned above don't yet
> understand java.sql.Type of -1. Do you know offhand what type that is?
> It can be added easily to Simper, I can make the change and commit to
> sourceforge CVS in a flash.
> 
> Bryan
> 
> On Tue, 2002-03-05 at 05:11, Matt Raible wrote:
> 
> I'm trying to get Simper working with MySQL and I'm getting the following error
> when I try to access http://localhost/simper (Tomcat 4.x running on port 80).
> 
> 
> javax.servlet.ServletException: Exception while Simper.initEverything tried to
> invoke user-supplied initializer: java.lang.IllegalStateException: Invalid
> sqlType: -1
> at org.netmeme.simper.Simper.initEverything(Simper.java:260)
> at org.netmeme.simper.Simper.doFilter(Simper.java:158)
> 
> 
> 
> java.lang.IllegalStateException: Invalid sqlType: -1
> at org.netmeme.simper.Simper.getClassFromSQLType(Simper.java:401)
> at org.netmeme.simper.Simper.registerTable(Simper.java:294)
> at org.netmeme.simper.demo.DemoInit.init(DemoInit.java:41)
> at org.netmeme.simper.Simper.initEverything(Simper.java:258)
> at org.netmeme.simper.Simper.doFilter(Simper.java:158)
> 
> 
> SQL Script I used to load MySQL:
> 
> --
> -- SQL commands to generate the simperdemo database
> --
> 
> CREATE TABLE IF NOT EXISTS authors (
> id int NOT NULL,
> name text,
> email text,
> Constraint authors_pkey Primary Key (id)
> );
> 
> CREATE TABLE IF NOT EXISTS  books (
> id int NOT NULL,
> id_author integer,
> title text,
> publishdate timestamp,
> Constraint books_pkey Primary Key (id)
> );
> 
> CREATE TABLE IF NOT EXISTS  next_id_table (
> table_name text,
> next_id int
> );
> 
> --INSERT INTO next_id_table (table_name, next_id) values ('authors', 0);
> 
> --INSERT INTO next_id_table (table_name, next_id) values ('books', 0);
> 
> 
> --
> -- Create a foreign key relationship (books.id_author to authors.id)
> -- To my knowledge, MySQL does not support referential integrety...
> 
> alter table books add constraint fk_books_authors foreign key (id_author)
> references authors (id)
> 
> 
> 
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - doFilter
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - initEverything
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  -
> initClassName=org.netmeme.simper.demo.Demo
> Init
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.demo.DemoInit  - init
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - registerDataSource
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - registerTable(books)
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - column name: id,
> type: class java.lang.Int
> eger
> [HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - column name:
> id_author, type: class java.l
> ang.Integer
> 
> 
> Any ideas?
> 
> Matt
> 
> __
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 
> 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-> Web: http://husted.com/about/services

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




Re: simper - versionColumn?

2002-03-05 Thread Bryan Field-Elliot

It's an unimplemented placeholder for a future version, in which I hope
to implement a basic optimistic concurrency pattern. If your tables have
an integer column dedicated to versioning, Simper will automatically
increment it on every update, after first testing to be sure that the
value hasn't changed. When I implement this, you can choose not to use
it by passing "null" as the column name for the version, which makes
your code today forward-compatible.

The use-case this all supports, is in putting a SimperBean away
somewhere (e.g. in a session variable), pulling it out later (e.g.
during some future HTTP request), and updating the row, without holding
a connection or a transaction the entire time.

Bryan



On Tue, 2002-03-05 at 20:19, John Menke wrote:

The registerTable method takes a String versionColumn as a parameter:

public void registerTable(String tableName, String idColumn, String
versionColumn, IPKGen primaryKeyGenerator)

What is versionColumn used for?  In the sample application both of the
example tables set it null.  I cannot determine it's purpose.

-john


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





simper - versionColumn?

2002-03-05 Thread John Menke

The registerTable method takes a String versionColumn as a parameter:

public void registerTable(String tableName, String idColumn, String
versionColumn, IPKGen primaryKeyGenerator)

What is versionColumn used for?  In the sample application both of the
example tables set it null.  I cannot determine it's purpose.

-john


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




RE: Poolman is gone, I hardly knew ya

2002-03-05 Thread Robert D. Morse

Check out Torque.  It works great for me, although it may be overkill for
just a connection pool.  Doesn't the PoolMan stuff come with source?
Connection pools aren't rocket science.

http://jakarta.apache.org/turbine/torque/index.html


-Original Message-
From: Satish Jeejula [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 6:35 PM
To: 'Struts Users Mailing List'
Subject: RE: Poolman is gone, I hardly knew ya


I had my application working with PoolMan and put it in  production too just
TODAY.

I cannot break this news to my higher-ups. So is there any good connection
pooling software.

thanks,
satish

-Original Message-
From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 8:50 PM
To: Struts Users Mailing List
Subject: Poolman is gone, I hardly knew ya


According to the website:

http://www.codestudio.com/

Poolman is no more. What a bummer for me as I just learned it and
deployed it on a new project less than a week ago!

Previously, I was using the pooling mechanism built into Struts, but due
to many folks refering to it as "not industrial strength", I moved on
(to Poolman).

So what else are people using? Is there one built into Tomcat now? I
read that somewhere, I think in a mailing list message here, but I can't
seem to find any docs on it (looking at the Tomcat 4.0 docs).

Is there a mature one in the Jakarta Commons? I see a "dbcp" but I'm not
sure of it's status, if people are using it, etc.

Opinions appreciated!

Bryan






--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Re: Poolman is gone, I hardly knew ya

2002-03-05 Thread martin . cooper

Poolman is currently still available on SourceForge:

http://sourceforge.net/projects/poolman/

I don't know what the latest status is, but I've emailed the author. I'll 
summarise to the list if I hear back.

I don't think Commons DBCP has been released yet, but Poolman's demise 
might hasten that. It's apparently based on code that came out of a 
long-running production application, so it should be in good shape.

--
Martin Cooper


At 05:50 PM 3/5/02, Bryan Field-Elliot wrote:
>According to the website:
>
>http://www.codestudio.com/
>
>Poolman is no more. What a bummer for me as I just learned it and
>deployed it on a new project less than a week ago!
>
>Previously, I was using the pooling mechanism built into Struts, but due
>to many folks refering to it as "not industrial strength", I moved on
>(to Poolman).
>
>So what else are people using? Is there one built into Tomcat now? I
>read that somewhere, I think in a mailing list message here, but I can't
>seem to find any docs on it (looking at the Tomcat 4.0 docs).
>
>Is there a mature one in the Jakarta Commons? I see a "dbcp" but I'm not
>sure of it's status, if people are using it, etc.
>
>Opinions appreciated!
>
>Bryan



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




Re: Poolman is gone, I hardly knew ya

2002-03-05 Thread Michael Rimov

At 06:50 PM 3/5/2002 -0700, you wrote:
>According to the website:
>
>http://www.codestudio.com/
>
>Poolman is no more. What a bummer for me as I just learned it and
>deployed it on a new project less than a week ago!
>
>Previously, I was using the pooling mechanism built into Struts, but due
>to many folks refering to it as "not industrial strength", I moved on
>(to Poolman).
>
>So what else are people using? Is there one built into Tomcat now? I
>read that somewhere, I think in a mailing list message here, but I can't
>seem to find any docs on it (looking at the Tomcat 4.0 docs).
>
>Is there a mature one in the Jakarta Commons? I see a "dbcp" but I'm not
>sure of it's status, if people are using it, etc.
>
>Opinions appreciated!

We have a connection pooling mechanism in Expresso that one independent 
user described as "one of the best" [Don't remember his name, sorry].

It wouldn't be hard to modify it so you can get to the underlying 
dbconnection pretty easily.  [Just modify 
com.jcorporate.expresso.core.db.DBConnection to get what you need.]

Heck, it would even be a "submittable" addition since it's something that 
I've been looking to do soon.  [You could email it to me private]

Anyway, the URL is http://www.jcorporate.com/

I haven't personally been shopping around for connection pools, I just know 
it seems to work well under load.

HTH!
 -Mike


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




RE: Poolman is gone, I hardly knew ya

2002-03-05 Thread Satish Jeejula

I had my application working with PoolMan and put it in  production too just
TODAY.

I cannot break this news to my higher-ups. So is there any good connection
pooling software.

thanks,
satish

-Original Message-
From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 8:50 PM
To: Struts Users Mailing List
Subject: Poolman is gone, I hardly knew ya


According to the website:

http://www.codestudio.com/

Poolman is no more. What a bummer for me as I just learned it and
deployed it on a new project less than a week ago!

Previously, I was using the pooling mechanism built into Struts, but due
to many folks refering to it as "not industrial strength", I moved on
(to Poolman).

So what else are people using? Is there one built into Tomcat now? I
read that somewhere, I think in a mailing list message here, but I can't
seem to find any docs on it (looking at the Tomcat 4.0 docs).

Is there a mature one in the Jakarta Commons? I see a "dbcp" but I'm not
sure of it's status, if people are using it, etc.

Opinions appreciated!

Bryan






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




Re: Simper with MySQL

2002-03-05 Thread Bryan Field-Elliot

Yes,

There are two functions with Simper where we do mapping of
java.sql.Types to Java classes, and vice versa.

The error you're getting is that the functions mentioned above don't yet
understand java.sql.Type of -1. Do you know offhand what type that is?
It can be added easily to Simper, I can make the change and commit to
sourceforge CVS in a flash.

Bryan


On Tue, 2002-03-05 at 05:11, Matt Raible wrote:

I'm trying to get Simper working with MySQL and I'm getting the following error
when I try to access http://localhost/simper (Tomcat 4.x running on port 80).


javax.servlet.ServletException: Exception while Simper.initEverything tried to
invoke user-supplied initializer: java.lang.IllegalStateException: Invalid
sqlType: -1
at org.netmeme.simper.Simper.initEverything(Simper.java:260)
at org.netmeme.simper.Simper.doFilter(Simper.java:158)



java.lang.IllegalStateException: Invalid sqlType: -1
at org.netmeme.simper.Simper.getClassFromSQLType(Simper.java:401)
at org.netmeme.simper.Simper.registerTable(Simper.java:294)
at org.netmeme.simper.demo.DemoInit.init(DemoInit.java:41)
at org.netmeme.simper.Simper.initEverything(Simper.java:258)
at org.netmeme.simper.Simper.doFilter(Simper.java:158)


SQL Script I used to load MySQL:

--
-- SQL commands to generate the simperdemo database
--

CREATE TABLE IF NOT EXISTS authors (
id int NOT NULL,
name text,
email text,
Constraint authors_pkey Primary Key (id)
);

CREATE TABLE IF NOT EXISTS  books (
id int NOT NULL,
id_author integer,
title text,
publishdate timestamp,
Constraint books_pkey Primary Key (id)
);

CREATE TABLE IF NOT EXISTS  next_id_table (
table_name text,
next_id int
);

--INSERT INTO next_id_table (table_name, next_id) values ('authors', 0);

--INSERT INTO next_id_table (table_name, next_id) values ('books', 0);


--
-- Create a foreign key relationship (books.id_author to authors.id)
-- To my knowledge, MySQL does not support referential integrety...

alter table books add constraint fk_books_authors foreign key (id_author)
references authors (id)



[HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - doFilter
[HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - initEverything
[HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  -
initClassName=org.netmeme.simper.demo.Demo
Init
[HttpProcessor[80][1]] DEBUG org.netmeme.simper.demo.DemoInit  - init
[HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - registerDataSource
[HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - registerTable(books)
[HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - column name: id,
type: class java.lang.Int
eger
[HttpProcessor[80][1]] DEBUG org.netmeme.simper.Simper  - column name:
id_author, type: class java.l
ang.Integer


Any ideas?

Matt

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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






Poolman is gone, I hardly knew ya

2002-03-05 Thread Bryan Field-Elliot

According to the website:

http://www.codestudio.com/

Poolman is no more. What a bummer for me as I just learned it and
deployed it on a new project less than a week ago!

Previously, I was using the pooling mechanism built into Struts, but due
to many folks refering to it as "not industrial strength", I moved on
(to Poolman).

So what else are people using? Is there one built into Tomcat now? I
read that somewhere, I think in a mailing list message here, but I can't
seem to find any docs on it (looking at the Tomcat 4.0 docs).

Is there a mature one in the Jakarta Commons? I see a "dbcp" but I'm not
sure of it's status, if people are using it, etc.

Opinions appreciated!

Bryan








Re: how do you enable/disable a text field based on a checkbox?

2002-03-05 Thread Arron Bates

JavaScript will be your only way, working off the checkBox's onclick 
handler. You could use the onchange handler but it's implementation is a 
little fuzzy across browsers. Use onlick, get the state of the checkbox, 
and do your thing with the other field.

Arron.

[EMAIL PROTECTED] wrote:

>With the given html tags for the struts and taglibs and such, is there an
>easy way to enable a corresponding textfield when you check the box?
>Is there an easy way to disable the corresponding textfield when you
>uncheck the checkbox as well as clear the text field.
>
>thanks,
>Theron
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



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




how do you enable/disable a text field based on a checkbox?

2002-03-05 Thread theron . kousek


With the given html tags for the struts and taglibs and such, is there an
easy way to enable a corresponding textfield when you check the box?
Is there an easy way to disable the corresponding textfield when you
uncheck the checkbox as well as clear the text field.

thanks,
Theron


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




and formatKey

2002-03-05 Thread Matt Read

I've encountered a possible bug in the use of formatKey in . As
always it's more likely to be my error but I'd appreciate it if anyone could
have a look. I'm running the latest nightly build of struts.

Code snippets are below but to summarise, I'm using the  tag and
formatKey attribute in my JSP to refer to 3 different format keys in my
resource file. However all my values are being formatted using the
format.dollars key if the resource file entries are as below. If I remove
format.dollars then I get the strings formatted as percentages, etc. I.e.
only one format string is ever used. All my properties return datatype
"double" which I assume is something to do with the problem but I'm not sure
what. Why can't I format 4 different properties in 4 different ways using 4
different format keys?

Thanks,
Matt.

In a JSP file I have this snippet:












In my ApplicationResource.properties file I have this snippet:

format.int=0
format.dollars=$0.00
format.percentage=0.00%


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




Transaction token documentation

2002-03-05 Thread Parimi Srinivas

a. Is there any documentation or write up avl on how transaction tokens are
programmed ?.
b. What is the use of generateToken method in Action class ?. 

Thanks,


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




RE: "parameter" attribute in the action-mapping... what is it?

2002-03-05 Thread Matt Raible

I don't want to take any credit where it's not due.  I believe Matthias Bauer
wrote the workflow extension.  

Good to know you're thinkin' of me Ted! ;)

Matt

--- "Ditlinger, Steve" <[EMAIL PROTECTED]> wrote:
> 
> The SSL extension from my JavaWorld article of Feb 15 uses the "action"
> tag's "parameter" attribute.  That has since been modified so that the
> version available at http://struts.ditlinger.com uses the "set-property"
> tag.  This was done to avoid the exact limitation you are finding with the
> "parameter" attribute.
> 
> Cheers,
> Steve
> 
> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 12:43 PM
> To: Struts Users Mailing List
> Subject: Re: "parameter" attribute in the action-mapping... what is it?
> 
> 
> You can use a deliminated list of items, and then use the String
> tokenizer to pull them out. 
> 
> StringTokenizer helperClasses =
> new StringTokenizer(mapping.getParameter(),";");
> int i = -1;
> Object[] helpers = new Object[helperClasses.countTokens()];
> while (helperClasses.hasMoreTokens()) {
> String helperClass = helperClasses.nextToken().trim();
> if ((helperClass==null) || (helperClass.length()==0))
> continue;
>   // ...
> }
> 
> You can also extend ActionMappings and use the digester 
> feature to set your own properties. Matt Raible does this with his
> workflow extension. 
> 
> http://www.livinglogic.de/Struts/
> 
> After that, you're into modifying how the ActionServlet parses the
> config.
> 
> -- Ted Husted, Husted dot Com, Fairport NY US
> -- Developing Java Web Applications with Struts
> -- Tel: +1 585 737-3463
> -- Web: http://husted.com/about/services
> 
> 
> Steve Earl wrote:
> > 
> > Does anyone know if you can specify more than a single parameter on the
> > actionMapping definition within the struts-config.xml file?
> > 
> > The reason for the question is that I'd like to do something similar to
> > what's specified below - have an action which processes several related
> > tasks using a parameter to distinguish them. However, I'm also using Steve
> > Ditlinger's ssl tag extension and that requires a parameter on the
> > actionMapping of "secure".
> > 
> > All advice appreciated.
> > 
> > regards,
> > steve
> > 
> > __
> > Steve Earl
> > 
> > -Original Message-
> > From: Donald Miller [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 05, 2002 3:33 PM
> > To: Struts Users Mailing List
> > Subject: Re: "parameter" attribute in the action-mapping... what is it?
> > 
> > It's a general purpose attribute you can use to pass any desired
> > information into the action from the struts-config.xml file.  You can
> > access the parameter's value within the action class via the
> > mapping.getParameter() method.  For actions requiring multiple steps, the
> > parameter is often used to indicate which step the mapping is associated
> > with.  For example:
> > 
> >  >type="myactions.CreateSomethingAction"
> >...
> >parameter="step1">...
> > 
> >  >type="myactions.CreateSomethingAction"
> >...
> >parameter="step2">...
> > 
> >  >type="myactions.CreateSomethingAction"
> >...
> >parameter="complete">...
> > 
> > I hope this helps.  Take care.
> > 
> > Don
> > 
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> > 
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




Struts Validator - mulitple forms on one page

2002-03-05 Thread Ben Kafka

Hi,

  Would like to know if I can validate using js with multiple forms in one
file. Currently I'm having a problem. When I use  and
  only the last one specified
works. The other form gives me a javascript error. Is there anyway around
this?



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




Newbie Struts and Jbuilder6

2002-03-05 Thread Sam Lai

Hi,

Can anyone show me how to integrate struts in Jbuilder6?

thanks,
SAM


NOTICE
This e-mail and any attachments are confidential and may contain copyright material of 
Macquarie Bank or third parties. If you are not the intended recipient of this email 
you should not read, print, re-transmit, store or act in reliance on this e-mail or 
any attachments, and should destroy all copies of them. Macquarie Bank does not 
guarantee the integrity of any emails or any attached files. The views or opinions 
expressed are the author's own and may not reflect the views or opinions of Macquarie 
Bank. 




RE: "parameter" attribute in the action-mapping... what is it?

2002-03-05 Thread Ditlinger, Steve


The SSL extension from my JavaWorld article of Feb 15 uses the "action"
tag's "parameter" attribute.  That has since been modified so that the
version available at http://struts.ditlinger.com uses the "set-property"
tag.  This was done to avoid the exact limitation you are finding with the
"parameter" attribute.

Cheers,
Steve

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 12:43 PM
To: Struts Users Mailing List
Subject: Re: "parameter" attribute in the action-mapping... what is it?


You can use a deliminated list of items, and then use the String
tokenizer to pull them out. 

StringTokenizer helperClasses =
new StringTokenizer(mapping.getParameter(),";");
int i = -1;
Object[] helpers = new Object[helperClasses.countTokens()];
while (helperClasses.hasMoreTokens()) {
String helperClass = helperClasses.nextToken().trim();
if ((helperClass==null) || (helperClass.length()==0))
continue;
// ...
}

You can also extend ActionMappings and use the digester 
feature to set your own properties. Matt Raible does this with his
workflow extension. 

http://www.livinglogic.de/Struts/

After that, you're into modifying how the ActionServlet parses the
config.

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Steve Earl wrote:
> 
> Does anyone know if you can specify more than a single parameter on the
> actionMapping definition within the struts-config.xml file?
> 
> The reason for the question is that I'd like to do something similar to
> what's specified below - have an action which processes several related
> tasks using a parameter to distinguish them. However, I'm also using Steve
> Ditlinger's ssl tag extension and that requires a parameter on the
> actionMapping of "secure".
> 
> All advice appreciated.
> 
> regards,
> steve
> 
> __
> Steve Earl
> 
> -Original Message-
> From: Donald Miller [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 3:33 PM
> To: Struts Users Mailing List
> Subject: Re: "parameter" attribute in the action-mapping... what is it?
> 
> It's a general purpose attribute you can use to pass any desired
> information into the action from the struts-config.xml file.  You can
> access the parameter's value within the action class via the
> mapping.getParameter() method.  For actions requiring multiple steps, the
> parameter is often used to indicate which step the mapping is associated
> with.  For example:
> 
> type="myactions.CreateSomethingAction"
>...
>parameter="step1">...
> 
> type="myactions.CreateSomethingAction"
>...
>parameter="step2">...
> 
> type="myactions.CreateSomethingAction"
>...
>parameter="complete">...
> 
> I hope this helps.  Take care.
> 
> Don
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



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




Re: [JS] Struts Resources

2002-03-05 Thread dIon Gillard

[EMAIL PROTECTED] wrote:

>The Atlanta Java Users Group (AJUG) has been building some web apps
>using Struts.  Following the Struts examples, we put all of  our display
>strings in a resource file.  However, when we started testing our
>application, we discovered that any page which had a lot of labels was
>very slow when the labels were pulled from the resouce file.  Yes, we
>tried it more than once.In particular we have a page with about 10
>entry files followed by 30 or so check boxes, each with labels.   When
>we had just the 10 entry fields, the performance was good.  However,
>when we added the check boxes, the time to load the page through Struts
>was 45 seconds the first time and 17 seconds each subsequent time.  When
>we hardcoded the titles in the JSP, then the load time was reduced to
>about 2 seconds.  We have so many check boxes because we are soliciting
>user skills and preferences as part of a profile page.
>
>We would like to store the labels in the resources file; however, a 17
>second load time is unacceptable.  Any suggestions from the Struts gurus
>in the audience
>
Any ideas on what appserver/platform this was running on? And a snippet 
of the page to show how you were using the message resources would be 
good too.

Some jsp compilers/servlet engines do worse with custom tags than others.

>Cynthia Jeness
>
-- 
dIon Gillard, Multitask Consulting
http://adslgateway.multitask.com.au/developers




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




Re: Nesting Extension and persistance strategy--castor any one?

2002-03-05 Thread Arron Bates

Castor works a treat. If castor had finer grained validation mechanism, 
we could use it to validate automatically also and relieve another 
burden. I've used Castor before, but not as the model directly. But it's 
very possible. A very good system.

Castor, of course, does everything via XML Schema definition. But it's 
very complete.

Arron.


John Menke wrote:

>Rajesh,
>
>That sounds interesting.  I started looking at Castor also, but now I'm
>looking more into Simper.  Let me know how it goes maybe we can share notes.
>
>-john
>
>-Original Message-
>From: rajesh kalluri [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, March 05, 2002 11:32 AM
>To: Struts Users Mailing List
>Subject: Re: Nesting Extension and persistance strategy--castor any one?
>
>
>Hi All,
>
>I am not the expert in the field of designing OO persistence mechanisms.
>
>I am a fan of nested beans and also i have been playing with castor lately.
>
>So am thinking if we can map our monkey object schema to a db schema (I can
>hear a lot of thats easy). Then it should be a snap to marshall/unmarshall
>monkey beans  (nested in general) into XML files/ data base tables.
>
>I would start playing with it as soon as i have time.
>
>
>Regards
>Rajesh Kalluri.
>Manduca Management LLC,
>Suite 230, 5757 Blue Lagoon Dr.
>Miami, FL 33126.
>AIM: [EMAIL PROTECTED]
>Phone: 786-552-0521
>Fax: 786-552-0501
>
>- Original Message -
>From: "Arron Bates" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, March 04, 2002 11:16 PM
>Subject: Re: Nesting Extension and persistance strategy
>
>
>>>
>>>I like beans managing dirty state becuause I could possibly have one
>>>method
>>>that can handle several different structures if it's designed right.
>>>
>>>Maybe this:
>>>
>>>Have all DataBeans implement an interface lets day DirtyInterface that
>>>defines
>>>2 methods:
>>>
>>>public String getDirtyAttribute() and
>>>public void callJDBC(String dirtyAttribute)
>>>
>>>the dirtyAttribute class member could be one of several values:
>>>
>>>insert
>>>update
>>>delete
>>>(select)
>>>
>>>callJDBCbean(String dirtyAttribute) would call a JDBCbean
>>>corresponding to
>>>the databean,
>>>not sure how to define this, maybe in a way similar to the mapping of
>>>Actions?
>>>
>>>So then in the Action associated with the ActionForm we could pass the
>>>ActionForm into a Method that will call getDirtyAttribute and
>>>callJDBCbean
>>>for each bean that is nested within the ActionForm.
>>>
>>>Having trouble thinking of way to iterate through the beans, but I think
>>>it's possible.
>>>
>>I think that to get it more in line with the stupid-model-paradigm (SMP?
>>:) your beans could manage their dirty state, but the actual persistence
>>management be handled by a separate object, that takes the bean types in
>>overloaded methods.
>>eg:
>>persistDirtyBean(Organisation org) {...}
>>persistDirtyBean(Team team) {...}
>>persistDirtyBean(Investor investor) {...}
>>persistDirtyBean(Portfolio portfolio) {...}
>>persistDirtyBean(Stock stock) {...}
>>
>>Then you could just throw whatever bean at it you needed. The class
>>itself could even iterate the tree itself, in that the Organisation
>>version of the PersistDirtyBean would get Team objects, and then from
>>this method could call the Team persist method for whatever team. Or you
>>can, in just as correct a manner, use it ad-hoc just throwing whatever
>>object. Means that the persist methods aren't living with their related
>>Object, so some OO guru may say it's not defending the faith.
>>
>>There's just so many ways you can attack this. But I think that you're
>>in the right frame of mind to take it on at least. :)
>>
>How complex are the types/structure of your hierarchy?...
>
>>>Pretty simple.  Actually it almost maps exactly to your example
>>>
>>>Organization
>>>Team
>>>Investor
>>>Portfolio
>>>Stock
>>>
>>Simple until you have to persist the thing. :)
>>My definition of simple is when making a table you have a bean with a
>>collection of one type of object, that can be retrieved and updated with
>>one query.
>>
>>Oh, I miss those days when people thought that just seeing data was
>>special...
>>...and that it was on the "Information Super-Highway"... there's a term
>>that brings on flash-backs.
>>
>>
>>Arron.
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>>
>
>
>>For additional commands, e-mail:
>>
>
>
>>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



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




Re: redirection from an action/ refreshing page

2002-03-05 Thread Mark Woon

Use:





[EMAIL PROTECTED] wrote:

> addendum to question.  I meant to write that we do
>
> return mapping.findForward("success");
>
> not
>
> return new ActionForward(mapping.findFoward("success"));
>
> that was a typo
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 12:38 PM
> To: [EMAIL PROTECTED]
> Subject: redirection from an action/ refreshing page
>
> After we have finished handling the form in our action, we forward the
> request on to the next page using
>
> return new ActionForward(mapping.findForward("success"));
>
> where success is defined in the action in struts-config.xml using
>   
>
> However, after the page has been forwarded, the URL displayed in the web
> browser address page is the path to the previous action.  Namely
>
> /Save.do
>
> even though we are on the successpage.jsp.
>
> If this page is refreshed (using IE 5.5, haven't tried it on other
> browsers), it prompts me for whether I want to resubmit the form.  However,
> there is no form on the successpage.jsp.
>
> So, I am wondering, does anyone know how to prevent this from happening?
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
~~Mark Woon~~~
God put me on this Earth to accomplish a certain number of things.
Right now, I am so far behind I shall never die.





RE: How to control ' if then else' in a particular JSP using struts

2002-03-05 Thread rgiri

look into logic:present tag.
look at the login-present.jsp under the downloaded src
/web/exercise-taglib/logic-present.jsp
Hope that helps.
RG

-Original Message-
From: Dasgupta, Diptiman (Cognizant) [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 03, 2002 11:36 PM
To: [EMAIL PROTECTED]
Subject: How to control ' if then else' in a particular JSP using struts



 Hi,
 I am a newcomer in the struts framework. In my project each and every JSP
pages contain a lots of 'if then else' logic. Pls let me know, how can I
move all these
 flow issues in other parts of the framework and make my pages very simple.
I am not asking the flow issues betwwen multiple pages but flow inside a
particular page.
If anyone of you can provide any help

 pls reply me back in this id - 

[EMAIL PROTECTED]

-Thanks in advance
Diptiman Dasgupta
Cognizant Technology Solutions, India

--
To unsubscribe, e-mail:

For additional commands, e-mail:




Re: Pre Populating Fields - bit of a newbie question

2002-03-05 Thread Jason B Menard

Since you are just populating a field, JavaScript is an acceptable solution.
It should go without saying that you are doing server-side form validation
anyway so it shouldn't be a problem in this case.  Remember server-side
validation is a necessity.  Client-side validation (ie JavaScript) should be
thought of as a luxury for the user's convenience, but cannot be relied on
as the soul means of ensuring you are getting valid data sent to the server.

As far as pre-populating a form, in general my understanding has been that
the preferred way to do this in the Action (someone please correct me if I
am mistaken), particularly if you want to pre-populate the form with data
from your model.  But if all you are worried about is setting that date
field, JavaScript would be a cheap way to do it if it is a non-critical
issue.

Jason

- Original Message -
From: "Galbreath, Mark" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 2:28 PM
Subject: RE: Pre Populating Fields - bit of a newbie question


> This is an old, outdated argument; 99.99 percent of the web uses
JavaScript.
> Instantiating an object is very expensive, relatively speaking.  But it's
> your app; do what you want.
>
> Mark
>
> -Original Message-
> From: Jay sissom [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 1:07 PM
>
> You can use JavaScript only if you guarantee that every user of your
> application has a browser that supports JavaScript and it is enabled.
> You're probably OK if you are intranet, but with internet applications,
> you never know if someone is running WebTV or something like that.
>
> In my mind, the point of creating an object for this is to make sure I get
> a date even if JavaScript isn't enabled in the user's browser.  The time
> to get a date is in milliseconds I would bet.  It's not much overhead at
> all.
>
>
> On Tue, 5 Mar 2002, Galbreath, Mark wrote:
>
> > Use JavaScript.  What's the point of having the overhead of creating an
> > object for something as simple as getting the current date?
> >
> > Mark
> >
> > -Original Message-
> > From: Mattos, John [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 05, 2002 12:28 PM
> >
> > I need to have a startDate and endDate field in my form, and I'd like to
> > prepopulate the endDate field with today's date. There's a bean that has
> > set/getEndDate() methods, and I get to the form from an Action.perform()
> > call
> >
> > What's the best way to prepopulate that field?
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


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




[Off Topic] Setting up a Virtual Directory in Tomcat

2002-03-05 Thread Matt Raible

Does anyone know if it's possible to setup a virtual directory in Tomcat?  

I'm uploading files to a directory on my server, and (1) I want this directory
to be located where ever the user likes and (2) be able to display these files
if a user clicks on a link to them.  

Therefore, I need a virtual directory (also known as an alias in Apache) to
point to this upload directory, so users can get to the files once they've been
uploaded.  I can't use the file:// protocol, because that will make a reference
to the user's local machine.

We do NOT want to use Apache or another webserver as a front-end to Tomcat. 
One reason is because no SSL support on Windows.

Thanks,

Matt

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




RE: "parameter" attribute in the action-mapping... what is it?

2002-03-05 Thread Bill Page

I do what Ted does, but extend it down a level, putting a second string
tokensizer in the while loop to tokenize the following format:

key1=value1;key2=value2;key3=value3

That way they're not positional.  I also put them in map so I retrieve them
based on a key.  

> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 3:43 PM
> To: Struts Users Mailing List
> Subject: Re: "parameter" attribute in the action-mapping... 
> what is it?
> 
> 
> You can use a deliminated list of items, and then use the String
> tokenizer to pull them out. 
> 
> StringTokenizer helperClasses =
> new StringTokenizer(mapping.getParameter(),";");
> int i = -1;
> Object[] helpers = new Object[helperClasses.countTokens()];
> while (helperClasses.hasMoreTokens()) {
> String helperClass = helperClasses.nextToken().trim();
> if ((helperClass==null) || (helperClass.length()==0))
> continue;
>   // ...
> }
> 

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




RE: redirection from an action/ refreshing page

2002-03-05 Thread saval

addendum to question.  I meant to write that we do

return mapping.findForward("success");

not

return new ActionForward(mapping.findFoward("success"));

that was a typo

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 12:38 PM
To: [EMAIL PROTECTED]
Subject: redirection from an action/ refreshing page



After we have finished handling the form in our action, we forward the
request on to the next page using

return new ActionForward(mapping.findForward("success"));

where success is defined in the action in struts-config.xml using
  

However, after the page has been forwarded, the URL displayed in the web
browser address page is the path to the previous action.  Namely

/Save.do

even though we are on the successpage.jsp.

If this page is refreshed (using IE 5.5, haven't tried it on other
browsers), it prompts me for whether I want to resubmit the form.  However,
there is no form on the successpage.jsp.

So, I am wondering, does anyone know how to prevent this from happening?

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Re: Role-based Validation Extension Question

2002-03-05 Thread Matt Raible

Do you mean role-based actions extension?  I know that this extension allows
you to configure allowed roles to access each action.  Yes, you can do it in
your web.xml, but usually folks just protect *.do or /do/* and create an
appropriate mapping - and do all other configuring in web.xml.

Matt

--- "Emaho, Ghoot" <[EMAIL PROTECTED]> wrote:
> Hi,
>  
> I think I might be missing something here. Can someone tell me what the
> Role-based Validation extension gives you over, say, setting security
> restraints in the web.xml ?
>  
> I can set constraints on individual actions by mapping them in the web.xml.
> So what else does the extension give the developer ? 
>  
> This isnt a criticism, i just need someone to point it out to me. For the
> life of me I cant figure out what else you get, and i ant see any reason to
> use it at the moment.
>  
> Anyone who can point out the wood amongst the trees will be thanked kindly !
>  
> Cheers
>  
> Ghoot Emaho
> Development Team Leader
> Petrotechnics   Ltd
> 
>  
> 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




RE: How to fill a String[] property-updated question.?

2002-03-05 Thread Brian Richards

The problem you're running into is that your form bean doesn't match the
Bean pattern for indexed properties.  In the populate method of the
BeanUtil class a check for IndexedPropertyDescriptor is done on the form
bean.  The javadocs for IndexedPropertyDescriptor state:

... if the argument name is "fred", it will assume that there is an
indexed reader method "getFred", a non-indexed (array) reader method
also called "getFred", an indexed writer method "setFred", and finally a
non-indexed writer method "setFred". 

So to have a "correct" Bean, you need two getters and two setters for an
indexed property.  One for the entire array and one for an individual
element of the array.  

I've always though it is a bit confusing that the tags use the
non-indexed reader while the BeanUtils use the index writer.  That's how
it will populate the page initially but not populate the bean on the
post.  

Hope this helps

bsr


-Original Message-
From: Alex Colic [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 05, 2002 3:20 PM
To: Struts
Subject: How to fill a String[] property-updated question.?


Hi,

just an update. Before I access the page I initialized the String[]
array elements to 1...6. When I get to the page the values in the
String[] array are properly displayed in the corresponding text boxes
but when I submit the page I get the following error:

java.lang.IllegalArgumentException: array element type mismatch
at
org.apache.struts.util.PropertyUtils.setIndexedProperty(PropertyUtils.ja
va:8
51)
at
org.apache.struts.util.PropertyUtils.setIndexedProperty(PropertyUtils.ja
va:7
85)

I don't understand why I can view the elements but not save the
elements.

Thanks for any info.

Alex


--
To unsubscribe, e-mail:

For additional commands, e-mail:






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




Re: "parameter" attribute in the action-mapping... what is it?

2002-03-05 Thread Ted Husted

You can use a deliminated list of items, and then use the String
tokenizer to pull them out. 

StringTokenizer helperClasses =
new StringTokenizer(mapping.getParameter(),";");
int i = -1;
Object[] helpers = new Object[helperClasses.countTokens()];
while (helperClasses.hasMoreTokens()) {
String helperClass = helperClasses.nextToken().trim();
if ((helperClass==null) || (helperClass.length()==0))
continue;
// ...
}

You can also extend ActionMappings and use the digester 
feature to set your own properties. Matt Raible does this with his
workflow extension. 

http://www.livinglogic.de/Struts/

After that, you're into modifying how the ActionServlet parses the
config.

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Steve Earl wrote:
> 
> Does anyone know if you can specify more than a single parameter on the
> actionMapping definition within the struts-config.xml file?
> 
> The reason for the question is that I'd like to do something similar to
> what's specified below - have an action which processes several related
> tasks using a parameter to distinguish them. However, I'm also using Steve
> Ditlinger's ssl tag extension and that requires a parameter on the
> actionMapping of "secure".
> 
> All advice appreciated.
> 
> regards,
> steve
> 
> __
> Steve Earl
> 
> -Original Message-
> From: Donald Miller [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 3:33 PM
> To: Struts Users Mailing List
> Subject: Re: "parameter" attribute in the action-mapping... what is it?
> 
> It's a general purpose attribute you can use to pass any desired
> information into the action from the struts-config.xml file.  You can
> access the parameter's value within the action class via the
> mapping.getParameter() method.  For actions requiring multiple steps, the
> parameter is often used to indicate which step the mapping is associated
> with.  For example:
> 
> type="myactions.CreateSomethingAction"
>...
>parameter="step1">...
> 
> type="myactions.CreateSomethingAction"
>...
>parameter="step2">...
> 
> type="myactions.CreateSomethingAction"
>...
>parameter="complete">...
> 
> I hope this helps.  Take care.
> 
> Don
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




redirection from an action/ refreshing page

2002-03-05 Thread saval


After we have finished handling the form in our action, we forward the
request on to the next page using

return new ActionForward(mapping.findForward("success"));

where success is defined in the action in struts-config.xml using
  

However, after the page has been forwarded, the URL displayed in the web
browser address page is the path to the previous action.  Namely

/Save.do

even though we are on the successpage.jsp.

If this page is refreshed (using IE 5.5, haven't tried it on other
browsers), it prompts me for whether I want to resubmit the form.  However,
there is no form on the successpage.jsp.

So, I am wondering, does anyone know how to prevent this from happening?

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




How to fill a String[] property-updated question.?

2002-03-05 Thread Alex Colic

Hi,

just an update. Before I access the page I initialized the String[] array
elements to 1...6. When I get to the page the values in the String[] array
are properly displayed in the corresponding text boxes but when I submit the
page I get the following error:

java.lang.IllegalArgumentException: array element type mismatch
at
org.apache.struts.util.PropertyUtils.setIndexedProperty(PropertyUtils.java:8
51)
at
org.apache.struts.util.PropertyUtils.setIndexedProperty(PropertyUtils.java:7
85)

I don't understand why I can view the elements but not save the elements.

Thanks for any info.

Alex


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




RE: Extra Path Info Problem!!! HELP!!!

2002-03-05 Thread Michael Nash

Ted:

I've been experimenting with a way of doing mappings from "normal" URL's to
Action URI's, and wonder if it's the right approach. If so, I'd be happy to
drop it in for inclusion in a release when/if appropriate, or set it up as
an optional-add on.

I took the simple approach, and added a configuration like this:



   /form/*
   /application/Something.do
   
  someParamName
  someParamValue
   
   
  1
  firstParam
   
   
  2+ 
  secondParam
   
   


Then I have a servlet called "PathHandler", which I map to "/do/*", and...

if you issue a URL like:

/application/do/form/message/here/is/a/path

it would then simply issue a forward to:

/application/Something.do?someParamName=someparamValue&firstParam=message&se
condParam=here/is/a/path

Comments on whether or not this is the right way to go much appreciated, as
I need this functionality myself soon :-)

Mike

> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 14, 2002 4:10 AM
> To: Struts Users Mailing List
> Subject: Re: Extra Path Info Problem!!! HELP!!!
>
>
> Not supported, though I wish it were :o(
>
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg11714.html
>
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg11709.html
>
> Problem is, an Action URI is not a path, but a string identifier that is
> make to look like a path. So, someone has to write the code to simulate
> a path.
>
> Another problem is that the Action form tag assumes that all action URIs
> either don't have extensions or are using extension mapping. So, if you
> are using something like this:
>
> /do/MailMerge.txt
>
> This doesn't work as an ActionMapping, but does work as a ActionForward.
>
>
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Java Web Development with Struts.
> -- Tel +1 585 737-3463.
> -- Web http://www.husted.com/struts/
>
>
> cool dude wrote:
> >
> > Hi Guyz,
> >   I'm having a really strange problem wiht struts
> > ... I looked around in the mailing list & found a lot
> > of people had similar problems .. but I couldn't find
> > any solution for it. The problem relates to use of
> > extra path info. I have a URL which looks something
> > like this
> > http://myserver.com/servletname/extrapathinfo/actionname
> >
> > I've defined the url mapping in the web.xml as
> > /servletname/*. I was hoping that struts will try &
> > pick up only the last component of the URL as the
> > action name & I would be able to use the extra path
> > info in my servlet. But it doesn't work that way,
> > instead struts tries to look for an action with the
> > name /extrapathinfo/actionname ...
> >
> > I would really appreciate any idea/leads in solving
> > this problem ... been stuck-up with this for sometime
> > now .. :-(
> >
> > Thanx in advance,
> > VD.
> >
> > __
> > Do You Yahoo!?
> > Send FREE Valentine eCards with Yahoo! Greetings!
> > http://greetings.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:

> For additional commands, e-mail:


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




FW: Tomcat/Struts Profiling results

2002-03-05 Thread TKV Tyler VanGorder

Hi,

For the last week and a half, a colleague and myself have been doing load/
scalability testing for our struts/jsp-based application. I would like to
share our results in the hopes that it may help someone else faced with a
similar task. We had a tough time finding real-world examples that we could
learn from. 

This is a LONG post, so I will try to summarize first:
==
Yeah..the summary is pretty long as well. 8-)

For JSP, tag-heavy applications, we found tuning parameters that may help
others get better performance out of tomcat.

We simulated a load of 50 concurrent users using automation tools that
remove any human pauses. This is roughly equivalent to 250+ concurrent,
human users. Yes...that is an estimation.

Initially, using Tomcat 4.0.1, Stuts 1.0 Final:

The IBM JDK performed MUCH MUCH better than Sun's Server Hotspot
JVM (1.3.1)

After profiling, we discovered that a significant amount of our time
was being spent in the garbage collector with the hotspot JVM. Some
of our garbage collections took a 12+ seconds! Ouch.

We attempted tweaking the various hotspot JVM parameters to see if we
could get the hotspot VM in line with IBM's performance. We did get
better results but we still had some GCs that were taking 6 seconds.

We had a large number of throw-away objects that were confusing the
garbage collector in hotspot.

We deployed the SAME EXACT application under Weblogic 6.1's servlet
engine, using the hotspot JVM, and we saw much better performance and
this was without any hotspot tuning parameters!

So we switched back to tomcat and we ran the application, using OptimizeIt
to profile the application. A majority of our time was being spent in
the constructor of BodyContentImpl because of an initial 8K char buffer
being created for EACH tag, embedded in our page. This was more pronounced
in our application because we iterated over content that had tags nested
in the iteratorthat's 8K X Number of iterations X number of nested
tags! We found that in our application most of our tags were only outputting
a few characters.

We recompiled the BodyContentImpl and changed the initial buffer size to
512 bytes. The results were dramatic and hotspot began outperforming the IBM
JDK. Keep in mind that the hotspot server VM takes a while to tune its
runtime
so was necessary to run our scalability test on the hotspot VM several
times.
I submitted an enhancement to bugzilla, its ID is 6858.

The final results were impressive!

Our application has one workflow that is VERY database intensive. It takes
a human user approximately two minutes to complete the workflow once they
are familiar with it. The transaction does 20-40 database selects with
result
sets in the range of 10-40 rows each (on average). 20+ Inserts when the
transaction is finally saved. All database activity happens in real time,
while
the user walks through our workflow.

Tomcat 4.0.1 + (our hack), using Hotspot Server JVM 1.3.1:

   Hardware: EJB server - PII 300 (-Xms64m -Xmx64m)
 Servlet/web server - PIII Dual 550 (-Xms128m -Xmx128m)
  
   Simulated 50 automated users (No human pauses) - Average transaction
speed
   21 seconds, longest time 27 seconds!
   
Of course this is our application...and each application will have its own
load characteristics, but it is a good example of struts + tomcat.

So..if our 50 automated users average 21 seconds and a human user takes
roughly 2 minutes for the same workflow then the above platform *SHOULD*
be able to support 6X the number of human users (300 users)

Thanks and I hope this information might be useful to others trying to get
a feel for how well JSP/struts will scale.

Tyler Van Gorder [EMAIL PROTECTED]
Reed Roberts
Landacorp.

=
Detailsand the actual different tuning parameters we used:

The environments we used are as follows:


Hardware:

We used a low-end machine for the EJB server.

Database server:
  Compaq Proreliant ML370 Dual PIII 800 
  Windows 2000 Advanced Server Service Pack 2
  1Gig Ram

EJB Server:
 PII 300
 NT 4.0 Server
 128M Ram

Servlet Engine/Web Server
 PIII Dual 550.
 Windows 2000 Workstation
 256M Ram

5 client test machines...ranging in size
 Win 98 & Win NT machines.
 
All hardware was isolated on the same 100M Switch/hub



Software

Database Server  == Oracle 8
EJB Server   == Weblogic 6.1.0 Service Pack 2
Servlet Engine 1 == Tomcat 4.0.1 
Servlet Engine 2 == Weblogic 6.1.0 Service Pack 2

(We did not have a separate web server...tomcat and
weblogic acted as our web server!)



Load testing software:

We used our own, home grown, load testing software.
We first set up a proxy between a browser client and
the web server. The proxy 

RE: validate() and session expiry

2002-03-05 Thread Matt Read

No problem, I hadn't got around to trying it yet. Thanks for all the help.

Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 18:50
To: 'Struts Users Mailing List'
Subject: RE: validate() and session expiry


matt,

I spoke wrong. The controller element goes before the message-resources
element.



Sorry about that,
Chuck


-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 1:44 PM
To: 'Struts Users Mailing List'
Subject: RE: validate() and session expiry


Remember, the RequestProcessor is a 1.1 thing. You'll have to be using the
nightly build for it. Of course, the beta is just around the corner. Anyway,
the Struts 1.1 DTD defines a new element called "controller". It goes under
the root element after the action-mappings. Make sure that it's in the
correct location. It should be the last element in your struts config,
unless you have plug-in's defined. Here's an example of one from my book:



Notice that many of the things that were configured in the web.xml in 1.0
are now attributes on this element. The CustomerRequestProcessor listed here
extends the Struts version and this is where I override the mehtod.

You don't have to do anything with the ActionServlet. In fact, since the
RequestProcessor is where all of the meat is now, you can just use the
Struts ActionServlet as is and there's usually no need to subclass it.

Chuck Cavaness

-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 1:22 PM
To: [EMAIL PROTECTED]
Subject: RE: validate() and session expiry


Yes, but probably a little too ambitious for me I think. On a related note
though, I can't work out what to do with your subclassed RequestProcessor
class once you've overridden the processPreprocess() method? Any pointers on
the where you configure this to be used? Do you also have to subclass the
ActionServlet and set the processor field in your subclass to the new
RequestProcessor?

Thanks,
Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 16:16
To: 'Struts Users Mailing List'
Subject: RE: validate() and session expiry


You could always extend ActionMapping (or ActionConfig for 1.1) to accept
more parameter type attributes.  Of course at that point, you're extending
the framework but's that neccessarily a bad thing.

Chuck

-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:04 AM
To: [EMAIL PROTECTED]
Subject: RE: validate() and session expiry


That looks good too but given that you're only allowed to have one
 per action mapping it would preclude the use of parameter for
anything else. It would definitely make DispatchAction difficult to use. I
do like the idea of being able to configure this in struts-config.xml
though. Maybe it could be implemented as requiresSession="true"?

Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 12:57
To: Struts Users Mailing List
Subject: RE: validate() and session expiry


Matt,

   I had one other idea that I wanted to share with you. It came to be as I
was just starting to work on the security chapter for the Struts book. This
is for the case where you have a small number of actions that the user
needs to be logged in for, rather than all of them.

What if you added a value like "checkSession" using the parameter attribute
in the action mappings that required the user to be logged in. In the
"processPreprocess" method, you can look up the mapping for the action that
has been requested using

ActionMapping mapping = findMapping(path);

which is available in the ActionServlet class as well.

Once you have the mapping, yoy can call "getParameter", which will return a
String for the parameter in the ActionMapping. If no value is specified, a
null is returned. If "checkSession" of some other value is present, then
you know to check to see if the session is present and valid. If so, return
true, which allows the ActionServlet to continue on. Otherwise, you can use
the ActionMapping that you already found for the action and return to the
login page. You are probably better off declaring a global forward and
using the findForward(String name)  method in the ActionServlet to locate
the global login forward and forward to this.

By doing it like this, you make the whole thing very generic and
declarative. You are free to change which actions need to have the user
logged in without modifying any source code. The "processPreprocess" method
stays completly generic.

What does everything about this approach? I think I'll mention this in the
security chapter of the book.

Chuck

At 12:14 PM 3/5/2002 +, you wrote:
>Yep, all makes sense. Thanks to both of you. I'm a lot happier with how the
>logic is partitioned now and I like the validate="false" idea very much.
>
>Thanks,
>Matt.
>
>-Original Message-
>Fr

RE: Pre Populating Fields - bit of a newbie question

2002-03-05 Thread Galbreath, Mark

This is an old, outdated argument; 99.99 percent of the web uses JavaScript.
Instantiating an object is very expensive, relatively speaking.  But it's
your app; do what you want.

Mark

-Original Message-
From: Jay sissom [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 1:07 PM

You can use JavaScript only if you guarantee that every user of your 
application has a browser that supports JavaScript and it is enabled.  
You're probably OK if you are intranet, but with internet applications, 
you never know if someone is running WebTV or something like that.

In my mind, the point of creating an object for this is to make sure I get
a date even if JavaScript isn't enabled in the user's browser.  The time
to get a date is in milliseconds I would bet.  It's not much overhead at
all.


On Tue, 5 Mar 2002, Galbreath, Mark wrote:

> Use JavaScript.  What's the point of having the overhead of creating an
> object for something as simple as getting the current date?
> 
> Mark
> 
> -Original Message-
> From: Mattos, John [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 12:28 PM
> 
> I need to have a startDate and endDate field in my form, and I'd like to
> prepopulate the endDate field with today's date. There's a bean that has
> set/getEndDate() methods, and I get to the form from an Action.perform()
> call
> 
> What's the best way to prepopulate that field?

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




RE: How to fill a String[] property?

2002-03-05 Thread Brian Richards

Try

void setActivities(int index, String parm)
{
  mActivities[index] = parm;
}



-Original Message-
From: Alex Colic [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 05, 2002 2:02 PM
To: Struts
Subject: How to fill a String[] property?


Hi,
I have a form with a string array property 'Activities'. The form has
the following methods:

private String[] mActivities = new String[6];
public void setActivities(String[] parm1)   { mActivities = parm1;  }
public String[] getActivities() { return mActivities;   }

On my page I need 6 textboxes to be filled in each representing an
element in the mActivities array. I have tried the following:


... 

but I get bean.populate errors.

Any help is appreciated.

Alex


--
To unsubscribe, e-mail:

For additional commands, e-mail:






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




How to fill a String[] property?

2002-03-05 Thread Alex Colic

Hi,
I have a form with a string array property 'Activities'. The form has the
following methods:

private String[] mActivities = new String[6];
public void setActivities(String[] parm1)   { mActivities = parm1;  }
public String[] getActivities() { return mActivities;   }

On my page I need 6 textboxes to be filled in each representing an element
in the mActivities array. I have tried the following:


...


but I get bean.populate errors.

Any help is appreciated.

Alex


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




RE: validate() and session expiry

2002-03-05 Thread Chuck Cavaness

matt,

I spoke wrong. The controller element goes before the message-resources
element.



Sorry about that,
Chuck


-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 1:44 PM
To: 'Struts Users Mailing List'
Subject: RE: validate() and session expiry


Remember, the RequestProcessor is a 1.1 thing. You'll have to be using the
nightly build for it. Of course, the beta is just around the corner. Anyway,
the Struts 1.1 DTD defines a new element called "controller". It goes under
the root element after the action-mappings. Make sure that it's in the
correct location. It should be the last element in your struts config,
unless you have plug-in's defined. Here's an example of one from my book:

 

Notice that many of the things that were configured in the web.xml in 1.0
are now attributes on this element. The CustomerRequestProcessor listed here
extends the Struts version and this is where I override the mehtod. 

You don't have to do anything with the ActionServlet. In fact, since the
RequestProcessor is where all of the meat is now, you can just use the
Struts ActionServlet as is and there's usually no need to subclass it.

Chuck Cavaness

-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 1:22 PM
To: [EMAIL PROTECTED]
Subject: RE: validate() and session expiry


Yes, but probably a little too ambitious for me I think. On a related note
though, I can't work out what to do with your subclassed RequestProcessor
class once you've overridden the processPreprocess() method? Any pointers on
the where you configure this to be used? Do you also have to subclass the
ActionServlet and set the processor field in your subclass to the new
RequestProcessor?

Thanks,
Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 16:16
To: 'Struts Users Mailing List'
Subject: RE: validate() and session expiry


You could always extend ActionMapping (or ActionConfig for 1.1) to accept
more parameter type attributes.  Of course at that point, you're extending
the framework but's that neccessarily a bad thing.

Chuck

-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:04 AM
To: [EMAIL PROTECTED]
Subject: RE: validate() and session expiry


That looks good too but given that you're only allowed to have one
 per action mapping it would preclude the use of parameter for
anything else. It would definitely make DispatchAction difficult to use. I
do like the idea of being able to configure this in struts-config.xml
though. Maybe it could be implemented as requiresSession="true"?

Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 12:57
To: Struts Users Mailing List
Subject: RE: validate() and session expiry


Matt,

   I had one other idea that I wanted to share with you. It came to be as I
was just starting to work on the security chapter for the Struts book. This
is for the case where you have a small number of actions that the user
needs to be logged in for, rather than all of them.

What if you added a value like "checkSession" using the parameter attribute
in the action mappings that required the user to be logged in. In the
"processPreprocess" method, you can look up the mapping for the action that
has been requested using

ActionMapping mapping = findMapping(path);

which is available in the ActionServlet class as well.

Once you have the mapping, yoy can call "getParameter", which will return a
String for the parameter in the ActionMapping. If no value is specified, a
null is returned. If "checkSession" of some other value is present, then
you know to check to see if the session is present and valid. If so, return
true, which allows the ActionServlet to continue on. Otherwise, you can use
the ActionMapping that you already found for the action and return to the
login page. You are probably better off declaring a global forward and
using the findForward(String name)  method in the ActionServlet to locate
the global login forward and forward to this.

By doing it like this, you make the whole thing very generic and
declarative. You are free to change which actions need to have the user
logged in without modifying any source code. The "processPreprocess" method
stays completly generic.

What does everything about this approach? I think I'll mention this in the
security chapter of the book.

Chuck

At 12:14 PM 3/5/2002 +, you wrote:
>Yep, all makes sense. Thanks to both of you. I'm a lot happier with how the
>logic is partitioned now and I like the validate="false" idea very much.
>
>Thanks,
>Matt.
>
>-Original Message-
>From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
>Sent: 05 March 2002 03:01
>To: Struts Users Mailing List
>Subject: RE: validate() and session expiry
>
>
>Your problem is slightly different than ours. In our application, the user
>had to be logged in to go anyw

RE: validate() and session expiry

2002-03-05 Thread Chuck Cavaness

Remember, the RequestProcessor is a 1.1 thing. You'll have to be using the
nightly build for it. Of course, the beta is just around the corner. Anyway,
the Struts 1.1 DTD defines a new element called "controller". It goes under
the root element after the action-mappings. Make sure that it's in the
correct location. It should be the last element in your struts config,
unless you have plug-in's defined. Here's an example of one from my book:

 

Notice that many of the things that were configured in the web.xml in 1.0
are now attributes on this element. The CustomerRequestProcessor listed here
extends the Struts version and this is where I override the mehtod. 

You don't have to do anything with the ActionServlet. In fact, since the
RequestProcessor is where all of the meat is now, you can just use the
Struts ActionServlet as is and there's usually no need to subclass it.

Chuck Cavaness

-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 1:22 PM
To: [EMAIL PROTECTED]
Subject: RE: validate() and session expiry


Yes, but probably a little too ambitious for me I think. On a related note
though, I can't work out what to do with your subclassed RequestProcessor
class once you've overridden the processPreprocess() method? Any pointers on
the where you configure this to be used? Do you also have to subclass the
ActionServlet and set the processor field in your subclass to the new
RequestProcessor?

Thanks,
Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 16:16
To: 'Struts Users Mailing List'
Subject: RE: validate() and session expiry


You could always extend ActionMapping (or ActionConfig for 1.1) to accept
more parameter type attributes.  Of course at that point, you're extending
the framework but's that neccessarily a bad thing.

Chuck

-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:04 AM
To: [EMAIL PROTECTED]
Subject: RE: validate() and session expiry


That looks good too but given that you're only allowed to have one
 per action mapping it would preclude the use of parameter for
anything else. It would definitely make DispatchAction difficult to use. I
do like the idea of being able to configure this in struts-config.xml
though. Maybe it could be implemented as requiresSession="true"?

Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 12:57
To: Struts Users Mailing List
Subject: RE: validate() and session expiry


Matt,

   I had one other idea that I wanted to share with you. It came to be as I
was just starting to work on the security chapter for the Struts book. This
is for the case where you have a small number of actions that the user
needs to be logged in for, rather than all of them.

What if you added a value like "checkSession" using the parameter attribute
in the action mappings that required the user to be logged in. In the
"processPreprocess" method, you can look up the mapping for the action that
has been requested using

ActionMapping mapping = findMapping(path);

which is available in the ActionServlet class as well.

Once you have the mapping, yoy can call "getParameter", which will return a
String for the parameter in the ActionMapping. If no value is specified, a
null is returned. If "checkSession" of some other value is present, then
you know to check to see if the session is present and valid. If so, return
true, which allows the ActionServlet to continue on. Otherwise, you can use
the ActionMapping that you already found for the action and return to the
login page. You are probably better off declaring a global forward and
using the findForward(String name)  method in the ActionServlet to locate
the global login forward and forward to this.

By doing it like this, you make the whole thing very generic and
declarative. You are free to change which actions need to have the user
logged in without modifying any source code. The "processPreprocess" method
stays completly generic.

What does everything about this approach? I think I'll mention this in the
security chapter of the book.

Chuck

At 12:14 PM 3/5/2002 +, you wrote:
>Yep, all makes sense. Thanks to both of you. I'm a lot happier with how the
>logic is partitioned now and I like the validate="false" idea very much.
>
>Thanks,
>Matt.
>
>-Original Message-
>From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
>Sent: 05 March 2002 03:01
>To: Struts Users Mailing List
>Subject: RE: validate() and session expiry
>
>
>Your problem is slightly different than ours. In our application, the user
>had to be logged in to go anywhere. This mechanism was a way to catch the
>problem when a user has already logged in and let's the session timeout.
>They then invoke an action that has a form that uses the session object for
>something, like getting the user's Locale. Although I agree with Bryan that
>having anything other than present

RE: Pre Populating Fields - bit of a newbie question

2002-03-05 Thread Ross MacCharles

Try initializing the endDate member data when the ActionForm bean is
instantiated

/Ross

 -Original Message-
From:   Mattos, John [mailto:[EMAIL PROTECTED]] 
Sent:   Tuesday, March 05, 2002 12:28 PM
To: 'Struts Users Mailing List'
Subject:RE: Pre Populating Fields - bit of a newbie question

Anyone?

Pre populating fields?

John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014


-Original Message-
From: Mattos, John [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:19 AM
To: 'Struts Users Mailing List'
Subject: Pre Populating Fields - bit of a newbie question


Hi

I need to have a startDate and endDate field in my form, and I'd like to
prepopulate the endDate field with today's date. There's a bean that has
set/getEndDate() methods, and I get to the form from an Action.perform()
call

What's the best way to prepopulate that field?

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: validate() and session expiry

2002-03-05 Thread Matt Read

Yes, but probably a little too ambitious for me I think. On a related note
though, I can't work out what to do with your subclassed RequestProcessor
class once you've overridden the processPreprocess() method? Any pointers on
the where you configure this to be used? Do you also have to subclass the
ActionServlet and set the processor field in your subclass to the new
RequestProcessor?

Thanks,
Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 16:16
To: 'Struts Users Mailing List'
Subject: RE: validate() and session expiry


You could always extend ActionMapping (or ActionConfig for 1.1) to accept
more parameter type attributes.  Of course at that point, you're extending
the framework but's that neccessarily a bad thing.

Chuck

-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:04 AM
To: [EMAIL PROTECTED]
Subject: RE: validate() and session expiry


That looks good too but given that you're only allowed to have one
 per action mapping it would preclude the use of parameter for
anything else. It would definitely make DispatchAction difficult to use. I
do like the idea of being able to configure this in struts-config.xml
though. Maybe it could be implemented as requiresSession="true"?

Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 12:57
To: Struts Users Mailing List
Subject: RE: validate() and session expiry


Matt,

   I had one other idea that I wanted to share with you. It came to be as I
was just starting to work on the security chapter for the Struts book. This
is for the case where you have a small number of actions that the user
needs to be logged in for, rather than all of them.

What if you added a value like "checkSession" using the parameter attribute
in the action mappings that required the user to be logged in. In the
"processPreprocess" method, you can look up the mapping for the action that
has been requested using

ActionMapping mapping = findMapping(path);

which is available in the ActionServlet class as well.

Once you have the mapping, yoy can call "getParameter", which will return a
String for the parameter in the ActionMapping. If no value is specified, a
null is returned. If "checkSession" of some other value is present, then
you know to check to see if the session is present and valid. If so, return
true, which allows the ActionServlet to continue on. Otherwise, you can use
the ActionMapping that you already found for the action and return to the
login page. You are probably better off declaring a global forward and
using the findForward(String name)  method in the ActionServlet to locate
the global login forward and forward to this.

By doing it like this, you make the whole thing very generic and
declarative. You are free to change which actions need to have the user
logged in without modifying any source code. The "processPreprocess" method
stays completly generic.

What does everything about this approach? I think I'll mention this in the
security chapter of the book.

Chuck

At 12:14 PM 3/5/2002 +, you wrote:
>Yep, all makes sense. Thanks to both of you. I'm a lot happier with how the
>logic is partitioned now and I like the validate="false" idea very much.
>
>Thanks,
>Matt.
>
>-Original Message-
>From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
>Sent: 05 March 2002 03:01
>To: Struts Users Mailing List
>Subject: RE: validate() and session expiry
>
>
>Your problem is slightly different than ours. In our application, the user
>had to be logged in to go anywhere. This mechanism was a way to catch the
>problem when a user has already logged in and let's the session timeout.
>They then invoke an action that has a form that uses the session object for
>something, like getting the user's Locale. Although I agree with Bryan that
>having anything other than presentation validation in the ActionForm is
>dangerous, let's face it; sometimes we do stupid things.
>
>Chuck
>
>At 02:50 AM 3/5/2002 +, you wrote:
> >Thanks, that sounds like a good solution. My only reservation is that in
> >processPreprocess() you'd have to effectively hard-code a list of the
> >request paths that require a user to login. I suppose you have to do it
> >somewhere though.
> >
> >Matt.
> >
> >-Original Message-
> >From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
> >Sent: 05 March 2002 02:34
> >To: Struts Users Mailing List
> >Subject: Re: validate() and session expiry
> >
> >
> >We had the same issue to deal with. What we did was in our ActionServet
> >(which subclassed Struts ActionServlet), was to override the
> >"processPreprocess" method, which is called for every request. We checked
> >the session there, instead of in every Action perform method. If the
> >session is expired or the user isn't logged in, we perform a redirect to
> >the login page. This worked out very nicely and also allowed us to remove
> >the check in the Action cl

Re: Digester Question

2002-03-05 Thread Steve A Drake

On Mon, 4 Mar 2002, Craig Tataryn wrote:

> I realize that the digester is now part of commons, but I figure there is
> probably a lot of expertise here since it grew up in Struts.  I was
> wondering if someone could help me figure out the easiest way to do this:
>
> I have an xml document, that holds form data, I would like to use the
> digester to populate my objects automatically.  A form file might look like
> this:
>
> 
>   
>  
>   
>   
>   ...
>   
> ...
> 
>
> Let's assume there are many forms...  I was wondering, without having to
> load all forms into objects and then picking the one I want to use, I would
> rather the digester only instantiate and populate an object for lets say,
> the form node who's type attribute is "calculator".
>
> What's the easiest way to do this?  I don't think the digester can pattern
> match on attribute values the way XPath does, so is there a programming
> technique I can use to filter further?

 Hi Craig. Since, AFAIK, the digester blindly instantiates all of the
implied objects in your database file, I think that you'll need to parse the
database file independently. You might try parsing the database file
using JDOM, extracting the elements that you want and passing that
snippet to the digester. I think that utilizing JDOM, you'll get working
code much faster than you would with raw SAX parsing. I have used
JDOM but I haven't tried utilizing it with the digester - just an idea.


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




RE: Has any one used struts with castor as a persistence mechanism....

2002-03-05 Thread John Menke

Check out http://chiki.emaho.org  Ghoot has source code available and uses
castor.

-Original Message-
From: rajesh kalluri [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 12:37 PM
To: Struts Users Mailing List
Subject: Has any one used struts with castor as a persistence
mechanism


Hi All,

Has any one tried to use struts with castor XML frame work for persistence
if so could you please share your experiences and throw soem guidance.

1-As a starting point i have tried to generate java classes from a schema
using source generator of castor.

2-I have made ActionForm as my super class to the generated classes.

3-Unfortunately if i want to use the marshalling and un marshalling power of
castor i have to generate marshall/unmarshall/valiate methods, this is where
i run into problems as the validate method of ActionForm clashes with them.

4- To over come this i may have to generate two sets of beans with the
source generator one as FormBeans and one with marshall/unmarshall capacity

5 Then i  can use some commons utilities to transfer data from form beans to
data beans and persist them

6 I feel this will be a nice way of xml round tripping, even though i am
aware of similar solutions using digester and other utils.

Please let me know if  this process can be refined if any one has similar
experience

Regards
Rajesh


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




RE: Help to manage html href tag with sruts

2002-03-05 Thread Don Dumrauf

I did this:
 etc.
I defined mailTo as a String = "mailto:";
Hope this answers your question

-Original Message-
From: Apollinaire Coulibaly [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 12:41 PM
To: [EMAIL PROTECTED]
Subject: Help to manage html href tag with sruts


Hi all,

I've the following situation: I have to manage this html tag 
Can some tell to me how to manage it using taglibrary? how can I pass the
user 
email adress to the tag as:  
Thanks all

PitB

-- 

___
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup




--
To unsubscribe, e-mail:

For additional commands, e-mail:





This email and any files transmitted with it are confidential and are
intended for the sole use of the individual to whom they are addressed.
Black Box Corporation reserves the right to scan all e-mail traffic for
restricted content and to monitor all e-mail in general. If you are not the
intended recipient or you have received this email in error, any use,
dissemination or forwarding of this email is strictly prohibited. If you
have received this email in error, please notify the sender by replying to
this email.



RE: Pre Populating Fields - bit of a newbie question

2002-03-05 Thread Jay sissom

You can use JavaScript only if you guarantee that every user of your 
application has a browser that supports JavaScript and it is enabled.  
You're probably OK if you are intranet, but with internet applications, 
you never know if someone is running WebTV or something like that.

In my mind, the point of creating an object for this is to make sure I get
a date even if JavaScript isn't enabled in the user's browser.  The time
to get a date is in milliseconds I would bet.  It's not much overhead at
all.


On Tue, 5 Mar 2002, Galbreath, Mark wrote:

> Use JavaScript.  What's the point of having the overhead of creating an
> object for something as simple as getting the current date?
> 
> Mark
> 
> -Original Message-
> From: Mattos, John [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 12:28 PM
> 
> Anyone?
> 
> Pre populating fields?
> 
> I need to have a startDate and endDate field in my form, and I'd like to
> prepopulate the endDate field with today's date. There's a bean that has
> set/getEndDate() methods, and I get to the form from an Action.perform()
> call
> 
> What's the best way to prepopulate that field?
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


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




RE: Pre Populating Fields - bit of a newbie question

2002-03-05 Thread Maturo, Larry

Hi,

The first statement was:
I need to have a startDate and endDate field in my form, and I'd like to
prepopulate the endDate field with today's date.

Easy to understand.
 
The second statement was:
There's a bean that has set/getEndDate() methods, and I get to the form 
from an Action.perform() call

This is ambiguous.  Is the bean that has set/getEndDate methods the form
bean?  If so, you just need to instantiate a copy of your form bean within
your action, convert today's date to a string, store it in the form
bean using setEndDate, and store the form bean in the request or session,
depending on how you set up your mapping in struts-config.xml.  Note that
the name you need to store the form bean under is the name you used when
setting it up in struts-config.xml.

I hope this helps, if not please repost with more details.


-- Larry Maturo

-Original Message-
From: Mattos, John [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:28 AM
To: 'Struts Users Mailing List'
Subject: RE: Pre Populating Fields - bit of a newbie question


Anyone?

Pre populating fields?

John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014


-Original Message-
From: Mattos, John [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:19 AM
To: 'Struts Users Mailing List'
Subject: Pre Populating Fields - bit of a newbie question


Hi

I need to have a startDate and endDate field in my form, and I'd like to
prepopulate the endDate field with today's date. There's a bean that has
set/getEndDate() methods, and I get to the form from an Action.perform()
call

What's the best way to prepopulate that field?

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Re: Pre Populating Fields - bit of a newbie question

2002-03-05 Thread rajesh kalluri

May be you can use the jakarta datetime taglib with some thign like this.




 
  ">
  
 


Refer to

http://jakarta.apache.org/taglibs/doc/datetime-doc/datetime-1.0-B1/index.htm
l for more examples.

Regards

- Original Message -
From: "Galbreath, Mark" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 12:56 PM
Subject: RE: Pre Populating Fields - bit of a newbie question


> Use JavaScript.  What's the point of having the overhead of creating an
> object for something as simple as getting the current date?
>
> Mark
>
> -Original Message-
> From: Mattos, John [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 12:28 PM
>
> Anyone?
>
> Pre populating fields?
>
> I need to have a startDate and endDate field in my form, and I'd like to
> prepopulate the endDate field with today's date. There's a bean that has
> set/getEndDate() methods, and I get to the form from an Action.perform()
> call
>
> What's the best way to prepopulate that field?
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




RE: Pre Populating Fields - bit of a newbie question

2002-03-05 Thread Galbreath, Mark

Use JavaScript.  What's the point of having the overhead of creating an
object for something as simple as getting the current date?

Mark

-Original Message-
From: Mattos, John [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 12:28 PM

Anyone?

Pre populating fields?

I need to have a startDate and endDate field in my form, and I'd like to
prepopulate the endDate field with today's date. There's a bean that has
set/getEndDate() methods, and I get to the form from an Action.perform()
call

What's the best way to prepopulate that field?

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




RE: design question

2002-03-05 Thread Callas, Jeff P.

Ted:
How can I get off the Struts Mailing List.
I've tried sending an eMail to:

To subscribe to the list, send a message to:
   <[EMAIL PROTECTED]>



-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:12 AM
To: Struts Users Mailing List
Subject: Re: design question


A third option people have mentioned is to serialize the form-bean as a
single hidden field. As part of validate, you can repopulate any null
fields. 

Never actually tried this one myself, but it seems clever. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


keithBacon wrote:
> 
> You have to keep the data in the session or write it to the database.
(Storing
> it on each form as hidden fields seems too fiddly to me).
> Unless you have huge volumes I actually prefer to save it on the database
&
> have a status field that indicates the data is incomplete.
> 
> --- Ronald Haring <[EMAIL PROTECTED]> wrote:
> > Ah yes,
> > that is a solution. But then you have to keep the general data in
session
> > indeed, which I never feel to comfortable about. But thx for the
pointer.
> >
> > Gr
> > Ronald
> >
> > > i see
> > > I am looking to build something similar and I am thinking of
> > > managing this
> > > through the action mappings.
> > > I am hoping to manage this as follows using the same action
> > > and keeping the
> > > form in the session.
> > > I plan to read up on building wizard type forms but from my
> > > small knowledge
> > > i think this wwould work
> > > e.g.
> > > 
> > >   parameter="PAGE1"
> > >   type=".mo..web.EditAction"
> > >   name="DatabaseTypeForm"
> > >   scope="session"
> > >   validate="false">
> > >   
> > > 
> > > 
> > > etc
> > > 
> > > 
> > > etc
> > > 
> > >
> > > etc
> > > 
> > >
> >
> >
> > Furore B.V.
> > Rijswijkstraat 175-8
> > Postbus 9204
> > 1006 AE Amsterdam
> > tel. (020) 346 71 71
> > fax. (020) 346 71 77
> >
> >

> > ---
> > The information transmitted is intended only for the person
> > or entity to which it is addressed and may contain confidential
> > and/or privileged material. Any review, retransmission,
> > dissemination or other use of, or taking of any action in
> > reliance upon, this information by persons or entities other
> > than the intended recipient is prohibited. If you received
> > this in error, please contact the sender and delete the material
> > from any computer
> >

> > ---
> >
> >
> 
> =
> ~~
> Search the archive:-
> http://www.mail-archive.com/struts-user%40jakarta.apache.org/
> ~~
> Keith Bacon - Looking for struts work - South-East UK.
> phone UK 07960 011275
> 
> __
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Has any one used struts with castor as a persistence mechanism....

2002-03-05 Thread rajesh kalluri

Hi All,

Has any one tried to use struts with castor XML frame work for persistence
if so could you please share your experiences and throw soem guidance.

1-As a starting point i have tried to generate java classes from a schema
using source generator of castor.

2-I have made ActionForm as my super class to the generated classes.

3-Unfortunately if i want to use the marshalling and un marshalling power of
castor i have to generate marshall/unmarshall/valiate methods, this is where
i run into problems as the validate method of ActionForm clashes with them.

4- To over come this i may have to generate two sets of beans with the
source generator one as FormBeans and one with marshall/unmarshall capacity

5 Then i  can use some commons utilities to transfer data from form beans to
data beans and persist them

6 I feel this will be a nice way of xml round tripping, even though i am
aware of similar solutions using digester and other utils.

Please let me know if  this process can be refined if any one has similar
experience

Regards
Rajesh


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




Help to manage html href tag with sruts

2002-03-05 Thread Apollinaire Coulibaly

Hi all,

I've the following situation: I have to manage this html tag 
Can some tell to me how to manage it using taglibrary? how can I pass the user 
email adress to the tag as:  
Thanks all

PitB

-- 

___
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup




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




RE: Pre Populating Fields - bit of a newbie question

2002-03-05 Thread keithBacon

There is lots about this in the mail archive. Did u look there?

--- "Mattos, John" <[EMAIL PROTECTED]> wrote:
> Anyone?
> 
> Pre populating fields?
> 
> John Mattos
> Sr. Developer and Architect
> iNDEMAND
> 345 Hudson St. 16th Floor
> New York, New York
> 10014
> 
> 
> -Original Message-
> From: Mattos, John [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 11:19 AM
> To: 'Struts Users Mailing List'
> Subject: Pre Populating Fields - bit of a newbie question
> 
> 
> Hi
> 
> I need to have a startDate and endDate field in my form, and I'd like to
> prepopulate the endDate field with today's date. There's a bean that has
> set/getEndDate() methods, and I get to the form from an Action.perform()
> call
> 
> What's the best way to prepopulate that field?
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




Re: Poolman Setup with Struts under tomcat 3.3

2002-03-05 Thread Jin Bal

You're probably already doing but  just in case:

when you get your datasource use the static method in the PoolMan class
(PoolMan.findDataSource)
This will return you a datasource from poolman.
The fact that it works when you put the datasource tag back in the struts
config xml suggests that it is still trying to us the struts datasource
object (actionservlet.findDataSource i think).

HTH

Jin
- Original Message -
From: "Satish Jeejula" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 4:34 PM
Subject: Poolman Setup with Struts under tomcat 3.3


> Hello All,
>
> I am try to use poolman with struts under tomcat 3.3. I placed poolman.xml
> in the web-inf\classes directory and removed the datasource tag from
> struts-config.xml.
>
> But it is throwing following error...
>
> java.sql.SQLException: SQLException occurred in JDBCPool:
> java.sql.SQLException:
>  Io exception: The Network Adapter could not establish the connection
> params: oracle.jdbc.driver.OracleDriver,
> jdbc:oracle:thin:@216.136.75.139:1521:proddb.
>
> But if I put the datasource tag back in struts-config.xml .. it works
fine.
> But I am not sure which connection pooling (Poolman or Struts) it is using
> when I say getConnection() in my code.
>
>
> Do I have to place the datasource tag also along with poolman.xml???
>
> It is very urgent for me to solve this problem.
>
> Any help is appreciated ... thanks
>
> Satish
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>

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




RE: Pre Populating Fields - bit of a newbie question

2002-03-05 Thread Mattos, John

Anyone?

Pre populating fields?

John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014


-Original Message-
From: Mattos, John [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:19 AM
To: 'Struts Users Mailing List'
Subject: Pre Populating Fields - bit of a newbie question


Hi

I need to have a startDate and endDate field in my form, and I'd like to
prepopulate the endDate field with today's date. There's a bean that has
set/getEndDate() methods, and I get to the form from an Action.perform()
call

What's the best way to prepopulate that field?

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Handling exceptions

2002-03-05 Thread Hani Hamandi

Hmm, well, I think you should care about that.
If a JVM exception happens, there is most probably something wrong going on.
If you don't catch the exception/error, your user will get an ugly 505
server error or something like that. Your decision will depend on whether
this is okay in your application or not (from a product management point of
view). In our case, it was not. We prepared a nicely formatted Error page
with phone numbers and contact information apologizing for the inconvenience
... etc. We forward to this Error page is served whenever an "abnormal"
exception takes place, i.e., when we end up in the "catch Throwable" block
in validate() or in perform().

Hani.

-Original Message-
From: Dariusz Wojtas [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 4:06 PM
To: Struts Users Mailing List
Subject: RE: Handling exceptions


OK, that was helpful - now I see it from different perspective.
But what if somebody argues that Throwable catches
also JVM exceptions, like ThreadDeath or OutOfMemory
and similar? Should I care about that or not?
If not then why?

 Dariusz Wojtas


At 13:14 02-03-04 -0500, you wrote:
>Catching Throwable will catch both Exceptions and Errors. Catching
Exception
>will only catch Exceptions.
>You will want to catch Exceptions *AND* Errors to be bullet-proof.
>We were catching Exception for a while and we thought we were covered,
until
>one day we got (due to some weird deployment) a NoClassDefFoundError, which
>of course escaped the "catch Exception" and barfed right in front of the
>user in their browser as an ugly 505.
>
>So I think catch Throwable should be your final catch-all after you have
>handled all your "normal" exceptions.
>
>Good luck,
>Hani.


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Need Help: clues to an error message

2002-03-05 Thread Kanoza, Douglas (NCI)

When I've gotten that error, it's because my struts-config.xml file was
invalid: missed closing tag, whatever.

-Original Message-
From: Sher_A [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 05, 2002 12:16 PM
To: Struts Users Mailing List
Subject: Need Help: clues to an error message

What's the likely reason for the following error message?

Cannot find ActionMappings or ActionFormBeans collection

Or where to look first?
I've stared at my struts-config.xml for days now.

Details will be supplied if requested.


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Need Help: clues to an error message

2002-03-05 Thread Sher_A

What's the likely reason for the following error message?

Cannot find ActionMappings or ActionFormBeans collection

Or where to look first?
I've stared at my struts-config.xml for days now.

Details will be supplied if requested.


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




Re: Ping on 1.1 or Tiles/Nightly working

2002-03-05 Thread Cedric Dumoulin


  I have used the simplest and quicker solution in order to make Tiles working
with latest Struts build ;-).

  If it is possible to use plug-in rather than extension mechanism, this will be
done. Unfortunately, I haven't found free time to look at this ;-). If you
already have a patch for this, let us know !

Cedric

Andre Beskrowni wrote:

> hmm.  are we still going to have to extend the controller class to use
> tiles?  (used to be ActionServlet, now it's RequestProcessor...)  i was
> hoping that this would make use of the new plug-in capabilities --- or is
> just validator going in that direction?
>
> ab
>
> > -Original Message-
> > From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, March 04, 2002 7:40 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Ping on 1.1 or Tiles/Nightly working
> >
> >
> > Subject: Re: Ping on 1.1 or Tiles/Nightly working
> > From: Vic Cekvenich <[EMAIL PROTECTED]>
> >  ===
> > Add this in Struts-config:
> > > processorClass="org.apache.struts.tiles.TilesRequestProcessor">
> >
> >
> > Vic
> >
> >
> > Sean Willson wrote:
> >
> > > I wanted to ping any developers that may be listening to
> > get an update
> > > as to when they might think the nightly will work with
> > Tiles or when 1.1
> > > beta/alpha may start rolling? I know people talked about
> > pre JavaOne etc
> > > ... wanted to get a feel as our product is readying for
> > release and we
> > > have a few things in the nightly that we would like to use,
> > otherwise we
> > > have to code around them. I already read the website, and I
> > understand
> > > that it is ready when it is ready, I was just wondering if
> > I could get
> > > an ETA ... thanks again guys.
> > >
> > > Sean
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > 
> > > For additional commands, e-mail:
> > > 
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


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




RE: design question

2002-03-05 Thread Ronald Haring

this looks very nice indeed. I will look into this some more. Thx Ted

Gr
Ronald 

> At this point, I rarely write custom Actions any more. Now I 
> try to use
> a framework action to handle all the usual action-stuff, and 
> pass it the
> name of a business bean to invoke as part of the 
> ActionMapping. At this
> point, I'm creating moderately complex application using only 
> the stock
> actions in the scaffold package. Lots and lots of business beans, but
> very action classes. 
> 
> http://cvs.apache.org/viewcvs/jakarta-struts/contrib/scaffold/
> src/framework/main/org/apache/scaffold/http/
> 
> What I'm thinking about now is extending ActionMapping so that it has
> the same type of functionality embedded in the DispatchAction. To wit,
> let you specify an object to instantiate and a method to call from the
> ActionMapping. There could actually be a couple of different method
> signatures to call, maybe a perform, an execute, and then an 
> invoke that
> just took a single object (the ActionForm), but have them 
> each return a
> collection. There could also be an attribute to give whatever they
> return a name, and pop it into a context. 
> 
> I think we can really dispense with most actions almost 
> completely, and
> configure most everything from the Struts config, as Craig 
> envisioned in
> his workflow proposal. Most of what the Actions do is very 
> predictible,
> it's just the wee-bit of business logic in the middle that makes one
> different from the other.


Furore B.V.
Rijswijkstraat 175-8
Postbus 9204
1006 AE Amsterdam
tel. (020) 346 71 71
fax. (020) 346 71 77


---
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other
than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material
from any computer

---




RE: "parameter" attribute in the action-mapping... what is it?

2002-03-05 Thread Steve Earl

Does anyone know if you can specify more than a single parameter on the
actionMapping definition within the struts-config.xml file?

The reason for the question is that I'd like to do something similar to
what's specified below - have an action which processes several related
tasks using a parameter to distinguish them. However, I'm also using Steve
Ditlinger's ssl tag extension and that requires a parameter on the
actionMapping of "secure".

All advice appreciated.

regards,
steve

__ 
Steve Earl


-Original Message-
From: Donald Miller [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 3:33 PM
To: Struts Users Mailing List
Subject: Re: "parameter" attribute in the action-mapping... what is it?



It's a general purpose attribute you can use to pass any desired
information into the action from the struts-config.xml file.  You can
access the parameter's value within the action class via the
mapping.getParameter() method.  For actions requiring multiple steps, the
parameter is often used to indicate which step the mapping is associated
with.  For example:

...

...

...

I hope this helps.  Take care.

Don


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: Nesting Extension and persistance strategy--castor any one?

2002-03-05 Thread John Menke

Rajesh,

That sounds interesting.  I started looking at Castor also, but now I'm
looking more into Simper.  Let me know how it goes maybe we can share notes.

-john

-Original Message-
From: rajesh kalluri [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:32 AM
To: Struts Users Mailing List
Subject: Re: Nesting Extension and persistance strategy--castor any one?


Hi All,

I am not the expert in the field of designing OO persistence mechanisms.

I am a fan of nested beans and also i have been playing with castor lately.

So am thinking if we can map our monkey object schema to a db schema (I can
hear a lot of thats easy). Then it should be a snap to marshall/unmarshall
monkey beans  (nested in general) into XML files/ data base tables.

I would start playing with it as soon as i have time.


Regards
Rajesh Kalluri.
Manduca Management LLC,
Suite 230, 5757 Blue Lagoon Dr.
Miami, FL 33126.
AIM: [EMAIL PROTECTED]
Phone: 786-552-0521
Fax: 786-552-0501

- Original Message -
From: "Arron Bates" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, March 04, 2002 11:16 PM
Subject: Re: Nesting Extension and persistance strategy


> >
> >
> > I like beans managing dirty state becuause I could possibly have one
> > method
> > that can handle several different structures if it's designed right.
> >
> > Maybe this:
> >
> > Have all DataBeans implement an interface lets day DirtyInterface that
> > defines
> > 2 methods:
> >
> > public String getDirtyAttribute() and
> > public void callJDBC(String dirtyAttribute)
> >
> > the dirtyAttribute class member could be one of several values:
> >
> > insert
> > update
> > delete
> > (select)
> >
> > callJDBCbean(String dirtyAttribute) would call a JDBCbean
> > corresponding to
> > the databean,
> > not sure how to define this, maybe in a way similar to the mapping of
> > Actions?
> >
> > So then in the Action associated with the ActionForm we could pass the
> > ActionForm into a Method that will call getDirtyAttribute and
> > callJDBCbean
> > for each bean that is nested within the ActionForm.
> >
> > Having trouble thinking of way to iterate through the beans, but I think
> > it's possible.
> >
>
> I think that to get it more in line with the stupid-model-paradigm (SMP?
> :) your beans could manage their dirty state, but the actual persistence
> management be handled by a separate object, that takes the bean types in
> overloaded methods.
> eg:
> persistDirtyBean(Organisation org) {...}
> persistDirtyBean(Team team) {...}
> persistDirtyBean(Investor investor) {...}
> persistDirtyBean(Portfolio portfolio) {...}
> persistDirtyBean(Stock stock) {...}
>
> Then you could just throw whatever bean at it you needed. The class
> itself could even iterate the tree itself, in that the Organisation
> version of the PersistDirtyBean would get Team objects, and then from
> this method could call the Team persist method for whatever team. Or you
> can, in just as correct a manner, use it ad-hoc just throwing whatever
> object. Means that the persist methods aren't living with their related
> Object, so some OO guru may say it's not defending the faith.
>
> There's just so many ways you can attack this. But I think that you're
> in the right frame of mind to take it on at least. :)
>
> >>> How complex are the types/structure of your hierarchy?...
> >>>
> > Pretty simple.  Actually it almost maps exactly to your example
> >
> > Organization
> > Team
> > Investor
> > Portfolio
> > Stock
> >
>
> Simple until you have to persist the thing. :)
> My definition of simple is when making a table you have a bean with a
> collection of one type of object, that can be retrieved and updated with
> one query.
>
> Oh, I miss those days when people thought that just seeing data was
> special...
> ...and that it was on the "Information Super-Highway"... there's a term
> that brings on flash-backs.
>
>
> Arron.
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Re: Nesting Extension and persistance strategy--castor any one?

2002-03-05 Thread rajesh kalluri

Hi All,

I am not the expert in the field of designing OO persistence mechanisms.

I am a fan of nested beans and also i have been playing with castor lately.

So am thinking if we can map our monkey object schema to a db schema (I can
hear a lot of thats easy). Then it should be a snap to marshall/unmarshall
monkey beans  (nested in general) into XML files/ data base tables.

I would start playing with it as soon as i have time.


Regards
Rajesh Kalluri.
Manduca Management LLC,
Suite 230, 5757 Blue Lagoon Dr.
Miami, FL 33126.
AIM: [EMAIL PROTECTED]
Phone: 786-552-0521
Fax: 786-552-0501

- Original Message -
From: "Arron Bates" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, March 04, 2002 11:16 PM
Subject: Re: Nesting Extension and persistance strategy


> >
> >
> > I like beans managing dirty state becuause I could possibly have one
> > method
> > that can handle several different structures if it's designed right.
> >
> > Maybe this:
> >
> > Have all DataBeans implement an interface lets day DirtyInterface that
> > defines
> > 2 methods:
> >
> > public String getDirtyAttribute() and
> > public void callJDBC(String dirtyAttribute)
> >
> > the dirtyAttribute class member could be one of several values:
> >
> > insert
> > update
> > delete
> > (select)
> >
> > callJDBCbean(String dirtyAttribute) would call a JDBCbean
> > corresponding to
> > the databean,
> > not sure how to define this, maybe in a way similar to the mapping of
> > Actions?
> >
> > So then in the Action associated with the ActionForm we could pass the
> > ActionForm into a Method that will call getDirtyAttribute and
> > callJDBCbean
> > for each bean that is nested within the ActionForm.
> >
> > Having trouble thinking of way to iterate through the beans, but I think
> > it's possible.
> >
>
> I think that to get it more in line with the stupid-model-paradigm (SMP?
> :) your beans could manage their dirty state, but the actual persistence
> management be handled by a separate object, that takes the bean types in
> overloaded methods.
> eg:
> persistDirtyBean(Organisation org) {...}
> persistDirtyBean(Team team) {...}
> persistDirtyBean(Investor investor) {...}
> persistDirtyBean(Portfolio portfolio) {...}
> persistDirtyBean(Stock stock) {...}
>
> Then you could just throw whatever bean at it you needed. The class
> itself could even iterate the tree itself, in that the Organisation
> version of the PersistDirtyBean would get Team objects, and then from
> this method could call the Team persist method for whatever team. Or you
> can, in just as correct a manner, use it ad-hoc just throwing whatever
> object. Means that the persist methods aren't living with their related
> Object, so some OO guru may say it's not defending the faith.
>
> There's just so many ways you can attack this. But I think that you're
> in the right frame of mind to take it on at least. :)
>
> >>> How complex are the types/structure of your hierarchy?...
> >>>
> > Pretty simple.  Actually it almost maps exactly to your example
> >
> > Organization
> > Team
> > Investor
> > Portfolio
> > Stock
> >
>
> Simple until you have to persist the thing. :)
> My definition of simple is when making a table you have a bean with a
> collection of one type of object, that can be retrieved and updated with
> one query.
>
> Oh, I miss those days when people thought that just seeing data was
> special...
> ...and that it was on the "Information Super-Highway"... there's a term
> that brings on flash-backs.
>
>
> Arron.
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




Poolman Setup with Struts under tomcat 3.3

2002-03-05 Thread Satish Jeejula

Hello All,

I am try to use poolman with struts under tomcat 3.3. I placed poolman.xml
in the web-inf\classes directory and removed the datasource tag from
struts-config.xml.

But it is throwing following error... 

java.sql.SQLException: SQLException occurred in JDBCPool:
java.sql.SQLException:
 Io exception: The Network Adapter could not establish the connection
params: oracle.jdbc.driver.OracleDriver,
jdbc:oracle:thin:@216.136.75.139:1521:proddb.

But if I put the datasource tag back in struts-config.xml .. it works fine.
But I am not sure which connection pooling (Poolman or Struts) it is using
when I say getConnection() in my code. 


Do I have to place the datasource tag also along with poolman.xml???

It is very urgent for me to solve this problem.

Any help is appreciated ... thanks

Satish

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




Re: Re : logic:iterate String

2002-03-05 Thread keithBacon

that looks it is the output from the toString method of an array or collection
class. Specify proprty=... to make struts call that property instead of
toString(). (Maybe?).
 
--- "FARINE Arnaud - SOP ( [EMAIL PROTECTED] )"
<[EMAIL PROTECTED]> wrote:
> If I write this I obtain somthing like this:
> [myval1,myval2]
> Why I've got [ and ,?
> Thx
> 
> * 
> SchlumbergerSema
> Arnaud FARINE 
> Ingénieur chargé d'études
> Tel: 04.97.15.79.18 
> [EMAIL PROTECTED]
>  
> 150, Allée Pierre Ziller
> Les Bouillides - BP279
> 06905 Sophia-Antipolis Cedex
> Fax: 04.94.15.89.01 
>  * 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




Re: design question

2002-03-05 Thread Ted Husted

At this point, I rarely write custom Actions any more. Now I try to use
a framework action to handle all the usual action-stuff, and pass it the
name of a business bean to invoke as part of the ActionMapping. At this
point, I'm creating moderately complex application using only the stock
actions in the scaffold package. Lots and lots of business beans, but
very action classes. 

http://cvs.apache.org/viewcvs/jakarta-struts/contrib/scaffold/src/framework/main/org/apache/scaffold/http/

What I'm thinking about now is extending ActionMapping so that it has
the same type of functionality embedded in the DispatchAction. To wit,
let you specify an object to instantiate and a method to call from the
ActionMapping. There could actually be a couple of different method
signatures to call, maybe a perform, an execute, and then an invoke that
just took a single object (the ActionForm), but have them each return a
collection. There could also be an attribute to give whatever they
return a name, and pop it into a context. 

I think we can really dispense with most actions almost completely, and
configure most everything from the Struts config, as Craig envisioned in
his workflow proposal. Most of what the Actions do is very predictible,
it's just the wee-bit of business logic in the middle that makes one
different from the other.

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Ronald Haring wrote:
> 
> Hi all,
> 
> I've studied the design paper that Ted has put up at his site
> (http://husted.com/about/scaffolding/strutByStrut.htm) . Very clear
> explanation Ted, it only left me with one question. In your paper you state
> that every form should have its own action. However for my last project (and
> my first struts project) I used the same action for most of the forms.
> 
> This action would then decide based upon a navigate field in the form :
> - which formBean to create and populate
> - which mapping to return
> 
> based on a large if (navigation.equals("")) tree.
> 
> I submitted always to the same form, so that this ControllerAction could
> perform some default behavious I liked to execute (e.g. dynamic change of
> language, default SQLException handling) and that all the navigation was in
> the same class.
> Somehow I have the feeling that this is not the way to go.
> 
> However on the detail screens there are links to other detail screens. These
> are simple links like 
> ...  etc etc. (where
> goSubmit is a javascript function that will fill the navigate field with the
> given value and then submit the form). If I want a action for every form how
> should I set this so that showFirstDetailsScreen will go to the right
> action, without using multiple forms (since this really screws up the html
> lay-out)
> 
> Gr
> Ronald
> 
> Furore B.V.
> Rijswijkstraat 175-8
> Postbus 9204
> 1006 AE Amsterdam
> tel. (020) 346 71 71
> fax. (020) 346 71 77
> 
> 
> ---
> The information transmitted is intended only for the person
> or entity to which it is addressed and may contain confidential
> and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in
> reliance upon, this information by persons or entities other
> than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material
> from any computer
> 
> ---

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




Pre Populating Fields - bit of a newbie question

2002-03-05 Thread Mattos, John

Hi

I need to have a startDate and endDate field in my form, and I'd like to
prepopulate the endDate field with today's date. There's a bean that has
set/getEndDate() methods, and I get to the form from an Action.perform()
call

What's the best way to prepopulate that field?

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




Re: Date Form Fields Question

2002-03-05 Thread keithBacon

lots in the archive about this! 
http://www.mail-archive.com/struts-user%40jakarta.apache.org/

--- "Mattos, John" <[EMAIL PROTECTED]> wrote:
> Hi all
> 
> I have a form that contains a StartDate and EndDate text fields, and I'm
> wondering what the best way to deal with them is.
> 
> Should the Form Bean attribute be of type Date, or should I make it a
> String, and just use DateFormat.parse(StartDate); to parse it in the
> validate method?
> 
> Thoughts? Best practices?
> 
> John Mattos
> Sr. Developer and Architect
> iNDEMAND
> 345 Hudson St. 16th Floor
> New York, New York
> 10014
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




Re: Digester Question

2002-03-05 Thread Craig Tataryn

Anyone?



>From: "Craig Tataryn" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Digester Question
>Date: Mon, 04 Mar 2002 14:19:07 -0600
>
>I realize that the digester is now part of commons, but I figure there is
>probably a lot of expertise here since it grew up in Struts.  I was
>wondering if someone could help me figure out the easiest way to do this:
>
>I have an xml document, that holds form data, I would like to use the
>digester to populate my objects automatically.  A form file might look like
>this:
>
>
>  
> 
>  
>  
>  ...
>  
>...
>
>
>Let's assume there are many forms...  I was wondering, without having to
>load all forms into objects and then picking the one I want to use, I would
>rather the digester only instantiate and populate an object for lets say,
>the form node who's type attribute is "calculator".
>
>What's the easiest way to do this?  I don't think the digester can pattern
>match on attribute values the way XPath does, so is there a programming
>technique I can use to filter further?
>
>Thanks,
>
>Craig.
>
>Craig W. Tataryn
>Programmer/Analyst
>Compuware
>
>_
>Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>


Craig W. Tataryn
Programmer/Analyst
Compuware

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




RE: validate() and session expiry

2002-03-05 Thread Chuck Cavaness

You could always extend ActionMapping (or ActionConfig for 1.1) to accept
more parameter type attributes.  Of course at that point, you're extending
the framework but's that neccessarily a bad thing.

Chuck

-Original Message-
From: Matt Read [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 11:04 AM
To: [EMAIL PROTECTED]
Subject: RE: validate() and session expiry


That looks good too but given that you're only allowed to have one
 per action mapping it would preclude the use of parameter for
anything else. It would definitely make DispatchAction difficult to use. I
do like the idea of being able to configure this in struts-config.xml
though. Maybe it could be implemented as requiresSession="true"?

Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 12:57
To: Struts Users Mailing List
Subject: RE: validate() and session expiry


Matt,

   I had one other idea that I wanted to share with you. It came to be as I
was just starting to work on the security chapter for the Struts book. This
is for the case where you have a small number of actions that the user
needs to be logged in for, rather than all of them.

What if you added a value like "checkSession" using the parameter attribute
in the action mappings that required the user to be logged in. In the
"processPreprocess" method, you can look up the mapping for the action that
has been requested using

ActionMapping mapping = findMapping(path);

which is available in the ActionServlet class as well.

Once you have the mapping, yoy can call "getParameter", which will return a
String for the parameter in the ActionMapping. If no value is specified, a
null is returned. If "checkSession" of some other value is present, then
you know to check to see if the session is present and valid. If so, return
true, which allows the ActionServlet to continue on. Otherwise, you can use
the ActionMapping that you already found for the action and return to the
login page. You are probably better off declaring a global forward and
using the findForward(String name)  method in the ActionServlet to locate
the global login forward and forward to this.

By doing it like this, you make the whole thing very generic and
declarative. You are free to change which actions need to have the user
logged in without modifying any source code. The "processPreprocess" method
stays completly generic.

What does everything about this approach? I think I'll mention this in the
security chapter of the book.

Chuck

At 12:14 PM 3/5/2002 +, you wrote:
>Yep, all makes sense. Thanks to both of you. I'm a lot happier with how the
>logic is partitioned now and I like the validate="false" idea very much.
>
>Thanks,
>Matt.
>
>-Original Message-
>From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
>Sent: 05 March 2002 03:01
>To: Struts Users Mailing List
>Subject: RE: validate() and session expiry
>
>
>Your problem is slightly different than ours. In our application, the user
>had to be logged in to go anywhere. This mechanism was a way to catch the
>problem when a user has already logged in and let's the session timeout.
>They then invoke an action that has a form that uses the session object for
>something, like getting the user's Locale. Although I agree with Bryan that
>having anything other than presentation validation in the ActionForm is
>dangerous, let's face it; sometimes we do stupid things.
>
>Chuck
>
>At 02:50 AM 3/5/2002 +, you wrote:
> >Thanks, that sounds like a good solution. My only reservation is that in
> >processPreprocess() you'd have to effectively hard-code a list of the
> >request paths that require a user to login. I suppose you have to do it
> >somewhere though.
> >
> >Matt.
> >
> >-Original Message-
> >From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
> >Sent: 05 March 2002 02:34
> >To: Struts Users Mailing List
> >Subject: Re: validate() and session expiry
> >
> >
> >We had the same issue to deal with. What we did was in our ActionServet
> >(which subclassed Struts ActionServlet), was to override the
> >"processPreprocess" method, which is called for every request. We checked
> >the session there, instead of in every Action perform method. If the
> >session is expired or the user isn't logged in, we perform a redirect to
> >the login page. This worked out very nicely and also allowed us to remove
> >the check in the Action classes, since this method is called before the
> >ActionForm validate and the Action perform method.
> >
> >In 1.1, this method is moved to the RequestProcessor class, but it works
> >the same way. I'm sure there are other solutions, but this is one
approach.
> >
> >Chuck Cavaness
> >
> >At 02:20 AM 3/5/2002 +, you wrote:
> > >I've got a problem and I'm not sure whether it's my poor design or a
>struts
> > >limitation. I'd appreciate it if someone can shed some light. Let me
know
> >if
> > >you require more details.
> > >
> > >I have an action mapping for an "update my pro

Re: Multiple submit buttons solution

2002-03-05 Thread keithBacon

Hi Peter,
I just use links to do this. (I think you can use an Image as well).
Buttons are a bit ugly so I don't need this functionality.
There's lots in struts so I don't favor adding more.
Keith.


--- Peter Severin <[EMAIL PROTECTED]> wrote:
> Hi folks,
> 
> I've been searching for a solution for multple submit buttons in the
> same form
> and how it can be achieved without using javascript. Summing up
> different suggesstions
> I came with the following solution. We can encode additional parameter
> values into the submit button name and make struts handle this
> parameters transparently for us.
> For example we could have the following html code:
> 
> 
> ActionServlet would detect this parameter and auto populate the form
> with parameter 'deleteItemId' and value '10'.
> To extend this idea further we could have the following code:
> 
> 
> 
> 
> In the action we could test form.getAction() parameter value and to
> dispatch to the coresponding delete/edit method inside which we coule
> use form.getItemId() to execute the operation.
> You've got the point.
> I would like to hear comments and suggestions on this. I am willing to
> post the actual code in the future if the idea proves itself valuable.
> 
> Regards,
> Peter.
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




Role-based Validation Extension Question

2002-03-05 Thread Emaho, Ghoot

Hi,
 
I think I might be missing something here. Can someone tell me what the Role-based 
Validation extension gives you over, say, setting security restraints in the web.xml ?
 
I can set constraints on individual actions by mapping them in the web.xml. So what 
else does the extension give the developer ? 
 
This isnt a criticism, i just need someone to point it out to me. For the life of me I 
cant figure out what else you get, and i ant see any reason to use it at the moment.
 
Anyone who can point out the wood amongst the trees will be thanked kindly !
 
Cheers
 
Ghoot Emaho
Development Team Leader
Petrotechnics   Ltd

 



Re: design question

2002-03-05 Thread Ted Husted

A third option people have mentioned is to serialize the form-bean as a
single hidden field. As part of validate, you can repopulate any null
fields. 

Never actually tried this one myself, but it seems clever. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


keithBacon wrote:
> 
> You have to keep the data in the session or write it to the database. (Storing
> it on each form as hidden fields seems too fiddly to me).
> Unless you have huge volumes I actually prefer to save it on the database &
> have a status field that indicates the data is incomplete.
> 
> --- Ronald Haring <[EMAIL PROTECTED]> wrote:
> > Ah yes,
> > that is a solution. But then you have to keep the general data in session
> > indeed, which I never feel to comfortable about. But thx for the pointer.
> >
> > Gr
> > Ronald
> >
> > > i see
> > > I am looking to build something similar and I am thinking of
> > > managing this
> > > through the action mappings.
> > > I am hoping to manage this as follows using the same action
> > > and keeping the
> > > form in the session.
> > > I plan to read up on building wizard type forms but from my
> > > small knowledge
> > > i think this wwould work
> > > e.g.
> > > 
> > >   parameter="PAGE1"
> > >   type=".mo..web.EditAction"
> > >   name="DatabaseTypeForm"
> > >   scope="session"
> > >   validate="false">
> > >   
> > > 
> > > 
> > > etc
> > > 
> > > 
> > > etc
> > > 
> > >
> > > etc
> > > 
> > >
> >
> >
> > Furore B.V.
> > Rijswijkstraat 175-8
> > Postbus 9204
> > 1006 AE Amsterdam
> > tel. (020) 346 71 71
> > fax. (020) 346 71 77
> >
> > 
> > ---
> > The information transmitted is intended only for the person
> > or entity to which it is addressed and may contain confidential
> > and/or privileged material. Any review, retransmission,
> > dissemination or other use of, or taking of any action in
> > reliance upon, this information by persons or entities other
> > than the intended recipient is prohibited. If you received
> > this in error, please contact the sender and delete the material
> > from any computer
> > 
> > ---
> >
> >
> 
> =
> ~~
> Search the archive:-
> http://www.mail-archive.com/struts-user%40jakarta.apache.org/
> ~~
> Keith Bacon - Looking for struts work - South-East UK.
> phone UK 07960 011275
> 
> __
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

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




resolveEntity error

2002-03-05 Thread Akash Munjal

hi,
 I get this message when I deploy a struts based appl

resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 
'http://java.sun.com/j2ee/dtds/web-app_2_2.dtd')

 Not registered, use system identifier

Call 
org.apache.struts.action.ActionServlet.addServletMapping(action/java.lang.String,*.do/java.lang.String)

any ideas what is causing it?
thanks,
akash



Re: How to use the html:text tag properly.

2002-03-05 Thread keithBacon

I'm pretty sure if you use get/set in your form bean you should not use value.
It specifies the literal value to display in the field (I think? - as I never
use it).

--- Alex Colic <[EMAIL PROTECTED]> wrote:
> 
> Hi,
> 
> I am trying to get the value attribute to work in the text tag. I have an
> 'ITEM' bean with two properties. One is set up when the user selects an
> item. When they go to a page I want the page to display the existing value
> in 'item.primeLocation' and I want the text box to be prefilled with the
> value from 'item.primeLocation' but have the text user input go into
> 'newPrimeLocation. Both parameters are within the ITEM bean.
> 
> I think the value attribute is supposed to get the from the 'primeLocation'
> but I actually get "primeLocation" passed into the text box. I must be doing
> something wrong.
> 
> 
>   Primary Location
>   
>   
> 
> 
> 
> Thanks for any help.
> 
> Alex
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




Re: Multiple submit buttons solution

2002-03-05 Thread Olivier Dinocourt

why not use :

or


olivier

- Original Message -
From: "Peter Severin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 4:10 PM
Subject: Multiple submit buttons solution


> Hi folks,
>
> I've been searching for a solution for multple submit buttons in the
> same form
> and how it can be achieved without using javascript. Summing up
> different suggesstions
> I came with the following solution. We can encode additional parameter
> values into the submit button name and make struts handle this
> parameters transparently for us.
> For example we could have the following html code:
> 
>
> ActionServlet would detect this parameter and auto populate the form
> with parameter 'deleteItemId' and value '10'.
> To extend this idea further we could have the following code:
>
> 
> 
>
> In the action we could test form.getAction() parameter value and to
> dispatch to the coresponding delete/edit method inside which we coule
> use form.getItemId() to execute the operation.
> You've got the point.
> I would like to hear comments and suggestions on this. I am willing to
> post the actual code in the future if the idea proves itself valuable.
>
> Regards,
> Peter.
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



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




RE: Ping on 1.1 or Tiles/Nightly working

2002-03-05 Thread Andre Beskrowni

hmm.  are we still going to have to extend the controller class to use
tiles?  (used to be ActionServlet, now it's RequestProcessor...)  i was
hoping that this would make use of the new plug-in capabilities --- or is
just validator going in that direction?

ab

> -Original Message-
> From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 04, 2002 7:40 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Ping on 1.1 or Tiles/Nightly working
> 
> 
> Subject: Re: Ping on 1.1 or Tiles/Nightly working
> From: Vic Cekvenich <[EMAIL PROTECTED]>
>  ===
> Add this in Struts-config:
> processorClass="org.apache.struts.tiles.TilesRequestProcessor">
>
> 
> Vic
> 
> 
> Sean Willson wrote:
> 
> > I wanted to ping any developers that may be listening to 
> get an update 
> > as to when they might think the nightly will work with 
> Tiles or when 1.1 
> > beta/alpha may start rolling? I know people talked about 
> pre JavaOne etc 
> > ... wanted to get a feel as our product is readying for 
> release and we 
> > have a few things in the nightly that we would like to use, 
> otherwise we 
> > have to code around them. I already read the website, and I 
> understand 
> > that it is ready when it is ready, I was just wondering if 
> I could get 
> > an ETA ... thanks again guys.
> > 
> > Sean
> > 
> > 
> > -- 
> > To unsubscribe, e-mail:   
> > 
> > For additional commands, e-mail: 
> > 
> > 
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:


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




RE: validate() and session expiry

2002-03-05 Thread Matt Read

That looks good too but given that you're only allowed to have one
 per action mapping it would preclude the use of parameter for
anything else. It would definitely make DispatchAction difficult to use. I
do like the idea of being able to configure this in struts-config.xml
though. Maybe it could be implemented as requiresSession="true"?

Matt.

-Original Message-
From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
Sent: 05 March 2002 12:57
To: Struts Users Mailing List
Subject: RE: validate() and session expiry


Matt,

   I had one other idea that I wanted to share with you. It came to be as I
was just starting to work on the security chapter for the Struts book. This
is for the case where you have a small number of actions that the user
needs to be logged in for, rather than all of them.

What if you added a value like "checkSession" using the parameter attribute
in the action mappings that required the user to be logged in. In the
"processPreprocess" method, you can look up the mapping for the action that
has been requested using

ActionMapping mapping = findMapping(path);

which is available in the ActionServlet class as well.

Once you have the mapping, yoy can call "getParameter", which will return a
String for the parameter in the ActionMapping. If no value is specified, a
null is returned. If "checkSession" of some other value is present, then
you know to check to see if the session is present and valid. If so, return
true, which allows the ActionServlet to continue on. Otherwise, you can use
the ActionMapping that you already found for the action and return to the
login page. You are probably better off declaring a global forward and
using the findForward(String name)  method in the ActionServlet to locate
the global login forward and forward to this.

By doing it like this, you make the whole thing very generic and
declarative. You are free to change which actions need to have the user
logged in without modifying any source code. The "processPreprocess" method
stays completly generic.

What does everything about this approach? I think I'll mention this in the
security chapter of the book.

Chuck

At 12:14 PM 3/5/2002 +, you wrote:
>Yep, all makes sense. Thanks to both of you. I'm a lot happier with how the
>logic is partitioned now and I like the validate="false" idea very much.
>
>Thanks,
>Matt.
>
>-Original Message-
>From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
>Sent: 05 March 2002 03:01
>To: Struts Users Mailing List
>Subject: RE: validate() and session expiry
>
>
>Your problem is slightly different than ours. In our application, the user
>had to be logged in to go anywhere. This mechanism was a way to catch the
>problem when a user has already logged in and let's the session timeout.
>They then invoke an action that has a form that uses the session object for
>something, like getting the user's Locale. Although I agree with Bryan that
>having anything other than presentation validation in the ActionForm is
>dangerous, let's face it; sometimes we do stupid things.
>
>Chuck
>
>At 02:50 AM 3/5/2002 +, you wrote:
> >Thanks, that sounds like a good solution. My only reservation is that in
> >processPreprocess() you'd have to effectively hard-code a list of the
> >request paths that require a user to login. I suppose you have to do it
> >somewhere though.
> >
> >Matt.
> >
> >-Original Message-
> >From: Chuck Cavaness [mailto:[EMAIL PROTECTED]]
> >Sent: 05 March 2002 02:34
> >To: Struts Users Mailing List
> >Subject: Re: validate() and session expiry
> >
> >
> >We had the same issue to deal with. What we did was in our ActionServet
> >(which subclassed Struts ActionServlet), was to override the
> >"processPreprocess" method, which is called for every request. We checked
> >the session there, instead of in every Action perform method. If the
> >session is expired or the user isn't logged in, we perform a redirect to
> >the login page. This worked out very nicely and also allowed us to remove
> >the check in the Action classes, since this method is called before the
> >ActionForm validate and the Action perform method.
> >
> >In 1.1, this method is moved to the RequestProcessor class, but it works
> >the same way. I'm sure there are other solutions, but this is one
approach.
> >
> >Chuck Cavaness
> >
> >At 02:20 AM 3/5/2002 +, you wrote:
> > >I've got a problem and I'm not sure whether it's my poor design or a
>struts
> > >limitation. I'd appreciate it if someone can shed some light. Let me
know
> >if
> > >you require more details.
> > >
> > >I have an action mapping for an "update my profile" page with an
>associated
> > >ActionForm and validate="true". In order to navigate to this form the
>user
> > >has to login first. The Action itself checks that the user is logged in
>in
> > >the perform() method. If he isn't then he's forwarded back to the login
> > >action. This all works fine in the case where the session expires and
the
> > >user clicks on the link to tak

RE: design question

2002-03-05 Thread Ronald Haring

> You have to keep the data in the session or write it to the 
> database. (Storing
> it on each form as hidden fields seems too fiddly to me).
> Unless you have huge volumes I actually prefer to save it on 
> the database &
> have a status field that indicates the data is incomplete.

that is true for data entry screens. Not for various display screens where
you only need an identifier to retrieve your information from a database.

For data entry screens I think I will have to rely on sessions, since I like
my data in the database to be complete otherwise you should have a worker
thread to check your database for incomplete fields and destroy these
incomplete records after a number of time/days/weeks.

Gr
Ronald


Furore B.V.
Rijswijkstraat 175-8
Postbus 9204
1006 AE Amsterdam
tel. (020) 346 71 71
fax. (020) 346 71 77


---
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other
than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material
from any computer

---




RE: default key?

2002-03-05 Thread Hani Hamandi

Actually, I think I was misunderstood.
I don't want it to print anything for the user. What I was thinking of is
something like this:



What this means is "if you don't find "someKey" then don't throw an
exception, but rather try the default key "someOtherKey", and if *that*
doesn't work, then throw an exception.

Even better:



I would make both defaultKey and defaultValue *optional*. If defaultValue is
specified, and if none of the keys is found, then simply the default value
is displayed.

What do you guys think?


-Original Message-
From: keithBacon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 4:15 AM
To: Struts Users Mailing List
Subject: Re:  default key?


me too!
Would anybody prefer returning a message like "struts warning - message:"+
key
+" not found);
and just printing a warning. This is a bit mucky but at least lets the
system
carry on running. Not sure myself.
K.

--- Joachim Gjesdal <[EMAIL PROTECTED]> wrote:
> Yeah, and then submit the patch and ask a comitter if this would be 
> better than throwing an exception. I?m all for it!
> 
> if (message == null) {
> /*
> JspException e = new JspException
> (messages.getMessage("message.message", key));
> RequestUtils.saveException(pageContext, e);
> throw e;
> */
> ResponseUtils.write(pageContext, key);
> }
> 
> joachim gjesdal
> 
> Hani Hamandi wrote:
> 
> >Ok, and then what? Re-jar struts myself with this new source-code?
> >Thanks!
> >
> >-Original Message-
> >From: Joachim Gjesdal [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, March 04, 2002 4:27 PM
> >To: Struts Users Mailing List
> >Subject: Re:  default key?
> >
> >
> >Hani,
> >No, its easy :-) , just see the sourcecode for 
> >org.apache.struts.MessageTAG, remove the JSPException that is thrown and 
> >return the key.
> >
> >joachim gjesdal
> >
> >Hani Hamandi wrote:
> >
> >>Man! Is this a hard one? :(
> >>
> >>-Original Message-
> >>From: Hani Hamandi [mailto:[EMAIL PROTECTED]]
> >>Sent: Monday, March 04, 2002 11:49 AM
> >>To: Struts Users Mailing List (E-mail)
> >>Subject:  default key?
> >>
> >>
> >>Folks,
> >>
> >>Is there any way to tell , "if you can't find this key,
then
> >>use that key" ?
> >>
> >>Here's what I would like to do:
> >>For every property in my ApplicationResources, I would like to have a
> >>default value, and a couple different texts for different contexts (in
the
> >>same language, English).
> >>So I thought of this (so far theoretical) approach:
> >>Here's how one property, "X.Y.Z" for example, would look like:
> >>
> >>X.Y.Z=default text
> >>A.X.Y.Z=different text A
> >>B.X.Y.Z=different text B
> >>
> >>What I want to achieve is:
> >>
> >>Whenever I use , if this key is not
found,
> >>then use the key "X.Y.Z" (the default value). And similarly, whenever I
use
> >>, if this key is not found, then use the
> >>"X.Y.Z".
> >>
> >>Is there any way to do that?
> >>
> >>Thanks!
> >>Hani.
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >>
> >>For additional commands, e-mail:
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >>
> >
> >
> >>For additional commands, e-mail:
> >>
> >
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> >
> >For additional commands, e-mail:
> >
> >
> >--
> >To unsubscribe, e-mail:  
> 
> >For additional commands, e-mail:
> 
> >
> 
> 
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

> 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




Re: "parameter" attribute in the action-mapping... what is it?

2002-03-05 Thread Donald Miller


It's a general purpose attribute you can use to pass any desired
information into the action from the struts-config.xml file.  You can
access the parameter's value within the action class via the
mapping.getParameter() method.  For actions requiring multiple steps, the
parameter is often used to indicate which step the mapping is associated
with.  For example:

...

...

...

I hope this helps.  Take care.

Don


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




Re: Forwarding to referer

2002-03-05 Thread Eddie Bush

I'm not quite sure what you mean by the 'referer'.  Could you elaborate?

Eddie

- Original Message -
From: "George Moschovitis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 3:55 AM
Subject: Forwarding to referer


Hi everybody, I am a new user of struts and I have the following question:

at the end of an Action.perform method there is a typical:

return map.findForward("ok");

that forwards to a web page specified in struts-config.
instead of forwarding to a hardcoded url i want to be able to redirect to
the referrer for this
action. How can this be done ?

any help appreciated !

George Moschovitis

---
Navel Ltd, Greece





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




RE: design question

2002-03-05 Thread Ronald Haring

I have one big problem and one minor problem with keeping information in
sessions
- it takes memory, and you have no way of telling when this will released
(sure if session timeouts, then you might suspect that it will be cleaned
any time soon, but its always up to the gc to do that, so never sure)
- when using load balancing you have to use sticky redirection to the server
maintaining the session object for this user (but this is not very important
yet and I know you will have to do that with only a sessionid key in the
client object as well)



Gr
Ronald 

> -Original Message-
> From: Eddie Bush [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 3:47 PM
> To: Struts Users Mailing List
> Subject: Re: design question
> 
> 
> There's really no reason not to keep the data in the session. 
>  The session
> is server-side and is not transmitted to the client, so it's 
> secure.  I
> can't think of any other reason you would be uncomfortable 
> with using the
> session, but if you have a different concern please feel free 
> to voice it.
> 
> HTH,
> 
> Eddie
> 
> - Original Message -
> From: "Ronald Haring" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, March 05, 2002 7:07 AM
> Subject: RE: design question
> 
> 
> > Ah yes,
> > that is a solution. But then you have to keep the general 
> data in session
> > indeed, which I never feel to comfortable about. But thx 
> for the pointer.
> >
> > Gr
> > Ronald
> >
> > > i see
> > > I am looking to build something similar and I am thinking of
> > > managing this
> > > through the action mappings.
> > > I am hoping to manage this as follows using the same action
> > > and keeping the
> > > form in the session.
> > > I plan to read up on building wizard type forms but from my
> > > small knowledge
> > > i think this wwould work
> > > e.g.
> > > 
> > >   parameter="PAGE1"
> > >   type=".mo..web.EditAction"
> > >   name="DatabaseTypeForm"
> > >   scope="session"
> > >   validate="false">
> > >   
> > > 
> > > 
> > > etc
> > > 
> > > 
> > > etc
> > > 
> > >
> > > etc
> > > 
> > >
> >
> >
> > Furore B.V.
> > Rijswijkstraat 175-8
> > Postbus 9204
> > 1006 AE Amsterdam
> > tel. (020) 346 71 71
> > fax. (020) 346 71 77
> >
> > 
> --
> 
> --
> > ---
> > The information transmitted is intended only for the person
> > or entity to which it is addressed and may contain confidential
> > and/or privileged material. Any review, retransmission,
> > dissemination or other use of, or taking of any action in
> > reliance upon, this information by persons or entities other
> > than the intended recipient is prohibited. If you received
> > this in error, please contact the sender and delete the material
> > from any computer
> > 
> --
> 
> --
> > ---
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:



Furore B.V.
Rijswijkstraat 175-8
Postbus 9204
1006 AE Amsterdam
tel. (020) 346 71 71
fax. (020) 346 71 77


---
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other
than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material
from any computer

---




How to use the html:text tag properly.

2002-03-05 Thread Alex Colic


Hi,

I am trying to get the value attribute to work in the text tag. I have an
'ITEM' bean with two properties. One is set up when the user selects an
item. When they go to a page I want the page to display the existing value
in 'item.primeLocation' and I want the text box to be prefilled with the
value from 'item.primeLocation' but have the text user input go into
'newPrimeLocation. Both parameters are within the ITEM bean.

I think the value attribute is supposed to get the from the 'primeLocation'
but I actually get "primeLocation" passed into the text box. I must be doing
something wrong.


  Primary Location
  
  



Thanks for any help.

Alex


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




Multiple submit buttons solution

2002-03-05 Thread Peter Severin

Hi folks,

I've been searching for a solution for multple submit buttons in the
same form
and how it can be achieved without using javascript. Summing up
different suggesstions
I came with the following solution. We can encode additional parameter
values into the submit button name and make struts handle this
parameters transparently for us.
For example we could have the following html code:


ActionServlet would detect this parameter and auto populate the form
with parameter 'deleteItemId' and value '10'.
To extend this idea further we could have the following code:




In the action we could test form.getAction() parameter value and to
dispatch to the coresponding delete/edit method inside which we coule
use form.getItemId() to execute the operation.
You've got the point.
I would like to hear comments and suggestions on this. I am willing to
post the actual code in the future if the idea proves itself valuable.

Regards,
Peter.


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




Re: creating a variable set to return value of a method - using struts

2002-03-05 Thread Elijah Jacobs

Thanks for the response,

I could not find an example on how to turn

<% HashMap myMap = someClass.getMyMap(); %> to a bean:define

I'm having trouble getting the syntax down... can someone show me an example
of how this is done?

thanks in advanced,

- ej

- Original Message -
From: "keithBacon" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 4:10 AM
Subject: Re: creating a variable set to return value of a method - using
struts


> Hi,
> > HashMap myMap = someClass.getMyMap();
> 
> > myMap.put("1", "one");
> struts is designed for presentation logic, so this isn't in it's scope.
>
> Have you seen Larry's struts white paper at:-
> http://stealthis.athensgroup.com/presentations/
>
> hope this helps = Keith.
>
>
> --- Elijah Jacobs <[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > I am trying to achieved the following code below using only tags:
> >
> > <%
> > HashMap myMap = someClass.getMyMap();
> > myMap.put("1", "one");
> > %>
> >
> > someClass would return a HashMap.
> >
> > I can't seem to find an example of how this can be done.
> >
> > can someone point me to an example (or show me a example)?
> >
> > - ej
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:

> > For additional commands, e-mail:

> >
>
>
> =
> ~~
> Search the archive:-
> http://www.mail-archive.com/struts-user%40jakarta.apache.org/
> ~~
> Keith Bacon - Looking for struts work - South-East UK.
> phone UK 07960 011275
>
> __
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>

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




Re:

2002-03-05 Thread Eddie Bush

If you use relative links in your page, you should place the 
tag inside the  element of your page.  It will render a base tag so
that relative links will not appear to be broken.

Eddie

- Original Message -
From: "send2boney" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 03, 2002 9:00 PM
Subject: 


> anybody knows what this tag is for?
> thanks
>
> Boney Sze
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


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




Re: design question

2002-03-05 Thread Eddie Bush

There's really no reason not to keep the data in the session.  The session
is server-side and is not transmitted to the client, so it's secure.  I
can't think of any other reason you would be uncomfortable with using the
session, but if you have a different concern please feel free to voice it.

HTH,

Eddie

- Original Message -
From: "Ronald Haring" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 7:07 AM
Subject: RE: design question


> Ah yes,
> that is a solution. But then you have to keep the general data in session
> indeed, which I never feel to comfortable about. But thx for the pointer.
>
> Gr
> Ronald
>
> > i see
> > I am looking to build something similar and I am thinking of
> > managing this
> > through the action mappings.
> > I am hoping to manage this as follows using the same action
> > and keeping the
> > form in the session.
> > I plan to read up on building wizard type forms but from my
> > small knowledge
> > i think this wwould work
> > e.g.
> > 
> >   parameter="PAGE1"
> >   type=".mo..web.EditAction"
> >   name="DatabaseTypeForm"
> >   scope="session"
> >   validate="false">
> >   
> > 
> > 
> > etc
> > 
> > 
> > etc
> > 
> >
> > etc
> > 
> >
>
>
> Furore B.V.
> Rijswijkstraat 175-8
> Postbus 9204
> 1006 AE Amsterdam
> tel. (020) 346 71 71
> fax. (020) 346 71 77
>
> --
--
> ---
> The information transmitted is intended only for the person
> or entity to which it is addressed and may contain confidential
> and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in
> reliance upon, this information by persons or entities other
> than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material
> from any computer
> --
--
> ---
>
>


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




Re: Getting DataSource from an Action

2002-03-05 Thread Eddie Bush

D'oh!  I actually wanted it in a TAG but that will work fine.  I had
forgotten about that method of obtaining it.

Thanks so much for your patience!

Eddie

- Original Message -
From: "Ronald Haring" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 7:59 AM
Subject: RE: Getting DataSource from an Action


> sure there is:
>
> public ActionForward perform(ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response)
> throws IOException, ServletException {
>
> // Extract attributes we will need
> if ( Globals.isDebugable() ) {
> Log.getDebugDeveloperCategory().debug(
> Globals.snoopRequest(request) );
> }
> HttpSession session = request.getSession(false);
> Locale locale = getLocale(request);
> MessageResources messages = getResources();
> DataSource dataSource = (DataSource)
>
servlet.getServletContext().getAttribute(org.apache.struts.action.Action.DAT
> A_SOURCE_KEY);
>
> Gr
> Ronald
>
> > -Original Message-
> > From: Eddie Bush [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 05, 2002 2:51 PM
> > To: Struts Users Mailing List
> > Subject: Getting DataSource from an Action
> >
> >
> > Is it possible to obtain a reference to the built-in struts
> > datasource from a custom action?
> >
> > If so, is there something I could reference on how to do it?
> > I haven't been able to find anything.
> >
> > Thanks so much!
> >
> > Eddie
> >
> >
>
>
> Furore B.V.
> Rijswijkstraat 175-8
> Postbus 9204
> 1006 AE Amsterdam
> tel. (020) 346 71 71
> fax. (020) 346 71 77
>
> --
--
> ---
> The information transmitted is intended only for the person
> or entity to which it is addressed and may contain confidential
> and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in
> reliance upon, this information by persons or entities other
> than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material
> from any computer
> --
--
> ---
>
>


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




RE: design question

2002-03-05 Thread keithBacon

You have to keep the data in the session or write it to the database. (Storing
it on each form as hidden fields seems too fiddly to me).
Unless you have huge volumes I actually prefer to save it on the database &
have a status field that indicates the data is incomplete.

--- Ronald Haring <[EMAIL PROTECTED]> wrote:
> Ah yes, 
> that is a solution. But then you have to keep the general data in session
> indeed, which I never feel to comfortable about. But thx for the pointer.
> 
> Gr
> Ronald
> 
> > i see
> > I am looking to build something similar and I am thinking of 
> > managing this
> > through the action mappings.
> > I am hoping to manage this as follows using the same action 
> > and keeping the
> > form in the session. 
> > I plan to read up on building wizard type forms but from my 
> > small knowledge
> > i think this wwould work
> > e.g.
> > 
> >   parameter="PAGE1"
> >   type=".mo..web.EditAction"
> >   name="DatabaseTypeForm"
> >   scope="session"
> >   validate="false">
> >   
> > 
> > 
> > etc
> > 
> > 
> > etc
> > 
> >
> > etc
> > 
> > 
> 
> 
> Furore B.V.
> Rijswijkstraat 175-8
> Postbus 9204
> 1006 AE Amsterdam
> tel. (020) 346 71 71
> fax. (020) 346 71 77
> 
> 
> ---
> The information transmitted is intended only for the person
> or entity to which it is addressed and may contain confidential
> and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in
> reliance upon, this information by persons or entities other
> than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material
> from any computer
> 
> ---
> 
> 


=
~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

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




  1   2   >