Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

URGENT: unknown error with login page

Posted on 2006-04-03
44
Medium Priority
?
276 Views
Last Modified: 2010-04-01
Hi,

Im attempting to create a login in jsp with the following form and jsp page to process it....

home.jsp:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<br>
<br>
<head>
<title>Momentum Marketing Intranet</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../ROOT/Momentum/text.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {font-size: 14px}
.style2 {
      font-family: "Times New Roman", Times, serif;
      font-size: 16px;
}
-->
</style>
</head>

<body bgcolor="#FFFFFF">
<table width="770" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
  <tr>
    <td bgcolor="#FFFFFF"><table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td><a href="../ROOT/Momentum/index.jsp"><img src="../ROOT/Momentum/mom_logo.gif" width="256" height="74" border="0"></a></td>
          <td width="411">&nbsp;</td>
        </tr>
        <tr>
          <td width="359"><img src="../ROOT/Momentum/leftbar.gif" width="359" height="39"></td>
          <td align="right" bgcolor="336CA1">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="2"><img src="../ROOT/Momentum/topbar.gif" width="770" height="69"></td>
        </tr>
        <tr>
          <td colspan="2">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" background="../ROOT/Momentum/but_bg.gif">
              <tr>
                <td align="right"><img src="../ROOT/Momentum/spacer.gif" width="15" height="23"><img src="../ROOT/Momentum/spacer.gif" width="15" height="23"><img src="../ROOT/Momentum/spacer.gif" width="15" height="23"><img src="../ROOT/Momentum/spacer.gif" width="15" height="23"><img src="../ROOT/Momentum/spacer.gif" width="15" height="23"><img src="../ROOT/Momentum/spacer.gif" width="45" height="23"></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
      <table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="167" rowspan="3" valign="top" bgcolor="8FBEE8">&nbsp;          </td>
          <td colspan="2" align="center"><table width="95%" border="0" cellpadding="5" cellspacing="0" class="text">
              <tr>
                <td class="text"><font color="#000000"><span class="style1"><br>
                      <span class="style2">Welcome to the Momentum Marketing company Intranet. Please authenticate yourself with our database to access the administration section. </span></span><br>
                  <br>
                </font></td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td width="588" align="center"> <form name="form1" method="post" action="adminresult.jsp">
            <table width="85%" border="0" cellpadding="3" cellspacing="1" bgcolor="#666666">
              <tr>
                <td bgcolor="E3EDFF"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="17%"><strong>Username:</strong></td>
                    <td width="83%"><input name="Username" type="text" id="Username"></td>
                  </tr>
                </table></td>
              </tr>
            </table>
            <table width="85%" border="0" cellpadding="3" cellspacing="1" bgcolor="#666666">
              <tr>
                <td bgcolor="E3EDFF"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="17%"><strong>Password:</strong></td>
                    <td width="83%"><input name="Password" type="password" id="Password"></td>
                  </tr>
                </table></td>
              </tr>
            </table>
            <p>
              <input type="submit" name="Submit" value="Submit">
            </p>
            <p><br>
              </p>
          </form>
            </td>
          <td width="15" align="center" valign="top">&nbsp; </td>
        </tr>
        <tr>
          <td colspan="2" valign="bottom"><table width="82%" border="0" cellspacing="0" cellpadding="8">
              <tr>
                <td align="center" valign="bottom"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif">&copy;
                  2005 Momentum Marketing Services Ltd.</font></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>


adminresult.jsp:

<%@ page import="java.sql.*" %>

<html>
<head>
<title>Admin Verification</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<%

    Connection connection = null;
    try {
        // Load the JDBC driver
        String driverName = "oracle.jdbc.driver.OracleDriver";
        Class.forName(driverName);
   
        // Create a connection to the database
        String serverName = "witnt07.wit.ie";
        String portNumber = "1521";
        String sid = "orawit";

        String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
        String username = "W01445693";
        String password = "EPEDXZ";
        connection = DriverManager.getConnection(url, username, password);
    } catch (ClassNotFoundException e) {
        out.println( "Could not find the database driver");
    } catch (SQLException e) {
      e.printStackTrace();
        out.println( "Could not connect to the database");
    }
      
