Easiest way to integrate J2SE app with a Web app
I have a really simple J2SE app that consists of a couple of classes. I plan to make it available to my co-workers, and I've been thinking the easiest way would be for them to access it from a browser, instead of distributing the executable on each machine.
What's the easiest method/framework that would allow me to do this? This app is pretty targeted-- it will just perform the same isolated operation, and will have some activity against the DB --but the logic is already implemented on the开发者_Python百科 app. The interface would only require some input from users (login,password,ip,etc), an action component to trigger the process and nothing else.
I've been thinking of a simple JSP/Servlet app for it, but wanted to see what's available now. If any how-to link is available, would be great.
Axis allows you to to create web services from existing java classes. But this may require writing a desktop client.
Grails framework can use existing java classes and is easy to use. It follows MVC pattern similar to Ruby on Rails.
If you don't need anything complex, and you're ready to to write html with System.out.println() thenjust write a simple servlet. There are many guides online, it's very straightforward.
If the application is simple, then use simple JSP/Servlet, otherwise MVC framework(Struts...) could be used here. But using MVC framework leads learning curve.
It's kind of trade-off: you could decide the learning curve is worthy or not in your application.
精彩评论