Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #39655
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: What's the deal with JSP? |
| Date | 2020-12-29 13:48 -0500 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <rsftmh$8j4$1@gioia.aioe.org> (permalink) |
| References | <3fb97b37-b0e7-48a3-a2b3-c4d1a828d6dbn@googlegroups.com> |
On 12/29/2020 10:27 AM, e.d.pro...@gmail.com wrote: > So it stands for Java Server Pages, gets compiled into a .java file, > seems like Java should be the primary language, but Eclipse > recognizes html as the primary language and Java code has to be > embedded with <% %> which people don't recommend. Assuming there's no > good frameworks available like Spring or Angular, what's the best way > to make jsp look like clean code? A JSP page should consist of either a mix of markup and Java or preferably only markup. If it was all Java then you should use a servlet instead. So I think it makes sense for Eclipse to color code it as HTML and not as Java. <% %> are indeed considered primitive / old fashioned / bad style. There are several techniques that can be used to avoid that mix and get more clean code. Most important should be JSTL and bean classes. Any good JSP tutorial or book (which likely would be 15+ years old!) would describe those. I have written something: https://www.vajhoej.dk/arne/articles/jeetrick.html which you may consider useful - or not. Arne
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What's the deal with JSP? "e.d.pro...@gmail.com" <e.d.programmer@gmail.com> - 2020-12-29 07:27 -0800
Re: What's the deal with JSP? Arne Vajhøj <arne@vajhoej.dk> - 2020-12-29 13:48 -0500
Re: What's the deal with JSP? "e.d.pro...@gmail.com" <e.d.programmer@gmail.com> - 2020-12-29 13:59 -0800
Re: What's the deal with JSP? Arne Vajhøj <arne@vajhoej.dk> - 2020-12-29 22:43 -0500
csiph-web