I need to install servlet-api.jar in the libext folder.

Hi I am doing a tutorial on struts 2.0.11.
i need to install servlet-api.jar in the libext folder which I have created inside WEB-INF
Now I have downloaded servlet.api which is in the zip form.
When I extract the files. Its giving me two folders
1. javax
2. META-INF
Inside javax there is a folder called servlet. Inside servlet folder there are
a) bunch of call files
b) http folder
c) resources folder
Inside http folder there are
a) class files
b) properties files
Inside the resources folder there are
a) dtd files
b) xsd files
Inside the META-INF folder there is the manifest.mf file
I just need servlet-api.jar
I think that I have extracted the contents of servlet-api.jar by using the extract feature of winzip.
Do you think that by just changing the extension of the file from servlet-api.zip to servlet-api.jar it will do the trick or do i need to do something else.
Please guide

pksingh79 wrote:
Hi ^^,
your replies were very helpful. I did try to check the lib folder of the webserver and there was not servlet-api.jar. However I downloaded a dummy project and it did have servlet-api.jar in it, so I am ok for now.
thanks and regards,
PrashantYou should not be doing that. Always use the one from the application server which you're going to use. Otherwise you will possibly get in runtime trouble due to version differences.
The actual location and filename of the servlet API might differ per application server implementation. If it was for example Tomcat 6, it is the servlet-api.jar in the /lib directory. If it was for example Glassfish (the current release), then it is the javaee.jar in the /lib directory.

