I wrote the below code to test the status of msgCode. If the msgCode is not Success it should redirect to error.jsp file. If it is a Success it should stay on the same page . When I ran the code the page always redirects to error.jsp although msgCode is Success. What mistake did I do in my code. Can you please help me if you can. Thank in advance.
 <%@ page import="com.siebel.SurveyWebService.SurveyTester" %>
<%  
   SurveyTester tc = new SurveyTester();
   tc.getResult();
   java.lang.String msgCode = tc.getResult2().getStatusCode(); 
  %>
 <%= msgCode%>
 <%
 if (msgCode.toString() != "Success")
 {    
    response.sendRedirect("error.jsp");
  }
%>
