| | |
Need sample JSP code....
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2008
Posts: 1
Reputation:
Solved Threads: 0
I'm developing an online web based system for my 3rd year project using JSP & Servlets. I have a database table which includes details of the applicants..and I want to display the information of each applicant page by page. That mean only a single person's details is displayed on the page.There should button called Next in the botto of the page and when I click it I want the page to refreshed and disply the details of the next applicant. Only the content of the page should be changed.i.e. There should b onlya single jsp page, but with every button refresh the it's content should be chaged.
I'm finding it hard to write a code to meet this functionality...so Can anyone send me sample code which performs the way I require. I need a quick reply.
Thanx
I'm finding it hard to write a code to meet this functionality...so Can anyone send me sample code which performs the way I require. I need a quick reply.
Thanx
I will **NOT** give you the code to do this cause very simply I don't want to ruin the motive for which your course (whichever you are doing was made) but I will give you the logic on how to go about this.
Now consider the JSP in which you are displaying the details of a person, lets call it dispdetails.jsp,
Now what you could do is make this take page take a parameter say "personId", which uniquely identifies the person whose details are going to be displayed in the page.
Next when you are querying the database for the details of this person, you could also fetch the Unique Identifier of the person next in the list and store it in a variable say "nextPersonId".
Now create a form like this
And when some one clicks next just post this form via javascript and your JSP page will display the next person's details(as it receives the next person's Id in the "personId" parameter)
Now consider the JSP in which you are displaying the details of a person, lets call it dispdetails.jsp,
Now what you could do is make this take page take a parameter say "personId", which uniquely identifies the person whose details are going to be displayed in the page.
Next when you are querying the database for the details of this person, you could also fetch the Unique Identifier of the person next in the list and store it in a variable say "nextPersonId".
Now create a form like this
html Syntax (Toggle Plain Text)
<form name="frmnext" action="dispdetails.jsp"> <input type="hidden" name="personId" value="<%=nextPersonId%> "> </form>
Last edited by stephen84s; Aug 24th, 2008 at 6:22 am.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
"How to ask questions the smart way ?"
"How to ask questions the smart way ?"
![]() |
Similar Threads
- pass bean property name across JSP pages (JSP)
- errors regarding java code in jsp page. help me please (JSP)
- Automatic mail using jsp and javamail (JSP)
- help needed in coloring html tables (JavaScript / DHTML / AJAX)
- including java programs or code in jsp (JSP)
- how to access the database within same jsp page (JSP)
- having problem for display the piechart in JSP (JSP)
- <jsp:include> Not Printing On Web Page, But In Source Code (JSP)
- Combo Box In Jsp+ Ajax Urgent Please Help Me (JSP)
- shopping cart using jsp, servlet, javabean (Community Introductions)
Other Threads in the JSP Forum
- Previous Thread: Mysql connect with jsp
- Next Thread: I need advice on jsp seach form and "clipboard"
Views: 1479 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for JSP
apache array backbutton combobox comma connection csv database development directorystructure dropdownlist dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 mysql netbeans network parameters passing ping printinserverinsteadofclient project read redirect request.getparameter response seperated servlet servletdopost()readxml sessions software sql ssl state_saving_method stocks sun tomcat tutorial update values video web write






