Tomcat - serving another web app?

I’m attempting to serve another app via Servoy’s tomcat.

  1. Create new folder in servoy/server/ folder:
    servoy/server/newapp

  2. Add virtual host to servoy/server/conf/server.xml:

      <Host name="newapp.local"  appBase="newapp"
		            unpackWARs="true" autoDeploy="true"
		            xmlValidation="false" xmlNamespaceAware="false">
		            
		<Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="logs"  prefix="newapp_access_log." suffix=".txt"
                 pattern="common"/>
      </Host>

I’ve set a static DNS entry for newapp.local - this is working fine.

Then, I’ve tried both:

  1. Adding a WAR file to newapp and restarting Tomcat
    Tomcat creates newapp-extWEBAPP in servoy/server
    newapp_access.log is created
    Accessing newapp.local:8080 resolves, but gives a blank page - no html, no body…nothing. Calling any of the jsp pages directly still nothing.

  2. Adding extended web app in newapp does the same (except no -extWEBAPP folder created, of course.). Even try adding plain-jane index.html - nothing. Accessing jsp files directly…nothing.

There are no errors logged in access log or server error log.

Anyone have any experience trying to get Servoy’s tomcat to serve other webapps or JSP pages?

Anything I put in server/webapps/ROOT will run fine.

Any tomcat / servoy guru’s running other apps on servoy’s tomcat? hints? pointers? help? :slight_smile:

Thanks,

NCM
FSCI

EDIT - also trying Context Path to make newapp its own web application, yet part of the localhost domain that is servoy:

<Host name="localhost"  appBase="webapps"
		            unpackWARs="true" autoDeploy="true"
		            xmlValidation="false" xmlNamespaceAware="false">

        
        <Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="logs"  prefix="localhost_access_log." suffix=".txt"
                 pattern="common"/>

        <Context path="/lib" docBase="../../lib"/>
        <Context path="/plugins" docBase="../../plugins"/>
        <Context path="/beans" docBase="../../beans"/>
        <Context path="/lafs" docBase="../../lafs"/>
        <Context path="/newapp" docBase="newapp"/>
      </Host>

I’ve tried placing the newapp folder at:

servoy/server/webapps/ROOT/newapp - this should be the right one for docbase=“newapp” , right?

servoy/server/webapps/newapp

servoy/server/newapp

In all cases, I get a 404 error.

EDIT -

OK, no more blank pages with:

 <Host name="newapp.local"  appBase="newapp"
		            unpackWARs="true" autoDeploy="true"
		            xmlValidation="false" xmlNamespaceAware="false">
		            
		            <Context path="" docBase="" debug="1"/>

		<Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="logs"  prefix="newapp_access_log." suffix=".txt"
                 pattern="common"/>
      </Host>

BUT get a 404 -The requested resource (/Login.jsp) is not available
I’ve put the newapp folder (with Login.php inside) in
all of the above mentioned locations AND

servoy/server/newapp/ROOT (newapp folder with jsp files renamed as ROOT)

Why oh why can I not server up a simple jsp file outside of the servoy ROOT folder (ie, a seperate web app) .

It has to be something obvious to someone used to configuring tomcat…or ist he Servoy tomcat somehow disallowing all other web apps from running?

…or ist he Servoy tomcat somehow disallowing all other web apps from running?

That could indeed be the case. Once I had Servoy installed and I wanted to install Crystal Reports Server (which also uses TomCat) on the same machine and that didn’t work

In this thread, Jan Blok states that Servoy’s tomcat is a standard tomcat…but I can’t seem to configure it to run any other webapps by setting up another context.

http://forum.servoy.com/viewtopic.php?t … ght=tomcat

If it is standard, then re-configuring it should allow for additional hosts/contexts/webapps to be run on it.

After spending nearly 10 hrs trying different configurations, I can’t seem to get it to work. Have learned alot about configuring a tomcat server :slight_smile:

I’ve tried changing the Catalina policy too, wondering if it was a security issue (similar to apache allow / deny folder permissions).

Servoy - is the Tomcat with Servoy 3.5+ a standard tomcat, just reconfigured for Servoy…or, has it been changed within the bin/jar files and is a handicapped tomcat install?

We’d love to have just one instance running Servoy and another simple web app. Plus, it would negate much of the configuration, port management and more thats needed to run more than one instance.

NCM
FSCI

If both webservers work on port 8080, then you have a problem.
I changed the default port for Servoy to 8088 and then I succeeded to get it work with 2 different webservers

Well, I just created a new XEN image that has a tomcat environment on it. I’ll use that now for testing, but would like to have a single server with Servoy and a couple of our other internally used tomcat webapps on it.

Jan Blok replied to my question if Servoy’s tomcat was handicapped in any way - its not, so perhaps a startup or config problem. If I figure out a way to make it work, I’ll post back here.