Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

not using javascript in jsp

 
naga raaju
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,

i am using java usebean concepts for my applications.

first i call --> front.html page(it contains dropdownlist having 5 options )when i select third option and click submit button it calls .jsp page ,in that jsp page i am
again calling html page using <%@include file="front.html" %> what the problem is in my displaying page shows first option instead of third option.

so my question is isthere any solution to show third option instead of first option.
here i am not using javascript only java.can you give any idea.

have a nice day.


front.html
=========
<html>
<head>
</head>
<body>
<form action="reload.jsp" method="post">
<label name="exchangelabel">SNO :</label>
<select name="sno">

<option>101</option>
<option>102</option>
<option>103</option>
<option>104</option>
</select>  

<label name="exchangelabel">SNAME :</label>
<select name="sname">

<option>raju</option>
<option>taj</option>
<option>raj</option>

</select>  
<input type="submit" value="click">



</body>
</html>

reload.jsp
==============
<html>
<body>
<%@page import="java.sql.*" %>
<%@include file="front.html" %>
</body>
</html>

by
Naga
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65545
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basic HTML: add a selected attribute to the option you want selected.
 
Ravindra Suroju
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
form tab is not closed... please check
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Ravindra S",
Please check your private messages regarding an important administrative matter.
-Ben
 
The knights of nee want a shrubbery. And a tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!