I copied the content of war directory to the web_app (which is my
public_html directory). Then I restarted tomcat, still I got the same
error

--- ERROR--
Sending name to the server:
test abcdef

Server replies:
An error occurred while attempting to contact the server. Please check
your network connection and try again
-- ERROR--

does the javascript file generated by the GWT sends request to the
wrong servlet? does it point to /mainarea/greet all the time?

Thanks,
Oby


On Jul 14, 6:01 am, Katharina Probst <kpro...@google.com> wrote:
> Try just taking the whole war directory that the compiler produces (as is)
> and copying it to your tomcat/webapps/ directory.  Rename the war directory
> to the name of your webapp (say, public_html).
>
> Then do tomcat/bin/startup.sh
>
> and go to
>
> localhost:8080/public_html/MainArea.html
>
> That should do the trick...
>
> kathrinOn Wed, Jul 14, 2010 at 2:51 AM, Oby Sumampouw <osumamp...@gmail.com> 
> wrote:
> > Hi,
> > I am trying to see if I can deploy the web starter project to a web
> > server (which runs using tomcat)
>
> > The steps that I have done so far:
> > 0.) create new GWT application, so it's the default template for a web
> > app
> > 1.) I compiled the starter project
> > 2.) Copy the class, lib directory to the ~/public_html/WEB-INF
> > 3.) Copy the web.xml to the ~/public_html/WEB-INF
>
> > this is the web.xml
>
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE web-app
> >    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> >    "http://java.sun.com/dtd/web-app_2_3.dtd";>
>
> > <web-app>
>
> >  <!-- Servlets -->
> >  <servlet>
> >    <servlet-name>greetServlet</servlet-name>
> >    <servlet-class>bla.bla.bla.server.GreetingServiceImpl</servlet-
> > class>
> >  </servlet>
>
> >  <servlet-mapping>
> >    <servlet-name>greetServlet</servlet-name>
> >    <url-pattern>/mainarea/greet</url-pattern>
> >  </servlet-mapping>
>
> >  <!-- Default page to serve -->
> >  <welcome-file-list>
> >    <welcome-file>MainArea.html</welcome-file>
> >  </welcome-file-list>
>
> > </web-app>
>
> > 4.) I put the MainArea.html and MainArea.css to the ~/public_html
> > because they are the welcome-file
> > 5.) I copied the compiled javascript and resources (in the folder
> > called 'mainarea') to ~/public_html
> > 6.) So the structure is like this:
>
> > -- public_html
> >      |- MainArea.html
> >      |- MainArea.css
> >      |- WEB-INF
> >           |- web.xml
> >           |- lib
> >           |- class
> >      |- mainarea
> >           |- gwt
> >           |- hosted.html
> >           |- mainarea.nocache.js
> >           |- other resources
>
> > When I go to the website, the page loads fine. But when I click send
> > (to send the input to the server) it seems the path is wrong. I got
> > this error:
>
> > Sending name to the server:
> > GWT User
>
> > Server replies:
> > An error occurred while attempting to contact the server. Please check
> > your network connection and try again.
>
> > I was wondering if this servlet location is correct?
>
> > Another noob question about JSP, can I put the generated javascript
> > code to ~/public_html/WEB_INF/mainarea instead of ~/public_html/
> > mainarea.
>
> > Initially I thought WEB_INF becomes the root directory if web app
> > tries to refer to some file? But apparently in the MainArea.html the
> > script src='mainarea/mainare.nocache.js' doesn't work if I put
> > mainarea inside WEB_INF.
>
> > I wish there's a way to make the html file able to access the mainarea
> > directory from WEB_INF. Is it possible?
>
> > Thanks!
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2Bunsubs 
> > cr...@googlegroups.com>
> > .
> > 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 google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to