tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: vhost - servlets not available
Date Thu, 13 Jan 2011 15:36:30 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Johannes,

On 1/13/2011 10:01 AM, Johannes Stein wrote:
> i deployed a gwt-application in tomcat 6.0.18 without any problems. I
> pointed a url to the ip-adress and deployed the application unter
> webapps/myfolder, so that the app was reachable unter http://mydomain/myfolder.
> It worked fine.

Thanks for using the standard deployment mechanism! So many people want
to edit server.xml for some reason.

BTW, 6.0.18 is really quite ancient. You should seriously consider
upgrading. 6.0.30 was released today... seems like an auspicious occasion.

> But since im using a vhost in tomcat i got a problem.
> Every time when gwt tries a callback i get the message: "Requested
> resource not found". I did not make any changes in the web.xml.
> I added the host like the following in the server.xml:
> ...
> <!-- Define the default virtual host
>            Note: XML Schema validation will not work with Xerces 2.2.
>        -->
>       <Host name="srv2.tudom.de" appBase="tudom"
>        unpackWARs="true" autoDeploy="true"
>        xmlValidation="false" xmlNamespaceAware="false">
>         </Host>
>          <!-- VIRTUAL HOST INJECTION POINT -->
>     </Engine>

What is your default host? It's specified in the <Engine> "defaultHost"
attribute.

> The code is deployed into the folder tudom. The .html works fine, but
> my callbacks dont work.
> 
> A snippet from my web.xml:
> <servlet>
>         <servlet-name>StartService</servlet-name>
>         <servlet-class>tudom.start.server.StartServiceImpl</servlet-class>
>   </servlet>
>   <servlet-mapping>
>         <servlet-name>StartService</servlet-name>
>         <url-pattern>/tudom.start.Start/StartService</url-pattern>
>   </servlet-mapping>
> 
> When im changing the URL-Pattern to
> <url-pattern>/tudom.start.Start/StartService</url-pattern>
> 
> the Servlet gets reachable, but this doesnt interest GWT, cause it
> still tries to load /tudom.start.Start/StartService.

Aren't those the same URL?

What is the full URL that GWT is trying to access -- including server
name? I suspect that the introduction of the VHOST has exposed a flaw in
the URL building in your GWT interface's URLs.

Are you trying to call one VHOST from a page hosted by another VHOST?
Are there any <BASE> elements in your web page that might be affecting
things?

It might be helpful to use a protocol sniffer like firebug,
LiveHTTPHeaders, iehttpheader, fiddler, etc. to see what URL your GWT
app is really trying to hit.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0vG/4ACgkQ9CaO5/Lv0PDpbQCeLJ7PVFJcV7qPzzCFO5oYv04v
4e0AnAnYUlftZps6btkg50xliMbK+n0U
=yQgm
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message