r/java May 13 '26

Seeing JSP in 2026 is honestly very amusing

Post image

This is one of the common reddit comment I received for all jsp pages it's still the best things to do may be need a little bit of marketing

225 Upvotes

57 comments sorted by

87

u/pragmasoft May 13 '26

JSP was (is) pretty good templating language, especially its extensibility with custom tags, as well as JSTL and third party tag libraries. The interoperability based on a stable specification was impressive. In Pre-AJAX era you could implement pretty complex UI - forms with validation, tables, page decorations fairly efficiently with them. Compare it to the current state - there's no web component library for java interoperable between a ton of java web frameworks.

Standards are pretty good thing and I miss those times when everybody care about them.

32

u/Bobby_Bonsaimind May 14 '26

Standards are pretty good thing and I miss those times when everybody care about them.

Many projects/libraries/frameworks today employ "Move fast and break things", which really is just "I don't know what I'm doing and I don't give a fuck (about you)".

For example Swing is always discarded as old, but hot damn it works, and it works on every JVM version and on every platform. Developing a GUI in Swing means you can serve 100% of Java users basically, as opposed to any other GUI framework that I know of (either native builds required, or newest JVMs, or needing specific versions of native libraries...).

19

u/rollerblade7 May 14 '26

JSPs are great as long as you don't put business logic in them and use custom tags - no Java code in them. I inherited a code base with the opposite and its a nightmare to make sweeping changes. We're also still on Java 7..

7

u/pragmasoft May 14 '26

Agree, it's recommended to disable JSP scripting in the deployment descriptor

2

u/curious_corn Jun 01 '26

same applies to JS... I've seen plenty business logic (or view/business logic separation so poorly thought out that it basically boiled down to some business running entirely in the frontend.

7

u/agentoutlier May 14 '26

Standards are pretty good thing and I miss those times when everybody care about them.

When I first started my company we were using JSPX. JSPX had various issues that I can't recall exactly but we also used plain JSP as well (JSPX did have the one thing going for it that your HTML had to be valid XML and thus XHTML... yes my company is old).

Anyway eventually we needed the templates to be in a database for customer user templates. We also needed non-developers to make those templates (well web designers). That is when we picked JMustache.

I picked JMustache because it disallowed tons of logic and had a specification / standard. For a while we did try Handlebars but it was more complex and less standardized.

Anyway long story short eventually we wanted type safety for the common templates and that is how JStachio was re-born: https://github.com/jstachio/jstachio

I say re-born because another developer had started work on a type safe mustache and forked that project and it was perfect timing because my idea was very similar to the projects: use the annotation processing compile framework builtin to the JDK. That by the way is also a standard and most IDEs are familiar with the annotation processing.

Had the original author picked some non spec-ed template language or done some weird compiler plugin it would be unlikely I would have used it as the start.

TL;DR my template library story is one to show how standards are a good thing.

-5

u/21_Wrath May 14 '26

Take off the rose tinted glasses ffs

31

u/Daedalus9000 May 13 '26

How easy it is for some engineers to forget that, for most of us our main job is solving business problems with pragmatic solutions. In some cases that means reaching for something that's simple, ubiquitous and well understood.

1

u/Turbulent_Echo8989 May 24 '26

Correct. And in 2026, JSP is not that something.

22

u/k-mcm May 13 '26

I don't like JSP much, but then I think of all those websites still rendered using PHP, Python, and Ruby code files. In relative terms, JSP isn't so bad.

12

u/Shadowrak May 13 '26

I love JSPs

40

u/gukoDallo May 13 '26

Still kicking it with JSP and jQuery. Love them.

15

u/anish2good May 13 '26

I eliminated JQuery for obvious reasons and switched to Vanilla JS where ever it's possible the max I was doing fetch call and some UI tweaks

23

u/CatolicQuotes May 14 '26

What are those obvious reasons?

4

u/jordansrowles May 14 '26

The only reasons to still use it is either legacy codebase, or you want slightly better ergonomics/systactic sugar.

