[SCAFFOLD] ProcessAction - Merging properties from a session obje ct

2003-10-03 Thread aies22
Hi,

Looking at the ProcessAction code, it turns out that in order to get a
session object to the execute() method of a ProcessBean, the following
conditions must be met:

1) A form is submitted
2) That form is an instance of BaseForm (and not DynaActionForm or other
type for that matter)
3) The bean is exposed in session under the name userProfile

Otherwise, that session object will not be available to the ProcessBean.

Is there another build in method to pass a session object into the
ProcessBean (other than subclassing ProcessAction :-( ?

Thanks,
Noam




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



[SCAFFOLD] Future of Scaffold - alternative DAO

2003-10-03 Thread aies22

Hi,

Does anyone know of an alternative but similar DAO package to Scaffold which
fits in with Struts as smoothly (i.e. can be configured into the
ActionMapping very intuitively)?

Noam


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



RE: [SCAFFOLD] Future of Scaffold - alternative DAO

2003-10-03 Thread aies22
Ted,

Thanks.

In fact, following you advice, I am using iBATIS SqlMaps, which is very very
neat indeed.

I started building my app based on the Scaffold package after reading
Struts in Action (which was actually almost 10 months ago) and I like it a
lot. Looking forward to the Commons Chain. 

Noam

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 11:49 PM
To: Struts Users Mailing List
Subject: Re: [SCAFFOLD] Future of Scaffold - alternative DAO


For the SQL stuff, iBATIS www.ibatis.com is such a perfect fit, it's 
spooky. I'm actually getting ready to migrate it.

For the interface between the Action and the business tier, Commons 
Chain is the next step.

-Ted.

[EMAIL PROTECTED] wrote:
 Hi,
 
 Does anyone know of an alternative but similar DAO package to Scaffold
which
 fits in with Struts as smoothly (i.e. can be configured into the
 ActionMapping very intuitively)?
 
 Noam
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 
Ted Husted,
   Junit in Action  - http://www.manning.com/massol/,
   Struts in Action - http://husted.com/struts/book.html,
   JSP Site Design  - http://www.amazon.com/exec/obidos/ISBN=1861005512.

Get Ready, We're Moving Out!! - http://www.clark04.com



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



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



[SCAFFOLD] Elegant way to expose more than one object using Proc essAction

2003-09-22 Thread aies22
Hi,

When using the Scaffold ProcessAction, a data-bean is instantiated by the
framework and it's execute() method is called, returning a ProcessResult
object to the view layer.

The ProcessResult object may contain a single object or a collection (of
values or objects).

Suppose I want to return to the view layer a collection of some sort AND a
single object which has nothing to do with that collection.

In order to do that, what I do now is to create another helper collection in
which I store both the single object\s and the collection I wish to send to
the view layer. Then I return this helper collection as a ProcessResult
object to the view layer, where I have to extract back both the collection
and the single object as separate entities, and define them as beans.

Is there a more elegant way to expose a number of objects\collections of
different types using a single call to ProcessAction?

Thanks,
Noam


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



RE: [SCAFFOLD] AccessBase, createKey and ResultSetMetaData JDBC d rive r problems

2003-09-07 Thread aies22
Thanks Ted,

As always your advice was most helpful!!! 

The iBATIS DB layer package is great, though I'd rather stay with Scaffold
version for DAO.

BTW, some of the scaffold links on your site (husted.com) are currently not
working.

Noam

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 12:48 PM
To: Struts Users Mailing List
Subject: Re: [SCAFFOLD] AccessBase, createKey and ResultSetMetaData JDBC
drive r problems


Those utilities was originally developed using an older MySQL driver and 
may not be up to date. If you continue to have problems, my best advice 
is to have a look at the iBATIS DB layer www.ibatis.com, which uses 
the same approach to data access.

-Ted.

[EMAIL PROTECTED] wrote:
 Hi,
 
 When using the scaffold AccessBase.createKey() method, to get a simple
 integer field from the database, I get a java.lang.ClassCastException:
 java.lang.Long. 
 
 Looking at the log file, I find the following error message:
 
 Driver doesn't support strong ResultSetMetaData,  and PoolMan
subsequently
 failed an attempt to fabricate  a table name in spite of the driver
 limitations.
 
 Am using Poolman, Resin, Struts 1.1, J/connector, MySQL.
 
 It has obviously a JDBC driver problem.
 
 Has anyone come across this? Any ideas 
 
 Thanks,
 Noam
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-- 
Ted Husted,
   Junit in Action  - http://www.manning.com/massol/,
   Struts in Action - http://husted.com/struts/book.html,
   JSP Site Design  - http://www.amazon.com/exec/obidos/ISBN=1861005512.



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



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



[SCAFFOLD] AccessBase, createKey and ResultSetMetaData JDBC driver problems

2003-09-03 Thread aies22
Hi,

When using the scaffold AccessBase.createKey() method, to get a simple
integer field from the database, I get a java.lang.ClassCastException:
java.lang.Long. 

Looking at the log file, I find the following error message:

Driver doesn't support strong ResultSetMetaData,  and PoolMan subsequently
failed an attempt to fabricate  a table name in spite of the driver
limitations.

Am using Poolman, Resin, Struts 1.1, J/connector, MySQL.

It has obviously a JDBC driver problem.

Has anyone come across this? Any ideas 

Thanks,
Noam


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



RE: SubClass RequestProcessor or Action class

2003-09-02 Thread aies22
Hi,

If you want to use your custom RequestProcessor subclass, for security
issues or any other preProcess() needs, all you need to do is define it in
the struts-config.xml controller  definition, which is the last definition
before the /struts-config closing tag. Then your class would be called for
every request.

for example, my custom RequestProcessor which is used to process roles is
defined as
controller processorClass=com.foo.RequestProcessorRoles /

It worked for me.

Noam

-Original Message-
From: Kommineni, Sateesh (IndSys) [mailto:[EMAIL PROTECTED]
Sent: Monday, September 01, 2003 9:17 AM
To: Struts Users Mailing List
Subject: RE: SubClass RequestProcessor or Action class


Hi,

   If you want each request to your app  needs to do some security related
stuff then you can have an Action class which does this and store the
details in a session for that User . If sessions are not allowed for your
app and if you have to execute the security related stuff for each request
then create a Base Action class which does the security related stuff and
extend all Action classes from it ..

  Hope this is helpful...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Monday, September 01, 2003 12:17 PM
To: Struts Users Mailing List
Subject: RE: SubClass RequestProcessor or Action class



Actually I would like to extend the RequestProcessor class (let's say
MyOwnRequestProcessor inheriting from RequestProcessor) and override the
preProcess() method to embed some security related code. I was wondering
how would I let STRUTS framework know that MyOwnRequestProcessor should be
called instead of the standard STRUTS RequestProcessor. My ultimate aim is
to guarantee that the piece of code I embed in the preProcess() method
should definitely be executed for every request. Please bear with me if I
am making no sense as I am still in the process of getting good idea on
STRUTS.

Regards
Sreekant G


 

  Andrew Hill

  [EMAIL PROTECTED]To:   Struts Users
Mailing List [EMAIL PROTECTED]   
  idnode.com  cc:

   Subject:  RE: SubClass
RequestProcessor or Action class  
  09/01/2003 11:30 AM

  Please respond to

  Struts Users Mailing

  List

 

 





This is a joke right?

...Friday is well and truly over mate. Its Monday now.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Monday, 1 September 2003 12:03
To: [EMAIL PROTECTED]
Subject: SubClass RequestProcessor or Action class


HI All,

As a general practice all the application action classes are inherited from
org.apache.struts.action.Action class. What are the Pro's and Con's of
inheriting the application action classes from
org.apache.struts.action.RequestProcessor class instead ?

Regards
Sreekant G




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







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



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



RE: page field on DynaValidatorForm class

2003-09-02 Thread aies22
Hi,

You need not define the page field on your DynaValidatorForm declaration. It
is defined in the org.apache...DynaValidatorForm  class.
Embedding html:hidden property=page value=1/ in the form does the
work.

Noam

-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 31, 2003 7:57 PM
To: 'Struts Users Mailing List'
Subject: page field on DynaValidatorForm class


Hi,

Do I need to include the declaration of a 
form-property name=page ... in a form of type DynaValidatorForm in
the struts-config.xml?

Thanks in advance,
Erez



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



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



RE: page field on DynaValidatorForm class

2003-09-02 Thread aies22
Thanks Erez, you were right.

I was in the midst of finding that out myself, and you just saved me some
hours of frustration :-)

Noam

-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 02, 2003 12:40 PM
To: 'Struts Users Mailing List'
Subject: RE: page field on DynaValidatorForm class


Hi Noam,

I have looked into the code of Struts, and turns out that if you don't
specify a 'page' property in the struts-config.xml the page property
will no get set and will be left as 0 in the DynaValidateForm. As a
rule, any parameter on the request that does not exist in the
configuration of a DynaActionForm and derived, will be ignored, skipped
and no warning gets printed - a bit sad but true.

Erez



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 02, 2003 10:48 AM
To: [EMAIL PROTECTED]
Subject: RE: page field on DynaValidatorForm class

Hi,

You need not define the page field on your DynaValidatorForm
declaration. It
is defined in the org.apache...DynaValidatorForm  class.
Embedding html:hidden property=page value=1/ in the form does the
work.

Noam

-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 31, 2003 7:57 PM
To: 'Struts Users Mailing List'
Subject: page field on DynaValidatorForm class


Hi,

Do I need to include the declaration of a 
form-property name=page ... in a form of type DynaValidatorForm in
the struts-config.xml?

Thanks in advance,
Erez



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



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




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



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



re: artimus data source issue - poolman.xml

2003-07-29 Thread aies22
If you are trying to change database settings for the artimus
example application:
Please note that there is a poolman.xml file in the
commons-scaffod.jar!!!
I've spent a day playing around with this, moving poolman.xml's
around till I figured out where my trouble are.

Noam

From: Ted Husted 
*   Subject: re: artimus data source issue 
*   Date: Sun, 16 Feb 2003 10:55:10 -0800 

Something like the configuration file for poolman has to be on the Java
classpath where the classloader can find it. The simplest location is
directly under the WEB-INF/classes folder. The glitch there is that, to do a
clean build, it's very convenient to just delete that folder and rebuild the
application for scratch. So, it can be safer to have two, and get the build
file to copy it cover when it builds the rest of the application. Start by
putting the poolman.xml file you want to use under classes, and see that its
working. Then have a look at the build.xml to see if it is trying to copy
that file from another location to classes. Then copy your updated file to
the source location, to be sure its available to future builds.

There are some generic setup instructions for poolman here:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg25553.html

HTH, Ted.


--
Ted Husted,
Struts in Action http://husted.com/struts/book.html


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



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



RE: Simple Tiles question

2003-07-24 Thread aies22
It is legal, but:
1. You have to make sure that the outcome of putting all the tiles together
creates  one complete HTML page. Which means that if you have a header tile,
content tile and a footer tile, you should open the header with html and
close the footer with /html and so on.
2. It is sometimes better to use the JSP tags html:html rather than plain
html.

-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 9:51 PM
To: 'Struts Users Mailing List'
Subject: Simple Tiles question


A simple question I guess,

Is it legal to have the tags like html /html and others in a tile.
Meaning, when converting a page to a tile, do I have to remove those 
html:html header etc. tags?

Erez



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



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



Container Authentication: Artimus on Resin

2003-07-21 Thread aies22
Hi,

A short one. This is a Resin question - but I did not find my answers
there...

Does someone know how to set container authentication on Resin so as to run
the artimus application.

The default for artimus is using Tomcat, which has a tomcat-users.xml file
to define roles. But for Resin, there is only resin.conf.

Thanks,

Noam


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