I figured it out; it was a problem with the url-pattern tag in my web.xml file.
This is what I had: <url-pattern>/stockwatcher/stockPrices</url-pattern> but this resulted in the stockPrices servlet being accessible from this URL: http://127.0.0.1:8080/stockwatcher/stockwatcher/stockPrices?q=ABC Instead, I changed it to: <url-pattern>/stockPrices</url-pattern> Because it's already within the stockwatcher war context. Now this link works as expected: http://127.0.0.1:8080/stockwatcher/stockPrices?q=ABC On Mon, Dec 12, 2011 at 10:27 AM, mpp4manu <[email protected]> wrote: > There is a tutorial, a bit dated, on the IBM DeveloperWorks website > that shows how a build similar to what you are attempting is done. > > Part 1 is here: > http://www.ibm.com/developerworks/opensource/tutorials/os-ag-gwt1/ > > This tutorial uses Apache Geronimo (with Tomcat) and a MySQL back end, > but I think has all of the essential elements needed. > > On Dec 12, 3:07 am, Frank <[email protected]> wrote: > > My guess your war doesn't contain everything needed, or something else > > is wrong. > > > > An easier way to deploy a war using Eclipse is : > > - Be sure you installed the google plugin > > - Click the blue G circle in the toolbar and select GWT Compile > > project > > - After this was finished just zip the src/war folder and give it > > a .war name (zip it in such a way that the root contains your .html > > file > > > > Now deploy that one in Tomcat... > > > > For real projects a real ant file that does all this automagicly is > > very recommended > > > > Frank > > > > On Dec 11, 1:54 am, wlindner <[email protected]> wrote: > > > > > I've been following the tutorial on building a sample GWT Application: > http://code.google.com/webtoolkit/doc/latest/tutorial/gettingstarted.... > > > > > I then wanted to try exposing a servlet for serving up some JSON data > > > according to this tutorial: > http://code.google.com/webtoolkit/doc/latest/tutorial/JSON.html > > > > > Both tutorials are very clear and I had no issues getting it to work > > > in Eclipse running in development mode. The way I'm testing it is by > > > going to this URL: > http://localhost:8888/stockwatcher/stockPrices?q=ABC+DEF > > > That returns json results just as is designed in the tutorial. But now > > > I want to deploy this project as a war file and run it in my own > > > Tomcat server. I found this tutorial for deploying turning the project > > > into a .war file: > http://blog.elitecoderz.net/gwt-and-tomcat-create-war-using-eclipse-t.... > > > It was clear, and the .war file built without any errors, but after I > > > deploy it, my servlet for JSON data does not work. I simply get a 404 > > > page and nothing happens. I also don't see anything in the server.log. > > > Also, I am attempting to deploy this in Tomcat 6, if that makes any > > > difference. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