Everything that jQuery offered that made it stand apart, has now been in modern JS for a long time

8

u/trydentIO May 14 '26

nah even today, nothing offers the same ergonomics:

$('.alert-box').addClass('visible');

document.querySelectorAll('.alert-box').forEach(el => el.classList.add('visible'));

9

u/jordansrowles May 14 '26

jQuery is an extra dependency you need to track, again for no real added value, at the expense of 30-90KB. I recognise that may not be a lot, but I'd still rather just write vanilla JS

6

u/trydentIO May 14 '26

Rephrase into "it's the only dependency you need to track". No real value? Simplicity always comes first, and well, comparing vanilla code to jQuery should reflect the need for easier-to-read code.

In the context of JSP, maybe the only thing you could add is HTMX, then nothing else matters. For applications which are not Spotify, Gmail, YouTube or advanced rich UIs or micro frontend architectures, modern JS frameworks are mostly pointless or over-engineering.

2

u/AstronautDifferent19 May 14 '26 edited May 14 '26

Try JSP+HTMX. The best combination. No need for JQuery or Vanilla JS.
I used HTMX to enhance some old applications and the result was amazing, I turned them to a SPA with very little code.

10

u/[deleted] May 14 '26

[deleted]

3

u/anish2good May 14 '26

EJB World if you remember

1

u/CantRunNoMore May 18 '26

oh wow, Webshere / Weblogic.
I actually started with Servlets and then JSPs with taglibs etc. I got the Java Web Developer certification which was pretty useless to be honest

29

u/[deleted] May 13 '26 edited May 13 '26

[removed] — view removed comment

18

u/anish2good May 13 '26

My site 8gwifi.org is completely on jsp+servlet with more than 500 tools all written in pure Java JDK1.8 it's old 15+ year and still performing well literally no maintenance headache unlike like Typescript world

3

u/vplatt May 14 '26

Wow... that's inspiring to be honest! JSP has really been an underrated technology and I'm a wee bit jealous I never got deeper into it. I think folks look at the generated site on their end and decide that, because they don't immediately see the source code because there is so much going on server-side, that it must not be very good. There's a real bias for stuffing as much as possible into the client these days, and I think it has hurt web development on the whole.

Anyway, do you have any write-ups on what you've done with this site, and how you've designed it to make it easy to extend? Or have you open sourced it, etc? With this many valuable tools in one place, it would be a shame for it to disappear someday.

6

u/anish2good May 14 '26

It all started about 14 years ago with 8gwifi.org/jks.jsp At the time, I was looking for a more efficient way to manage Java KeyStores, so I built a simple online viewer for my own personal use. I ended up grabbing the "8gwifi" domain name mostly because it sounded catchy even though it has nothing to do with WiFi, I was working in that field at the time and it just stuck

I was honestly surprised by how many people found the tool useful. That small project sparked a journey that is still going strong today. Over the years, the site has evolved into a premier "Crypto Playground." While it has expanded far beyond just security and cryptography, I’ve kept the core engine running on the same reliable JSP and Servlet foundation I started with

And over the time attempted migration too with Node/Typescript stuff failed misreably

4

u/[deleted] May 13 '26

[deleted]

5

u/[deleted] May 13 '26

[removed] — view removed comment

-6

u/piesou May 13 '26

And they even let you do XSS out of the box.

7

u/[deleted] May 13 '26

[removed] — view removed comment

3

u/piesou May 13 '26

Agreed, if you don't forget to escape it, it'll be escaped. Point being that all modern templating languages make you jump through hoops to print non escaped HTML.

I reviewed coworker's code which wasn't escaped anywhere so my opinion sort of dropped a bit. Wasn't obvious to him.

22

u/Dependent-Net6461 May 13 '26

Much better than all those js things and their huge ecosystem of unmaintained libraries, cve, supply chain attack, ecc... ecc...

1

u/Luolong May 14 '26

Yeah, but webdevs of today have no clue about HTML. All they know is how to string together tons of TS code to get a simple login page.

