Facing issue while designing UI in GWT

104 views
Skip to first unread message

vikash@Atos

unread,
Jul 6, 2012, 2:14:43 AM7/6/12
to google-we...@googlegroups.com
Hi,

Is there any way, we can develope and run a J2EE App in GWT environment?

Can we mix J2EE components, like servlets and jsps in GWT app?

Facing issue while designing UI with GWT.

Any help guide would be helpful.

Thanks in advance.

Regards,
Vikash

ashwin....@gmail.com

unread,
Jul 6, 2012, 2:23:02 AM7/6/12
to google-we...@googlegroups.com
simply put GWT is a client side library. you develop using java/ phyton or Go instead of javascript. 

Its is similar to packaging a jsp/ html page inside a web app and would run under any j2ee container.

yes you can combine, servlets and jsp in GWT app. 

~Ashwin


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/pAA-jpmoOsQJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

vikash@Atos

unread,
Jul 6, 2012, 3:14:14 AM7/6/12
to google-we...@googlegroups.com
Hi Thanks for Reply.

Is there any development guide which specifies way of development of a GWT application?

How can we connect a GWT App, to a DB?

Thanks 

Kanagaraj M

unread,
Jul 6, 2012, 4:10:08 AM7/6/12
to google-we...@googlegroups.com


On Friday, 6 July 2012 12:44:14 UTC+5:30, vikash@Atos wrote:
Hi Thanks for Reply.

Is there any development guide which specifies way of development of a GWT application?

Yes. There are lot of sample applications available. The one which comes with the eclipse plugin is a good one to start with.
 

How can we connect a GWT App, to a DB?

It will be the same as how will you connect to DB from a servlet.

Amit Sharma

unread,
Jul 6, 2012, 4:26:38 AM7/6/12
to google-we...@googlegroups.com
hi Vikas....
              I think you are using servlet with GWT in the form of its Service implementation class ...here you are using gwt-servlet.jar file.....also in case you want pure servlet to implement with GWT please go through this url :http://zawoad.blogspot.in/2010/04/how-to-call-servlet-in-gwt.html ....


Amit

vikash@Atos

unread,
Jul 6, 2012, 5:39:44 AM7/6/12
to google-we...@googlegroups.com
Hi,

I guess, using DB in GWT Application is something different, than normal web app. Something client-server way is used for this purpose?

Is there any example, where I can see how to connect a GWT app to MySQL?

Thanks

Kanagaraj M

unread,
Jul 6, 2012, 6:33:50 AM7/6/12
to google-we...@googlegroups.com
One thing you have to notice here is, your XxxServiceImpl itself a servlet.

Check this out - http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/server/rpc/RemoteServiceServlet.html

I dont see any problem in accessing DB from a servlet. From the servlet you can make JDBC connection to the database and make you have the jdbc jar file in your class path.

vikash@Atos

unread,
Jul 6, 2012, 8:41:45 AM7/6/12
to google-we...@googlegroups.com
Hi,

Tried to do the same using the LoginManager example given in the book. However, could not get the results from DB.

Tried to debug, but the control is not going to MyServiceImpl class. may be that class is not getting called.

Uploading the code as well here.

Due to zip file size limit, remoced gwt-servlet.jar from lib folder.

Please help.
Thanks
LoginManager.rar

javed ansari

unread,
Jul 6, 2012, 4:44:38 AM7/6/12
to Google Web Toolkit
Vikas, It seems you first needs the basic understanding of GWT and its
uses
Here is the procedure to create GWT app in eclipse IDE
1. Install GWT from eclipse
https://developers.google.com/eclipse/docs/getting_started
2. Create gwt application. Follow the tutorials.
https://developers.google.com/eclipse/docs/getting_started#creating
3. Use RPC to connect to DB. Write your db connection and data
manipulation in server side in InterfaceImpl class of the rpc.
https://developers.google.com/web-toolkit/doc/latest/tutorial/RPC
4. Never write the business logic and core work on the GUI side. In
fact you will not be able to do so because GWT packages will not
support. use GWT only for data presentation.
5. GWT has a control called FormPanel. use this widget control to
layout your form and call the desired servelet on the submit of the
form panel.

Regards,
Javed

vikash@Atos

unread,
Jul 12, 2012, 6:12:06 AM7/12/12
to google-we...@googlegroups.com
Hi Javed,

Even the simple apps are not working.

PFA the source. due to it's size, I have removed the gwt-servlet.jsr file in the lib folder.

Thanks for help.
SimpleRPC.zip
LoginManager.zip
Reply all
Reply to author
Forward
0 new messages