Hi Joe,

Alternatively, you can use hosted mode with the -noserver option to use your
own backend to produce and serve your HTML files. GWT hosted mode will still
work to debug your GWT client-side code as well.

Using hosted mode with the -noserver option:
http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=FAQ_HostedModeNoServer

Cheers,
-Sumit Chandel

On Thu, Jan 1, 2009 at 3:03 AM, Joe Cole <profilercorporat...@gmail.com>wrote:

>
> I have run into this problem a few times, so thought it may be worth
> posting for others.
> We wanted to be able to produce the html files via a framework like
> freemarker, jsp, wicket etc in hosted mode. It turned out to be
> trivial.
>
> public class CustomShellServlet extends GWTShellServlet {
>
>        IRoutes routes;
>
>        @Override protected void doGet(final HttpServletRequest request,
> final HttpServletResponse response) throws ServletException,
> IOException {
>                if (routes.hasExplicitRouteFor(request.getRequestURI())) {
>                        router.service(request, response);
>                        return;
>                }
>                super.doGet(request, response);
>        }
> }
>
> All you need to do is override the requests for the html files
> themselves. In my example it uses an internal class we use, but can
> easily work with freemarker templates or other view technologies.
>
> The only configuration change was replacing gwtshellservlet in the
> tomcat/webapps/ROOT/WEB-INF/web.xml to:
>
>       <servlet>
>                <servlet-name>shell</servlet-name>
>
>  <servlet-class>com.your.packagename.CustomShellServlet</servlet-
> class>
>        </servlet>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to