Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I avoid Java EE to create a light-weight web page?

Everything I download seems hellbent on using all of Java EE. I need to build a single page to handle requests to it and do a tiny bit of processing based on parameters. This is to hook into another framework that will routinely call this URL.

I want a quick and easy way to create a page with some processing. Is there an easy way to do this using Java? I am using Java because I am comfortable with Java. I used SE for years and did some work in EE but I don't want all the stuff that comes with EE.

Should I maybe just avoid Java altogether and use something else. This needs to be deployed in a linux environment.

like image 829
uriDium Avatar asked Jun 29 '10 14:06

uriDium


2 Answers

I used SE for years and did some work in EE but I don't want all the stuff that comes with EE.

Then just use a Servlet and that's all. Nothing, I repeat NOTHING, forces you to use "all that stuff" and your question is either a free rant or shows some deep misunderstanding.

like image 174
Pascal Thivent Avatar answered Sep 28 '22 02:09

Pascal Thivent


  1. You need Tomcat (or jetty, or any servlet container - jetty has an embeddable version btw)
  2. You need a .jsp file and optionally an HttpServlet

Generally, it's not a good practice to put any processing code in a JSP, but if it is really simple and won't be extended, simply put the logic there - it is translated to a Servlet anyway.

like image 28
Bozho Avatar answered Sep 28 '22 00:09

Bozho