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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:13:33+00:00 2026-06-05T23:13:33+00:00

I have the following java code: import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement;

  • 0

I have the following java code:

import java.sql.Connection;   
import java.sql.DriverManager;   
import java.sql.ResultSet;   
import java.sql.Statement;


public class License {   
    public static void main(String[] args) {   

        Connection connection = null;   
        ResultSet resultSet = null;   
        Statement statement = null;   

        try {   
            Class.forName("org.sqlite.JDBC");   
            connection = DriverManager.getConnection("jdbc:sqlite:C:/license_tracker/usage.db3");   
            statement = connection.createStatement(); 
            System.out.println("Connection Successful!!!!");
            String query = "SELECT  USR.id,USR.name, ST.license FROM users USR, status ST, upd_ate UD WHERE UD.upt_id = (select max(p2.upt_id) from upd_ate p2) AND ST.id = USR.id AND ST.upt_id = UD.upt_id ORDER BY ST.license,USR.name";

            resultSet = statement.executeQuery(query);  

            while (resultSet.next()) { 

                System.out.printf("%8s   %-50s   %-7s%n",resultSet.getString("cymer_id"), resultSet.getString("name"), resultSet.getString("license"));   

            }   
        } catch (Exception e) {   
            e.printStackTrace();   
        } finally {   
            try {   
                resultSet.close();   
                statement.close();   
                connection.close();   
            } catch (Exception e) {   
                e.printStackTrace();   
            }   
        }   
    }   
}

I want to display the contents of the resultSet in a web browser, essentially IE9, in a tabular format. I’ve searched about this and I think there are two options to this, using JAVA applet or JSP. Since I have to run the code on the server should I use JSP?I’m not so familiar with JSP, so I would appreciate if someone can help me with that. I’m using Eclipse Indigo & have Tomcat ver 7.

I have a html code on the webpage layout. I wanna put the information in the table.

<!DOCTYPE html>

<html>


<head>


<!-- FORMAT OF THE BOXES //-->
<style type="text/css">

div.ex
{
width:360px;height:300px;
padding:10px;
border:5px solid gray;
margin:0px;
background-color:linen;}

    div.graph
{
width:800px;height:300px;
padding:10px;
border:5px solid gray;
margin:0px;
background-color:linen;}


</style>





</head>


<body>




<!--h1=> LOGO & h2=> Heading //-->




<h2 style="text-align:center;font-family:century schoolbook;color:black";><b>Pro/Engineer And Intralink License Logs</b></h2>



<!-- License summary bar //-->
<div id="content" style="background-color:mediumpurple;clear:both;text-align:center;"><big>License Summary</big></div>

<!-- TABLES //-->
<center>
<table cellspacing="5" border="0" cellpadding="0">



 <td><p><div class="ex"><center>DESIGNER LICENSES</center><br/></p></td>


 <td width="2" bgcolor=black><BR></td>
 <td>
 <p><div class="ex"><center>LEAD LICENSES</center><br/></p>
 </td>


 <td width="2" bgcolor=black><BR></td>
 <td>
 <p><div class="ex"><center>CABLING LICENSES</center><br/></p>
 </td>


 <td width="2" bgcolor=black><BR></td>
 <td>
 <p><div class="ex"><center>LICENSES</center><br/></p>
 </td>


 </table> 
</center>

<!-- GRAPH SPACE //-->
 <p><div class="graph"><center>GRAPHICAL REPRESENTATION</center></div></p>




</body>



<hr/>
<center><style=padding:100px;>



<!-- FOOTER //-->
<footer>
<div id="donotremove">
    <abbr title="License Availability (v1 on 32)">License Availability</abbr> © 2011-2351  All rights reserved.</a>.</div></footer>
</center>



</html>
  • 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-06-05T23:13:34+00:00Added an answer on June 5, 2026 at 11:13 pm

    Maybe you could do something like this:

    import java.io.*;
    
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    
    public class LicenseServlet extends HttpServlet {
    
    public void doGet(HttpServletRequest request,
                        HttpServletResponse response)
          throws ServletException, IOException {
            PrintWriter out = response.getWriter();
    
            out.print("<html><body><table>");
    
            // ... pseudocode
            while (resultSet.next()) { 
                out.print("<tr><td>");
                out.print("%8s   %-50s   %-7s%n",resultSet.getString("cymer_id"), resultSet.getString("name"), resultSet.getString("license"));   
                out.print("</td></tr>");
    
            } 
    
    
            out.print("</table></body></html>");
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following code in Java: import java.util.*; public class longest{ public static void
I have the following code: import java.net.InetAddress; public class lookup { public static void
I have the following simple code: import java.io.*; class IO { public static void
Hy i have the following code : import java.sql.*; import java.net.*; public class binsz
Lets say i have the following bit of code import java.sql.Connection; import java.sql.DriverManager; import
From the following code : import java.io.*; class fileTester { public static void main(
I have the following Java code - import java.lang.reflect.Field; public class AnnotationTest { public
I have the following simple Java code: package testj; import java.util.*; public class Query<T>
I have the following Java code: import java.util.Arrays; import java.util.Collections; public class Test {
This is the following code: `package com.tom.jam; //import java.sql.Connection; //import java.sql.DriverManager; import java.sql.*; import

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.