%>

<%

session.setAttribute("Username",request.getParameter("Username"));

try
{
    String user = request.getParameter("Username");
    String formPassword = request.getParameter("Password");
      String Password = null;

 
    Statement stmt = connection.createStatement();
    ResultSet rs = stmt.executeQuery("select Pass from Supervisor WHERE Username = '" + user + "'");


      if( formPassword == null) {
            String redirectURL = "/momentum/error.jsp";
        response.sendRedirect(redirectURL);
      }
      else {
            if( rs.next() )
            {
                  Password = rs.getString("Password");
                                          
                  if( formPassword.equals( Password ) )
                  {
                        //login sucess
                        
            String redirectURL = "/momentum/adminoptions.jsp";
        response.sendRedirect(redirectURL);


                  
                  }
                  else
                  {
                        //login failed
                        
            String redirectURL = "/momentum/error.jsp";
        response.sendRedirect(redirectURL);
      
                  }
                  
            }
            else
            {
                  //Login failed
            String redirectURL = "/momentum/error1.jsp";
        response.sendRedirect(redirectURL);
            }
      }
 }
 
finally
{
    connection.close();
}

%>
 
</body>
</html>


the error that im getting is as follows:

type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.

exception

java.lang.NullPointerException
      at org.apache.jsp.adminresult$jsp._jspService(adminresult$jsp.java:144)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
      at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
      at java.lang.Thread.run(Thread.java:536)


Sorry about the length of my post. Im not all that familiar with JSP so im not even sure where the error might be coming from!

any ideas??

thanks!
0
Comment
Question by:clonmelog
  • 18
  • 15
  • 5
  • +2
41 Comments
 
LVL 11

Expert Comment

by:fargo
ID: 16364296
Hi,

Please go to the work directory of tomcat.

tomcat-path/work/org/apache/jsp/adminresults/adminresult$jsp.java

and check the line 144.

There is some variable which is getting null.
Let us know if you have problem understanding the line 144 in the java file.

regards,
fargo
0
 
LVL 11

Expert Comment

by:fargo
ID: 16364318
Hi,

Moreover, Password = rs.getString("Password");
 is not correct.

this should be Password = rs.getString("Pass");

OR use SELECT Pass AS Password FROM....

in the query to make the present jsp work.

fargo
0
 
LVL 2

Author Comment

by:clonmelog
ID: 16364458
  connection.close();

is at line 144..... would this be a problem?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 29

Expert Comment

by:bloodredsun
ID: 16364525
This would indicate that the connection object is null and that you never create a connection

Also, you have a try statement with no catch only a finally

try
{
    String user = request.getParameter

("Username");
...//where is the catch block after this?

This maybe why it is not working
0
 
LVL 11

Expert Comment

by:fargo
ID: 16364526
Hi,

did you check in the work directory???

Moreover, if connection.close() is at line 144. It means, at first step u are not able to get the connection.
Please put some logging information in-between to check whether u are able to get the connection or not??

fargo
0
 
LVL 11

Expert Comment

by:fargo
ID: 16364540
good catch...bloodredsun.

fargo
0
 
LVL 2

Author Comment

by:clonmelog
ID: 16364603
sorry, ive just checked my original code and im missing this at the end:

 }
               
            // end
            // HTML // begin [file="/adminresult.jsp";from=(94,2);to=(98,0)]
                out.write("\r\n \r\n</body>\r\n</html>\r\n");

            // end

        } catch (Throwable t) {
            if (out != null && out.getBufferSize() != 0)
                out.clearBuffer();
            if (pageContext != null) pageContext.handlePageException(t);
        } finally {
            if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
        }
    }
}

I forgot to put that in the original post, aplogies!
0
 
LVL 11

Expert Comment

by:fargo
ID: 16364635
well, the code you posted just now is from the generated java file.

fargo
0
 
LVL 29

Expert Comment

by:bloodredsun
ID: 16364704
very droll fargo :-)
0
 
