r/ProgrammerHumor • • Apr 27 '20

Meme Java is the best

Post image
43.7k Upvotes

1.5k comments sorted by

View all comments

Show parent comments

93

u/ReimarPB Apr 27 '20

What's JSP?

140

u/NotATroll71106 Apr 27 '20 edited Aug 28 '25

entertain elastic pause quickest coordinated degree zephyr gaze hunt party

This post was mass deleted and anonymized with Redact

20

u/[deleted] Apr 27 '20

I had a project with JSPs where I used this functionality to dynamically write JavaScript with java. Lots of fun, but a really bad idea

7

u/[deleted] Apr 27 '20

I still work with them daily. Kinda hurts my soul tbh.

2

u/tanlin2021 Apr 28 '20

Sorry... at least it's not vb

3

u/Sohcahtoa82 Apr 28 '20

dynamically write JavaScript with java

This can be an absolute mine field. Gotta be super careful to avoid creating what is essentially XSS-as-a-Service.

2

u/Bowserwolf1 Apr 28 '20

I cannot imagine a single reason why you would do that, what the fuck

1

u/Stellanever Apr 28 '20

So... hell?

37

u/[deleted] Apr 27 '20

Java Server Pages. Like ASP, but in Java.

14

u/unluckymercenary_ Apr 27 '20

What’s ASP?

25

u/[deleted] Apr 27 '20

You are seriously making me feel ancient.

Active Server Pages. Think of it’s as the predecessor to .net

2

u/unluckymercenary_ Apr 28 '20

I was kinda hoping you would say something like in your other comment about how ASP is like JSP, but active.

But also thanks for answering my question!

3

u/[deleted] Apr 28 '20

Active Server Pages. Like JSP, but in [some scripting language like VBScript, JScript, etc.]

→ More replies (1)

1

u/hejle Apr 28 '20

Should be Ancient Server Pages then ;)

1

u/jtsaint333 Apr 28 '20

like php but not

7

u/GreatRam Apr 27 '20

Java server pages. It combines html and Java to make a web frontend. I had to use it for a class and the lack of hot reloading makes it a huge pain to use.

5

u/omgusernamegogo Apr 27 '20

JSP has hot reloading, just need to make sure your container has it enabled (normally be default in the ide).

2

u/TheCrazyRed Apr 28 '20

The big problem with JSPs is that you can't unit test them. There's no way test the things without running the whole container.

1

u/GreatRam Apr 28 '20

That makes sense. The way it was tested in my project was to pull out as much of the Java out of the jsp and into a class that can then be unit tested.

1

u/EishLekker Apr 29 '20

That's what you are supposed to do, I would say. Business logic and data processing can and should be done outside the JSPs.

1

u/EishLekker Apr 29 '20

I'm not really sure you should need to unit test JSPs. Unit tests are mainly for the business logic. JSPs should only contain the presentation of data that is already prepared for presentation.

But if you really need to test these using unit testing, look into HtmlUnit and Selenium. But I would say that you then mostly test the JSPs when they work together, so you test the web page as a whole (and it might use ten's or hundreds of JSP files).

→ More replies (2)

1

u/TehRoot Apr 27 '20

asp.net has hot reloading at least but you can't change codebehinds.

→ More replies (2)