You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter Shankey <sh...@its.charlestoncounty.org> on 2001/09/17 22:41:09 UTC
JSP page to Oracle with Tomcat
Tomcat 4.0 b7
Solaris 8
Oracle 8.1.7
I am trying to perform a Oracle DB query from a jsp page. I have included
the web.xml file the jsp page "fwtst.jsp" and the error message I am
having returned to me from the query.
I believe the problem is that I do not know how to make system
environments known to JSP or Tomcat. This is because of the error I am
getting which is "javax.servlet.ServletException: ORA-12154: TNS:could
not resolve service name at so on and so on"
>From my Oracle experience I know this error typically mean you are using
the wrong DB alias or an environment variable such as ORACLE_HOME or
TNS_ADMIN is not set or is incorrect.
Before I start Tomcat I have checked and re-checked my ability to run
sqlplus and connect to the DB but from the JSP page I cannot.
My questions are
Can I set environmental variables such as ORACLE_HOME in the JSP. If so
how? please give a short example
Can I use one of Tomcat's files such as web.xml or server. xml ?? please
give a short example
Can I use one of the web-appliation files such as web.xml?? Please give a
short example
Thanks
Pete