apache (pass thru servlet) with tomcat

I have a problem using the Pass-Thru servlet with apache in combination with tomcat 3.3.

Since I have installed JServe to run the Pass-Thru servlet the attached error message appears when I start tomcat.

I need Tomcat for X-Application to search and diplay the results, Pass-Thru servlet for transforming the result by pointing to a link to HTML.

So, what can i do to use both ?

Thanks in advance
Ralf Schmidt
error.txt (3.22 KB)

I can’t interpret the error message you are getting, except to tell you that it doesn’t seem to involve any Tamino code.

I wouldn’t try to install both tomcat and JServ together: rather, run the passthru servlet under tomcat directly. The documentation doesn’t explain in detail how to do this, but the passthru servlet is a completely standard servlet and will run quite happily under tomcat once you have worked out where to install it and how to set up the relevant configuration files. If you have problems with this, let us know - someone will probably recognize them.

Hello Ralf,

I can confirm Tamino PassThru being a standard servlet. I sucessfully tested it with Tomcat 3.3, 3.3.1. Currently I am using Tamino PassThru Servlet with Tomcat 4.0.4 for demos.

Regards
Peter

OK, I have now succesfully installed the Pass-Thru Servlet under Tomcat 3.3 …

servlet-name: styler (web.inf file)

db-name: dipl
collection: docs

Now I would like to transform a document with a stylesheet stored in tamino with the following link:



<bdm:display select=“$ID”/> returns the actual ino:id of the document, e.g. 4.

But this doesn’t work.

The Link to the xml-document

http://127.0.0.1/tamino/dipl/docs?_xql=artikel[@ino:id=4]

works, as well as the link to the stylesheet

http://127.0.0.1/tamino/dipl/docs/stylesheet/artikel.xsl

What is the mistake ?


Thanks in advance
Ralf

The problem happens because Tomcat is processing your servlet request on port 8080, but your web server (Apache?) is processing Tamino requests on port 80.

A passthru servlet URL should look like this:

http://localhost/styler_servlet_location/tamino/database/collection/doctype?_xql=query&_xslsrc=http://localhost/tamino/database/Stylesheets/xsl:stylesheet/stylesheet.xsl

When this URL is processed, the first part of the URL (http://localhost) is appended to the tamino part of the URL (tamino/welcome3_1_2_1/collection/doctype?xql=query) to get the xml result for processing.

In your case you have tried to specify a complete URL for the xml and so the append process will generate an invalid URL.

You need to make the append process work, which means your URL must start with http://localhost, not http://localhost:8080.

In turn, this means you need to install Apache’s mod_jk so that requests for servlets are passed automatically from Apache to Tomcat.

You can find details on installing the various Apache/Tomcat links
here.

When this is done, your anchor tag URL should be:


HTH

When you type a URI in the address box of your browser, the browser will automatically escape any special characters such as “[” and “]”. When you use the same URI in an element in HTML, you should write it in escaped form: that is “[” and “]” should be written as %5B and %5D.

You didn’t say what error messages you were getting, so I don’t know if this will fix your problem, but you should do it anyway.

Michael Kay

Thanks for your assistance !

Since I have installed mod_jk with the information in the tomcat documentation

http://jakarta.apache.org/tomcat/tomcat-3.3-doc/mod_jk-howto.html

it works fine … :slight_smile:

With and without the replacement of the square brackets with the URL-Codes in the link.


Ralf