Is possible to make a jsp script work with oracle wallet?

Have a jsp script that connects to oracle database. Since I wants to hide the username/password to oracle schema, I would like to use oracle wallet to achieve it. Is it possible? Can any guru shed some lights on how to do that or point to a link? The connection portion using wallet is critical for me.  (Oracle database version v11.2)

If it is not possible, is there any way to hide the username/password somewhere?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jl66ConsultantAuthor Commented:
The webserver is Tomcat on Linux.
johnsoneSenior Oracle DBACommented:
It should be possible with wallet.  You would leave off the username and password in the connect string, so that it just becomes /@dbname.  The client should handle it from there.

This page seems to have some good extra information that I didn't see (at least easily found) in the Oracle doc ->
jl66ConsultantAuthor Commented:
Thanks for the tip.
For a plain java program, this is no problem. I already worked out. However if you put in jsp script running on Tomcat, that always complains the wrong password no matter hard hard I tried. I am really interested in the link or example for jsp script with wallet.

Can any guru find it or show some more tips for me?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

johnsoneSenior Oracle DBACommented:
Since I haven't seen any activity on this thread, I tried to do some searching.  I pieced a few things together and this is what I see.

These are the links I used:

If I am piecing those 2 things together correctly, you should be able to connect with a string similar to:

String url = "jdbc:oracle:oci:/@myTNSEntry");
Connection conn = ods.getConnection();

Based on what I am seeing in those links, you should be able to connect with a standard JDBC connection.  What are you trying that isn't working?  Also, is the wallet open?
jl66ConsultantAuthor Commented:
johnsone, Thanks a lot for your tips again. I tried it. It says the wrong username/password, and tried other similar things, not been successful yet. I am wondering that usually Tomcat is installed and owned by one user (U1), but the wallet owner is different. Usually it is a normal oracle database user (U2). Without any wallet password involvement, how can U1 get known the info in wallet via jsp page? Do you have a test env? Maybe I am asking too much.

Recently I read something on jndi, can I use it instead of wallet? The purpose is that in jsp page, there should not be a schema password there?  Maybe I need to open another ticket for it after this one.
johnsoneSenior Oracle DBACommented:
My understanding of wallet is it is user based.  Each user would have to have their own wallet.  You would have to create a wallet as U1 to be able to use it within Tomcat.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jl66ConsultantAuthor Commented:
Thanks for your tips.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.