aspose file tools
The moose likes JSP and the fly likes not using javascript in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSP
Reply Bookmark "not using javascript in jsp" Watch "not using javascript in jsp" New topic
Author

not using javascript in jsp

naga raaju
Greenhorn

Joined: Mar 14, 2008
Posts: 29
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

Joined: Jan 10, 2002
Posts: 56529
    
  14

Basic HTML: add a selected attribute to the option you want selected.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Ravindra Suroju
Greenhorn

Joined: Mar 11, 2008
Posts: 14
form tab is not closed... please check


Best Regards,<br />Ravindra.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"Ravindra S",
Please check your private messages regarding an important administrative matter.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: not using javascript in jsp
 
Similar Threads
Combobox-java servlet
Need Help With Dynamic text box in JSP
Value in dropdown from servlet
&nbsp; ...
jsp:useBean doubt