LVL 2

Author Comment

by:clonmelog
ID: 16364794
sorry about that,

OK code now is:

<%@ page import="java.sql.*" %>

<html>
<head>
<title>Admin Verification</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<%

    Connection connection = null;
    try {
        // Load the JDBC driver
        String driverName = "oracle.jdbc.OracleDriver";
        Class.forName(driverName);
   
        // Create a connection to the database
        String serverName = "witnt07.wit.ie";
        String portNumber = "1521";
        String sid = "orawit";

        String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
        String username = "W01445693";
        String password = "EPDEXZ";
        connection = DriverManager.getConnection(url, username, password);
    } catch (ClassNotFoundException e) {
        out.println( "Could not find the database driver");
    } catch (SQLException e) {
 e.printStackTrace();
        out.println( "Could not connect to the database");
    }
 
%>

<%

session.setAttribute("Username",request.getParameter("Username"));

try
{
    String user = request.getParameter("Username");
    String formPassword = request.getParameter("Password");
 String Password = null;

 
    Statement stmt = connection.createStatement();
    ResultSet rs = stmt.executeQuery("select Pass from Supervisor WHERE Username = '" + user + "'");


 if( formPassword == null) {
  String redirectURL = "/momentum/error.jsp";
        response.sendRedirect(redirectURL);
 }
 else {
  if( rs.next() )
  {
   Password = rs.getString("Pass");
       
   if( formPassword.equals( Password ) )
   {
    //login sucess
   
  String redirectURL = "/momentum/adminoptions.jsp";
        response.sendRedirect(redirectURL);


   
   }
   else
   {
    //login failed
   
  String redirectURL = "/momentum/error.jsp";
        response.sendRedirect(redirectURL);
 
   }
   
  }
  else
  {
   //Login failed
  String redirectURL = "/momentum/error1.jsp";
        response.sendRedirect(redirectURL);
  }
 }
 }
 
finally
{
    connection.close();
}

%>
 
</body>
</html>


works other than the fact that its redirecting to error.jsp despite the fact that the correct details are being entered and the tables in the db are correct.
0
 
LVL 11

Expert Comment

by:fargo
ID: 16364862
catch block is again missing.

fargo
0
 
LVL 2

Author Comment

by:clonmelog
ID: 16364882
ah i see....

How would i go about coding that catch in?
0
 
LVL 11

Expert Comment

by:fargo
ID: 16364933
} catch(Exception ex){
System.out.println("Exception", ex);
}finally
{
    connection.close();
}

fargo
0
 
LVL 2

Author Comment

by:clonmelog
ID: 16365023
getting this error now:

An error occurred between lines: 37 and 97 in the jsp file: /adminresult.jsp

Generated servlet error:
D:\tomcat4\work\Standalone\localhost\_\adminresult$jsp.java:139: 'catch' without 'try'.
                 } catch(Exception ex){
0
 
LVL 11

Expert Comment

by:fargo
ID: 16365085
The last section should be this

            try
            {
                String user = request.getParameter("Username");
                String formPassword = request.getParameter("Password");
             String Password = null;

                                      Statement stmt = connection.createStatement();
                                       ResultSet rs = stmt.executeQuery("select Pass from Supervisor WHERE Username = '" + user + "'");



             if( formPassword == null) {
              String redirectURL = "/momentum/error.jsp";
                    response.sendRedirect(redirectURL);
             }
             else {
              if( rs.next() )
              {
               Password = rs.getString("Pass");
                   
               if( formPassword.equals( Password ) )
               {
                //login sucess
               
              String redirectURL = "/momentum/adminoptions.jsp";
                    response.sendRedirect(redirectURL);


               
               }
               else
               {
                //login failed
               
              String redirectURL = "/momentum/error.jsp";
                    response.sendRedirect(redirectURL);
             
               }
               
              }
              else
              {
               //Login failed
              String redirectURL = "/momentum/error1.jsp";
                    response.sendRedirect(redirectURL);
              }
             }
             }catch(Exception ex){
                   System.out.println("Exception", ex);
             }finally
            {
                connection.close();
            }

fargo
0
 
LVL 2

Author Comment

by:clonmelog
ID: 16365127
still getting this error:

org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.


An error occurred between lines: 37 and 96 in the jsp file: /adminresult.jsp

Generated servlet error:
D:\tomcat4\work\Standalone\localhost\_\adminresult$jsp.java:141: Wrong number of arguments in method.
                                System.out.println("Exception", ex);

0
 
LVL 11

Expert Comment

by:fargo
ID: 16365141
Sorry. The exception should be like

System.out.println(ex.getMessage());

fargo


0
 
LVL 29

Expert Comment

by:bloodredsun
ID: 16365281
You seem to have this in hand fargo so I'll unsub now :-)
0
 
LVL 11

Expert Comment

by:fargo
ID: 16365305
bloodredsun, if you are around...my points are always in danger... -:)
Anyway, this should be your question. You catch the catch.

