The servlet spec would offer a world of insight into the proper places
of files. But let's take all this one step at a time. My comments are
intermixed.
David Salisbury wrote:
I'm not sure if I have a tomcat configuration problem or some other problem.
I'm try to get Oracle's XSQLServer
application up and working under tomcat... but something's amiss. In trying to
get a proof of concept going, I'm
installing under servlets-examples under the tomcat installation directory.
I'm a newbie on tomcat, but it's my
understanding that installing applications under the installation directory
will help in that I will not have to change
server.xml or CLASSPATH. Is that correct?
Yes.
Seems that tomcat _should_ be able to serve
/usr/local/tomcat/webapps/servlets-examples/WEB-INF/demo.xml without changes to server.xml, but it only
seems to see this file if I put a <Context> directive into server.xml.
According to the servlet spec, demo.xml cannot be served directly to the
client. WEB-INF is protected space for application files like configs,
classes, library jar files, etc., ...
But the above .xml problem may be parenthetical.. back to my XSQL
So, I have the class files that Oracle says I need under
webapps/servlets-examples/WEB-INF/lib
oraclexsql.jar xmlparserv2.jar xsqlserializers.jar xsu12.jar
with the XSQLConfig.xml file is in here too
Technically speaking, if this file is supposed to be visible to the
classloader (aka classpath), you should have it in WEB-INF/classes.
In order to get the servlet to kick off with a url referencing a .xsql file
extension, I have in servlets-examples/WEB-INF/web.xml
<servlet>
<servlet-name>xsql</servlet-name>
<servlet-class>oracle/xml/xsql/XSQLServlet</servlet-class> <!-- path from
the oraclexsql.jar in lib -->
</servlet>
<servlet-mapping>
<servlet-name>xsql</servlet-name>
<url-pattern>*.xsql</url-pattern>
</servlet-mapping>
This may not be breaking anything, but servlet-class is usually
expressed in a dot notation like oracle.xml.xsql.XSQLServlet
It seems that indeed, the XSQLServlet app is launched with a url reference to
http://farley:8090/servlets-examples/demo.xsql
It seems to be found if this demo.xsql file is under WEB-INF or WEB-INF/classes
( normal? ).
Your servlet mapping is correctly invoking the XSQLServlet class because
of the wildcard *.xsql. The servlet itself can't find the file.
But I get the error message on the browser: XSQL-001: Cannot locate requested
XSQL file. Check the name.
either way. I don't see any messages in the tomcat log files.
So tomcat seems to find the file, but the servlet doesn't.
Tomcat isn't seeing the file and has no idea about it. It's just
matching the request to the proper servlet. You could try
http://farley:8090/servlet-examples/foobar.xsql to see evidence of that.
Adjusting my CLASSPATH to add tomcat/webapps/servlets-examples/WEB-INF in either
setclasspath.sh or catalina.sh seems to have no effect.
Don't mess with classpath. It will always bring about headaches. If
the files are in their proper place, things will work. Again, a browse
of the servlet spec will offer a world of insight.
Any help on how things should be set up is more than appreciated.
-ds
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--David
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]