Re: cannot find the datasource in struts?

2001-08-21 Thread Richard William Lake

 a newbie in using struts...
 kindly let me know what i should be doing to define a datasource..
 i have the struts-config.xml file where i defined the datasource
 parameters...
 and now i m trying to run the example provided in the struts
 but it is throwing error javax.sql.DataSource not found...
 
 is there anything that i m missing? let me know please...

I take it this is a ClassNotFoundException when starting TomCat?I had this problem 
earlier today when using data-sources but found a solution...

* Put the j2ee.jar from the Enterprise Edition JDK in the %TOMCAT_HOME%\lib folder.

Of course, this may not be the correct solution but was a quick fix without changing 
too much of my development system around!


Richard.




Form within Form

2001-08-17 Thread Richard William Lake

I have a form that has fields which themselves may be modified by another form, with 
the changes reflected in the original form (with everything else intact). How can I 
achieve this?

Regards,
Richard



Multi-page form bean persistence

2001-08-14 Thread Richard William Lake

I have a multi-page form to manipulate a 2-level tree structure, so one of the 
variables of my ActionForm specifies which branch of the tree is shown, and I have no 
problem switching between branches to view the data. I'm using another variable to 
define a cancel/commit status of the form, which defines when the user has chosen to 
finish editing. If this status is not set then the Action forwards to the Input form.

The form transfers properties between pages by using html:hidden/ tags. The problem 
is that the data structure does not persist (it is a member variable of the form 
class) between requests, even though it is only created if the variable is null and it 
is not set in the reset method. I have also tried using session scope for the form, 
with no noticeable difference.

Perhaps there is somebody who can explain how to achieve form persistance across pages 
(the view is the same for all pages in my case) or is this a grey-area at the 
moment in this excellent framework?

I would also like to use multiple data sources for the benefits of connection pooling. 
I couldn't find any mention of documentation describing how to define this. Is there a 
property of the XML tag to give a database a named reference?
* Actually, I couldn't find any documentation detailing the precise structure and 
layout of the struts-config.xml file.

As a final point, it would be nice to see a how-to article section on the Struts 
website with minimal examples of such scenarios or building blocks if you like. I 
wonder if this has been discussed before?

Regards,
Richard