compile getDataSource error in Action

2006-09-28 Thread red phoenix

I use JDK1.6 and Struts1.3.5,I use Javac to compile a  Action file,like
follows:
javac xxxAction.java
but when I compile it,it raise follows error:

xxxAction.java:31: Can't find symbol
symbol: method getDataSource(javax.servlet.http.HttpServletRequest,
java.lang.String)
location: class xxxAction
   DataSource dataSource=getDataSource(request,yy);
 ^
1 error

Why raise above error? How to correct it?
Thanks


Re: compile getDataSource error in Action

2006-09-28 Thread Wendy Smoak

On 9/28/06, red phoenix [EMAIL PROTECTED] wrote:

I use JDK1.6 and Struts1.3.5,I use Javac to compile a  Action file,like
follows:
javac xxxAction.java
but when I compile it,it raise follows error:

xxxAction.java:31: Can't find symbol
symbol: method getDataSource(javax.servlet.http.HttpServletRequest,
java.lang.String)
location: class xxxAction
DataSource dataSource=getDataSource(request,yy);
  ^


The Struts data source config was deprecated in 1.2 and removed in 1.3.

We have this page on how to access a database:
  http://struts.apache.org/1.3.5/faqs/db-howto.html

And the upgrade notes (which were missing information on the removal
of the getDataSource method, I just added it.)

  http://wiki.apache.org/struts/StrutsUpgradeNotes12to13

I think this is going to be a FAQ, so if anyone would like to
contribute a 'HOWTO' on moving from Struts data source config to
another option, that would be great!

--
Wendy

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



Re: compile getDataSource error in Action

2006-09-28 Thread Christopher Goldman
On Fri, 2006-09-29 at 00:03 +0800, red phoenix wrote:
 I use JDK1.6 and Struts1.3.5,I use Javac to compile a  Action file,like
 follows:
 javac xxxAction.java
 but when I compile it,it raise follows error:
 
 xxxAction.java:31: Can't find symbol
 symbol: method getDataSource(javax.servlet.http.HttpServletRequest,
 java.lang.String)
 location: class xxxAction
 DataSource dataSource=getDataSource(request,yy);
   ^
 1 error
 
 Why raise above error? How to correct it?
 Thanks

It sounds like your Action subclass does not have a
getDataSource(HttpServletRequest,String) method.

Perhaps the method belongs to some other object?

Chris

-- 
Christopher D. Goldman
[EMAIL PROTECTED]
415.962.4884


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