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

  • Home
  • SEARCH
  • 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 6068235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:41:37+00:00 2026-05-23T09:41:37+00:00

I am a front end or UI developer with limited understanding of Java. I

  • 0

I am a front end or UI developer with limited understanding of Java. I have a java based web app with JSTL used in it..I would like to understand the exact use of JSTL. Is it always used within JSP pages and is it used only for getting data from the database. Could you please explain with some basic examples..

  • 1 1 Answer
  • 0 Views
  • 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-23T09:41:38+00:00Added an answer on May 23, 2026 at 9:41 am

    Is it always used within JSP pages

    Yes.

    … and is it used only for getting data from the database.

    No. In fact, in most cases it is bad practice to access the database from a JSP, using JSTL or using other means (e.g. scriptlets).

    does it mean like most JSP would have an associated Java file like 1-1 mapped, where the logic to get data using SQL query is written and is given to the JSP page.

    Sort of. But there is not necessarily a 1 to 1 mapping:

    • Not all JSPs need to access the database.
    • A Java servlet may use multiple JSPs to render different output pages.
    • Different servlets may share a single JSP; e.g. to render a common error message page.

    If yes, what exactly is the role of JSTL code within the JSP.

    The aim of a JSP is to render output; typically HTML pages, but it could be anything text-based. JSTL is used within JSPs when the the output rendering logic is too complicated or messy to express using JSP EL.


    UPDATE

    The old-fashioned alternative to JSTL and JSP EL is to embed Java code … i.e. scriptlets … in the JSPs. For example:

    <c:if test="${a == 'true'}">
        hi
    </c:if>
    

    is equivalent to something like this:

    <% if ("true".equals(context.findAttribute("a")) { %>
        hi
    <% } %>
    

    Also for JSTL use, from what I understand, it is used within the JSP for dynamic HTML rendering through if-else statements.

    You are describing HTML whose structure and content depends request parameters, configuration parameters, data fetched from the database and so in. This is the primary uses of JSTL.

    However, this is NOT what is normally referred to as “Dynamic HTML”. Dynamic HTML is where the browser changes the HTML of the currently displayed page, for e.g., when Javascript embedded in the page changes displayed page by modifying the DOM.

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

Sidebar

Related Questions

I'm a front-end developer and I was looking for opinions about the best all-round
When hiring a front-end developer, what specific skills and practices should you test for?
I'm developing front-end code for a web application, and ran into an odd piece
I have a .NET webforms front end that allows admin users to upload two
I have a few ASP.Net database front-end websites where MS Access is the back-end.
I'm a front end developer who's recently started using IntelliJ Idea for JS development.
I just started working at a place as a front end developer where I
I have a solution that uses webforms for front end & mvc for admin
All front-end developers know the pain of coding for Firefox, then viewing our then
I've got a UI front end which talks to and manipulates a SQL Server

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.