This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Harry Pulley

+ Follow
since Sep 03, 2012
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Harry Pulley

Local help showed me that my class files weren't in the .war file, duh. Adding the class files to the warbuilder.xml to put them in the war file lets tomcat successfully deploy and run the servlet.
7 years ago
I worked on a GWT web application with client, shared and server code. It all works great in Eclipse when Run As or Debug As a web application, the servlet is found just fine. But if I deploy it in Virgo Tomcat or just Tomcat the calls to the servlet don't work. I get a 404. I have searched and many similar postings are around but none of them fixed my issue. Error from my app, not the vanilla greet example but it is the same:

getSituation failed: 404 <html><head><title>Apache Tomcat/7.0.26 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;} {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - Servlet SituationServlet is not available</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Servlet SituationServlet is not available</u></p><p><b>description</b> <u>The requested resource (Servlet SituationServlet is not available) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.26</h3></body></html>

I thought maybe it was something I had done so I then created the standard GWT web application example with the greetServer. I added a Warbuilder.xml file to build the war file. It has exactly the same problem so I am wondering what on earth I have done or not done.

Could it be my warbuilder? That's the only part that isn't in the standard GWT web application sample:
<project name="VisualNovel2" basedir="." default="default">

<target name="default" depends="buildwar,deploy"></target>

<target name="buildwar">
<war basedir="war" destfile="VisualNovel2.war" webxml="war/WEB-INF/web.xml">
<exclude name="WEB-INF/**" />
<webinf dir="war/WEB-INF/">
<include name="**/*.jar" />

<target name="deploy">
<copy file="VisualNovel2.war" todir="." />


Here is the web.xml:

Here is the VisualNovel2.gwt.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='visualnovel2'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name=''/>

<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name=''/>
<!-- <inherits name=''/> -->
<!-- <inherits name=''/> -->
<!-- <inherits name=''/> -->

<!-- Other module inherits -->

<!-- Specify the app entry point class. -->
<entry-point class='visualnovel2.client.VisualNovel2'/>

<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>



My own code is more complex but there is no need to include it as it has the same issue, can't talk to the servlet. It works perfectly from within Eclipse and annoyingly on my Windows 7 64 system with Virgo Tomcat 3.5 and a 64-bit Linux system with Virgo Tomcat 3.5 or Tomcat 6 the system can't connect to the servlet.

I have other services which do work which makes me think it is not a config issue on virgo tomcat or tomcat but if there is config I can fix, please let me know. They are more complicated so I didn't want to use them, I thought I could just use GWT but obviously I am missing something.

Thanks in advance for any help you can provide. It is probably a stupid one liner or something that I've forgotten but for the life of me I cannot find it...

If you want to replicate this simply open eclipse (I have Juno with JDK 1.7.0_07) and create a new Google Web Application Project, create a Warbuilder.xml file, run Google->compile, do Run As ant builder on the Warbuilder.xml and drop the war file in your virgo tomcat pickup or tomcat webapps directory.


7 years ago