开发者

simplest solution to write a java web app run on tomcat: just list a few db records by id

When asking this I answered myself: use a jsp.

But ok, what about a lightweight, easy to use framework?

It would be perfect if this framework had Eclipse plugin, so that I could generate all code in one click and simply f开发者_如何学编程ill one method body (populate it with the data), then in one click create a war file using a wizard and deploy it on Tomcat.

Are there such frameworks?

p.s. I use spring, but I think there are ways to integrate it into every framework.


Take a look at Spring Roo.


If you only want to list a few DB records, I would just implement it dirty with a simple JSP with scriptlets. But you could also use the JSP SQL Tag library for that.

A simple one method body controller that needs that forwards to a view can most easily be writen with the Stripes framework that forwards to a JSP view (see wikipedia code example for how easy this can be done).

Generating nice tables in JSP can quickly be done by the popular Display Tag library.


If your not afraid to learn something new take a look at Grails

One of the big advantages of Grails is that its a full stack environment. Meaning that out of the box you get everything you need for your web app development

  • Test Servlet container (Tomcat)

  • Test database (hypersonic)

  • ORM (hibernate)

    etc.....

Once installed just run

> grails create-app

Then you have a complete runnable application. (Auto bootstraps your project creation and config)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