How to create and run additional servlet

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

How to create and run additional servlet

Postby MaticPetek » Wed May 07, 2008 12:09 pm

Hello,
I create my project with GWT Designer and i use hosted mode for my development testing. One of functionality is also upload of user files. I create separate servlet to handle file upload in Netbeans, but their is a problem : because of different domains (GWT hosted mode runs on port 8888 and NetBeans tomcat runs on 8080), GWT FileUpload component cannot read response. This is know issue and it is also documented in GWT JavaDoc.
The solution would be to include addition servlet direct into GWT project. Is this possible? On GWT forums I read article how to run GWT application with Tomcat, but I don't understand how to do this with GWT Designer. Thank you for help.
Regards
Matic
MaticPetek
 
Posts: 11
Joined: Sat May 05, 2007 9:53 am

Re: How to create and run additional servlet

Postby Konstantin.Scheglov » Thu May 08, 2008 3:47 am

Yes, this is possible.

Just include additional servlet definition into *.gwt.xml, like GWT Designer does for RemoteService (RemoteServiceServlet is subclass of HttpServlet):

Code: Select all
   <servlet path="/MyService" class="com.mycompany.project.server.MyServiceImpl"/>
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests