How to load a JSP content in a GWT service

25 views
Skip to first unread message

Olivier

unread,
Oct 9, 2009, 5:13:23 PM10/9/09
to gwt-sl
Hi,

I have to create a GWT service, over spring, thanks to you George for
this library (GWT-SL). However, I have found only sample of code that
show up, how to answer a string. In my case I would like to answer
something larger, like a JSP page. And by the way, take advantage of
JSP technology.

Do you think it is possible ?
Do you know how ?

Sorry if the question is a bite stupid or miss information. I am new
in this 2 technologies.

regards

George Georgovassilis

unread,
Oct 10, 2009, 10:02:45 AM10/10/09
to gwt-sl
Hello Olivier,

The "normal" way web sites work is a two step procedure:

1. The browser sends a request
2. The server sends a response which replaces the HTML page the
browser currently displays

So, after 2 has finished, nothing is left of the old HTML page. It is
erased and a new content is displayed to the user.

With RPC the procedure changes:

1. The browser sends a request
2. The server sends a response which the javascript in the browser
receives, parses and reacts to it.

So, all you can ever get from the server as a response is a java
object which your program must receive and react to.

Now, if you want to display a JSP page after an RPC call, you still
can change the window location (see the javadocs for GWT's Window
class) to direct you to that JSP.

kursat...@gmail.com

unread,
Oct 10, 2009, 10:27:46 AM10/10/09
to gwt...@googlegroups.com
Hi Olivier,

This depends on your architecture. If you want to use gwt components individually, you can integrate those components in a jsp page using some techniques explained in Gwt documentation. However, if you want to use Gwt as a master framework, especially using smartgwt or extgwt, things change. You can load a jsp in a tab using these frameworks. In our project, we came across a problem where extgwt grid implementation together with gwts serialization was too slow to load the data, and has lot of compatibility and rendering issues, we though of loading jsp and pure html. But this time, you loose all of your programmatic access to objects in the rest of your project, which was not acceptable in our case. So we used xml data instead of slow serialization of gwt, and managed to overcome that problem.

Best Regards,
Bu e-posta, Turkcell BlackBerry ile gönderilmiştir.
Reply all
Reply to author
Forward
0 new messages