PDA

View Full Version : GWT-RPC servlet



unc
10 Dec 2009, 2:09 AM
Hi,

I have two questions concerning the GWT architecture.


Is it possible to put the servlet implementation in another project? So that I have the interface e.g. DataService and DataServiceAsync in my GXT project on the client side and the implementation of the service e.g. DataServiceImpl in another project. If this is possible how can I configure it? I don't want to have this implementation in the GXT project under "myproject.server". If it is not possible how can I connect to my Business logic project which provides me the data for the frontend?
How can I integrate my application in another webpage. I don't want to use Iframes.

Thanks in advance.
Best regard!

unc
10 Dec 2009, 11:41 PM
No suggestions?
Maybe someone can give me a hint where I can find more information about this topic?

Thanks,
Best Regards!

themalkolm
11 Dec 2009, 1:35 AM
Hi,


Is it possible to put the servlet implementation in another project? So that I have the interface e.g. DataService and DataServiceAsync in my GXT project on the client side and the implementation of the service e.g. DataServiceImpl in another project. If this is possible how can I configure it? I don't want to have this implementation in the GXT project under "myproject.server". If it is not possible how can I connect to my Business logic project which provides me the data for the frontend?
How can I integrate my application in another webpage. I don't want to use Iframes.

Thanks in advance.
Best regard!

Why not? GWT uses interface to determine service commands and URL to acces it. Its up to you who should register and run this servlet. I use Spring Framework to run servlets and GWT knows nothing about this.

unc
11 Dec 2009, 2:05 AM
Can you please explain me shortly what I have to change in my GWT project so that it refers to the servlet of my other project?

I think I have to change the following but I don't know if it's enough:


Add a servlet tag to the model <servlet class="" path=""/>. But what class and path i have to use here..the Impl class?
In the web.xml file I have to add the servlet class

<servlet>
<servlet-name>myService</servlet-name>
<servlet-class>com.test.myServiceImpl</servlet-class>
</servlet>



Is this all I have to change? Do you know a documentation about this topic. I haven't found one.
Do I have/need a project dependency from my GWT project to the Backend/server project?

Thank you very much for your help!!
Best regards

themalkolm
11 Dec 2009, 2:11 AM
Can you please explain me shortly what I have to change in my GWT project so that it refers to the servlet of my other project?

I think I have to change the following but I don't know if it's enough:


Add a servlet tag to the model <servlet class="" path=""/>. But what class and path i have to use here..the Impl class?
In the web.xml file I have to add the servlet class

<servlet>
<servlet-name>myService</servlet-name>
<servlet-class>com.test.myServiceImpl</servlet-class>
</servlet>



Is this all I have to change? Do you know a documentation about this topic. I haven't found one.
Do I have/need a project dependency from my GWT project to the Backend/server project?

Thank you very much for your help!!
Best regards

Really, Im not expert in servlets but all I want you to understand that servlet is not GWT specific thing. I don't know how to solve your problem. I just know how configure Spring to register servlets and make GWT work with it. Sorry for that.

themalkolm
11 Dec 2009, 2:12 AM
Try to find something about how register servlet in web.xml. Its nothing about GWT.

Kevin Daly
18 Dec 2009, 7:36 PM
But it must be run on the same web server. You just have to update your path to the servlet in your GWT annotations to reflect the context that the second project is installed in.

You can hack GWT to do cross domain stuff
http://raibledesigns.com/rd/entry/how_to_do_cross_domain