Someone Please help
Here is my code
<%@ page import ="java.util.*"%>
<%@ page import ="java.io.*"%>
<html>
<head>
<title>Radio Button</title>
</head>
<body>
<div style="width:90%;height:200%;border:10px solid green;">
<% BufferedReader br= new BufferedReader(new FileReader("C:/tomcat/webapps/myJSP/temp.txt"));
String line=null;
String wrd=null;
while((line=br.readLine())!=null)
{
Scanner sc = new Scanner(line);%>
<% { %>
<form name="frm" action="CheckSplit.jsp" method="post" >
<% if(sc.hasNext("Question1"))
{
out.println(line);
} %>
<% if(sc.hasNext("1.1"))
{
String word[]=line.split(":");
wrd= word[1];
%>
<input name="radioButton" type="radio" value="1" checked="checked"/> <% out.println(wrd);%>
<%} %>
<% if(sc.hasNext("1.2"))
{
String word[]=line.split(":");
wrd= word[1];%>
<input name="radioButton" type="radio" value="2" /><% out.println(wrd);%>
<%}
if(sc.hasNext("1.3"))
{
String word[]=line.split(":");
wrd= word[1];
%>
<input name="radioButton" type="radio" value="3" /><%out.println(wrd);%>
<%}
if(sc.hasNext("1.4"))
{
String word[]=line.split(":");
wrd= word[1];%>
<input name="radioButton" type="radio" value="4" /><% out.println(wrd);%>
<%} %>
<div style="width:100%;border-top:1px dashed #000000;line-height:0px;"></div>
<%
if(sc.hasNext("Question2"))
{
out.println(line) ;}%><br>
<%
if(sc.hasNext("2.1"))
{
String word[]=line.split(":");
wrd= word[1];%>
<input name="radioButton1" type="radio" value="1" checked="checked"/> <%out.println(wrd);%>
<%}
if(sc.hasNext("2.2"))
{
String word[]=line.split(":");
wrd= word[1];%>
<input name="radioButton1" type="radio" value="2" /> <%out.println(wrd);%>
<% }
if(sc.hasNext("2.3"))
{
String word[]=line.split(":");
wrd= word[1];%>
<input name="radioButton1" type="radio" value="3" /><%out.println(wrd);%>
<% }
if(sc.hasNext("2.4"))
{
String word[]=line.split(":");
wrd= word[1];%>
<input name="radioButton1" type="radio" value="4" /> <%out.println(wrd);%>
<% } %>
<% } %>
<% } %>
<input name="goto" type="submit" value="Submit" />
</form>
</div>
</body>
</html>
I am trying to put a single horizontal line between my 2 questions but it is putting the hr line multiple ones why? can anybody please help.I have an project to fininsh? Is this colliding with the jsp while loop. If someone can answer this i will be very greatful
Here is my code
<%@ page import ="java.util.*"%>
<%@ page import ="java.io.*"%>
<html>
<head>
<title>Radio Button</title>
</head>
<body>
<div style="width:90%;height:200%;border:10px solid green;">
<% BufferedReader br= new BufferedReader(new FileReader("C:/tomcat/webapps/myJSP/temp.txt"));
String line=null;
String wrd=null;
while((line=br.readLine())!=null)
{
Scanner sc = new Scanner(line);%>
<% { %>
<form name="frm" action="CheckSplit.jsp" method="post" >
<% if(sc.hasNext("Question1"))
{
out.println(line);
} %>
<% if(sc.hasNext("1.1"))
{
String word[]=line.split(":");
wrd= word[1];
%>
<input name="radioButton" type="radio" value="1" checked="checked"/> <% out.println(wrd);%>
<%} %>
<% if(sc.hasNext("1.2"))
{
String word[]=line.split(":");
wrd= word[1];%>
<input name="radioButton" type="radio" value="2" /><% out.println(wrd);%>
<%}
if(sc.hasNext("1.3"))
{
String word[]=line.split(":");
wrd= word[1];
%>
<input name="radioButton" type="radio" value="3" /><%out.println(wrd);%>
<%}
if(sc.hasNext("1.4"))
{
String word[]=line.split(":");
wrd= word[1];%>
<input name="radioButton" type="radio" value="4" /><% out.println(wrd);%>
<%} %>
<div style="width:100%;border-top:1px dashed #000000;line-height:0px;"></div>
<%
if(sc.hasNext("Question2"))
{
out.println(line) ;}%><br>
<%
if(sc.hasNext("2.1"))
{
String word[]=line.split(":");
wrd= word[1];%>
<input name="radioButton1" type="radio" value="1" checked="checked"/> <%out.println(wrd);%>
<%}
if(sc.hasNext("2.2"))
{
String word[]=line.split(":");
wrd= word[1];%>
<input name="radioButton1" type="radio" value="2" /> <%out.println(wrd);%>
<% }
if(sc.hasNext("2.3"))
{
String word[]=line.split(":");
wrd= word[1];%>
<input name="radioButton1" type="radio" value="3" /><%out.println(wrd);%>
<% }
if(sc.hasNext("2.4"))
{
String word[]=line.split(":");
wrd= word[1];%>
<input name="radioButton1" type="radio" value="4" /> <%out.println(wrd);%>
<% } %>
<% } %>
<% } %>
<input name="goto" type="submit" value="Submit" />
</form>
</div>
</body>
</html>
I am trying to put a single horizontal line between my 2 questions but it is putting the hr line multiple ones why? can anybody please help.I have an project to fininsh? Is this colliding with the jsp while loop. If someone can answer this i will be very greatful