0

I'm just getting involved with Servlets, Tomcat, JSP etc and was wondering what people typically use for GUI's in their JSP pages (for client-side interactivity). I've used jQuery, YUI, extJS, etc. for JS scripting in simple webpages, but what about for web applications? Do these client-side technologies integrate well with JSP pages? Are there tag libraries out there to help with this sort of thing?

Any suggestions?

As a specific example, would it be a good idea to populate a YUI DataTable using JSP embedded in the JavaScript?

Tony R
  • 11,224
  • 23
  • 76
  • 101

2 Answers2

1

For rich GUI, consider looking at JSF. There are lot of JSF component libraries around which offers GUI awesomeness, for example PrimeFaces. It's basically using jQuery / jQuery UI under the covers. Checkout for example the Mock OS X demo.

If you don't want to bow for a component based MVC framework like JSF, then you can also just go ahead with "plain" jQuery / jQuery UI. It shouldn't be that hard on JSP. All JSP basically does is generating and sending some bunch of HTML/CSS/JS code from webserver to webbrowser. All JavaScript/jQuery basically does is intercepting on the HTML DOM tree as the webbrowser has retrieved (in other words, it has totally no knowledge about the server side JSP code which generated/sent it).

You only need to realize that afterwards bringing a component based MVC framework in an existing JSP/jQuery webapplication isn't that easy. Rather look for a request based MVC framework like Spring MVC then.

Related questions

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
0

You can use any of those libraries. I personally prefer jQuery. I've also used prototype and Ext JS in the past. Some frameworks integrate proprietary or generic Ajax approaches, but I find the popular ones (such as those you listed) to be a better alternative.

Steven Benitez
  • 10,936
  • 3
  • 39
  • 50