Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JDBC JSP SQL Error
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Rakesh Keerthi
JSP SQL Error
0 Answer(s)      2 years and 5 months ago
Posted in : JDBC


Hi While trying to execute the below code i'm getting the following error "java.sql.SQLException: Io exception: Got minus one from a read call ". please help me out.

<%
try{
String Username=request.getParameter("username");
String Password=request.getParameter("password");
session.setAttribute("myusername", Username);
 Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:8084:dsn","system","tiger");  
           Statement st=null;
           PreparedStatement ps=null;
           ps=con.prepareStatement("select * from Users where USERID=? and PASSWORD=?");
           ps.setString(0, Username);
           ps.setString(1, Password);
           ResultSet rs=null;
           rs=ps.executeQuery();
           if(rs.next()){

                String redirectURL= "New.html";
                response.sendRedirect(redirectURL);

        }
                     else{
               out.println("no login");

                     }
                     }
    catch(Exception e){
    out.println(e);
}
%>

Advertisement
View Answers

Related Tutorials/Questions & Answers:
JSP SQL Error
JSP SQL Error  Hi While trying to execute the below code i'm getting the following error "java.sql.SQLException: Io exception: Got minus one from a read call ". please help me out. <% try{ String Username
SQL error - JSP-Servlet
SQL error  Hello friends, Can we update a column with referrence to that column value. For example, the query...){ System.out.println("Error occured while updating!!!"); } con.close
Advertisements
Java servlet sql connectivity error - JSP-Servlet
Java servlet sql connectivity error  Hi, I have been trying to connect to sql database via the servlet program in java.I have not been successful so far. However when i try to connect to sql through a normal java program
SQL Error - SQL
SQL Error  Invalid character value for cast specification on column number 5 (Designation) Whats this error about this if the field i specified in programming error. ie DB fields in above question
SQL Error Version 5.5.15
SQL Error Version 5.5.15  SQL Error Version 5.5.15
error : not an sql expression statement
error : not an sql expression statement  hii I am gettin followin error in connecting to database SQLserver 2005 in Jdeveloper,i m usin struts and jsp my pogram: import java.sql.*; public class TaskBO { public TaskBO
sql syntax error help
sql syntax error help  this query show syntax error .. i am unable to figure it out insert into order (orderdate, dpname, paymethod, tamount...') where is the error ?   Please send the error details and the datatype
SQL connection error in android
SQL connection error in android  hi, i am android developer . recently i made one application connect with sql server 2005 using jtds...:sql:Exception : BUFFERDIR connection property invalid. if you have any answer
correct the sql error
correct the sql error  i am getting a SQL Error while retriving data from access to jframe called "datatype mismatch in criteria expression" plez do...(null,"Please enter the Student ID to Search","Error",0); } else { try
SQL QUERY ERROR
SQL QUERY ERROR  Im writing a query which shows error of INVALID... THE FORM IS THROWING THE ERROR OF INVALID CHARACTER BUT THE SAME QUERY IS RUNNING..._value'. . .); For more information, visit the following link: SQL Queries
JSP error
JSP error  what is difference between global-exception and error-page in jsp. which condition they are use
foreign key error in sql
foreign key error in sql  create table matchdetails(mid varchar2(10),mdate date,team1 varchar2(10),team2 varchar2(10...) references matchdetails(mid)); ->for the above batsman table it shows error
hibernate sql error - Hibernate
hibernate sql error  Hibernate: insert into EMPLOYE1 (firstName, lastName, age, p-type, EMP_ID) values (?, ?, ?, 'e', ?) Exception in thread "main" org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
jsp -sql - JSP-Servlet
jsp -sql  Hello Sir/Madam, Please send me the error in the following sql code if any. I did not get any error message and iam not getting... then it gives error because 'todayc' is constant variable not matching
How to trap Trigger Error - SQL
problem?.. Is there a way in where I can trap all SQL error and place it under... error_log ( timestamp DATETIME, username NVARCHAR(30), ErrorID INT, database_name NVARCHAR(50), error_stack
SQL and JSP
SQL and JSP  1.sql database 1.store login and password details along with user name 2.list of employees with all relevant personal details... using sql data base.. 2.JSP pages 1.login screen which will have user id
jsp error
jsp error  <p>hi, could please help whenever i run jsp file in my eclipse i got this error.my jsp file is</p> &lt;%@ page language... encountered an internal error () that prevented it from fulfilling this request
My Sql Error - Development process
My Sql Error  Hello Sir ,I have Created Table with following Query,then Table Created Succefully,But some errors Occured, can u give me the Code with Microsoft Access As BackEnd Application in this Project . plz Help me Sir
jsp error - JSP-Servlet
jsp error  HTTP Status 404 - /jsp... message /jsp/ description The requested resource (/jsp/) is not available..., The 404 or Not Found error message is an HTTP standard response code indicating
JSP Error - JSP-Servlet
JSP Error  When i am running my registration.jsp getting following error. HTTP Status 500... description The server encountered an internal error () that prevented it from fulfilling
syntax error in SQL Insert Statement - Java Beginners
syntax error in SQL Insert Statement  Dear Sir ,I have write following code to save data into access databse, but code gives following error code...)values(?,?)"); Error: java.sql.SQLException: [Microsoft][ODBC Microsoft
Error while SQL Server connection to Java
Error while SQL Server connection to Java  import java.sql.*; public..."); con=DriverManager.getConnection("jdbc:odbc:SQL_SERVER;user=DTHOTA;password...("password", " "); con=DriverManager.getConnection("jdbc:odbc:SQL_SERVER", prop
Error while SQL Server connection to Java
Error while SQL Server connection to Java  import java.sql.*; public..."); con=DriverManager.getConnection("jdbc:odbc:SQL_SERVER;user=DTHOTA;password...("password", " "); con=DriverManager.getConnection("jdbc:odbc:SQL_SERVER", prop
jsp error - JSP-Servlet
jsp error  how to remove below error:: exception org.apache.jasper.JasperException: java.lang.NullPointerException root cause...... newpo.jsp:   JSP Page
jsp error - JSP-Servlet
jsp error  Hello, my name is sreedhar. i wrote a jsp application to generate a report from oracledata base and the report should display in Ms-excel... in detail. Visit for more information. http://www.roseindia.net/jsp/ Thanks
jsp error - JSP-Servlet
jsp error  To Upload and insert the file into oracle Database with Current Date and Time In JSP and my project is online library management system plz help how to store some books in particular folder and after how retrive
correct the sql error and retrive data....plez
correct the sql error and retrive data....plez  i am getting a SQL Error while retriving data from access to jframe called "datatype mismatch...("")) { JOptionPane.showMessageDialog(null,"Please enter the Student ID to Search","Error",0
SQL Query - JSP-Servlet
SQL Query   AS mysql backend updation query shows a syntax error. I gave the full query and the generated error here. Please send me the correct...+"'"); Generated error: Unknown Exception occured java.sql.SQLException
JSP Translation error - JSP-Servlet
JSP Translation error  Hello friends, In a new file declared first variable shows the following error. ----------------------------------------------- An error occurred at line: 2 in the jsp file: /stud
jsp sql server 2005 connectivity
jsp sql server 2005 connectivity  your jsp mysql tutorial is very help full.Please tell me how to connect jsp with SQL server 2005
error message - JSP-Servlet
error message  hi, friends after complete my servlet programe i can type http://localhost:8080 on the browser. the servlet program is insert data... sql+ is not working ,so what is the solution.plez any body give me the replay
 

 

 

DMCA.com