combox value are not show in a JSP

combox value are not show in a JSP

i have a combo box in a JSP after submit it does not show its value in logic.jsp

Home.jsp:

<html>
<body>
<select name='from_year'>
<%
for(int i=2010;i>2000;i--)
{
out.println("<option value="+i+">"+i+"</option>");
}
%>
<form method="" action="logic.jsp">
<input type="submit" name="submit" value="Go" ></td>
</form>
</body>
</html>

logic.jsp:

<%
String name=(String)request.getParameter("class_name");
%>

at run time logic.jsp show null.
please let me how i can find the value of combo box on logic.jsp.
View Answers

March 19, 2010 at 2:10 PM

Hi Friend,

We have modified your jsp files

1)Home.jsp:

<html>
<body>

<form method="post" action="logic.jsp">
<select name='from_year'>
<%
for(int i=2010;i>2000;i--)
{
out.println("<option value="+i+">"+i+"</option>");
}
%>
</select><br>
<input type="submit" name="submit" value="Go" >
</form>
</body>
</html>

2)logic.jsp:


<%
String name=(String)request.getParameter("from_year");
out.println(name);
%>

Thanks









Related Tutorials/Questions & Answers:
combox value are not show in a JSP - JSP-Servlet
combox value are not show in a JSP  i have a combo box in a JSP after submit it does not show its value in logic.jsp Home.jsp: <... show null. please let me how i can find the value of combo box on logic.jsp.
base the value of first combo box, how i display the second combox - JSP-Servlet
base the value of first combo box, how i display the second combox    i have a combo box for classes. my requirement is when i select the class... let me how i implement this in JSP. Class Subject Art
Advertisements
Re: base the value of first combo box, how i display the second combox - JSP-Servlet
Re: base the value of first combo box, how i display the second combox    thanks for your reply. i want to know suppose the second combo box appear only when i select the class 11th or 12th. please review. your answer
Re: base the value of first combo box, how i display the second combox - JSP-Servlet
Re: base the value of first combo box, how i display the second combox   Dear Sir, in this program when i click on submit button, the corrosponding value of combo box should be sent. but when i clicked to submit button, it do
combox
combox   i have one table in database item master..if i select one item throug combo box than other combobox show item price only select item name... how i can implement through jsp in a single jsp page.   We have used
how to show effect (visual) on jsp page using value from database
how to show effect (visual) on jsp page using value from database  I... i want is when the value in booking status is "booked" then the pictures shown as seats should be displayed red. when the value in booking status
I want to Populate ComBobox value from database that combox is Itemrenderer of DataGrid.
I want to Populate ComBobox value from database that combox is Itemrenderer of DataGrid.  I want to Populate ComBobox value from database that combox is Itemrenderer of DataGrid
combox validation javascript code - JSP-Servlet
combox validation javascript code  hiiiiiii, I want a javascript code for combobox field validation for my Lotus Notes web page.... thnx  Hi This is the source code of combobox validation in javascript
hide and show result in jsp
hide and show result in jsp  what codes do i have to change to make my result display if only i enter the correct value? suppose if i click search... prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@taglib prefix
How to show database values into graph using jsp?
How to show database values into graph using jsp?  How to show database values into graph using jsp
How to show database values into graph using jsp?
How to show database values into graph using jsp?  How to show database values into graph using jsp
JSP Value to JavaScript
JSP Value to JavaScript          JSP Value to JavaScript tells you to pass the value from JSP to JavaScript. The JavaScript create a function
How to save value in JSP
324 2012-12-12 save i want to save dis value jsp to action ...how can i get all value ..and store..how can its values goes...How to save value in JSP  Employee Name Time-IN Time-OUT
JSP hide and show tables
JSP hide and show tables In this tutorial, you will learn how to hide and show html tables using javascript in jsp. Here is an example of simple jsp code...="visible"; } </script> <input type="button" value
how to get the checkbox value in jsp
how to get the checkbox value in jsp  how to get the checkbox value in jsp?   JSP CheckBox Example - how to get the checkbox value in jsp
inserting value - JSP-Servlet
the jsp inserting the value in the jsp after that i want these value inserted...;Inserting form data into database using JSP and ServletGiven code will illustrate you, how one can get data into database using JSP and ServletExample Code
Show image and text on same jsp page
Show image and text on same jsp page  Hi all, I have to display image and text on the same jsp page. The text and image are both retrived from mysql database. The image is shown correctly on seperate jsp page but when shown
Show pdf's in web browser by using jsp?
Show pdf's in web browser by using jsp?  Hi, I want to display pdf file in browser by clicking the link, available in JSP page. When am trying... status - 404. How can i resolve it in JSP
ModuleNotFoundError: No module named 'combox'
ModuleNotFoundError: No module named 'combox'  Hi, My Python... 'combox' How to remove the ModuleNotFoundError: No module named 'combox'... to install padas library. You can install combox python with following command
How to show data from database in textbox in jsp
How to show data from database in textbox in jsp   How to show data from database in textbox in jsp   Here is an example that retrieve the particular record from the database and display it in textbox using JSP. <
Show the Value of Scroll Bar in Java Swing
Show the Value of Scroll Bar in Java Swing       In this section, you will learn how to show the value of scrolling position in the text box. The scroll bar has multiples
show folder on server by clicking a row in table using jsp and ajax
show folder on server by clicking a row in table using jsp and ajax  Hi, i want a jsp page which has one dropdown and one textfield. when i click on serach button after selecting the dropdown and a value in textfield it should
show folder on server by clicking a row in table using jsp and ajax
show folder on server by clicking a row in table using jsp and ajax  Hi, i want a jsp page which has one dropdown and one textfield. when i click on serach button after selecting the dropdown and a value in textfield it should
export value in csv from jsp
export value in csv from jsp  Hi! i have creted a html form using javascript. i hv taken the array values in jsp. nw i want to pass these array values from jsp to csv file. so please help me how to send
passing value from javascript to jsp - JSP-Servlet
passing value from javascript to jsp  Hi... Is there any way to get the value from the javascript and print it on the current jsp page or print an array onto the current jsp page using javascript  Hi Friend, We
By dropdownlist retrive data from database and show in textbox in jsp.
By dropdownlist retrive data from database and show in textbox in jsp.  Hello Sir, I am doing project in jsp.I have to retrive data from database, when I select value from dropdownlist, and that data I want to show in textbox
How to give the value - JSP-Servlet
How to give the value   How to give the value in following query... the value into question mark?...  Hi Friend, Try the following code...").selectedIndex; window.location.replace("http://localhost:8080/examples/jsp
code for insert the value from jsp to access database
code for insert the value from jsp to access database  code for insert the value from jsp to access database
how to assign javascript variable value to a jsp variable
how to assign javascript variable value to a jsp variable  how to assign javascript variable value to a jsp variable
Passing value in hyperlink - JSP-Servlet
Passing value in hyperlink  How to pass value in anchor tag or HTML link from one JSP page to another JSP page ?and how to retrieve values in another..., Retrive value from database Retrive data from database User   Hi
how to show value and percentage in piechart sections from database using jfreechart
how to show value and percentage in piechart sections from database using jfreechart  Hii Sir, I made a pie chart from database using jfreechart.Now I need to display the values and their percentage in the sections
Jsp Option Value
Jsp Option Value   ... a select box by retrieving the value from the database in jsp. For further processing... <select name=""> <option value="">
session value not get in many jsp page.
session value not get in many jsp page.  I am using servlet to set...,response); and get session value on jsp page by follwing:- (adsbygoogle...)session.getAttribute("user"); this is work but when this code is use in other jsp page its give
i want to pass Javascript value to JSP scriptlet..
i want to pass Javascript value to JSP scriptlet..  i am having a problem that, i am having a combo box in the JSP page when i select an item from... now i want to pass this value to JSP scriptlet
Assigning a value to JSP variable from a bean class. - JSP-Servlet
Assigning a value to JSP variable from a bean class.  Hi, I want to know how we can assign value to a JSP variable from a Java Bean. I am using Struts, JSTL. Which tags should I use to assign the value. e.g Kindly
passing value fron script to scriplet - JSP-Servlet
passing value fron script to scriplet  how to pass value from Java..., or use a the name/value query string. your first should look something like: Enter you value here: Then click the button to Check you use
Get form value in same page - JSP-Servlet
Get form value in same page  Hello friends, Can we get a form field value in the same to be processed in java coding... friend, For solving the problem visit to : http://roseindia.net/jsp/user
How to save and get value from JSP
324 2012-12-12 save i want to save dis value jsp to action ...how can i get all value ..and store..how can its values goes...How to save and get value from JSP  Employee Name Time
how to create a bar chart in jsp by fetching value from oracle databse?
how to create a bar chart in jsp by fetching value from oracle databse?  i want to show the population of various states in a bar chart in my jsp page by fetching the data from my oracle table. i am using my eclipse as my IDE
How to pass the value from controller to jsp page ?
How to pass the value from controller to jsp page ?  HI I need to pass the value from controller to jsp. I use the way like this Controller request.setAttribute("msg", "Successfully Login"); In jsp ${msg} and then i
How to retrieve data by using combo box value in jsp? - JSP-Servlet
How to retrieve data by using combo box value in jsp?  I am using a single jsp form.. i did not get from another form.. i do not use 2 jsp form.. all.... Note: I am using only this jsp form.. i do not use
get a radio button click value - JSP-Servlet
servlet from another jsp i.e 'main.jsp', then you have to store the value of id... have one probs that is i m getting a null value i m calling getParameter("id") in servlet that is used in another jsp so can i call getParameter("radio") i.e
How to retrieve data by using combo box value in jsp? - JSP-Servlet
How to retrieve data by using combo box value in jsp?  For example, In Employee.jsp form, When i click employee id value in combo box ,the related employee name will be displayed in text field
get value from multiple textbox in jsp
get value from multiple textbox in jsp  how to get multiple textbox value in another jsp? If i using the following code <%for(int i=0;i<3;i++) {%> <td>name<input type="text" class="name" id="name">
how to get combo box value - JSP-Servlet
how to get combo box value  i have created 1 servlet & 1 jsp page... in combo box in jsp page: (small part of my code) "> now i want the id in servlet page, that i have associated with value i.e "> bcoz i hav
How to retrieve data using combo box value in jsp? - JSP-Servlet
How to retrieve data using combo box value in jsp?  Hi freind, I already post this question. I need urgent help from u. pl response me... the following link: http://www.roseindia.net/jsp/comboSelect.shtml Hope
How to retrieve data by using combo box value in jsp? - JSP-Servlet
How to retrieve data by using combo box value in jsp?  Hi Friends, When i click combobox value in jsp form page, it will diplay related value.... I am using only this page.. not get value from another page
ID using get the databse latest value and displayed in jsp
ID using get the databse latest value and displayed in jsp   I have... ... after i click the preview button it should show the values you have entered... in preview jsp page. the id will shown in end of the url also
how to insert checkbox value into database using jsp
how to insert checkbox value into database using jsp  how to insert check box value to the database using jsp my code is <link href..." name="pmanager" value="Enter" ></td> <td align
how can retrive value from combo box in servlet?
how can retrive value from combo box in servlet?  i have a jsp page with combobox. And i want to get value from combox to servlet

Ads