Thursday, September 2, 2010

Re: Deploy simple app on jetty: Please help

Hi,

Thanks for your help

> You probably need to configure serverlets in your web.xml to match
> your @RemoteServiceRelativePath

Ok....I am not sure what you mean. There are so many .xml files about
the place. If you mean the web.xml file in the
/usr/share/jetty/webapps/MyWebApp/war/WEB-INF/web.xml

I have not changed this file.....it is the web.xml that came with the
starter project. It looks like this:

<?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>com.mycompany.mywebapp.server.GreetingServiceImpl</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>greetServlet</servlet-name>
<url-pattern>/mywebapp/greet</url-pattern>
</servlet-mapping>

<!-- Default page to serve -->
<welcome-file-list>
<welcome-file>MyWebApp.html</welcome-file>
</welcome-file-list>

</web-app>

> error or warning in your console will have a 503 error or 404 not sure
> but you can see where it is sending the request you to and that will
> give you correct URL-Pattern .
So I am not sure what console you mean. I am not running this thing in
eclipse with the error messages etc. It runs fine in eclipe with no
errors......I am trying to host it on (un-embedded) jetty server. The
error message is coming from the java code itself I think....not the
browser.....the client code handles the case when the server code
doesn't do what it's expecting.

What I think is happening is that server side application is not
running....but I don't know how to get it going.

Anyway.....I have zipped up the files and attached them with this
email.......but it is just the web starter project that you can
download from the gwt "getting started" page. I have not made any
changes.

Thanks for your help.

Cheers

Andrew

>
> if you post your application in zip I can have a look.
>
> On Sep 2, 12:12 pm, andrewjmccann <andrewjmcc...@gmail.com> wrote:
>> Hi Folks,
>>
>> I which to deploy my new GWT application on a local server running
>> jetty-6.1.22 on ubuntu 10.04.
>>
>> Before I tried that I tried to host the MyWebApp (Web Application
>> Starter Project).
>> I cannot get it to work.
>>
>> In eclipse I click Google -> GWT compile. It seems to compile fine.
>>
>> Then I copy the MyWebApp dir to /usr/share/jetty/webapps dir.
>>
>> Then I start or restart the jetty server from within /usr/share/jetty
>> with
>> java -jar start.jar etc/jetty.xml
>>
>> I point my browser tohttp://127.0.0.1:8080/MyWebApp/war/MyWebApp.html
>>
>> There I see the nice "log in" page:
>> Please enter your name:
>>
>> When I do I get the error dialog
>> An error occurred while attempting to contact the server. Please check
>> your network connection and try again.
>>
>> I have read so many post about "what to do"....but in many cases I
>> just don't understand what they're saying. Try to follow the manual:http://code.google.com/webtoolkit/doc/latest/DevGuideDeploying.html#D...
>>
>> But it doesn't work. I don't know what I'm doing wrong.
>>
>> Ideas?
>>
>> Cheers
>>
>> Andrew
>
> --
> 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-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

--
Microsoft sells you Windows ... Linux gives you the whole house
Television is a medium, because anything well done is rare!

--
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment