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 6786145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:12:39+00:00 2026-05-26T17:12:39+00:00

Are the database connections used by JSTL <sql:query> tag persistent? I mean if I

  • 0

Are the database connections used by JSTL <sql:query> tag persistent?

  1. I mean if I use a lot of <sql:query> tags on a page then will they
    share the same database connection?
  2. What about across the page
    connections? Does JSTL provide a way to use persistent connections
    like mysql_pconnect() in PHP?
  • 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-26T17:12:40+00:00Added an answer on May 26, 2026 at 5:12 pm

    In JSTL for SQL tags you can give the datasource which you want to use for DB connections. It is upto the datasource which decides the management of DB connections. A SQL tag gives the datasource information like this:

    <sql:query var="order" 
      dataSource="${applicationScope.orderDS}">
       select * from PUBLIC.orders where id = ?
       <sql:param value="${id}" />
    </sql:query>
    

    The datasource attribute value can be of the following types:

    1. Datasource – in which case this datasource will be used.
    2. String – in which case JDNI lookup will be done with that name.
    3. NULL – in which case it will use the datasource set by tag.

    In case you have a SQL query tags inside transaction tag. All the queries inside the transaction share the same connection for transaction management.

    <sql:transaction>
       <sql:query var="order" 
          dataSource="${applicationScope.orderDS}">
             select * from PUBLIC.orders where id = ?
             <sql:param value="${id}" />
       </sql:query>
       <sql:update var="order" 
          sql="update PUBLIC.orders set book_name = ? where id = ?">
             <sql:param value="${name}" />
             <sql:param value="${id}" />
       </sql:query>
    <sql:transaction>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Our project I have used LINQ to SQL for every kind of database
PHP provides mysql_connect() and mysql_pconnect() which allow creating both temporary and persistent database connections.
I'm trying to use my own form of connection pooling to handle database connections
I've used all three of these when making local programmatic connections to databases. Is
wpdb class in wordpress is used for making connection to database. is there any
How do you manage your database connections in your ASP.Net application? My understanding tells
What is the best way to do per-user database connections in Rails ? I
What is the benefit of using singleton instead of global for database connections in
I have been unable to find any documentation on properly closing database connections in
I'm working on a python script that starts several processes and database connections. Every

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.