Similar Messages

  • I FOUND : servlet-api.jar ...WHERE insert it to can compile SERVLETS

    I FOUND : servlet-api.jar in TOMCAT 6
    WHERE insert it to can compile SERVLETS ?
    where added(directory), some folders follow...?
    C:\Program Files\Java\jdk1.6.0_15\bin
    C:\Sun\AppServer\lib
    C:\Program Files\Java\jdk1.6.0_15\src\javax

    You can use any of the following methods:
    i) SET CLASSPATH variable with absolute path of your servlet-api.jar and then compile your servlet from any folder.
    ii)you can use
    C:\jdk\bin>javac -cp C:\tomcat\lib\servlet-api.jar SampleServlet.javaand after comilation put the compiled java class file to classes folder of you web application.
    [Obviously if you have any package, then you need to maintaing that folder structure inside classes folder]
    Here I assumed your javac is available at C:\jdk\bin folder and servlet-api.jar is available at C:\tomcat\lib folder
    ---Sujoy

  • Once i set classpath to servlet-api.jar, it doesnt Instantiate DbBean.

    I am using notepad editor. I am trying to instantiate a DbBean class inside the servlet's init() method.
    once i set (C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar) this path to compile the Controller servlet.
    C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\WEB-INF\classes>set classpath=C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar
    C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\WEB-INF\classes>javac Controller.java
    Controller.java:5: package bean does not exist
    import bean.DbBean;
    ^
    Controller.java:14: cannot find symbol
    symbol : class DbBean
    location: class Controller
    DbBean dbbean = new DbBean();
    ^
    Controller.java:14: cannot find symbol
    symbol : class DbBean
    location: class Controller
    DbBean dbbean = new DbBean();
    ^
    3 errors
    C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\WEB-INF\classes>
    this is my servlet
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import bean.DbBean;
    public class Controller extends HttpServlet
    public void init(ServletConfig config)throws ServletException
    ServletContext context = config.getServletContext();
    context.setAttribute("base_url",config.getInitParameter("base_url"));
    {color:#ff0000}DbBean dbbean = new DbBean();{color} {color:#0000ff}error showing in this line
    {color}dbbean.setDburl(config.getInitParameter("dburl"));
    dbbean.setUserName(config.getInitParameter("username"));
    dbbean.setPassward(config.getInitParameter("pwd"));
    /// database bean can be access from jsp page
    context.setAttribute("dbbean",dbbean);
    /// Load the data base driver
    try{
    Class.forName(config.getInitParameter("jdbcDriver"));
    catch(ClassNotFoundException e)
    System.out.println(e.toString());
    super.init(config);
    public void doGet(HttpServletRequest req, HttpServletResponse res)throws ServletException,IOException
    doPost(req,res);
    public void doPost(HttpServletRequest req, HttpServletResponse res)throws ServletException,IOException
    String base = "/onlinetest1/";
    String url = base + "login.jsp";
    String action = req.getParameter("action");
    if(action!=null)
    if(action.equals("successlogin.jsp"));
    url = base + "successlogin.jsp";
    RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(url);
    dispatcher.forward(req,res);
    public void destroy()
    System.out.println("Servlet stopped");
    This below class can be put inside bean folder( (ie)sub dir of controller servlet)
    package bean;
    import java.sql.*;
    import java.util.*;
    import java.io.*;
    public class DbBean
    String dburl="";
    String dbuser="";
    String dbpass="";
    public void setDburl(String url)
    dburl = url;
    public void setUserName(String uname)
    dbuser = uname;
    public void setPassward(String pwd)
    dbpass = pwd;
    What to do to rectify this, please help me why this error coming,

    hi,
    Actually i did my ordinary package compilation example below, its run correctly, but after set classpath to %tomcat-home%\common\lib\servlet-api.jar(for same programs its not working) this kinds of error coming.
    F:\shyam\test>javac first.java
    F:\shyam\test>java first
    main class
    DB Set Correctly
    F:\shyam\test>set classpath=C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar
    F:\shyam\test>javac first.java
    first.java:1: package bean does not exist
    import bean.DbBean;
    ^
    first.java:10: cannot find symbol
    symbol : class DbBean
    location: class first
    DbBean dbbean = new DbBean();
    ^
    first.java:10: cannot find symbol
    symbol : class DbBean
    location: class first
    DbBean dbbean = new DbBean();
    ^
    3 errors
    F:\shyam\test>
    In compilation it wont take DbBean class, please help me.
    thanks in advance,
    S.Shyam

  • HT3669 I only have a HP printer and why I need to install a file for all the HP printers drivers 590MB??? if normally the size of my file should be 5MB.  some one could me help to avoid installation of 590MB for my new mountain lion software???

    Hi guys..!!
    I would like to know if someone could help on this:
    I just have a HP printer (HP Designjet 100) and for some reason I need to install a file for all the HP printers drivers in total 590MB to be able to use my printer in my mountain lion???
    If normally the size of my files in the for previous software was more or less 5MB why now i need to install 590?
    Some one could help me how to avoid installation of 590MB for my new mountain lion software???
    Thanks

    If you go to http://support.apple.com/downloads and locate the HP Printer Drivers installer, you will find that it is 473.4 MB (for version 2.11). If you install this, it will install the full set of drivers for every model of HP printer that is supported by the drivers distributed through Apple. The disk space occupied once installed will probably be larger than the download, since the downloaded file is compressed.
    On the other hand, if you have an HP printer connected and you use Software Update (or the Update tab in App Store), that should offer you a much smaller set of HP drivers, which are only applicable to your printer (and possibly a few similar ones). These updates are typically only tens of megabytes rather than hundreds of megabytes.
    If Software Update doesn't offer you any HP drivers then it either thinks you have the latest drivers installed already, or the printer model is not supported by the drivers available from Apple.
    This article lists all of the printer models for which Apple distributes the driver:
    http://support.apple.com/kb/HT3669

  • Hi, I need to install Adobe Flash Player because the version I have installed in my Mac Os is old, but I can´t because I need to write my email and my password and I don´t remember my password, so what can I do?

    Hi, I need to install Adobe Flash Player because the version I have installed in my Mac Os is old, but I can´t do it because I need to write my email and my password and I don´t remember my password, so what can I do? Thank you

    The email and password will be the ones for your computer's security, not something for any Adobe product.  You might need to consult Mac customer support if you are unable to determine the required information.

  • [svn] 1985: use the asc.jar in the lib folder when running the asc tests

    Revision: 1985
    Author: [email protected]
    Date: 2008-06-06 12:20:06 -0700 (Fri, 06 Jun 2008)
    Log Message:
    use the asc.jar in the lib folder when running the asc tests
    Modified Paths:
    flex/sdk/trunk/build.xml

    You may want to use the filtering classloader. See the doc at http://e-docs.bea.com/wls/docs92/programming/classloading.html#wp1097187

  • INSTALLING SERVLET API

    How do I install the servlet api?

    The servlet api gets installed with any web server that you install. For example if you are installing Jeeves(Java Web Server) you will find a file called servlet.jar which contains all the servlet classes. The path is ./JavaWebServer2.0/lib/servlet.jar.
    Hope that helps.
    Regards
    Jaydeep

  • Question about using JavaMail API to read the calendar folder...

    Hi,
    I've made an application that goes to the mail server, fetches all mails in the calendar folder and tells you the meetings you have in a particular day.
    I'm using JavaMail API for this. My problem is that the application is very slow because I'm forced to fetch (one by one!) the contents of every message.
    My question is: How can Outlook show so fast the mettings you have? Do they have a specific API that allows them to get the right info by only calling certain methods? Is there something similar in Java?
    Thaks for your help!
    Note: I use method:
    folder.fetch(allMessages, fetchProfile);howerver the fetchProfile class does not allow me to specfy that I want to dowload the contents of the message (you only can specify the content_info); specifying all headears does not help me either.

    Clarification:
    The VI you have posted will work as following:
    1) The task will read 2 analog inputs (ai0, ai3).
    2) The acquisition starts, oncece digital signal (trigger) is detected on PFI0
    3) The sampling rate will be as specified in "rate" control - it is continuous analog input acquisition, which means that after trigger is received (point 2), the board will start to generate hardware clock with frequency you specify as "rate"
    4) with each rising edge of that hardware clock, the measurement is taken, and stored into buffer of driver.
    5) DAQmx read will try to read "number of samples per channel" number of samples each time is called - and if there is not enough measurement stored in buffer (step 4), then DAQmx read will wait until DAQ card will measure reaquested number of samples (or timeout occurs before requested number of samples has been acquired)
    6) DAQmx read will be then called 1000 times - so totaly you will read 1000 * "number of samples per channel"  number of samples.
    You do not have to be worried about speed of the loop. In fact, if you need to read just 1000 samples, with 1kS/s, then you can remove for loop and you can change measurement mode from continuous to finite samples, and specify number of samples to read to be 1000. You will read them all properly. I recomend you to read User Manual for your DAQ device - lets say M Series User Manual.
    I hope it is clear now.
    regards,
    stefo

  • Installing Servlets API

    How do i do this, i've got the download with all the classes but i can't find and instructions anywhere, i assume i have to install it into the jdk directory but where in it??
    i've tried the bin directory and it doesn't like that ....
    ideas?

    Hi, ashcarrot,
    There'r different implementations and versions of Servlets. The J2EE Reference Implementation includes the Tomcat implementation of Servlets (c below), and J2SE does not include Servlet technology.
    I assume u have installed the standard edition SDK/JDK. This is the download page from Sun for Servlet technology:
    http://java.sun.com/products/servlet/download.html
    The Tomcat 4.0.4 link is no longer valid and u could go to the Tomcat homepage to download the latest Tomcat 4.1.12 and find detailed information on installation:
    http://jakarta.apache.org/tomcat/index.html
    Jack

  • Need to install Adobe Reader to a 64 bit folder and not (x86) default 32 bit folder

    Hi
    We have a program on our system which searches on local machines for their Adobe Reader in able to open up a pdf. Only one pc on our network is 64 bit and of course when installing Reader will default install to C:\Program Files (x86).
    We need to be able to install AR to C:\Program Files to allow the databse to work on this 64 bit pc.
    I have tried using the cmd feature and also adobe customisation wizard but to no avail.
    Is there any way to change folder location on install?
    Many thanks

    The software is wrong? How do you mean?  The software by default tells the users computers to use Adobe Reader to open up the created pdf files by this program. This program has been designed for a specialist purpose and cost thousands. Unfortunately the default location is under the 32 bit directory which is Program Files on all the 32 bit machines which is just fine. Now we need the 64 bit pc to be able to run this software but changing the default location of where to find adobe reader would mean the 32 bit pc's would not work. To add another location would mean the designer of the program charging another huge amount (approx £300).
    All I am asking is there anyway installing AR can override the default location in a 64 bit pc and put adobe in C:\Program Files as if it were a 32 bit pc?
    Many thanks for replies so far

  • Do i need to install a v-ram in the ram bit of my emac ?

    Hi
    Im abit confused.....!
    I bought this emac in nov 2002 - and i do alot of video conversion work - 5 yrs down the line.
    do the slots in my RAM slot area only take RAM or do they also take what i think is called
    v-ram (Is this also a 'pci card' ??) and if so should i install some ?
    yours confused
    d

    The the two DIMM slots under the access hatch on the bottom of the eMac are for the computer's RAM. The graphics "card" (actually a chipset on the main logic board) has soldered video RAM and cannot be upgraded. A PCI card is different from either computer or video RAM; different types of cards (mainly video cards, but there are other kinds) can go into computers that have PCI slots, but the eMac has no PCI slots.

  • Switching computers and need to install Photoshop and lightroom on the new computer. I own the products.

    Hello. How can I do this? Do I need to deactivate it on the old machine?

    You are allowed to have two activated installations, so if you prefer you can keep the original installation intact.  If you prefer not to then the minimum you need to do is deactivate it.
    Downloads:
    CS3 - http://helpx.adobe.com/creative-suite/kb/cs3-product-downloads.html
    CS4 - http://helpx.adobe.com/creative-suite/kb/cs4-product-downloads.html
    CS5 - http://helpx.adobe.com/creative-suite/kb/cs5-product-downloads.html
    CS5.5 - http://helpx.adobe.com/creative-suite/kb/cs5-5-product-downloads.html
    CS6 - http://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html
    Lightroom - all versions
    Windows
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Windows
    Mac
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Macintosh

  • Is there a way to search for a specific keyword within the sites to which the bookmarks are linked? I need to search all linked sites in the bookmark folder without having to open each page and "find" manually.

    Currently, I must browse through 50 or so bookmarked pages to see if a specific topic is covered. I would like to be able to search all bookmarked pages at once for a specific keyword. For example, if I have 50 news sites bookmarked and I would like to see which pages have the word "tuna" in them, I would need to open each page individually and do a "find". If I could search all of those pages at once, then I would save an immense amount of time. I have looked on the add-ons and found nothing...

    1. Create a smart album and in the drop down in the top right corner select file status
    2. Check mark the file status box and select 'Offline'
    Now you should have all your 'Offline' (Yellow Exclamation and/or Red Slash) files.
    To reconnect..
    1. Select the missing files.
    2. Go to File and scroll to Manage Referenced Files
    The dialog box will have one of the photos selected
    3. Select the drive and folder that contains the referenced file and select it
    4. Click 'Reconnect All'
    This might not reconnect all of them, but the dialog box will still be open and you can reconnect the ones left.
    Narvon
    Message was edited by: Narvon

  • Is there any API to obtain the current Folder ID where the user is located??

    how can obtain the current folder id where the user is?
    tks in advance

    Folder Id is one of the attributes you can pass to a custom item
    type procedure. In the custom item type, go to the Procedures
    tab. At the bottom of the page, under "Pass Attributes as
    Parameters" select Folder Id from the list. Under "Pass As" you
    have to provide the name of the parameter in your custom
    procedure.
    For example, here is a procedure that displays a list of
    subfolders for a given folder:
    <pre>
    create or replace procedure SCOTT.DISPLAY_SUBFOLDERS AS
    p_folderid IN VARCHAR2,
    p_siteid IN VARCHAR2)
    as
    begin
    for c in
    (select '<a href="PORTAL30.wwv_main.main?p_cornerid=' || f.id
    || '&p_siteid=' || f.caid || ">'
    || f.display_name || '</a>' theURL
    from portal30.wwsbr_all_folders f, portal30.wwv_user_corners c
    where c.id = f.id
    and c.parentid = p_folderid
    and f.caid = p_siteid ) loop
    htp.p(c.theURL || '<br>');
    end loop;
    exception
    when others then
    null;
    end;
    </pre>
    This procedure takes both the folder id and the site id as
    parameters.
    Regards,
    Jerry

  • How to install servlet classes in order to compile a simple servlet...

    When trying to compile a simple servlet (java file), I get errors having to do with not finding any object of the javax.servlet class. I am using J2SE v.1.4, and from what I know, it does not have built-in support for Servlets-JSP.
    Do I need to install myself the servlet classes (downloaded from Sun's site) in order for my servlet to be able to compile and work under tomcat? And if so, where should I put them? Or is there something else I have to do?
    Thank you in advance for your assistance!

    If you have Tomcat already, the files you require are in:
    (Tomcat4)
    [TOMCAT_HOME]/common/lib/servlet.jar
    or
    (Tomcat5)
    [TOMCAT_HOME]/common/lib/servlet-api.jar
    [TOMCAT_HOME]/common/lib/jsp-api.jar
    This file needs to be added to your classpath when compiling a servlet.

Maybe you are looking for

  • Report generation toolkit VI error when running EXE

    A VI inside the Report Generation Toolkit (version 1.1.2), Excel Find Application Directory.vi, will not function correctly when running an EXE.  The "Current VI's path" block will return the path of the currently running EXE rather than the path of

  • Cannot add files to iPod

    Hi, I have an 80GB iPod Classic. I use Windows 7 and Windows XP. When I try adding media to it through iTunes, it freezes, and I have to disconnect my iPod to make my PC work again. When I disconnect, it says "The iPod 'Shivangi's iPod' cannot be syn

  • I can't use my photoshop because when I open it inmetely the sistem shut it down

    When I open photoshop inmediately the sistem shut it down tellling me that there was a problem and I have to close the program, what might be causing this problem?@

  • How to properly get rid of the SATA drives in "Safely Remove Hw"(systray Icon)

    If you have the nvidia ide and or raid enabled (using the nv/sw ide driver) you have the drives listed under add/remove hw icon in systray . To have it gone from now and forever use this dword in registry . Code: [Select] Windows Registry Editor Vers

  • ABAP API' s Problems

    Hi All, I am trying to retrieve data from MDM using ABAP API's . I am stuck with couple of scenarios: 1.How can we pass Boolean field to retrieve the data from MDM?  2. I  need pass a date value ....the last updated date should be greater than last j