Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 762819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:27:23+00:00 2026-05-14T16:27:23+00:00

I guess my questions are not well described. Is this coding style (like the

  • 0

I guess my questions are not well described. Is this coding style (like the example below) still recommended?

Aren’t there any new methods of mixing html with jsp? I see some examples with the blockquote < script > < /script >. I guess that’s for seperating code blockwise and not always the best way.

Any suggestions, let’s say a framework, syntax coloring or even formatting would help.

My problem is that the relation or even errors between Class and JSP file is not always displayed well in eclipse. Or it’s maybe not easy for a new person to read/understand it.

Here an example

<%} %>
<%if(condition) { %>
<tr>
    <td class="label"><%=method()%></td>
    <td class="text"><%=method()%></td>
</tr>
<%} %>
<tr>
  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T16:27:24+00:00Added an answer on May 14, 2026 at 4:27 pm

    Those ugly things are called scriptlets and yes, they are considered bad practice since a decade, since the moment that taglibs and EL were born. Nowadays they may be useful for quick prototyping, but really nothing more than that.

    Nowadays, you normally use taglibs like JSTL to control the page flow and output. You normally use Expresson Language (EL) to access backend data. You can do fairly a lot at the presentation layer with them. If you comes to a point that it is not possible with either of them and you’re forced to grab scriptlets, then the code logic ultimately belongs in a real Java class. You can use a Servlet class to control/preprocess/postprocess requests, you can use a Filter class to filter requests, you can use a DAO class to do the database interaction, you can use a Javabean class to store/transfer/access data, you can use a Domain class for business logic, you can use an Utility class for static tools. Use the JSP where it is intented for: a view technology to write template text like HTML/CSS/Javascript in which provides the possibility to interact with backend Java code and data by taglibs and EL.

    Those tutorials are very good to get started with them all the right way: Beginner and Intermediate JSP/Servlet tutorials, Advanced JSP/Servlet tutorials.

    That said, the <script></script> things where you’re talking about have by the way nothing to do with Java/JSP. Those are HTML elements which indicate a block of Javascript. This is an entirely independent language with the first 4 characters of the name and a less or more simliar keyword/syntax usage as the only relation to Java.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I guess there might be some overlapping with previous SO questions, but I could
Okay guess this question looks a lot like: What is the best way to
Alright, I know questions like this have probably been asked dozens of times, but
Is there anyway given a string like, my example\n , to get a pointer
This might seem like a silly question, but after asking some questions on stackoverflow
After reading several other questions, it looks like it's not advisable to have an
I guess the question title sums it up. Is there a time when it
I guess this question will sound familiar, but I am yet another programmer baffled
This is very basic magento question i guess. I want to first get all
This is a simple question,I guess, but I couldn't figure it out. How do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.