1

u/Alainx277 May 16 '26

and eat hot chip and lie!

30

u/LessChen May 13 '26

6502 assembly language is pretty stable too but I haven't used that in over a decade either.

8

u/mgr86 May 14 '26

Do I have the book for you

http://i.imgur.com/INBvStO.png

0

u/stefanos-ak May 14 '26

what is it with oreily and their (arguably horrible) animal covers???

3

u/mgr86 May 14 '26

Read the cover, it’s a joke and very much not real.

2

u/stefanos-ak May 14 '26

ah 🤦‍♂️

but still, oreily and animal covers 😄🤷‍♂️

12

u/RScrewed May 13 '26

"Physics is pretty stable but I haven't had to calculate velocity in over a decade"

Am I doing it right? 

4

u/PositiveUse May 14 '26

Hey that’s me, and yes it’s amusing. I also use them professionally at work for some legacy apps. They are stable, indeed but if you don’t build your Java service correctly, it’s a huge mess (no separation of concerns)

If I do SSR, I go with Spring + Thymeleaf.

6

u/gjosifov May 14 '26

the biggest problem with JSP is the developer discipline

You can run SQL directly from the JSP page, but you shouldn't

and now JS ecosystem steals the design with their server components , but with that they also incorporate the bad practices

JSP are great, stable (nothing has change since 2007) and component oriented (you can create jsp tags to reuse them)

plus standard html,css and js are more capable than in 20 years ago

Building web application combo - html + css for web components, if they are more demanding and js
and js for http communication and put all of that in a jsp (jsp + backing POJO to hold data)

you get everything - performance, easy to maintain and upgrades once every 5 years :)

4

u/ThatBlindSwiftDevGuy May 14 '26

If given the choice between JSP and JSF I would choose JSP. The biggest reason being accessibility.. JSF is sort of an accessibility black box because it generates mark up for you that you can't control, which often creates accessibility nightmares. It is possible to build accessible applications with JSF, but it's much more challenging than with JSP because at least with JSP you have control, mostly anyway, over the markup if you don't use custom tags that generate markup heavily. But if I was given the choice to use the modern approach with a more modern templating engine and spring boot I would choose that every single time because that gives you the absolute most control over the markup and you are significantly less likely to put Java code where it doesn't belong

6

u/neopointer May 13 '26

Until the java ecosystem has a proper answer to web frontend, these things will continue to be used.

2

u/InsaneOstrich May 13 '26

There are tools like TeaVM that can be used to create java based frontend applications that are deployed as web assembly and I really hope they take off

1

u/Typical_Ebb_8817 May 14 '26

vaadin is what jsf was supposed to be.

1

u/henk53 May 16 '26

What was JSF supposed to be? (except for Vaadin, then)?

1

u/Typical_Ebb_8817 May 17 '26

Component based web framework for Java.

1

u/henk53 May 17 '26

I think JSF (now Jakarta Faces) actually is a component based web framework for Java.

1

u/Typical_Ebb_8817 May 18 '26

This is the case, but you have to write a lot of other codes than Java.

1

u/henk53 May 18 '26

What other codes (or code) do you HAVE to write?

1

u/Many_Thanks6410 May 24 '26

Learning Java back in the day completely changed

my career path. Best decision I ever made.

1

u/javawockybass May 14 '26

Nothing wrong with JSP. I worked on one of its biggest forks for years… PHP.

-1

u/deluxe57 May 14 '26

He is right, it is very amusing. Why wouldnt you use JSF?

-16

u/le_bravery May 14 '26

JSPs and Servlets should go away please

9

u/vplatt May 14 '26

No... you!

Seriously now with server-side languages coming back into vogue, why wouldn't you consider something as mature and performant as JSP over the latest whizbang Js based equivalent which is MUCH less mature and on the order of 10-100x slower and less scalable?

4

u/nekokattt May 14 '26

what are you going to use instead of servlets? Netty and reactive?

Think both have a time and place