Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fastest alternative to JSP scriplets while still using java classes?

I've never really done much web work, but for a project i have to write dynamic website in java.

So originally i started using scriplets in the jsp combined with standard java classes to reduce the amount of code in the jsp files. This was working great for me and i was producing results very quickly.

However when i looked online i saw that this way was disregarded almost a decade ago.

So i started looking into the JSTL libary and the the EL. However after searching for a very long while found it hard to wrap my head round and often got sidetracked with researching the benefits of JSF, pre processing servlets and much more. This project will never actually go into 'production' it will be presented to someone along with my code.

So my question is, what is the fastest and easiest way to display information from my database into a jsp while using standard java classes (Which i am used to, and have already created) to do the most of the work (create connection etc).

I have goggled this endlessly and it has only made me more confused. Much of the infromation from google just involved variables from the pages scope or the request scope, not getting information from java classes.

Thanks very much

like image 930
ApiMail Avatar asked Dec 08 '25 06:12

ApiMail


1 Answers

Even though this is intended to be a small, simple project, I'd suggest using the Grails framework. It's extremely simple to set up, and work with, and will give you all of the benefits of a web MVC framework.

Using Grails, you can write Controller classes that retrieve the data from the database, and expose it to the GSP pages (very similar to JSPs) for display.

like image 144
GreyBeardedGeek Avatar answered Dec 09 '25 19:12

GreyBeardedGeek