tomcat problem

A

Amir Michail

Hi,

I'm trying to deploy my app without a path: instead of something like
mydomain.com/path/somefile.html, one could just access it using
mydomain.com/somefile.html.

To get this to work, I have tried the following in server.xml:

<Host name="mydomain.com" appBase="/var/lib/tomcat5.5/webapps"
unpackWARs="true" autoDeploy="true">

<Context path="" docBase="myApp" debug="0" reloadable="true"/>

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

For mounts, I have:

<VirtualHost mydomain.com>
ServerName mydomain.com

JkMount / ajp13
JkMount /* ajp13
</VirtualHost>

The web.xml file for my app contains:

<servlet-name>myAppService</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>

This results in a 405 error when I access mydomain.com/somefile.html.

Changing it to:

<servlet-name>myAppService</servlet-name>
<url-pattern>/myApp</url-pattern>
</servlet-mapping>

works better (i.e., the app starts) but results in a subsequent RPC
error: the requested resource (/) is not available. (I'm using gwt's
rpc mechanism.)

Any hints?

Amir
 
S

Shinya Koizumi

When you install Tomcat, all the files in the /Root dir can be access
www.mydomain.com/somefileinroot.html if you configure the dsn properly.

To start with, after the installation, you can put this somefile.html in
TomcatHome\webapps\ROOT.

Secondly, you configure your dns so that you can access the web server using
domain name.

That is all you have to do in order to display the web page.


Hope this helps.

Shinya
 
A

Amir Michail

Shinya said:
When you install Tomcat, all the files in the /Root dir can be access
www.mydomain.com/somefileinroot.html if you configure the dsn properly.

To start with, after the installation, you can put this somefile.html in
TomcatHome\webapps\ROOT.

I think the problem I'm having is related to using the wrong path
somehow for a default application.

I can get the page to load, but the subsequent GWT RPC fails.

Amir
 
A

Amir Michail

Amir said:
I think the problem I'm having is related to using the wrong path
somehow for a default application.

I can get the page to load, but the subsequent GWT RPC fails.

Amir

Hi,

In case anyone is interested, this turned out to be a problem with
using GWT.getModuleBaseURL().

That doesn't work in this case because docBase is used to make the
application the default one in tomcat.

Amir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top