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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:31:01+00:00 2026-06-12T01:31:01+00:00

jobview.jsp(JSP that display all jobs, hyperlinks on job reference number) <%@page contentType=text/html pageEncoding=UTF-8%> <%@page

  • 0

jobview.jsp(JSP that display all jobs, hyperlinks on job reference number)

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.ResultSet"%>
<jsp:useBean id="job" scope="session" class="JobVacancies.Job" />
<%
        ResultSet rs = job.getResultSet();
        out.println("<h1>Job Vacancies</h1>");
        out.println("<table border=2>");
        out.println("<tr>");
        out.println("<td>Reference Number</td>");
        out.println("<td>Job Title</td>");
        out.println("<td>Brief Description</td>");
        out.println("<td>Date Posted</td>");
        out.println("<td>Date Closing</td>");
        out.println("</tr>");

        while (rs.next())
        {
          out.println("<tr>");
          out.println("<td><a href='jobdetail.jsp'>"+rs.getInt(1)+"</a></td>");
          out.println("<td>"+rs.getString(2)+"</td>");
          out.println("<td>"+rs.getString(3)+"</td>");
          out.println("<td>"+rs.getString(4)+"</td>");
          out.println("<td>"+rs.getString(5)+"</td>");
          out.println("</tr>");
         }
         out.println("</table>");
%>

jobdetail.jsp(JSP that displaying the job’s detail according to Reference Number clicked on jobview.jsp)

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Job Detail</title>
    </head>
    <body>
        <h1>Job Reference Number: </h1>

        <p><a href="index.jsp">Go back to job list</a></p>
    </body>
</html>

My question is: How to capture the hyperlink text(Reference Number clicked on jobdetail.jsp) on jobdetail.jsp.

My goal is: to use that value(i) as part of the query("SELECT * FROM CQU.JOBS WHERE REFERENCE_NUM="+i)

I’m an inexperience programming student. Please explain as detail as possible.
If you don’t have much time, give me some hints, please.
Thanks for your time.

  • 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-12T01:31:02+00:00Added an answer on June 12, 2026 at 1:31 am

    You’ll want to use a query string to pass the information as a request parameter. Then you can access it using the getParameter(...) of your the request object.

    In jobview.jsp you’ll do something like this:

    int referenceNum = rs.getInt(1);
    out.println("<a href='jobdetail.jsp?referenceNum="+referenceNum +"'>"+referenceNum +"</a>");
    

    … and in jobdetail.jsp you’d do something like this:

    <h1>Job Reference Number: <% out.println(request.getParameter("referenceNum")) %></h1>
    

    PS you should consider ditching scriplets in favor of JSTL and UEL.

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

Sidebar

Related Questions

I am creating app for jobsite. It will display login page first. when we
I have the following model: class JobView(models.Model): job = models.ForeignKey(Job) user = models.ForeignKey('auth.User') created
General context : MVVM application. I have a View called JobView. Its DataContext is
I am building a table on a wordpress site that displays data that is
I tried modifying a Yesod project, and came across a weird error. First I
I was wondering if you guys could help with a complicated query. I have
I am trying to send the value of a radio button to a javascript
For some reason this is giving me an error? $result = mysql_query(SELECT wpjb_job.*, wpjb_category.*

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.