fargo
0
 
LVL 29

Expert Comment

by:bloodredsun
ID: 16365371
ha! These are your points, you worked for them and I have more than enough :-)

In fact I'm looking forward to see who will become the next featured expert (highest scorer of the last month - on the left hand nav) between you, radarsh and TimYates as it won't be me anymore.
0
 
LVL 11

Expert Comment

by:fargo
ID: 16365411
hi bloodredsun. Thanks for encouraging words. BTW, radarsh and Tim are oldies...and they are the real experts. I am just started to hang around more. You cannot be touched.....

fargo
0
 
LVL 35

Expert Comment

by:TimYates
ID: 16365615
Won't be me ;-)  I can't get a look in here or in Java these days ;-)

My poor old hands just aren't quick enough ;-)

heheheh
0
 
LVL 29

Expert Comment

by:bloodredsun
ID: 16365937
old hands! Watch it mate I'm older than you so what does that say about me! ;-)
0
 
LVL 35

Expert Comment

by:TimYates
ID: 16365944
hehehe soz granddad ;-)

*runs off to bed and pretends to be asleep* ;-D

See y'all tomorrow :-)
0
 
LVL 23

Expert Comment

by:Siva Prasanna Kumar
ID: 16366786
Are you using JRE 1.5 ??? and more on which servlet engine are you using (tomact) or web server are you using???

and 1st please try this & then get back.

change the catch block as follows.

catch(Exception ex){
             ex.printStackTrace();
           }
0
 
LVL 2

Author Comment

by:clonmelog
ID: 16369248
fargo,

im still getting the same error im afraid. the page isnt logging in despite the fact that the code is correct

shivaspk, ive tried yours and i get the following error:

org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.

