Please I desperatly need your help!!

sorry but I need 2 figure this out fast ive been at this all day but cant seem to find the answer.
I need to write some info to a database but somehow it doesnt work.
jsp code:
<!-- order.jsp -->
<%@ page import = "project.Login" %>
<%@ page import = "java.util.Date" %>
<jsp:useBean id="Login" scope="session" class="project.Login">
</jsp:useBean>
<%
int klantid =  (Integer)session.getAttribute( "qooxeid");
int order = Integer.parseInt(request.getParameter("order"));
// Get the system date and time.
java.util.Date utilDate = new Date();
// Convert it to java.sql.Date
Date datum = new java.sql.Date(utilDate.getTime());
%>
<jsp:setProperty name="Login" property="*" />
<%@ page import="java.sql.*" %>
<HTML>
<HEAD>
<TITLE>order</TITLE>
</HEAD>
<BODY>
<% 
     String qooxeuser= (String)session.getAttribute( "qooxeuser" );
     if(qooxeuser == null){
%>
          <jsp:forward page="login.html" />
<%
     else{
          // write to winkelwagen
          Login.Winkelwagen();     
%>
U heeft uw product net in uw winkelwagentje gelegd.
<%
%>
</BODY>
</HTML>.java file:
package project;
import java.sql.*;
     public class Login{
     public Connection connection = null;
     public boolean confirmation = false;
     public String password;
     public int klantid;
     public String username;
     public int voorraad;
     public int order;
     public Date datum;
     public int orderid;
     public void Winkelwagen() throws SQLException, ClassNotFoundException{
               initializeJdbc();
               RowCount();
               PreparedStatement sqlinsert = connection.prepareStatement
               ("INSERT INTO Ordertbl VALUES(?, '?', ?, ?, 'winkelwagen')");
               sqlinsert.setInt(1,orderid);
               sqlinsert.setDate(2,datum);
               sqlinsert.setInt(3,order);
               sqlinsert.setInt(4,klantid);
               ResultSet rsetinsert = sqlinsert.executeQuery();
               rsetinsert.close();
               sqlinsert.close();
               connection.close();
     public void RowCount() throws SQLException, ClassNotFoundException{
          // Select the number of rows in the table
               PreparedStatement sqlorderid = connection.prepareStatement(
                    "SELECT COUNT(*) FROM Ordertbl");
               ResultSet rsetorderid = sqlorderid.executeQuery();
               // Get the number of rows from the result set
               rsetorderid.next();
               orderid = 1 + rsetorderid.getInt(1);
               rsetorderid.close();
               sqlorderid.close();
     public void Login() throws SQLException, ClassNotFoundException{
         // Initialize database connection and create a Statemet object
          initializeJdbc();
          //** Execute a statement */
          PreparedStatement sql = connection.prepareStatement("SELECT Username, Password, klantid FROM Klant WHERE Klant.Username = ? and Klant.Password = ?");
          sql.setString(1,username);
          sql.setString(2,password);
          ResultSet rset = sql.executeQuery();
          if(rset.next()){
               klantid =  Integer.parseInt(rset.getString(3));
               confirmation = true;
               /**Close connection**/
               rset.close();
               sql.close();
               connection.close();
          else{
               /**Close connection**/
               rset.close();
               sql.close();
               connection.close();
     /** Initialize database connection */
     public void initializeJdbc() throws SQLException, ClassNotFoundException {
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
               // Connect to the sample database
               connection = DriverManager.getConnection("jdbc:odbc:project");
               //** Create a statement */
               Statement statement = connection.createStatement();
     /**return username property*/
     public String getusername() {
          return username;
     public void setusername(String newusername){
          username = newusername;
          /**return klantid property*/
     public Integer getklantid() {
          return klantid;
     public void setklantid(Integer newklantid){
          klantid = newklantid;
     /**return klantid property*/
     public Date getdatum() {
          return datum;
     public void setklantid(Date newdatum){
     datum = newdatum;
          /**return password property*/
     public String getpassword() {
          return password;
     public void setpassword(String newpassword){
          password = newpassword;
     /** Return connection property */
     public Connection getConnection() {
          return connection;
}when I run the jsp file with tomcat I get this error:
org.apache.jasper.JasperException: 3
     org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.ArrayIndexOutOfBoundsException: 3
     sun.jdbc.odbc.JdbcOdbcPreparedStatement.clearParameter(JdbcOdbcPreparedStatement.java:1021)
     sun.jdbc.odbc.JdbcOdbcPreparedStatement.setInt(JdbcOdbcPreparedStatement.java:525)
     project.Login.Winkelwagen(login.java:24)
     org.apache.jsp.order_jsp._jspService(org.apache.jsp.order_jsp:96)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
but dont think thats usefull
Lots of thanks if you can help me

sorry but I need 2 figure this out fastI think you mean that you 'need to figure' ... is it that tough to type one extra character?
ive been at
this all day but cant seem to find the answer.That should be a capitol 'I'.
I need to write some info to a database but somehow
it doesnt work....
when I run the jsp file with tomcat I get this
error:
org.apache.jasper.JasperException: 3...
root cause
java.lang.ArrayIndexOutOfBoundsException: 3
     sun.jdbc.odbc.JdbcOdbcPreparedStatement.clearParameter(JdbcOdbcPreparedStatement.java:1021)
     sun.jdbc.odbc.JdbcOdbcPreparedStatement.setInt(JdbcOdbcPreparedStatement.java:525)
     project.Login.Winkelwagen(login.java:24)
     org.apache.jsp.order_jsp._jspService(org.apache.jsp.order_jsp:96)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
but dont think thats usefullI disagree. This tells you that there is an Array Index that is out of bounds in line 24 of the login java file. So, what you need to do is to find the 24th line of the java file, look at what code you are trying to execute, (here is a hint: as per the italicized error line, the line calls a setInt method in PreparedStatement).
So why would one of the indexes you use in setInt method calls become out of bounds? Look at the PreparedStatement, and count the number of question marks. Then note that one of those question marks is different then the rest? So how would you fix that, you think?
Lots of thanks if you can help me

Similar Messages

  • Please i really need your help...

    where can i buy an hp 110 tri color cartridge? here in the philippines since i bought my printer in singapore, can i buy a cartridge here?

    What printer model?
    You will need to Contact HP to request a "Regionalization Reset". There should not be any charge for this, it is covered as part of the cartridge warranty. You will need to have access to your computer and printer while on the line with HP. You will also need to have a set of cartridges for the new region, once the reset is complete cartridges from the original region will no longer work.  HP's web page on the subject is here.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • PLEASE! i NEED your help!

    Hello i need help!
      For the last 3 weeks my itunes is not working ' itunes was not installed correctly please reinstall error 7 ". and quicktime isen't wokring either ' pleas install apple application support here is a list of thinks that i'v tried to do.
    1)  downloaded revo installer pro ( 30 days trial ). and deleted everything apple and than reinstalled itunes.
    2) downloaded winrar to download apple aplication support.
    3) updated everything in my windows update exept for ' windows 7 pack 1 x64 systems ( kb976932 ) because my battery needs to get replaced but i can't buy that untill next month ( i'm in college ).
    please please please! help me i don't know annything about all this!

    iTunes for Windows: "Error 7" message when opening iTunes

  • I want to get iBook, Facebook and Skype to my iphone 4.2.1 through my iTune, but I coudn't because it is said that it requires a newer version of iOS. Please I need your help. Thanks

    I want to get iBook, Facebook and Skype to my iphone 4.2.1 through my iTune, but I coudn't because it is said that it requires a newer version of iOS. Please I need your help. Thanks

    If your iPhone can't be updated to a higher iOS version then the only way to get them is if you downloaded versions of them which were compatible with iOS 4.2.1 and you still have copies of those versions somewhere e.g. on your computer or on a backup - only the current version of each app is available in the store, and as apps (and other content) are tied to the account that downloads them, you will need to have older copies that are linked to your id

  • Hi, my iphone its in recovery mode and when i restore my iphone 5s loading show the blue screen and show note on itunes (unknown error 14) please i need your help please . thanks

    Hi, my iphone its in recovery mode and when i restore my iphone 5s loading show the blue screen and show note on itunes (unknown error 14) please i need your help please . thanks

    In the article Resolve iOS update and restore errors this is what it says about error 14:
    Check your USB connections
    Related errors: 13, 14, 1600, 1601, 1602, 1603, 1604, 1611, 1643-1650, 2000, 2001, 2002, 2005, 2006, 2009, 4005, 4013, 4014, or “invalid response."
    If the USB connection between your device and computer is interrupted, you may be unable to update or restore.
    To narrow down the issue, you can also change up your hardware:
    Use the USB cable that came with your device, or a different Apple USB cable.
    Plug your cable into a different USB port directly on your computer. Don't plug it into your keyboard.
    Try a different computer.
    If necessary, resolve any further issues with the USB connection, then with your security software.
    If you're still seeing the error message, check for hardware issues by following the next section.

  • I have a big problem, please I need your help

    Hi I was typing a message to send and my laptop off the sending page, and I received a message from Hp allowing me to stop my machine because on a system error. after five minutes I try to re-start my laptop but no way! How could I do as it refuse to start? my laptop is Hp pavillon Entertainment PC) AMD AthlonX2 64 I need your help please very soon

    I'm not suggesting anything. Your options are:
    Start over. It'll take anywhere between a few days and a few months depending on your CD collection
    Go to a CD ripping agency. It'll take a day or two, and they charge about a buck or two a CD.
    Go to a data recovery agency. They charge a few hundred dollars an hour.

  • HT1199 I need your help, PLEASE. How can to fix "NO MOUNTABLE FILE SYSTEM" error of my back up hard drive on Mountain Lion OS?

    I need your help, PLEASE. How can to fix "NO MOUNTABLE FILE SYSTEM" error of my back up hard drive on Mountain Lion OS?

    Did you format the drive for Mac use before you tried to use it as a backup drive?
    Are you using Time Machine on the drive? You can't view the contents of its backup database and the only way to access the info is directly from the Time Machine app.

  • HT201210 please,I need your help ! I was updating my iphone ios to ios4.2 and then problems begins when it shows that it needs to restore the factory software to I was trying to restore ,but that didn't happen it begins but then it shows unknown error 101

    please,I need your help ! I was updating my iphone ios to ios4.2 and then problems begins when it shows that it needs to restore the factory software to I was trying to restore ,but that didn't happen it begins restoring but then it shows unknown error 1015

    Stop being impatient.
    From the article that the question was posted from:
    Errors related to downgrading iOS
    The required resource cannot be found: This alert message occurs when your device has a newer version of iOS than what is available in iTunes. When troubleshooting a device that presents this alert message, go to Settings > General > About and check the version of iOS on the device. If it is newer than the latest released iOS version, the device may have a prerelease developer version of iOS installed.   Installing an older version of iOS over a newer version is not supported.
    Error 1015: This error is typically caused by attempts to downgrade the iPhone, iPad, or iPod touch's software. This can occur when you attempt to restore using an older .ipsw file. Downgrading to a previous version is not supported. To resolve this issue, attempt to restore with the latest iPhone, iPad, or iPod touch software available from Apple. This error can also occur when an unauthorized modification of the iOS has occurred and you are now trying to restore to an authorized, default state.
    You cannot downgrade.
    If you have a 3GS, you can only install iOS 6.1.3 which is the current version of iOS for the device.

  • I need your help, please. I can't get my photostream synchronized

    Dear friends, I need your help again!!!
    My photostream from my computer, windows vista, is not updating the pictures on my photostream in neither one of my IOS devices.
    I'm sure that the photostream in both IOS are turned on. In my computer it is also turned on.
    For example, I tranferred some pictures from a normal file to the photostream in the computer and I expected that them went also to my
    iphone and ipad, but it not occurred.
    Please, do you have some advise for me?
    Thanks in advance.

    first i would try a simple restart of your computer and your iPad and see if they show up after they reboot. Also which folder are you putting them in? on windows there will be a seperate folder in the photostream folder that will show upload/uploads you will want to make sure they are in there. Also here are some basics about photostream to make sure you are meeting all the requirements and are not over your limit, http://support.apple.com/kb/HT4486

  • Help please am useing an Iphone 3gs after i restore the iOS device restart my phone can not Activate it.. what do i do please i need your help.?

    Help please am useing an Iphone 3gs after i restore the iOS device restart my phone can not Activate it.. what do i do please i need your help.?

    Usually indicitive of a phone that's been jailbroken or hacked to unlock it, something of which you will net get support for here.

  • Please , i need youre help ! im from Mexico and i dont speak inglish well but ill try explain me... i buy a cs5 students edicion but i lost my paswoord for the instalacion can you helpe me ? how can i recuperade my paswoord

    please , i need youre help ! im from Mexico and i dont speak inglish well but ill try explain me... i buy a cs5 students edicion but i lost my paswoord for the instalacion can you helpe me ? how can i recuperade my paswoord
    Creative Suites

    Find your serial number quickly
    Mylenium

  • HI ALL SINCE TWO DAYS I AM DOWNLOADING VIBER BUT I AM NOT HAVING MY ACCESS CODE AND EVERY TIME I DELETE THE APPLICATION AND DOWNLOADING IT AGAIN BUT ALWAYS THE SAME RESULT PLEASE I NEED YOUR HELP FOR THE ACCESS CODE.MY PHONE NUMBER IS 0022996969896.THANKS

    HI ALL SINCE TWO DAYS I AM DOWNLOADING VIBER BUT I AM NOT HAVING MY ACCESS CODE AND EVERY TIME I DELETE THE APPLICATION AND DOWNLOADING IT AGAIN BUT ALWAYS THE SAME RESULT PLEASE I NEED YOUR HELP FOR THE ACCESS CODE.MY PHONE NUMBER IS 0022996969896.THANKS IN ADVANCE

    try this website this should help you http://helpme.viber.com/index.php?/Knowledgebase/List/Index/1/iphone

  • HT201328 Hey, i bought an iphone from online shop and its locked by orange france, i contact them to unlock it but they refused, they said that we regret to inform you that we'r not able to unlock second hand phones? I need your help please.

    Hey, i bought an iphone from online shop as a used phone and its locked by orange france, i contact them to unlock it but they refused, they said that we regret to inform you that we'r not able to unlock second hand phones? I need your help please. Its not fair , apple should figure it out
    Regards,
    Orange

    This is no different with any carrier locked phone. Getting a carrier locked phone officially unlocked is the responsibility of the carrier, not the cell phone manufacturer. A cell phone manufacture cannot unlock a carrier locked phone without the carrier's authorization.
    An iPhone sold as officially unlocked when new can be used by others as a second hand phone, and the same with any carrier locked iPhone that can be unlocked by the carrier, and many carriers offer it.

  • HT4623 I. Tried many time to install my apple to update software but can't fix I need your help please and Thanks.

    How i fix and software update i was tried but cant i need your help please and thanks.

    "but cant"
    That doesnt tell us anything useful. You need to post EXACTLY what you did and EXACTLY what happened, including any error messages.

  • HT4097 please my ipad in recovery mode after last update and i tried the previous steps and it is same condition in recovery mode please i need your help

    please i need your help i made update to my ipad to the last version then i find it in recovery mode and tried to restore it using i tunes but it the same in recovery mode please i need your help to solve this problem

    If you followed these instructions and you were unable to enter recovery mode, I'm still leaning toward a hardware problem.  Also, since you have IOS-7, read this.  It might help.

Maybe you are looking for

  • How to make this effect in Keylight?

    Hi, I have question, how to make this effect in Keylight? I know that this overlay is added here: http://oi57.tinypic.com/1174fup.jpg Photos: http://iv.pl/images/18475588964010299091.jpg

  • Data Import from XML Format file

    I want to import data  from XML file format.Can i do it ? If yes then please give me more details in the step.

  • LineChart category axis labelFunction / dataProvider problem

    Hi, I am trying to plot a line chart using actionscript. What I am trying to achive is plot the chart with entire dataset, but show only limited number of points in x and y axis's. Problem:      When I give dataProvider to category axis with some lim

  • ORA-22806 : not an object or reference in 10gRel2

    Hi, We have recently successfully upgraded our oracle 8i database to 10.2.0.1 database is up and running fine, but one of the user created procedure is giving error as below : ORA-22806 : not an object or reference See the below code : =============

  • Verification email

    Can someone please tell me do BT send out verification emails and failing that, closing your email account.  Solved! Go to Solution.