开发者

Java + Web interface [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question s开发者_开发百科o that it can be reopened, visit the help center. Closed 11 years ago.

I'm writing a small application and I want to visualize results so I can see them in a web browser. For example, I want to display a plot of my data points.

Sure, I can write a http listener, that will serve an programatically built html. Or I can use java web application stack, but this seems a bit heavy weight for this simple task.

What do you recommend to do?


I would recommend using an embedded Jetty Server in your application. It's small and lightweight, and doesn't require to write the http-listener.

Embedding Jetty

The embedded jetty makes it easy to write a simple servlet and add some custom libraries.


A simple Jetty server with a JSP page maybe? If you need to programmatically draw a plot from data points then you'll probably need extra libraries for that.


What about creating a HTML file containing the plot of your data points as an image? You would only need to install a small and lightwight http server?

If you want to create the plot on demand (when you display the website) and give it some parameters via URL I think you will need a Java Application Server (e.g. Glassfish, Tomcat, etc) and create a web-app that reads those parameters, computes your chart/image/whatever and then displays it in a jsp page

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