D:\tomcat4\work\Standalone\localhost\_\adminresult$jsp.java:155: Type expected.
        } catch (Throwable t) {
          ^
1 error, 1 warning
0
 
LVL 11

Expert Comment

by:fargo
ID: 16369266
Can you check the value for the following in the adminresult.jsp page

String user = request.getParameter("Username");
String formPassword = request.getParameter("Password");
String Password = rs.getString("Pass");

post the values for the above three values.

regards,
fargo
0
 
LVL 2

Author Comment

by:clonmelog
ID: 16369284
try
                {
                    String user = request.getParameter("Username");
                    String formPassword = request.getParameter("Password");
                      String Password = null;
               
                 
                    Statement stmt = connection.createStatement();
                    ResultSet rs = stmt.executeQuery("select Pass from Supervisor WHERE Username = '" + user + "'");
               
               
                      if( formPassword == null) {
                            String redirectURL "/momentum/error.jsp";
                      response.sendRedirect(redirectURL);
                      }
               else {
                if( rs.next() )
                      {
                      Password = rs.getString("Password");
                                                          
              if( formPassword.equals( Password ) )
                                  {
                            //login sucess
                                        
                            String redirectURL = "/momentum/adminoptions.jsp";
                        response.sendRedirect(redirectURL);
               
0
 
LVL 11

Expert Comment

by:fargo
ID: 16369307
what is it that you posted??

fargo
0
 
LVL 2

Author Comment

by:clonmelog
ID: 16369327
sorry ive misunderstood what you asked there, i thought you meant to post the values carrying into the java file.

what exactly do you mean?
0
 
LVL 11

Expert Comment

by:fargo
ID: 16369350
I mean the following

String user = request.getParameter("Username");
System.out.println("User is "+user);

String formPassword = request.getParameter("Password");
System.out.println("formPassword is "+formPassword);

String Password = rs.getString("Pass");
System.out.println("Password is "+Password);

We can then expect the results.
fargo
0
 
LVL 2

Author Comment

by:clonmelog
ID: 16369396
where abouts do i place this code beacuse ive tried it like this below and no luck:

String user = request.getParameter("Username");
                    System.out.println("User is "+user);

              String formPassword = request.getParameter("Password");
                    System.out.println("formPassword is "+formPassword);
           String Password = null;

                                      Statement stmt = connection.createStatement();
                                       ResultSet rs = stmt.executeQuery("select Pass from Supervisor WHERE Username = '" + user + "'");



           if( formPassword == null) {
            String redirectURL = "error.jsp";
                  response.sendRedirect(redirectURL);
           }
           else {
            if( rs.next() )
            {
             Password = rs.getString("Pass");
                   System.out.println("Password is "+Password);

all it does is spit back the error1.jsp page to me.
0
 
LVL 11

Expert Comment

by:fargo
ID: 16369422
Hi,

If it is going to error1.jsp..it means the formPassword is null. You can check the output in console for the above we did.
are you using logging like log4j etc.?

fargo
0
 
LVL 2

Author Comment

by:clonmelog
ID: 16369469
no im not using any logging... im very new to java as you can see ;-)

Perhaps my form is the problem?

<form name="form1" method="post" action="adminresult.jsp">
            <table width="85%" border="0" cellpadding="3" cellspacing="1" bgcolor="#666666">
              <tr>
                <td bgcolor="E3EDFF"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="17%"><strong>Username:</strong></td>
                    <td width="83%"><input name="Username" type="text" id="Username"></td>
                  </tr>
                </table></td>
              </tr>
            </table>
            <table width="85%" border="0" cellpadding="3" cellspacing="1" bgcolor="#666666">
              <tr>
                <td bgcolor="E3EDFF"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="17%"><strong>Password:</strong></td>
                    <td width="83%"><input name="Password" type="password" id="Password"></td>
                  </tr>
                </table></td>
              </tr>
            </table>
            <p>
              <input type="submit" name="Submit" value="Submit">
            </p>
            <p><br>
              </p>
          </form>
0
 
LVL 11

Expert Comment

by:fargo
ID: 16369502
Hi,

form seems to be fine.

>> You can check the output in console for the above we did
have u checked this???

You definitely has to check what values you are getting from the form and against what you are checking.

fargo
0
 
LVL 2

Author Comment

by:clonmelog
ID: 16369681
How do you mean in console?
0
 
LVL 2

Author Comment

by:clonmelog
ID: 16369701
I have it, one moment.
0
 
LVL 2

Author Comment

by:clonmelog
ID: 16369716
www.templateit.net/doc1.doc

thats the result coming from the console!
0
 
LVL 2

Author Comment

by:clonmelog
ID: 16369721
0
 
LVL 11

Expert Comment

by:fargo
ID: 16369751
good. What is coming with the resultset then?

rs.getString("Pass");

fargo
0
 
LVL 11

Accepted Solution

by:
fargo earned 2000 total points
ID: 16371930
If Password string is not getting print, it means that this query is not returning any result

select Pass from Supervisor WHERE Username = '" + user + "'
// cross check with
select Pass from Supervisor WHERE Username = 'admin'

bcoz, if(rs.next()) is not true.



0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this step by step method when setting up QuickBooks Online. They will allow you to explore the various features of the advanced settings available to you.
The deadly train derailment that occurred recently in DuPont, Washington, raises a lot of questions. It was a new route, the first trip tested with passengers, and the train was travelling at 50 mph over the zone’s speed limit. Could IoT play a role…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question