Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need your guidance for building job search page.

 
Deepa Balasubramanayam
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am building a job search page. If the user enters java ,all the available jobs in java is displayed along with their job number. After that ,If the user clicks the one of the Job number in the list , it has to display the full details of the Job selected. I do not know how to do the last Part. Please give me a suggestion.
------------------
 
paul sun
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Deepa,
On the first page listing all searched job, rewrite the job number on the specific job number link. Like following:
<href a="JobDetail?jobNumber=<%= searchedlistbean.getJobNumber(i)" %>" >Job Number:<%= searchedlistbean.getJobNumber(i)" %></a>
* JobDetail is a servlet or jsp to process a single job detail and response a page about a detailed job.
Hope helpful to you.
Paul Sun
 
Deepa Balasubramanayam
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,
If I code JobDetail servlet to process a single job detail , WHAT I HAVE TO CODE TO GET THE JOB NUMBER WHICH HAS BEEN SELECTED INSIDE THE JOBDETAIL SERVLET.
Thanks
Deepa

Originally posted by paul sun:
Hello Deepa,
On the first page listing all searched job, rewrite the job number on the specific job number link. Like following:
<href a="JobDetail?jobNumber=<%= searchedlistbean.getJobNumber(i)" %>" >Job Number:<%= searchedlistbean.getJobNumber(i)" %></a>
* JobDetail is a servlet or jsp to process a single job detail and response a page about a detailed job.
Hope helpful to you.
Paul Sun


------------------
 
paul sun
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Deepa,
For JobDetail servlet, do (a typical way):
* get job number
String job_Number = request.getParameter("jobNumber");
** get job object
Job job = (Job)DB.getJob(job_Number);
*** bind the job object to request
request.setAttribute("job", job);
**** forward to a jsp displaying the job
For jsp, do:
* jsp gets the job object
<jsp:useBean id="job" class="package.Job" scope="request" />
** jsp get properties from the job object
Title:<%= job.getTitle() %>
Salary:<%= job.getSalary() %>
Term:<%= job.getTerm() %>
...
# Job - a bean representing a single job holding the details
# DB - a bean for database query, or something holding the job info; maybe the data already in the session
Hope useful!
paul sun

Originally posted by Deepa Balasubramanayam:
Hi Paul,
If I code JobDetail servlet to process a single job detail , WHAT I HAVE TO CODE TO GET THE JOB NUMBER WHICH HAS BEEN SELECTED INSIDE THE JOBDETAIL SERVLET.
Thanks
Deepa



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic