Compilation problem with JSP: i am sure this is easy but cant figure out

this is my jsp file:
<@ page import="java.sql.*, com.simpleneasy.*" errorPage="error.jsp"; %>
<jsp:useBean id="c" class="ConnectionBean"></jsp:useBean>
<html>
<%
     String sql = "select * from test;";
     ResultSet rs;
     c.establishConnection();
     try{
          rs = c.executeQuery(sql);
     }catch (SQlException ex){}     
     while (rs.next()){
     %>VALa is <%= rs.getInt("val")%>
     <br>Valb is <%= rs.getString("val2")%><%
     closeConnection();
%>
</html>
located in tomcat416/tomcat/webapps/simpleneasy/jsp
ConnectionBean.class is located in tomcat416/tomcat/webapps/simpleneasy/WEB-INF/classes/com/simpleneasy
here is the sample of error that i am getting.. there are a lot more but dont want to paste the whole thing here:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 1 in the jsp file: /jsp/testdb.jsp
Generated servlet error:
[javac] Compiling 1 source file
/usr/tomcat416/tomcat/work/Standalone/localhost/simpleneasy/jsp/testdb$jsp.java:42: cannot resolve symbol
symbol : class ConnectionBean
location: class org.apache.jsp.testdb$jsp
ConnectionBean c = null;
^
An error occurred at line: 1 in the jsp file: /jsp/testdb.jsp
Generated servlet error:
/usr/tomcat416/tomcat/work/Standalone/localhost/simpleneasy/jsp/testdb$jsp.java:44: cannot resolve symbol
symbol : class ConnectionBean
location: class org.apache.jsp.testdb$jsp
c = (ConnectionBean) pageContext.getAttribute("c", PageContext.PAGE_SCOPE);
^
An error occurred at line: 1 in the jsp file: /jsp/testdb.jsp
Generated servlet error:
/usr/tomcat416/tomcat/work/Standalone/localhost/simpleneasy/jsp/testdb$jsp.java:47: cannot resolve symbol
symbol : class ConnectionBean
location: class org.apache.jsp.testdb$jsp
c = (ConnectionBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "ConnectionBean");
^
An error occurred at line: 3 in the jsp file: /jsp/testdb.jsp
Generated servlet error:
/usr/tomcat416/tomcat/work/Standalone/localhost/simpleneasy/jsp/testdb$jsp.java:60: cannot resolve symbol
symbol : class ResultSet
location: class org.apache.jsp.testdb$jsp
     ResultSet rs;
^
An error occurred at line: 3 in the jsp file: /jsp/testdb.jsp
Generated servlet error:
/usr/tomcat416/tomcat/work/Standalone/localhost/simpleneasy/jsp/testdb$jsp.java:64: cannot resolve symbol
symbol : class SQlException
location: class org.apache.jsp.testdb$jsp
     }catch (SQlException ex){}     
^

first of all thanks for helping ..
i re wrote the code as you suggested like this:
<@ page import="java.sql.*, com.simpleneasy.*" errorPage="error.jsp" %>
<jsp:useBean id="c" class="com.simpleneasy.ConnectionBean"></jsp:useBean>
<html>
<% String sql = "select * from test";
     ResultSet rs = null;
     c.establishConnection();
     try{     
          rs = c.executeQuery(sql);
          while (rs.next()){        
          out.println(rs.getInt("val"));
          out.println(rs.getString("val2"));
     }catch (SQlException ex){   }
     finally{      c.closeConnection();   }
     %>
</html>
but now i am getting this:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 3 in the jsp file: /jsp/testdb.jsp
Generated servlet error:
[javac] Compiling 1 source file
/usr/tomcat416/tomcat/work/Standalone/localhost/simpleneasy/jsp/testdb$jsp.java:59: cannot resolve symbol
symbol : class ResultSet
location: class org.apache.jsp.testdb$jsp
     ResultSet rs = null;
^
An error occurred at line: 3 in the jsp file: /jsp/testdb.jsp
Generated servlet error:
/usr/tomcat416/tomcat/work/Standalone/localhost/simpleneasy/jsp/testdb$jsp.java:67: cannot resolve symbol
symbol : class SQlException
location: class org.apache.jsp.testdb$jsp
     }catch (SQlException ex){   }
^
2 errors

Similar Messages

  • Anyone having or had a problem with kernel_task running uploads in back ground and can't figure out what its doing

    My iMac is running kernel_task and using a lot of upload bandwidth. I talked to isp this morning he said that I was topping out on the upload side while download was normal. He also said that it started about 3 weeks ago but I've been looking and trying to remember what I did as far as installing or changing setting and I can't figure it out, also using a magicjack on computer but tried without it and still the same and its hard to use the phone when other party only gets every other 4 or 5 words. HELP PLEASE!! driving me crazy.

    You have something that is uploading data from your network, so you may have a runaway application doing this. If you quit all your running applications does the problem still exist? If so then you may have a corrupted system process.
    Open Activity Monitor in the Utilities folder.  Select All Processes from the Processes dropdown menu.  Click twice on the CPU% column header to display in descending order.  If you find a process using a large amount of CPU time (>=70,) then select the process and click on the Quit icon in the toolbar.  Click on the Force Quit button to kill the process.  See if that helps.  Be sure to note the name of the runaway process so you can track down the cause of the problem.
    Create a new user account with admin status, then log out of your account and log into the new account. Does the problem still exist?
    Also, try basic repairs:
    Repair the Hard Drive and Permissions - Lion/Mountain Lion
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported then click on the Repair Permissions button. When the process is completed, then quit DU and return to the main menu. Select Restart from the Apple menu.

  • My ipod touch is disabled, i installed the latest version of itunes, but cant figure out how to restore, can anyone help with this?

    My ipod touch is disabled, i installed the latest version of itunes, but cant figure out how to restore the ipod, can anyone help?

    If you run into the "another installation" message even after the reboot of the PC (which is an excellent idea by HTP ProXy), reregistering your Windows Installer Service is worth a try.
    First, launch a command prompt as an administrator. In your Start search, type cmd then right-click on the cmd that comes up and select "Run as administrator".
    At the command prompt:
    Type %windir%\system32\msiexec.exe /unregister and hit enter.
    Type %windir%\syswow64\msiexec.exe /unregister and hit enter.
    Type %windir%\system32\msiexec.exe /regserver and hit enter.
    Type %windir%\syswow64\msiexec.exe /regserver and hit enter.
    Restart the PC and try another reinstalll.

  • I have a samsung intensity ll.How do i get rid of a small box with AA off of my main screen?Cant figure out what setting it is.

    How do i get rid of a small box with AA in it on my main screen? cant figure out what setting it is on my samsung intensity ll ?

    Good deal      (the AA stands for Auto Answer, by the way; and I like your avatar  )

  • Compilation problem with templates while using option -m64

    Hi,
    I have compilation problem with template while using option -m64.
    No problem while using option -m32.
    @ uname -a
    SunOS snt5010 5.10 Generic_127111-11 sun4v sparc SUNW,SPARC-Enterprise-T5220
    $ CC -V
    CC: Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25
    Here is some C++ program
    ############# foo5.cpp #############
    template <typename T, T N, unsigned long S = sizeof(T) * 8>
    struct static_number_of_ones
    static const T m_value = static_number_of_ones<T, N, S - 1>::m_value >> 1;
    static const unsigned long m_count = static_number_of_ones<T, N, S - 1>::m_count + (static_number_of_ones<T, N, S - 1>::m_value & 0x1);
    template <typename T, T N>
    struct static_number_of_ones<T, N, 0>
    static const T m_value = N;
    static const unsigned long m_count = 0;
    template <typename T, T N>
    struct static_is_power_of_2
    static const bool m_result = (static_number_of_ones<T,N>::m_count == 1);
    template <unsigned long N>
    struct static_number_is_power_of_2
    static const bool m_result = (static_number_of_ones<unsigned long, N>::m_count == 1);
    int main(int argc)
    int ret = 0;
    if (argc > 1)
    ret += static_is_power_of_2<unsigned short, 16>::m_result;
    ret += static_is_power_of_2<unsigned int, 16>::m_result;
    ret += static_is_power_of_2<unsigned long, 16>::m_result;
    ret += static_number_is_power_of_2<16>::m_result;
    else
    ret += static_is_power_of_2<unsigned short, 17>::m_result;
    ret += static_is_power_of_2<unsigned int, 17>::m_result;
    ret += static_is_power_of_2<unsigned long, 17>::m_result;
    ret += static_number_is_power_of_2<17>::m_result;
    return ret;
    Compiation:
    @ CC -m32 foo5.cpp
    // No problem
    @ CC -m64 foo5.cpp
    "foo5.cpp", line 20: Error: An integer constant expression is required here.
    "foo5.cpp", line 36: Where: While specializing "static_is_power_of_2<unsigned long, 16>".
    "foo5.cpp", line 36: Where: Specialized in non-template code.
    "foo5.cpp", line 26: Error: An integer constant expression is required here.
    "foo5.cpp", line 37: Where: While specializing "static_number_is_power_of_2<16>".
    "foo5.cpp", line 37: Where: Specialized in non-template code.
    "foo5.cpp", line 20: Error: An integer constant expression is required here.
    "foo5.cpp", line 43: Where: While specializing "static_is_power_of_2<unsigned long, 17>".
    "foo5.cpp", line 43: Where: Specialized in non-template code.
    "foo5.cpp", line 26: Error: An integer constant expression is required here.
    "foo5.cpp", line 44: Where: While specializing "static_number_is_power_of_2<17>".
    "foo5.cpp", line 44: Where: Specialized in non-template code.
    4 Error(s) detected.
    Predefined macro:
    @ CC -m32 -xdumpmacros=defs foo5.cpp | & tee log32
    @ CC -m64 -xdumpmacros=defs foo5.cpp | & tee log64
    @ diff log32 log64
    7c7
    < #define __TIME__ "09:24:58"
    #define __TIME__ "09:25:38"20c20
    < #define __sparcv8plus 1
    #define __sparcv9 1[snipped]
    =========================
    What is wrong?
    Thanks,
    Alex Vinokur

    Bug 6749491 has been filed for this problem. It will be visible at [http://bugs.sun.com] in a day or two.
    If you have a service contract with Sun, you can ask to have this bug's priority raised, and get a pre-release version of a compiler patch that fixes the problem.
    Otherwise, you can check for new patches from time to time at
    [http://developers.sun.com/sunstudio/downloads/patches/]
    and see whether this bug is listed as fixed.

  • Hello I have a problem with a Wifi Survey app, this app is from Access Agility, however this app was working fine, but without advise stop of working, I tried to open again, but app be close after few seconds.

    Hello I have a problem with a Wifi Survey app, this app is from Access Agility, however this app was working fine, but without advise stop of working, I tried to open again, but app be close after few seconds. Every time that I tried to open it, in diagnostic and use create some files, in special one named LatestCrash-WifiSurvey.plist, this one generate an incident identifier E73B0164-CDFA-4E9E-839E-A0C021BD17A2, but this incident identifier change every time that I tried to open, the last incident identifier is: DE600EB3-AB57-4C33-8DE8-71F6788A7441.
    After of it, I checked that the app had a new version available for downloading, I took a backup of my ipad and then upgrade this app, but is the same problem, all I want is to save the projects I had in this app, I´m afraid that if I delete this app and re-install it, probably I loss my projects.
    Thanks for your help indicating how I can save my projects and see them for example in an iphone for assurance that data is not lost.
    Something that called my attention is part of the log that shows a big CPU processing, but the strange thing is I killed all applications.
    Incident Identifier: E73B0164-CDFA-4E9E-839E-A0C021BD17A2
    CrashReporter Key:   ed0ca1405ce83d4f80cb3cce063d7248d7b76e91
    Hardware Model:      iPad2,5
    Process:         WifiSurvey [139]
    Path:            /var/mobile/Applications/1BEEE35A-85FC-4BE4-B62A-39A930CB3CE2/WifiSurvey.app/Wi fiSurvey
    Identifier:      WifiSurvey
    Version:         ??? (???)
    Code Type:       ARM (Native)
    Parent Process:  launchd [1]
    Date/Time:       2013-08-08 19:01:13.476 -0500
    OS Version:      iOS 6.1.3 (10B329)
    Report Version:  104
    Exception Type:  00000020
    Exception Codes: 0x000000008badf00d
    Highlighted Thread:  0
    Application Specific Information:
    com.accessagility.wifisurvey failed to launch in time
    Elapsed total CPU time (seconds): 20.990 (user 20.990, system 0.000), 52% CPU
    Elapsed application CPU time (seconds): 19.954, 50% CPU

    See:
    iOS: Troubleshooting applications purchased from the App Store
    Contact the developer/go to their support site if only one app.
    Restore from backup. See:
    iOS: How to back up              
    Restore to factory settings/new iPod

  • My mozilla does't opening new tabs & I am having very problem with my work due to this.Please tell me how can i resolve this problem.

    My mozilla does't opening new tabs & I am having very problem with my work due to this.Please tell me how can i resolve this problem

    The Ask Toolbar is causing that in the Firefox 3.6.13 version. Evidently something in that extension isn't compatible with a Firefox security fix. Disable that extension or un-install it.

  • [svn:fx-trunk] 11707: Fix incremental compilation problem with styles.

    Revision: 11707
    Author:   [email protected]
    Date:     2009-11-12 10:52:49 -0800 (Thu, 12 Nov 2009)
    Log Message:
    Fix incremental compilation problem with styles.
    QE notes: None.
    Doc notes: None.
    Bugs: SDK-24173
    Reviewer: Paul
    Tests run: checkintests
    Is noteworthy for integration: No.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24173
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java

    You have used elements like header, footer, footer1 and nav without using the correct DOCTYPE declaration. Replace the first line of your code with
    <!doctype html>
    Also have a look here for other problems http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fhome.surewest.net%2Fstorytales%2F test%2Fforposting.html
    After the above has been fixed, please come back here to fix the remaining problem(s)
    Gramps

  • I have a Iphone 4S and i update a new version 6.1, and i have a problem with wifi from i update this version. What is this problem? thanks Andres

    I have a Iphone 4S and i update a new version 6.1, and i have a problem with wifi from i update this version. What is this problem? thanks Andres

    Move or Copy the ENTIRE iTunes folder from the old computer or the backup of the old computer to the new computer.

  • Automatic page updates causing problems with your screen reader? this kind of message come when i access yahoo mail.yahoo mail page not come properly.

    Automatic page updates causing problems with your screen reader? this kind of message come when i access yahoo mail.yahoo mail page not come properly.i can't chat,compose mail nothing accessing.

    Try Refresh Blocker: https://addons.mozilla.org/firefox/addon/992

  • It keeps saying there's a billing problem with last purchase an to update payment method, but it keeps saying security code invalid. What do I do?

    It keeps saying there's a billing problem with last purchase an to update payment method, but it keeps saying security code invalid. What do I do?

    Type in the three digit code from the back of your credit/debit card to update your payment method/information. I had the same "security code invalid" response today... this is all it wanted me to do.

  • HT4848 Hi my name is Hajk and i got a friend that has a problem with her macbook, she gets a blue screen and cant log on. So i told her if she had an reinstall disk so that i could reinstall for her but she didn't get one with the macbook. what can she do

    Hi my name is Hajk and i got a friend that has a problem with her macbook, she gets a blue screen and cant log on. So i told her if she had an reinstall disk so that i could reinstall for her but she didn't get one with the macbook. what can she do ?

    If this is a fairly new Mac running either v10.7 Lion or v10.8 Mountain Lion she can use Lion or Mountain Recovery to repair the startup disk or reinstall OS X.

  • Hi, I have a problem with my ipad, I want to restore it but I can not. When I plug the ipad (off) it is not recognized by itunes, I turn the ipad, There are apple and the apple after you see the usb cable and itunes logo for just 1 minute and turns off an

    Hi, I have a problem with my ipad, I want to restore it but I can not. When I plug the ipad (off) it is not recognized by itunes, I turn the ipad, There are apple and the apple after you see the usb cable and itunes logo for just 1 minute and turns off and is no longer recognized by itunes.
    thank you for your help.

    Hi there beni_m,
    You may find the troubleshooting steps in the articles below helpful.
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/ts3281
    iOS: Device not recognized in iTunes for Mac OS X
    http://support.apple.com/kb/ts1591
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/ts1538
    -Griff W. 

  • Trying to get my fcp project to burn to dvd at the highest quality? Ive used compressor and then tried to put it in dvdsp put its not working. I am having problems with the audio or when i burn it , i cant play the dvd? any help would be appreciated

    Ive used compressor and then tried to put it in dvdsp put its not working. I am having problems with the audio or when i burn it , i cant play the dvd? any help would be appreciated

    I suspect you are attempting to burn an HD DVD, which will not play on a DVD player...
    But if you provide more details such as the settings you are applying in Compressor, then we would be able to provide you more accurate information.
    How are you adding the files to Compressor?
    In FCP, what are your footage properties (command-9) and sequence settings (command-0)

  • I can't start AE. Ae always shuts down. There is a Problem with the "AEDynamiclinkServer". I tried everything. But it doesn't work. How do I get AE back to work?

    I can't start AE. Ae always shuts down. There is a Problem with the "AEDynamiclinkServer". I tried everything. But it doesn't work. How do I get AE back to work?

    What "everything" have you tried?
    What exact version number (down to the last decimal) is your AE?
    What OS are you using?
    What are your other system specs?
    When did it work last? What happened between then and now?
    FAQ: What information should I provide?

Maybe you are looking for