You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by micky none <ha...@rediffmail.com> on 2005/01/26 20:42:25 UTC
Dynamic Connection
Hi Friends,
I want to dynamically configure the database,username and password settings,instead of putting them in conf/server.xml.In other words,I dont know beforehand which database to use,
with which username and password.It all depends upon the person and the machine from which it tries to make a connection.In yet another words,I just need to do what the BasicDataSource is doing i.e get the
connection details before making a connection.I am not quite sure if you got my point,but this is what i've been asked to do and I
have no clue as to where to go or what to do.If anyone of you got my point,please help me.
Thanks
Re: Dynamic Connection
Posted by David Smith <dn...@cornell.edu>.
Sounds like you can just about totally abandon the idea of using any
pooling functions provided by DBCP. If I were designing, I'd construct
an object that implements javax.sql.DataSource and store it in the
session as soon as you know what db is being used. Then on each
request, get the DS from the session and use it as needed. Just be sure
you only store the DS in the session -- don't store the connections.
I'm sure there are other ideas out there as well.
--David
micky none wrote:
>Hi Friends,
>I want to dynamically configure the database,username and password settings,instead of putting them in conf/server.xml.In other words,I dont know beforehand which database to use,
>with which username and password.It all depends upon the person and the machine from which it tries to make a connection.In yet another words,I just need to do what the BasicDataSource is doing i.e get the
>connection details before making a connection.I am not quite sure if you got my point,but this is what i've been asked to do and I
>have no clue as to where to go or what to do.If anyone of you got my point,please help me.
>Thanks
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: hi help regarding running first servlet,jsp in Tomcat 5.x
Posted by Ben Souther <bs...@fwdco.com>.
Das,
Two things:
First, whenever writing to the list, please start a new thread instead
of just clicking 'reply' from another message. To those of us using
treaded mail clients, you've just hijacked someone else's thread.
Second, it looks like the sample war file on the jakarta site is
corrupted. For now, can download a working version here:
http://issues.apache.org/bugzilla/attachment.cgi?id=13534
The url to run it will be: http://localhost:8080/myapp
If you've reconfigured your port, etc.. change the url accordingly.
-Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: hi help regarding running first servlet,jsp in Tomcat 5.x
Posted by K thiruthuvadas <td...@yahoo.com>.
Dear Caroline,
Thanks for the instant mail. It is amazing to find
that the support is almost instantaneous for Tomcat
Jakarta Webserver.
I solved the problem by shutting down my IIS admin
service which was occupying the 8080 port
thanks again for the link
http://www.moreservlets.com/Using-Tomcat-4.html#Configure-Tomcat
regards,
Das
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: hi help regarding running first servlet,jsp in Tomcat 5.x
Posted by Caroline Jen <ji...@yahoo.com>.
Please take a look at
http://www.moreservlets.com/Using-Tomcat-4.html#Configure-Tomcat
It gives instructions on the installation of Tomcat
and compiling and testing simple Servlets and JSPs.
Please let us know if you still run into problems.
--- K thiruthuvadas <td...@yahoo.com> wrote:
> Dear Friends,
> i want to subscribe to the mailing list of tomcat.
>
> I have a doubt here
>
> i successfully installed tomcat 5.x in my windows
> server
>
> but when i tried to run my first sample application
> i
> caould not succeed
>
> i downloaded the sample file and placed it in the
> webapps folder.
>
> But when i access the http://localhost:8080/sample
> link the browser asks for network user name and
> password
>
> I could not run my first application with the help
> available inthe tomcat website
>
> It shows when Tomcat starts, that port 8080 is in
> use,
> it throws a java.net.bind exception
> regards,
> Das
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Take Yahoo! Mail with you! Get it on your mobile
> phone.
> http://mobile.yahoo.com/maildemo
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
>
>
__________________________________
Do you Yahoo!?
All your favorites on one personal page � Try My Yahoo!
http://my.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
hi help regarding running first servlet,jsp in Tomcat 5.x
Posted by K thiruthuvadas <td...@yahoo.com>.
Dear Friends,
i want to subscribe to the mailing list of tomcat.
I have a doubt here
i successfully installed tomcat 5.x in my windows
server
but when i tried to run my first sample application
i
caould not succeed
i downloaded the sample file and placed it in the
webapps folder.
But when i access the http://localhost:8080/sample
link the browser asks for network user name and
password
I could not run my first application with the help
available inthe tomcat website
It shows when Tomcat starts, that port 8080 is in use,
it throws a java.net.bind exception
regards,
Das
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org