Problem with importing jsp packages

Hi guys. I'm having a problem compiling a class that imports jsp packages.
I'm getting errors along the lines of:
C:\>javac HelloTag.java
HelloTag.java:4: package javax.servlet.jsp does not exist
import javax.servlet.jsp.*;
^
HelloTag.java:5: package javax.servlet.jsp.tagext does not exist
import javax.servlet.jsp.tagext.*;
- I've copied jsp-api.jar and servlet-api.jar to a folder that's in my path: C:\Program Files\Java\jre1.5.0_03\lib\ext
Any suggestion?
Thanks.

U have to add the path into the classpath
set CLASSPATH=%CLASSPATH%;jsp-api.jar ....
the compile in the same cmd window
Do not use the CLASSPATH environment variable. Use the -classpath option while compiling and specify the path to your jar file.
javac -classpath <path to jar file> filename.javacheers,
ram.

Similar Messages

  • Problem with importing my package in JSP

    This is the code for creating a package dbconnection:
    package dbconnection;
    import java.sql.*;
    public class DBConnection
         java.sql.Connection con=null;
         public void DBConnection(){ }
         public java.sql.Connection getDBConnection()
    try{
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con=DriverManager.getConnection("jdbc:mysql://localhost/empdetails?user=root&password=harish");
              }//try in DBConnection
         catch(Exception e)
                   e.printStackTrace();
         }//catch in DBConnection
         finally{
              return con;
              }//finally in DBConnection
         }//getDBConnection
         // Closing Connection to Database
    public void closeConnection()
         try{
              con.close();
              //System.out.println("Connection closed");
         } //try in closeConnection
         catch(Exception e)
              e.printStackTrace();
         } // catch in closeConnection
    } // closeConnection
    This is the code for testing the above package to know whether the package getsimported or not:
    import dbconnection.*;
    import java.sql.*;
    import java.util.*;
    public class Testing1 {
         dbconnection.DBConnection dbc = new dbconnection.DBConnection();
         Statement st=null;
         Connection con=null;
         ResultSet rs = null;
         ResultSetMetaData rsmd= null;
         public Testing1() { }
         public void getDBConnection(){
              con = dbc.getDBConnection();
              System.out.println("Connection created");
                   try
                   st = con.createStatement();
                   System.out.println("Statement Created");
                   } // try
                   catch(Exception e)
                   e.printStackTrace();
                   } // catch
    public Vector getDetails()
         Vector v = new Vector();
         String s = null;
         int size = 0;
    rs = null;
    try
         getDBConnection(); // Get DB Connection
         rs=st.executeQuery("select * from dept");
    rsmd = rs.getMetaData();
    size = rsmd.getColumnCount();
    System.out.println("Column Count is "+size);
              while(rs.next())
    for(int i=1;i<=size;i++)
    s = rs.getString(i);
    // System.out.println(s);
                   v.addElement(s);
         catch(Exception e)
              e.printStackTrace();
         finally
              // closeConnection(); // Close DB Connection
         return v;
    } // close getAddressDetails
    public static void main(String a[])
         Testing1 mo = new Testing1();
         Vector vx = mo.getDetails();
         Enumeration ex = vx.elements();
         String str;int i=0;
         while(ex.hasMoreElements())
              str = (String) ex.nextElement();
              System.out.println("value :"+str);
    Now this is working fine when we run it normally. I am able to get the query done.
    When I simply call the class in a small JSP file to test its not working.
    I want the solution very urgently...
    I also want to tell u that i am using Tomcat server for which the classpath is also set correctly.
    Thankx,
    harish..

    The path in which I placed my DBConnection.class file is:
    C:\Tomcat\jakarta-tomcat-4.0.6\webapps\examples\WEB-INF\classes\testYou are suppose to place your class file in the package 'dbconnection'.
    So, puit your DBConnection.class in,
    C:\Tomcat\jakarta-tomcat-4.0.6\webapps\examples\WEB-INF\classes\dbconnection.
    Sudha

  • Having Problem With Importing Another Package

    Hi, I work in a team. We have a division of labor arrangement. Under our project, each developer is assigned a sub-task. Each sub-task receives some input parameters from its upstream sub-task and generates some outputs for the downstream sub-task.
    All developers first work independently. Each of us has our own folder/pacakge in the Repository. Each of us makes an assumption on the values of the input parameters received. (We later on integrate all sub-tasks.)
    I generate my Java classes under a folder called "Orchestrator", and I access some classes under the folder/package called "common". Things go smoothly.
    Thereafter, I start accessing other folders/packages. I first retrieve other folders/packages from the Repository and then in the Eclipse Package Explorer View --> import --> Import Existing Maven Projects ... No problem. I have all other folders/packages in the Package Explorer View.
    However, when I start adding the import statements in my Java classes to access classes in other folder/package; for example,
    import company_name.overall_project_name.project_name.folder_name.subfolder_name.class_name;I have the compilation error: The import company_name.overall_project_name.project_name.folder_name cannot be resolvedFirst, I have no problem to access the "common" folder/package. The code I have below does not have compilation error and I am able to use the class that is imported:
    import company_name.overall_project_name.project_name.common.util.ParamsDictionary;Second, I have checked the consistency of path and folder name.
    Can anybody give me a clue? Thank you.

    user537770 wrote:
    Hi, I work in a team. We have a division of labor arrangement. Under our project, each developer is assigned a sub-task. Each sub-task receives some input parameters from its upstream sub-task and generates some outputs for the downstream sub-task.
    All developers first work independently. Each of us has our own folder/pacakge in the Repository. Each of us makes an assumption on the values of the input parameters received. (We later on integrate all sub-tasks.)
    I generate my Java classes under a folder called "Orchestrator", and I access some classes under the folder/package called "common". Things go smoothly.
    Thereafter, I start accessing other folders/packages. I first retrieve other folders/packages from the Repository and then in the Eclipse Package Explorer View --> import --> Import Existing Maven Projects ... No problem. I have all other folders/packages in the Package Explorer View.
    However, when I start adding the import statements in my Java classes to access classes in other folder/package; for example,
    import company_name.overall_project_name.project_name.folder_name.subfolder_name.class_name;I have the compilation error: The import company_name.overall_project_name.project_name.folder_name cannot be resolvedFirst, I have no problem to access the "common" folder/package. The code I have below does not have compilation error and I am able to use the class that is imported:
    import company_name.overall_project_name.project_name.common.util.ParamsDictionary;Second, I have checked the consistency of path and folder name.
    Can anybody give me a clue? Thank you.Well, seems like your classpath doesn't include those folders you are trying to access.

  • Trouble with itunes upgrade I receive an error message problem with windows installer package

    I am trying to upgrade itunes.  I am running windows vista 64.  Everytime I try to upgrade I get an error that says Problem with windows installer package.  Anyone know how to fix this?

    No drivers in LowerFilters.
    No drivers in UpperFilters.
    Failed loading CD / DVD drives, error -43. Try doing a repair install on iTunes from the “Add or Remove Programs” control panel.
    I'd start with the following document, with one modification. At step 12 after typing GEARAspiWDM press the Enter/Return key once prior to clicking OK. (Pressing Return adds a carriage return in the field and is important.)
    iTunes for Windows: "Registry settings" warning when opening iTunes

  • Problems with importing text messages from PC Suit...

    Problems with importing text messages from PC Suit 7.1.18.0 to my Nokia 5800
     I am trying to import a csv file that contains text messages (Note that this file was created using PC Suit 7.1.18.0) to a subfolder that I have created to My Folders but PC Suits only imports the text messages to the Draft folder. Note that initially it shows that the messages are import in the correct folder but after a refresh it shows them in the Draft Folder. Is their any setting that I should change in the PC Suit or the phone? My computer runs on Windows XP Service Pack 3 and the Nokia 5800 was upgraded to the latest firmware v20.0.012
     Thanks for your help

    Most phones only allows importing of draft and archived box for SMS.
    To do a restoring, you need to backup the SMS as a .nbu file using PC Suite and restore later.
    If you got an SD card, you can also do a backup on the SD Card (backup.arc) then restore later (reset and restore: backup.arc and mmc).
    What's the law of the jungle?

  • Tempo problems with imported wav files

    Hey everyone, sorry if there's a quick fix for this in the forums that I couldn't find, but I've been having some tempo problems with imported .wav files.
    Long story short, my system couldn't handle playing all the tracks for a song while recording drums, so I bounced out an mp3 of the song and put it in a new Logic file so my drummer could just play along to that as I recorded him. Unfortunately, the original song is at 167 bpm, but I forgot to change the bpm in the new Logic file with the .mp3 file of the song to 167 bpm, so it was left at the default 120 bpm.
    So, the drums were recorded at the correct 167 bpm, but Logic thinks that those new drum .wav files should be played at 120 bpm, so when I import my drum tracks back into the original file, they do not play correctly at all.
    I could get record it all again, but I wanted to check if there was a way I could salvage what I already have, since my drummer lives about an hour away right now and can't just come over whenever he wants.
    Thanks for the help! I really appreciate it.

    Hi,
    First, do not use MP3 in Logic, the sound quality is less than AIFF, WAV or CAF, and Logic has to decode it for playback, making it a heavier burden on the CPU than an uncoded audiofile, such as AIFF, WAV or CAF.
    Secondly, audio files are independent of Logic's tempo. If you bounce down an audio file in any format (other than Apple Loop), it will play back at the same speed, +regardless of Logics' tempo setting+, either at recording or playback. Logic doesn't 'think' anything. The BPM is only important to MIDI tracks, or to the spacing between audio files. The audio files themselves *are not affected* by the tempo setting. If you import an audio file of tempo 167 into a 120 BPM project, the file will still play at 167, only Logic will indicate the wrong bar positions.
    regards, Erik.

  • Problem with procedure in package

    Problem with procedure in package:
    create table accounts
    (acno number(10),
    name varchar2(20),
    balance number(10,2));
    create package banking is
    procedure new_acct(acno NUMBER, name IN VARCHAR);
    procedure acct_dep(acno IN NUMBER, amount IN NUMBER);
    procedure acc_wdr(acno IN NUMBER, amount IN NUMBER);
    procedure acc_bal(acno IN NUMBER, bal OUT NUMBER);
    function acc_drwn(acno IN NUMBER) RETURN BOOLEAN;
    end banking;
    create or replace package body banking is
    procedure new_acct ( acno IN number,
    name IN varchar) is
    begin
    insert into accounts
    (acno, name, balance)
    values
    (acno, name,0);
    end;
    procedure acct_dep(acno IN NUMBER,
    amount IN NUMBER) is
    begin
    update accounts
    set balance = balance + amount
    where acno = acno;
    end;
    procedure acc_wdr(acno IN NUMBER,
    amount IN NUMBER) is
    begin
    update accounts
    set balance = balance - amount
    where acno = acno;
    end;
    procedure acc_bal(acno IN NUMBER,
    bal OUT NUMBER) is
    begin
    declare cursor c_balance(i_acno IN accounts.acno%type) is
    select balance
    from accounts
    where acno = i_acno;
    acc_bal accounts.balance%type;
    begin
    if c_balance%isopen then
    close c_balance;
    end if;
    open c_balance(acno);
    fetch c_balance into acc_bal;
    close c_balance;
    end;
    end;
    function acc_drwn(acno IN NUMBER) RETURN BOOLEAN is
    begin
    declare cursor c_balance(i_acno IN accounts.acno%type) is
    select balance
    from accounts
    where acno = i_acno;
    bal accounts.balance%type;
    begin
    if c_balance%isopen then
    close c_balance;
    end if;
    open c_balance(acno);
    fetch c_balance into bal;
    close c_balance;
    if bal < 0 then
    return true;
    else
    return false;
    end if;
    end;
    end;
    end banking;
    begin
    banking.new_acct(123,'FRANKS');
    end;
    execute banking.acct_dep(123,100);
    execute banking.acc_wdr(123,50);
    Works fine up to this point, however when running the balance check the balance amount is not visible?
    SQL> set serveroutput on
    SQL> begin
    2 declare
    3 bal accounts.balance%type;
    4 begin
    5 banking.acc_bal(123,bal);
    6 dbms_output.put_line('Franks balance is '||bal);
    7 end;
    8 end;
    9 /

    procedure acc_bal(acno IN NUMBER,
       bal OUT NUMBER)
    is
    cursor c_balance(i_acno IN accounts.acno%type) is
       select balance
       from accounts
       where acno = i_acno;
       l_acc_bal accounts.balance%type;
    begin
       open c_balance(acno);
       fetch c_balance into l_acc_bal;
       close c_balance;
       bal := l_acc_bal;
    end;

  • Has anybody had the following error while trying to download iTunes 10.5? There is a problem with Windows Installer package. A program required for this install to complete could not be run.

    Has anybody had the following error while trying to download iTunes 10.5? There is a problem with Windows Installer package. A program required for this install to complete could not be run.

    Go to "control panel" then "add or remove programs".  Highlight "Apple software update"  Choose "change" click "Repair"  This should do the trick.  Then download and install iTunes 10.5 again.

  • Tried to install iTunes 10.5 this morning but an error appeared saying "problem with windows installer package. A program required for this install to complete could not be run." Can someone please help

    I tried to install iTunes 10.5 this morning but an error appeared saying "problem with windows installer package. A program required for this install to complete could not be run." Can someone please help

    Firstly, are you installing iTunes for the first time or are you updating your current version of iTunes?
    If you're installing iTunes for the first time have you tried redownloading the installer package? Perhaps the file you downloaded originally is corrupted...
    http://www.apple.com/itunes/
    If you've tried that, then try installing iTunes as your computer's administrator. To do this right-click the install package and choose "Run as administrator".
    If you're updating iTunes to the most recent version try repairing the Apple Software Update program on your computer. It's under the add/remove programs.
    1. Open the control panel
    2. Open Add/Remove programs (called "Programs and Features" in Windows 7)
    3. Navigate to "Apple Software Update" in the list and click on it
    4. Click on "Change" then select "Repair" (or just select the repair option in Windows 7)
    Once you repair this, try running iTunes and the update again.
    Fingers crossed!

  • Problem with import file type setting

    Problem with import file type settings - In preferences>general I select "wav encoder" But then going to tools>Create it still says "create mp3 version".
    Can't find a way to overcome this. Thanks for any help.

    Doublechecking, roy. After making the preferences change, are you leaving the General tab by clicking the OK button down the bottom-right-hand corner of the tab?

  • Hi, I have problem with importing MOV files from SJCAM 4000. MOV files are in supported formats for Adobe Premiere Elements 11. But if I'm importing MOV file, only audio part is imported, video part is not imported. How can I solve this problem?

    Hi, I have problem with importing MOV files from SJCAM 4000. MOV files are in supported formats for Adobe Premiere Elements 11. But if I'm importing MOV file, only audio part is imported, video part is not imported. How can I solve this problem?

    haben
    From looking at the specifications of your camera (SJCam 4000), we know already what video compression your camera is using. It is H.264.
    A H.264.mov file should be supported by Premiere Elements 11. On what computer operating system is your Premiere Elements 11 running?
    Do you have the latest version of QuickTime installed on your computer? And, are you running QuickTime and Premiere Elements 11 from a
    User Account with administrative privileges? Please go to Premiere Elements 11 Publish+Share/Computer/QuickTime to confirm that you find
    presets there for the QuickTime choice there.
    What are the properties of these H.264.mov files - is it 1080p30 (1920 x 1080p30)  or something else? Do you know if this camera is recording with a variable or
    a constant frame rate?
    Please review and consider and then we will decide what next.
    Thank you.
    ATR

  • HT1349 Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.

    Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.
    Would appreciate help...its driving me up the wall!!

    Perhaps let's first try updating your Apple Software Update.
    Launch Apple Software Update ("Start > All Programs > Apple Software Update"). Does it launch and offer you a newer version of Apple Software Update? If so, choose to install just that update to Apple Software Update. (Deselect any other software offered at the same time.)
    If the ASU update goes through okay, try another iTunes install. Does it go through without the errors this time?

  • Having trouble trying to install itunes 10.5. Receive message saying 'There is a problem with this installer package. A program required for this install to complete could not be found. Please contact product vendor'

    Having trouble trying to install itunes 10.5. Receive message saying 'There is a problem with this installer package. A program required for this install to complete could not be found. Please contact product vendor'

    Managed to get the installation sorted. Go to Control Panel, and where you have a list of all installed programs, repair all the Apple/Itunes related programs. Installation worked fine after that. Hopefully it helps you out too!

  • Problem with importing

    Hi all, I recently downloaded elements 11, and I imported some photos okay, but now it starts to import, gets about half way, and a box saying elements organizer has stopped working. When I went into problem details, it said appcrash. any ideas wot be goin on. (Im importing photos in raw) Regards. Paul.

    Thanks for the reply jon. I was only importing 152 pics. off my nikon camera. I re downloaded elements 7 on to the puter, and they went straight on there with no trouble, so I would of thought they would go straight on to elmnts. 11. ho hum.and strange.
    Date: Fri, 18 Jan 2013 04:58:39 -0700
    From: [email protected]
    To: [email protected]
    Subject: Problem with importing
        Re: Problem with importing
        created by 99jon in Photoshop Elements - View the full discussion
    Hi Paul  What are your system specs. Raw files are usually quite large so the process could be draining your memory (RAM). Are you importing from camera or from your hard drive. In the case of the latter try importing one folder at a time or in smaller batches. You can select files and drag and drop into the organizer. You must drop on the dark gray area between the left and right side panels (if both panel are visible).
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5003831#5003831
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5003831#5003831
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5003831#5003831. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Photoshop Elements by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Problems with import slides powerpoint

    Hello,
    I have a problem with import slides from the powerpoint, when
    I try to import, the computer blow.
    What I can do?

    there have been lots of issues regarding this, however, I
    have found that if I export my ppt as individual jpeg slides I can
    then use the "insert > Slide > Image Slide" command to bring
    in my ppt slides, I have tried everything else as well but what was
    happening to me was Captivate 3 was losing all of my text and text
    animation. Now my animation is not critical, however, the text is
    very important of course. So now I have stagnat slides, a bit
    boring but at least I was able to finish my project.
    Hope this helps.
    Tony :)

Maybe you are looking for

  • Issue with Sales office values in BI

    Hi Team,      We have a issue with the sales office values in a BI report. The report displays 7 sales office values for the division 01. Where as in ECC, we have only 6 sales office values exists for the same division 01. These sales office 7 has be

  • Testing of an inbound idoc.

    hi experts, i have to create an inbound interface for processing message order/ordchg.I have a .txt data file .how do i test my inbound interface so that the data in the text file is passed onto the inbound idoc? Valuable help will be rewarded. Regar

  • Product ID Double Click

    DPS Folio Producer website I'd like to second publishing If you double-click the Product ID section Oh, why does it open portfolio? Double-click was 40 times. I must write the name of Product ID. Product ID to enter in a different way there?

  • How to insert HTML5 rollover buttons into Dreamweaver

    i publish an HTML5 canvas out of Flash contaning a rollover button and now I want to insert it into my site in Dreamweaver, how do i do it?

  • Significance of ldap in ORACLE_HOME

    My ORACLE_HOME of the installed Oracle Server contains Perl, JDK, JRE and many other tools. It also contains ldap. Can anybody explan its significance and how can I use it in connection to ldap server.