Hi i am truing to read data from a file and then i want to compare that string from my string i that string is equal to my string then run if condition otherwise else condition
My.jsp
   <%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ page import="java.io.*" %>
<html>
<body>
       <%
           String s1="1";
          // int i=4;
           // String s=null;
          // String s2="1";
           String s3=null;
            String file = application.getRealPath("/") + "data.txt";
           BufferedReader reader = new BufferedReader(new FileReader(file));
            String line;
            while((line = reader.readLine())!= null){
                s3=line.toString();
            }
  if(s3.equalsIgnoreCase(s1))
      %>
     <%@ include file="MarketWiseData.jsp" %>
     <%else
  {%>
      <%@ include file="CommodityWise.jsp" %>
<%
          }
%>
</body>
</html>
How can i get my target ?
Thanks in advance
 
     
    