Servlet API Specification

Can someone tell me which Servlet API Specification
is supported in JDeveloper 3.1?
2.0, 2.1, or 2.2?
Thanks a lot,
Raymond

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by John - JDeveloper Team:
You can determine this easily by adding
the following lines of code to your
Servlet's doGet() method.
Add...
ServletContext sc = this.getServletConfig().getServletContext();
out.println( "Servlet Engine Version is " +
sc.getMajorVersion() + "." + sc.getMinorVersion() );
This is ofcourse the runtime server environment's version, you can still develop
servlets for other versions, but can not
rely on the new features when running and
debugging in JDeveloper.
However, the real need is for the target
host.
But to answer your question directly,
On JDeveloper 3.1, when I run a servlet
containing the above code,
I see the result:
Servlet Engine Version is 2.1
John - JDeveloper Team<HR></BLOCKQUOTE>
Thanks for your informaiton!

Similar Messages

  • SAP Netweaver 7 - Supported Servlet API version?

    For SAP Netweaver 7 platform, please let me know the supported Servlet API version?
    Specifically, is Servlet API 2.4 supported?

    Hi,
    It isn't supported by 7.0, the version of 7.0 is 2.3 (JEE 3)
    Best regards

  • Servlet API 2.4

    I would like to download a copy of Servlet API 2.4 class files. I know that Servlet API 2.4 is part of the J2EE 1.4 download, but I really don't want (or need) the entire J2EE. So far, all I've been able to do is download the specification.
    There is a link to download Servlet API 2.3 class files, which I am currently using with NetBeans 4.1. I would like to add v2.4 to my NetBeans library.
    Does a link exist to download the Servlet API 2.4 class files and dox? If so, where can I find it? Any help would be appreciated.

    Hi Martin,
    Ivo is right. Web AS 6.40 is J2EE 1.3 compliant and implements Servlet 2.3 specification. In Servlet 2.3 API it’s not explicitly said that the contextInitialized() method in ServletContextListener interface should be called before any servlet or filter is initialized. In this release the ServletContextListeners are notified of context initialization after servlet and filter initialization and thus informing them that web application is ready to process requests.
    Unfortunately there is no workaround as it is implementation dependent, and of course of reasons for backwards compatibility such changes could not be done.
    What concerns your second question is that the J2EE 1.4 (hence, servlet 2.4 API) support is planned for the next release of the Web AS. In that release the contextInitialized event will be thrown before any servlet or filter is initialized.
    Regards,
    Diyan

  • Weblogic 6.1 and Servlet API 2.3

    Dears All,
    could you confirm weblogic v6.1 can support J2EE v1.3 and especially Servlet API v2.3 ?
    Our war deployment is fine (v2.3 seems supported) but queries about major/minor versions in Web application Context return v2.2.
    Are some upgrade or deployments specifications required ?
    Thanks,
    Bruno

    AFAIK 2.2.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              +1.617.623.5782
              WebLogic Consulting Available
              "Tajdar Siddiqui" <[email protected]> wrote in message
              news:3b043919$[email protected]..
              >
              > I read somewhere that Weblogic 6.0 supports Servlet Api 2.3 ( which in
              turn support
              > http Filters etc.).
              >
              > I searched the Weblogic docs site for 6.0 and there is no mention of
              Servlet Api
              > 2.3 over there. Can someone pls. validate this.
              >
              > Thanx,
              > Tajdar
              

  • Determine servlet api?

    How does one determine which servlet API their application server is running?

    You could try to access newer methods/classes
    Try this out.
    try {
       Class cls = Class.forName("javax.servlet.http.HttpSessionListener") ;
    }catch(Exception e)
       System.out.println("Using Servlet API 2.2 or less") ;
    }etc. Check the @since comment in the Servlet API for other Release specific classes/methods (2.2 HttpSession.getAttribute).

  • 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.

  • How to insert the new Servlet Api Class files?

    Hi,
    I need to know how do I add the Servlet Api Class to my java directory
    after i download it from the net? Thanks for your help in advance!

    niceguyme,
    If you downloaded the J2EE 1.3.1 API and installed it to (for example) c:\j2ee131, then what you need to add to your class path is:
    c:\j2ee131\lib\j2ee.jar
    I also add c:\j2ee131\lib\ejb10deployment.jar to the classpath, but it is not necessary.
    there are several ways to add these to your classpath. It depends on what Operating System you are using. On windows 98 type OS, you can edit the autoexec.bat and add these directly to your already existing classpath. Windows NT,2000, and XP: you can add them to the system environment variables classpath. Hopefully you know how to do this on your machine. What I like to do on the windows machine is create a batch file that will start it from within a command prompt. I do this because there are times when I need to compile my code using different versions of the Java api. I am enclosing an example of one for J2se1.4.1 and j2ee1.3.1.
    contents of java141.bat
    @ECHO OFF
    ECHO JDK 1.4.1 and J2EE 1.3.1 are current versions
    set HOLD_CP = %CLASSPATH%
    set HOLD_PATH = %PATH%
    set CLASSPATH=.
    set CLASSPATH=%CLASSPATH%;e:\jdk14\jre\lib\rt.jar
    set CLASSPATH=%CLASSPATH%;e:\jdk14\lib\dt.jar
    set CLASSPATH=%CLASSPATH%;e:\jdk14\lib\tools.jar
    set CLASSPATH=%CLASSPATH%;e:\jdk14\lib\htmlconverter.jar
    rem **** J2EE STUFF ****
    set CLASSPATH=%CLASSPATH%;e:\j2ee131\lib\j2ee.jar
    set CLASSPATH=%CLASSPATH%;e:\j2ee131\lib\ejb10deployment.jar
    set CLASSPATH=%CLASSPATH%;%HOLD_CP%
    set PATH=e:\jdk14\bin
    set PATH=%PATH%;"C:\Program Files\TextPad 4"
    set PATH=%PATH%;c:\windows\command
    set PATH=%PATH%;%HOLD_PATH%I hope this helps.
    TJJ

  • IllegalStateException: strict servlet API: cannot call getWriter()

    I am getting an exception in Weblogic when I am trying to display a pdf file in a web page.
    java.lang.IllegalStateException: strict servlet API: cannot call getWriter() after getOutputStream()
    I am using the following code code
    ByteArrayOutputStream baos;
    ServletOutputStream out = response.getOutputStream();
    baos.writeTo(out);
    I have seen this error in so many discussion forum and there is no proper solution for this error.
    I am able to see the pdf page even with this exception. But I want to get rid of this exception also from Weblogic.

    I just did a quick (and dirty!) test with the following to display a jpg image and it worked for me without any trace of an exception:
        @Override
        protected void doGet(HttpServletRequest request, HttpServletResponse response)  throws ServletException, IOException {
            response.setContentType("image/jpg");
            File f = new File("/Users/me/Desktop/IMG_0032.JPG");
            byte[] bits = new byte[(int) f.length()];
            FileInputStream fos = new FileInputStream(f);
            fos.read(bits);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            baos.write(bits, 0, bits.length);
            baos.writeTo(response.getOutputStream());
            baos.close();
            fos.close();
        }Note that there is no call anywhere to response.getWriter() in that.
    I'd guess the exception is directing you at what the problem is, at least as the server is seeing it -- somewhere in the execution of the request path there would appear to be call to response.getWriter() occurring after a call to response.getOutputStream() has been called, which is not permitted on WLS according to the error message.
    Do you use filters on this app? If response.getWriter() has been called on the same response object in a post request filter phase, that would be on the same call path with the same response object and would result in the exception.
    -steve-

  • How to use the servlet api

    I can't compile servlet code because it doesn't recognize the http... classes.
    I downloaded the servlet api but don't know what to do with it (unziped it but no installation!)
    please help

    I can't compile servlet code because it doesn't
    recognize the http... classes.
    I downloaded the servlet api but don't know what to do
    with it (unziped it but no installation!)
    please helpI am having the same problem... i am running windows 95 (unfortunately) and have installed the jsdk1.3.
    These are my autoexec.bat entries
    SET PATH=c:\jdk1.3\bin
    SET JAVA_HOME=C:\jdk1.3
    set classpath=c:\jdk1.3\lib;c:\jdk1.3\jre\lib\ext\servlet.jar%classpath%
    I am still not able to compile a servlet program though.
    Any ideas?
    Much appreciated!!!!
    -Charlie

  • Oracle Database Lite API Specification JDBC

    Hello.
    I would like to create a schema with Oracle Database Lite API Specification.
    I have done a script to create an application in the Mobile Server in this way:
    "Platform p = new Platform("WINCE_ARMV4_US_OLITE_STD42");"
    "Application app = new Application(nombre_app, ruta_virtual_app, p);"
    And using ConsolidatorManager for the conection:
    "ConsolidatorManager cm = new ConsolidatorManager();"
    "cm.openConnection(user, password, dir_repository);"
    But after that, I can't get the application. Could you help me, please?
    Thank you.
    With best regards.

    Is this subscription parameter causing a problem?
    unless the subscription parameter name is referenced in the select statements for any of the publication item definitions, it will be ignored by the processing as the subsetting parameters are just used to supply values for bind variables at query time
    If you have other valid subsetting parameters for the user, then try (if all your set up is done via APIs and you do not have an APPLICATION, only a PUBLICATION, this may not work)
    1) go into the mobile manager > users
    2) search for user name, and click on the link under the user name
    3) go to subsetting parameters and pick a valid one
    4) select the data and do cntrl C cntrl V (cut and paste)
    5) press the save button
    The above has the effect of resetting the user account, and refreshes sequence values, c$all_client_items etc.
    If you can do the above steps, but this does not remove the subsetting variable, you should be able to go to it and set the value to NULL
    I do not think that there is a delete function due to the dependancy to the select statements which would be complex to validate

  • Setting session timeout in servlet API 2.0 - based JSP (Apache/JServ)

    I'm using Apache/JServ (servlet API 2.0) to run JSPs. At present, a session becomes invalid after 30 minutes of inactivity. How can I increase or decrease this time?
    Thanks.

    You can set by using this command in JSP or servlet
    session.setMaxInactiveInterval(1800);
    replace 1800 (this is in seconds) with the number you want
    Suresh

  • Strict servlet API: cannot call getOutputStream() after getWriter()

    i have an applet which will communicate with a servet ,  but got following error in the servlet
    java.lang.IllegalStateException: strict servlet API: cannot call getOutputStream() after getWriter()
    at weblogic.servlet.internal.ServletResponseImpl.getOutputStream(ServletResponseImpl.java:280)
    at oracle.osl.lt.web.servlets.AudioServlet._processGetPlayList(AudioServlet.java:235)
    at oracle.osl.lt.web.servlets.AudioServlet.doPost(AudioServlet.java:91)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.wls.filter.SSOSessionSynchronizationFilter.doFilter(SSOSessionSynchronizationFilter.java:276)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    SUBSYSTEM = HTTP USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101020 MACHINE = p1dvosl02 TXID = CONTEXTID = TIMESTAMP = 1318836952580
    WatchAlarmType: AutomaticReset
    WatchAlarmResetPeriod: 30000
    >
    *below _processGetPlayList() is called by doPost() of the servlet.*
    seems the exception is thrown due to response.getOutputStream()?
    any idea? thanks!!
    private void _processGetPlayList(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    try {
    ObjectOutputStream objectOut =
    new ObjectOutputStream(new BufferedOutputStream(response.getOutputStream()));
    try {
    RichDataDTOExt richData = _getRichData(request);
    if (richData == null) {
    Log.web().debug(s7);
    throw new ServletException(s7);
    objectOut.writeObject(richData.getAudioRecordings().getAll(new ContentRefDTO[0]));
    finally {
    objectOut.close();
    catch (IOException e) {
    Log.web().error(e.getMessage());
    throw new ServletException();
    }

    thanks for you reply. but seems we don't call getWriter() at all in our code.
    actually this error only happen in our customer's env, no this issue in our development env.
    besides using getOutputStream() and getWriter() simultaneously for same response, is this maybe related with some web server configuration?

  • Where can I get a java API specification for jdk 6 update 7?

    Where can I get a java API specification for jdk 6 update 7?
    About jdk-6u7-windows-i586-p.exe

    Flying_eagle wrote:
    I don't know what is it called. I think maybe it's a specification about api that lists java api and explains how to use them.
    Such as a html file just like a dictionary.Well, the API documentation I posted a link of in reply #1 is not an explanation of how to use the Java classes. It is more a reference. When you need a thorough explanation, I recommend doing some tutorials, or buying a book.

  • 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

  • Where can I find the API specifications??

    Hi,
    I have been searching on the SUN website for the API specifications for J2ME. However so far I did not have any luck!
    I found the following document that can be seen from this link:
    http://java.sun.com/j2me/docs/pdf/cldc11api.pdf
    However I went to search for the Form class in this document but could not find it. Therefore I searched on Google for J2ME API, however I could not find anything either.
    Can someone please refer to me from where can I find the J2ME API specifications? Because without them I can hardly develop anything
    thanks & regards,
    sim085

    Download the sun WTK 2.2 and look in the docs folder

Maybe you are looking for