Trouble getting JDBCProxy Servlet to work
Posted in 2009
Topics: Connectivity: ODBC / JDBC / .NET, Java & JDBC Development, Internationalization & Character Sets
Hello, We are having trouble deploying the Informix JDBCProxy Servlet, and as we are neither accustomed to tomcat/other servlet server, nor is the documentation provided by IBM extensive to the point that it put me on the right track, I thought maybe some of you people got it working. Anyway, long story short, the docs can be found here http://publib.boulder.ibm.com/infocenter/idshelp/v115/index.jsp (search for proxy, click "Using an HTTP Proxy Server", in german it's the second hit), and they say to put the 3 classes mentioned in a servlet directory, which already is the point where I'm a little at a loss. I tried reading some tomcat6 documentation, and even came up with a context xml file: """ <?xml version="1.0" encoding="UTF-8"?> <Context path="/ProxyTest" docBase="/srv/tomcat/localhost/ProxyTest" antiResourceLocking="false" privileged="false" /> """ The corresponding directory "/srv/tomcat/localhost/ProxyTest" contains the 3 aforementioned classes, and I even can activate the "Application" in the tomcat manager, but I get 404s for http://localhost/ProxyTest and http://localhost/ProxyTest/IfxJDBCProxy. Now, from the little I understand from servlets, they need to be more than just a plain directory with some java classes in it, but I couldn't do more a the point I have come to than trying to copy one of the example servlets and meddle around with it until it bows to my will, which really isn't the purpose of the test. In the end, I think my question would be: Has anyone gotten the JDBCProxy to work and could share the results? Or if not, is there at least someone servlet/tomcat-savvy enough to help me out with this one? Thanks a bunch, and have a nice monday :-) Felix
you need a servlet engine for running the servlet IfxJDBCProxy.class. My configuration with Tomcat 5.5: 1) put the Informix-JDBC driver ifxjdbc.jar in $CATALINA_HOME/common/lib/ 2) put the 3 classes IfxJDBCProxy.class, SessionMgr.class and TimeoutMgr.class in $CATALINA_HOME/common/classes/ 3) edit your Tomcat configuration file $CATALINA_HOME/conf/web.xml - uncomment the block ------------------ <servlet> <servlet-name>invoker</servlet-name> <servlet-class> org.apache.catalina.servlets.InvokerServlet </servlet-class> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> ------------------ - and uncomment the block ------------------ <servlet-mapping> <servlet-name>invoker</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping> ------------------ 4) (Re)start Tomcat 5) Test the URL http://localhost:8080/servlet/IfxJDBCProxy - it should show "-- Informix Proxy Servlet v220 Servlet API 2.5 --" The configuration with Tomcat 6 is nearly the same. You have to create the path $CATALINA_HOME/common/lib and $CATALINA_HOME/common/classes. Felix Sch'fer schrieb: > Hello, > > We are having trouble deploying the Informix JDBCProxy Servlet, and as > we are neither accustomed to tomcat/other servlet server, nor is the > documentation provided by IBM extensive to the point that it put me on > the right track, I thought maybe some of you people got it working. > > Anyway, long story short, the docs can be found here > http://publib.boulder.ibm.com/infocenter/idshelp/v115/index.jsp (search > for proxy, click "Using an HTTP Proxy Server", in german it's the second > hit), and they say to put the 3 classes mentioned in a servlet > directory, which already is the point where I'm a little at a loss. I > tried reading some tomcat6 documentation, and even came up with a > context xml file: > """ > <?xml version="1.0" encoding="UTF-8"?> > <Context path="/ProxyTest" > docBase="/srv/tomcat/localhost/ProxyTest" > antiResourceLocking="false" privileged="false" /> > """ > The corresponding directory "/srv/tomcat/localhost/ProxyTest" contains > the 3 aforementioned classes, and I even can activate the "Application" > in the tomcat manager, but I get 404s for http://localhost/ProxyTest and > http://localhost/ProxyTest/IfxJDBCProxy. > > Now, from the little I understand from servlets, they need to be more > than just a plain directory with some java classes in it, but I couldn't > do more a the point I have come to than trying to copy one of the > example servlets and meddle around with it until it bows to my will, > which really isn't the purpose of the test. > > In the end, I think my question would be: Has anyone gotten the > JDBCProxy to work and could share the results? Or if not, is there at > least someone servlet/tomcat-savvy enough to help me out with this one? > > Thanks a bunch, and have a nice monday :-) > > Felix