Hi There,
I'm getting ready to ship off my application and I'm trying to use the
application server (standalone oc4j) to hold the data source information
instead of having it in struts-config.xml. Is this possible?
When jDeveloper deploys to the server it builds me a data-sources.xml file
which
Janice,
Check out these links:
http://otn.oracle.com/sample_code/tech/java/codesnippet/j2ee/jdbc/JDBC_in_J2EE.html
http://otn.oracle.com/products/jdev/tips/duff/mysql_and_oc4j3.html
It works fine for me.
-Richard
--- Janice [EMAIL PROTECTED] wrote:
Hi There,
I'm getting ready to ship off
below:
snip
InitialContext ic = new InitialContext();
DataSource ds =
(DataSource)ic.lookup(jdbc/TestDS);
..
DBConnection.dataSource=ds; //initializeDataSource in
the DBConnection class
snip
In my DBConnection class, I have
A big thank you to Richard and Shyam! I have things working again and am
back on track to get this app deployed!!
Janice
- Original Message -
From: Janice
To: [EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 11:56 AM
Subject: urgent - data-source and container managed datasource
Hi
the DataSource that refers to my DB defined in
datasource tag of struts-conf file to my DAO file.
WHAT I TRIED IS:
String name = event.getName();
HttpSession session = event.getSession();
ServletContext sc = session.getServletContext();
try{
DataSource dataSource =(DataSource
dev etc.)
-Original Message-
From: Raman [mailto:[EMAIL PROTECTED]
Sent: 13 February 2004 12:06
To: Struts Users Mailing List
Subject: DataSource help
Hi All,
I have a problem regarding the DB connection. In my application i want to log the
session time for each session. For that I am
What was the error message?
Niall
-Original Message-
From: Raman [mailto:[EMAIL PROTECTED]
Sent: 13 February 2004 12:06
To: Struts Users Mailing List
Subject: DataSource help
Hi All,
I have a problem regarding the DB connection. In my application i want to
log the session time
Hi,
I m using Tomcat5.0 and Struts1.1 and Informix 9.x as database
When i m trying to use DataSource of
org.apache.commons.dbcp.BasicDataSource in my struts application it
gives error
.I have mentioned in struts-config file also abt sdatasource like
username,password,drivername
Hi Guys,
I have a web application written in Stuts and am writing a scheduler which
is a seperate action servlet which is configured in the web.xml file to
start at startup.
All of my other action classes are session based so they can get the
default datasource (From the struts-config.xml
have you not seen the threads regarding the struts datasource?
the party line seems to frown upon it as it encourages breaking with
MVC, unless you pass the connection up to the model tier.
that said, in your shoes I'd configure a datasource in the second
webapp (albeit with the same config
(The original msg didn't seem to make it to the list.)
I'm trying to configure my Struts 1.1 app (Tomcat 4) for MySQL access
and getting nothing but grief. Currently, I'm showing the following
error in the log file:
java.lang.NoClassDefFoundError:
org/apache/struts/legacy/GenericDataSource
hi jim!
did you add struts-legacy.jar in WEB-INF/lib ?
but in 1.2 its not more supported (GenericDataSource)
look here:
http://jakarta.apache.org/struts/faqs/database.html
(The Struts DataSource Manager)
then you need pool.jar and
dbcp.jar
from the corresponding commons-projects
- http
the commons-projects
- http://jakarta.apache.org/commons/pool/
- http://jakarta.apache.org/commons/dbcp/
it for 1.2 and later
look here for more:
http://jakarta.apache.org/struts/faqs/database.html
(The Struts DataSource Manager)
greetings
matthias
-Original Message-
From: Jim Anderson [mailto
understanding you correctly?
On Jan 28, 2004, at 12:26 PM, Matthias Wessendorf wrote:
hi jim!
did you add struts-legacy.jar in WEB-INF/lib ?
but in 1.2 its not more supported (GenericDataSource)
look here:
http://jakarta.apache.org/struts/faqs/database.html
(The Struts DataSource Manager)
then you need
jim,
in 1.2
there is no GenericDataSource.
(because legacy.jar will be removed)
you can still use a DataSource
with BasicDataSource.
after 2.0 it will also be moved away
(see the faq)
with the datasource,
you write JDBC in an action-class.
do you really want it ? :-)
in my case i use
Hi all,
Is it possible to set up a DataSource for LDAP?
If yes how can I do this? And how do I retrieve a
connection?
Thanks
Oliver
:
Subject: LDAP + DataSource
01/23/2004
07:55 AM
), you can create datasource.
But as I wrote, I am using the classic way to access LDAP.
Best regards
Jiri
LDAP, as the name implies, is a Directory Access Protocol. As such, you
cannot use JDBC to establish connections. However, java does provide an
analagous interface for accessing Naming
. Januar 2004 16:49
An: Struts Users Mailing List
Betreff: Re: LDAP + DataSource
Hallo,
generally, it is right.
but, there exist jdbc driver for ldap (for example,
http://www.octetstring.com/products/jdbcldapdriver/). I do not use it,
becouse I
am using the classical way (java ldap packages from novell
)
at
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:23
1)
..
and when I try to run the application, the browser displays this message:
The requested service (Servlet action is currently unavailable) is not
currently available.
When I remove the datasource
Hi,
I am unable to get a DataSource in my Action. Here is
my code snippet:
struts-config.xml
--
data-source
set-property
property=driverClass
value=com.mysql.jdbc.Driver/
set-property
property=maxCount
a datasource to my struts-config and when I run the application I
can see it initializes ok:
Jan 7, 2004 10:09:48 PM org.apache.struts.legacy.GenericDataSource
createConnection
INFO:createConnection()
Jan 7, 2004 10:09:49 PM org.apache.struts.legacy.GenericDataSource
createConnection
INFO
hi chris,
have you tried:
getDataSource(req,dataSource);
greetings
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 07, 2004 10:25 AM
To: [EMAIL PROTECTED]
Subject: Datasource problem
Hi,
I must be missing something here
the one datasource
and all the docs I've seen don't require the key. My understanding is that
the key is only required when there is more than one datasource. No?
Thanks for your help.
Chris
On Wed, 7 Jan 2004, Matthias Wessendorf wrote:
hi chris,
have you tried:
getDataSource(req,dataSource
:[EMAIL PROTECTED]
Sent: Wednesday, January 07, 2004 10:44 AM
To: Struts Users Mailing List
Subject: RE: Datasource problem
Thanks Mathias, just after I sent the email I got it working using the
key as you suggested. I tried using the key earlier today and it didn't
work, probably I had some
Hi Matthias,
Thanks for all the info.
As you said that only one can be defined without a key hence if I use
getDataSource(req); then it should use the default datasource without
me having to specify the Globals.DATA_SOURCE_KEY as the second parameter.
So looking at my struts-config.xml
running into the following exception when issuing a getConnection to
an Oracle DataSource.
SQLException: Cannot create JDBC driver of class '' for connect URL 'null'
It has the following definition in a Tomcat 4.1.29 server.xml file.
Resource name=Library auth=Container scope=Shareable
I'm running into the following exception when
issuing a getConnection to an Oracle DataSource.
SQLException: Cannot create JDBC driver of class '' for connect URL
'null'
It has the following definition in a Tomcat 4.1.29
server.xml file.
Resource name="Library" auth="C
Mailing List [EMAIL PROTECTED]
Subject: Oracle DataSource configuration
Date: Mon, 29 Dec 2003 11:12:11 -0500
I'm running into the following exception when issuing a getConnection to an
Oracle DataSource.
SQLException: Cannot create JDBC driver of class '' for connect URL 'null'
It has the following
[EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Oracle DataSource configuration
Date: Mon, 29 Dec 2003 11:12:11 -0500
I'm running into the following exception when issuing a getConnection to an
Oracle DataSource.
SQLException: Cannot create JDBC driver of class
Ed,
The setup instructions for the BC4J/Struts Toy Store Demo at:
http://otn.oracle.com/sample_code/products/jdev/bc4jtoystore/index.html
go over the specifics of setting up Oracle DataSource for Tomcat.
The direct URL to the 80-page whitepaper that explains the demo's implementation
. Same error message.
Logged a few sanity checks. All look OK.
Value of servlet init parameter data-source is Library
InitialContext is not null
Context for java:/comp/env is not null
dataSource is not null: [EMAIL PROTECTED]
Any other ideas?
Has anyone successfully configured
-doc/jndi-datasource-examples-howto.html
Quoting Ed Dowgiallo [EMAIL PROTECTED]:
OK.
I have moved the Oracle JDBC library from shared/lib to common/lib. Same
error message. SQLException: Cannot create JDBC driver of class '' for
connect URL 'null'
Restarted Tomcat service. Same error
: Re: How find DataSource?
e-denton Java Programmer wrote:
Has anyone set up a connection pool using web.xml? Steps? Examples?
Tips?
No one has, it can't be done. You can declare it in web.xml,
that's all. Read Rick Reumans tutorial on ibatis dao and
ibatis petstore 3
Merry Christmas,
Wow, I finally connected to my data source! Now, I want to put the code
somewhere it will be executed only once, and save the DataSource object
where Actions, beans, etc. can get at it. That way, I don't have to perform
the lookup all the time.
Any suggestions on where to put
Hi,
How about a plugIn?
Regards
marco
-Original Message-
From: e-denton Java Programmer [mailto:[EMAIL PROTECTED]
Sent: 22 December 2003 14:11
To: Struts Users Mailing List
Subject: Re: How find DataSource?
Merry Christmas,
Wow, I finally connected to my data source
the DataSource object
where Actions, beans, etc. can get at it. That way, I don't have to perform
the lookup all the time.
Any suggestions on where to put the one time setup code, and where to save
the DataSource object reference (in the application?).
Thanks again,
Will
- Original Message -
From
how about putting it into DynaActionForm::initialize which initialises the
beans anyhow..
-Martin
this way your connections are
- Original Message -
From: Vic Cekvenich [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 22, 2003 9:31 AM
Subject: Re: How find DataSource?
I
repost (news error?)
Martin Gainty wrote:
how about putting it into DynaActionForm::initialize which
initialises the
beans anyhow..
-Martin
A DAO in a form or a bean hmmm. If that is what you want to do in
an MVC framework.
I don't do data source in formbeans.
Take a peak at PetStore
: Re: How find DataSource?
I put mine in a static block of the base DAO. (static as in once per
class, and all DAO's extend my base DAO).
.V
e-denton Java Programmer wrote:
Merry Christmas,
Wow, I finally connected to my data source! Now, I want to put the code
somewhere
Quoting e-denton Java Programmer [EMAIL PROTECTED]:
Merry Christmas,
Wow, I finally connected to my data source! Now, I want to put the code
somewhere it will be executed only once, and save the DataSource object
where Actions, beans, etc. can get at it. That way, I don't have to perform
- Original Message -
From: Vic Cekvenich [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 22, 2003 8:31 AM
Subject: Re: How find DataSource?
I put mine in a static block of the base DAO. (static as in once per
class, and all DAO's extend my base DAO).
.V
e
will access it.
Has anyone set up a connection pool using web.xml? Steps? Examples? Tips? I
can't even seem to change the driver without problems. And, web.xml doesn't
use JNDI, does it?
Has anyone used server.xml instead? Where did you keep the DataSource
Object? I looked into keeping
e-denton Java Programmer wrote:
Has anyone set up a connection pool using web.xml? Steps? Examples? Tips?
No one has, it can't be done. You can declare it in web.xml, that's all.
Read Rick Reumans tutorial on ibatis dao and ibatis petstore 3 example
and do that, and you will be in a good
Hi,
From a Data Acess Object (DAO), I need to access a DataSource (like
getServletContext().getAttribute (Globals.DATA_SOURCE_KEY)). But, I don't
have access to the servlet variable.
What is the proper way to get the DataSource from a DAO which is called by
an Action but doesn't extend Action
See sample source code section here:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
Ex:
Context ctx = new InitialContext();
if(ctx == null )
throw new Exception(Boom - No Context);
DataSource ds =
(DataSource)ctx.lookup
javax.naming.NamingException;
import javax.sql.DataSource;
public class DBConnection
{
public static Connection getDBConnection() throws
SQLException
{
Connection conn = null;
try
{
InitialContext ctx = new InitialContext();
DataSource ds = ( DataSource ) ctx.lookup
Don't spend the time to get DataSource working. It is deprecated and will
be removed from struts in 1.2. I use Poolman at sourceforge (I highly
reccomend it for non-j2ee projects). Most others use the DataSource
supplied with the container.
Edgar
-Original Message-
From: Caroline Jen
Ah a small comment... The Struts DataSource should not be used, I agree;
the J2EE container DataSource should be used; but it will not be
removed for a while AFIAK.
(Deprecated just means it might be removed in some futre version. Just
like hopefully bean, logic and html:link get deprecated
Take a look at a very good db example app that uses Struts on iBatis.com
caled PetStore 3.
.V
Ricky wrote:
hi, there,
with my project i had several queries about get datasource in struts. i know how
to get datasource in struts, just as in myAction, use getDataSource method
hi, there,
with my project i had several queries about get datasource in struts. i know how
to get datasource in struts, just as in myAction, use getDataSource method and return
DataSource object, and go on to get connection
i also know the logic beans between the Controller
i configured sql server datasource in struts-config
data-sources
data-source key=SqlGordon
type=com.microsoft.jdbcx.sqlserver.SQLServerDataSource
set-property property=ServerName
value=Gordon/
set-property property=DatabaseName
value
on MySQL, but
if it is helpful, I can send you a snippet from my server.xml which would be
applicable to how you would do your sql server.
Mike
-Original Message-
From: dario [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 8:56 AM
To: [EMAIL PROTECTED]
Subject: sql server datasource
Did you solved this problem?
what's wrong with it? I didn't get load exceptions
- Original Message -
From: Funicelli Aldo [EMAIL PROTECTED]
To: 'struts user' [EMAIL PROTECTED]
Sent: Monday, October 13, 2003 10:41 PM
Subject: setting DataSource
Using struts 1.1 I'm able to set
First hello everyone !!! This is my first answer and i'm learning struts now...
I'm using this method but it's deprecated...Did someone knows the right call ? thx.
DataSource dataSource =
(DataSource)servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
You can use the jndi datasource that you define in web.xml rather than
struts.
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-
examples-howto.html
The struts datasource is deprecated generally. Ideally you have your db
connection stuff in your model layer. If this means
--- Mathieu Grimault [EMAIL PROTECTED] wrote:
First hello everyone !!! This is my first answer and i'm learning struts
now...
I'm using this method but it's deprecated...Did someone knows the right
call ? thx.
DataSource dataSource =
(DataSource)servlet.getServletContext().getAttribute
! -- DataSource Error
Paul Idusogie wrote:
Thanks for your support, I was able to redeem a copy of the
struts-legacy.jar.
I have the following questions however:
Does this datasource model still support connection pooling.?
Yes.
Now if this code is specified as legacy, are there better approaches
I have the following setup within my struts-config.xml file
data-sources
data-source key=myDB
type=org.apache.commons.dbcp.BasicDataSource
set-property property=description value=my Database/
set-property property=url
Do you have the struts-legacy.jar in your WEB-INF/lib directory?
- Original Message -
From: Paul Idusogie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:44 AM
Subject: Please Please Help! -- DataSource Error
I have the following setup within my struts
Paul:
This might occur if you have multiple copies (perhaps differnt versions?) of
struts.jar in your classpath. Make sure you have one and only one struts-jar in
your WEB-INF/lib directory and that you compile against *that* jar. (Remove all
other extaneous ones.) Recompile your app (if
-Original Message-
From: Paul Idusogie [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:45 AM
To: [EMAIL PROTECTED]
Subject: Please Please Help! -- DataSource Error
Importance: High
I have the following setup within my struts-config.xml file
data-sources
data-source key
Subject: RE: Please Please Help! -- DataSource Error
Hi there, this errors looks familiar to me as a one time struts newbie,
you need to a file called struts-legacy.jar to help you. This is if ur
using the generic data source. I still havent been able to figure out
how to get
Where do I find the struts legacy package?
Sincerely,
Paul Idusogie
-Original Message-
From: Barry Volpe [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 1:13 PM
To: Struts Users Mailing List
Subject: Re: Please Please Help! -- DataSource Error
They way I got it working
In the struts 1.1 Final release
in the /lib directory
Barry
- Original Message -
From: Paul Idusogie [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 11:17 AM
Subject: RE: Please Please Help! -- DataSource Error
Where do I find
Thanks for your support, I was able to redeem a copy of the
struts-legacy.jar.
I have the following questions however:
Does this datasource model still support connection pooling.?
Now if this code is specified as legacy, are there better approaches to
retrieving database data without using
(*) FROM userAttributes /
If this fails your datasource will not work.
If it does fail completely remove this statement.
Barry
- Original Message -
From: Paul Idusogie [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 11:44 AM
Subject: RE
Paul Idusogie wrote:
Thanks for your support, I was able to redeem a copy of the
struts-legacy.jar.
I have the following questions however:
Does this datasource model still support connection pooling.?
Yes.
Now if this code is specified as legacy, are there better approaches to
retrieving
having to pass it around. (There are other advantages as
well, but this is the one most relevant to your concern here.)
So, when ever you neet a datasource, the method in SomeBean will have to
search it in JNDI. Doesn't this pose a performance penalty?
phi
Craig
it needs
to, without having to pass it around. (There are other advantages as
well, but this is the one most relevant to your concern here.)
So, when ever you neet a datasource, the method in SomeBean will have
to search it in JNDI. Doesn't this pose a performance penalty?
The JNDI
Hi,
I've implemented a struts application that uses JavaBeans which perform the whole
business logic. These beans access an Oracle DB. The datasource is passed from the
action classes to the bean classes as a parameter.
Now I have to implement a WebService that does the same as the Struts
It depends on the container as to how you put the datasource into the
context.
If you're using Tomcat 4.1:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
Then to access the datasource:
String dsName = java:comp/env/jdbc/myDS;
ctx = new
-
Von: Ben Anderson [mailto:[EMAIL PROTECTED]
Gesendet: Fr 17.10.2003 16:22
An: [EMAIL PROTECTED]
Cc:
Betreff: Re: Looking up the Struts Datasource
It depends on the container as to how you put the datasource
Exception
{
javax.sql.DataSource dataSource;
java.sql.Connection myConnection;
try {
dataSource = getDataSource(request);
myConnection = dataSource.getConnection();
// do what you wish with myConnection
} catch (SQLException sqle) {
getServlet().log(Connection.process, sqle);
} finally
PROTECTED]
Cc:
Betreff: Re: AW: Looking up the Struts Datasource
you've tried the configuration detailed in the struts faqs?
http://jakarta.apache.org/struts/faqs/database.html
public ActionForward
execute
Philipp Rthl wrote:
That's not really what I would like to do.
public ActionForward
execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception
{
SomeBean myBean = new SomeBean();
}
datasource is configured in server.config,,
can any one pls. help me to correct my mistake..
Regards,
viru
driver class 'null'.
here i am using Mysql database, i have copied mysql driver jar files into
struts application's lib folder , tomcat's common/lib and shared/lib
folder and Jndi datasource is configured in server.config,,
can any one pls. help me to correct my mistake..
Regards,
viru
, tomcat's
common/lib and shared/lib
folder and Jndi datasource is configured in
server.config,,
can any one pls. help me to correct my mistake..
Regards,
viru
-
To unsubscribe, e-mail:
[EMAIL PROTECTED
PROTECTED]
Sent: Friday, October 17, 2003 2:31 AM
Subject: Re: JNDI Datasource
This actually looks like a Tomcat problem, not a Struts problem, but if
you post your server.xml file it might help debug the problem.
Kirk Wylie
M7 Corporation
virupaksha wrote:
Dear All,
I am facing
Using struts 1.1 I'm able to set a DataSource correctly.
In struts-config.xml I use:
data-sources
data-source
set-property property= autoCommit value= false/
set-property value=true property=autoCommit /
set-property value=Alnitak Data Source property=description /
set
hello,
i am using mysql as a datasource in the app,everything
is working fine but when make changes in the class
files and reload the application the application
ceazes to work and i got the followng messages in my
log file. can some one help me figure out where am i
going wrong. am a newbie
11:33 PM
To: Struts Users Mailing List
Subject: datasource connection problem.
hello,
i am using mysql as a datasource in the app,everything
is working fine but when make changes in the class
files and reload the application the application
ceazes to work and i got the followng messages in my
log
On 09/09/2003 07:32 Rajat Pandit wrote:
hello,
i am using mysql as a datasource in the app,everything
is working fine but when make changes in the class
files and reload the application the application
ceazes to work and i got the followng messages in my
log file. can some one help me figure out
[EMAIL PROTECTED] wrote:
hello,
i am using mysql as a datasource in the
app,everything
is working fine but when make changes in the class
files and reload the application the application
ceazes to work and i got the followng messages in my
log file. can some one help me figure out where am i
The most common solution to this problem is using a Factory Method to
return the correct implementation of the interface. Your classes should
never know which implementation is in use because they will all ask the
Factory Method for the object. You just need to change the one line in
the
The most common solution to this problem is using a Factory Method to
return the correct implementation of the interface. Your classes should
never know which implementation is in use because they will all ask the
Factory Method for the object. You just need to change the one line in
Alternatively,
If you are worried about test code in production, you could extend from
ConnectionHandlerFactory with a TestConnectionHandlerFactor and override
the getConnectionHandler() method to return the connectionHandler for
testing.
James
James CE Johnson wrote:
The most common
In my DB tier I use an interface to get the connection.
When used under Tomcat, the class that implements the connection gets
the connecton through JNDI.
I want to test these classes outside of Tomcat.
Is there a simple way to put objects in the Context,
I mean a simple way to emulate Tomcat
javax.naming.InitialContext;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;
public class DBjndi {
protected static DataSource ds;
public static void init(String name) throws NamingException
--- Leonardo Francalanci [EMAIL PROTECTED] wrote:
In my DB tier I use an interface to get the connection.
When used under Tomcat, the class that implements the connection gets
the connecton through JNDI.
I want to test these classes outside of Tomcat.
Is there a simple way to put objects in
On 08/22/2003 04:43 PM Leonardo Francalanci wrote:
I read the JNDI tutorial, but is the worse thing I've ever read.
You've obviously never read any of my poetry.
--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9
-
To
--- [EMAIL PROTECTED] wrote:
hi all,
i have configured a datasource in struts-config.xml, which is
successfully loaded.
now my problem is that i want to write a component (which has
application-context scope) which wraps
the DataSource, so that individual action classes don't have
hi all,
i have configured a datasource in struts-config.xml, which is successfully
loaded.
now my problem is that i want to write a component (which has application-context
scope) which wraps
the DataSource, so that individual action classes don't have to deal with
PreparedStatement
Following on to a earlier question, what is the reccomended way of
retrieving a ResultSet and passing it to be viewed on a JSP page? I have
seen it done using ProcessBeans, Array Lists, ResultLists, Collection
and it all seems a bit confusing. In my app, the user enters a SQL query
so I have no
.
[EMAIL PROTECTED] wrote:
hi all,
i have configured a datasource in struts-config.xml, which is successfully
loaded.
now my problem is that i want to write a component (which has application-context
scope) which wraps
the DataSource, so that individual action classes don't have to deal
I found a reference to the SecurityFilter project on this mailing list.
I just hooked it up, and it seems to work pretty well.
I do have a question, though. Is there any way for the realm to use
same datasource as struts? I'm not passed anything useful. Is there
something static somewhere
-
From: Richard Raquepo [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, July 18, 2003 11:43 AM
Subject: using Struts datasource from a normal servlet
i have a service class that i can use in my actions by passing the servlet
variable to it
MyService service
Richard Raquepo wrote:
Another option would be to configure the DS in struts but register it with
a
singleton (Service Locator) that can retrieve the datasource in your data
access classes.
maybe you can give me some link about this? tutorials maybe? any code maybe?
:p
As you wish:
http
can i call/use the a struts datasource in my servlet.
the thing is, i have a struts app. then i created a servlet to do some specific thing.
now my question is,
can i use the datasource defined in my struts config file in my servlet. if so, how?
example code will
be very much appreciated
1 - 100 of 335 matches
Mail list logo