Servlet error: Error instantiating servlet

I have a relatively simple project that uploads a zip file to a servlet, however, when POST to the servlet I suddenly started getting the following error:
500 Internal Server Error
Servlet error: Error instantiating servlet 'ConfirmSiteReport'. Servlet class uploader.ConfirmSiteReport not found in web-application SiteReport-Uploader-webapp
I've checked the web.xml and have not found anything wrong, and I dont recall changing anything in the project config when this error started, and the class file is in the classes directory.:
<servlet>
<servlet-name>ConfirmSiteReport</servlet-name>
<servlet-class>uploader.ConfirmSiteReport</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ConfirmSiteReport</servlet-name>
<url-pattern>/confirmsitereport</url-pattern>
</servlet-mapping>

Using version 10.1.3.1. I commented everything out and printed out a simple hello world and the servlet worked, when I uncommented everything it throws a 500 error with no log entries, warnings, or anything. I'm thinking something I'm importing is conflicting with the OC4J servlet container.
package uploader;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringReader;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;
import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

Similar Messages

  • Application Server Control - Servlet error: Error instantiating servlet

    After migrated oracle ias to 10.1.2, I have problem access Application Server Control <serverip:1810>. The error from the web is
    "500 Internal Server Error
    Servlet error: Error instantiating servlet 'console' (servlet class not found, make sure it exists at /oracle/iasdev/sysman/webapps/emd/WEB-INF/classes/oracle/sysman/eml/app/Console.class, in a jar in /oracle/iasdev/sysman/webapps/emd/WEB-INF/lib/, in an orion-web.xml specified classpath or global server classpath)
    I checked in /oracle/iasdev/sysman/webapps/emd/WEB-INF/lib/, there are may .jar files as below
    bc4joem.jar
    d4o.jar
    disco_dsc.jar
    disco_dsc_smi.jar
    discoconfig5.jar
    emd.jar
    emdjsp.jar
    formsConfig.jar
    frmem.jar
    frmem_jsp.jar
    frmemplugin.jar
    iview.jar
    jcb.jar
    junit.jar
    log4j-core.jar -> /oracle/iasdev/sysman/jlib/log4j-core.jar
    ojpse_2_1_5.jar
    oracle_forms_rb.jar
    portalEMD_jsp.jar
    reportsConfig.jar
    reports_emd.jar
    reports_emdjsp.jar
    ssoEMD_jsp.jar
    ultrasearch_emdjsp.jar
    usca.jar
    webcachecfg.jar
    wireless_admintool.jar
    wireless_sysmgr.jar
    I wonder any settings need to be fixed/added ? please help ?

    Do you think you can reconfigure the EM, using something like this below, actually i use this for Database, but I am sure with few changes you should be able to reconfigure application server EM.
    $ORACLE_HOME/sysman/admin/emdrep/bin/RepManager -connect <TARGET>
    -sys_password <password> -action drop emca -config dbcontrol db
    -repos create –cluster
    Thanks
    Amit

  • Error Instantiating servlet

    Created a new server however i get the following error message:
    Servlet error: Error instantiating servlet *"ServletName"*
    Any advice on this?
    Edited by: AgentLeo on May 18, 2009 11:30 PM

    We are running into the same problem !!
    Have you guys mad any progress on this issue ? We are using OC4J 9.02.1
    Thanks
    Chris

  • Error when loading servlet using JDOM

    hi,
    I'm new in the servlet developpement and I would like to have your helps.
    I use JDOM to access to XML files. I use Eclipse WTP, and Tomcat like servlet container.
    When I try to load the simple servlet file, I get an exception which shows me that there is java.lang.NoClassDefFoundError: org/jdom/JDOMException.
    I think there are problems in the configuration, but I don't know why. Any help would be welcome.
    This is my code
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.List;
    import org.jdom.Document;
    import org.jdom.Element;
    import org.jdom.JDOMException;
    import org.jdom.input.SAXBuilder;
    import org.jdom.xpath.XPath;
    import org.jdom.*;
    * Servlet implementation class for Servlet: test1
    public class test1 extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
         String xparams_input_file="xparamsdata.xml";; //Fichier d'entr�e XML
         Document xparams_document;
         Element xparams_Element;
         /* (non-Java-doc)
         * @see javax.servlet.http.HttpServlet#HttpServlet()
         public test1() {
              super();
         /* (non-Java-doc)
         * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
              doPost(request,response);
         /* (non-Java-doc)
         * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
         protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
              System.out.println("TestOK");
         /* (non-Javadoc)
         * @see javax.servlet.GenericServlet#init()
         public void Lire_XParams_XML(){
              SAXBuilder saxBuilder = new SAXBuilder();
              try{               
                   xparams_document = saxBuilder.build(xparams_input_file);
                   xparams_Element = xparams_document.getRootElement();               
              catch (JDOMException e)
              { // indicates a well-formedness or other error
                   //e.printStackTrace();
                   System.out.println(xparams_input_file + " is not a well formed XML document.");
                   System.out.println(e.getMessage());               
              catch (IOException e)
              { // indicates an IO problem
                   System.out.println(xparams_input_file + " could not be parsed");
                   System.out.println(e.getMessage());
         public void init() throws ServletException {
              // TODO Auto-generated method stub
              super.init();
              System.out.println("TestOK init");
    And the errors
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Error instantiating servlet class test1
         org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
         org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
         java.lang.Thread.run(Unknown Source)
    root cause
    java.lang.NoClassDefFoundError: org/jdom/JDOMException
         java.lang.Class.getDeclaredConstructors0(Native Method)
         java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
         java.lang.Class.getConstructor0(Unknown Source)
         java.lang.Class.newInstance0(Unknown Source)
         java.lang.Class.newInstance(Unknown Source)
         org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
         org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
         java.lang.Thread.run(Unknown Source)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
    Apache Tomcat/5.5.17

    Have u set the classpath for jdom.jar. If u have jdom.jar file in ur machine , set the classpath to that. otherwise download one from the net .
    http://www.jdom.org/dist/binary/
    put it in ur build path.

  • Error in executing servlet JSPRunner: java.lang.NullPointerException

    I have some problems with my jsp files.
    I am using iAS6sp4 and iWS 6 on W2K.
    I created a EJB jar file and an empty WAR file (No JSP, Servlet, just web.xml & ias-web.xml) and pack them into a ear file for deployment. It was successful.
    Then I copy some jsp files to <iasinstall>/ias6/ias/APPS/<app name>/<war name>
    and restart the ias and iws server.
    When I try the URL: "http://myserver/NASApp/<app name>/myjsp.jsp", I got this error message from kjs.
    JSPRunner: init
    Exception: SERVLET-execution_failed: Error in executing servlet JSPRunner: java.lang.NullPointerException
    My jsp didn't include any java code, just pure htm code. I want to give it a test. But even though I tried with a proper jsp i still got this message. pls advise.
    Alan

    Hi,
    I got this working. Here are the steps that I followed and the output...
    Steps
    1. Deployed the helloworld application
    2. Invoked the application to see if it works fine
    3. Copied the myjsp.jsp to the C:\iPlanet\ias6\ias\APPS\helloworld\helloworld directory
    4. Shutdown the iAS and iWS and started again
    5. Invoked the .jsp file by typing http://sundts2.india.sun.com:81/NASApp/helloworld/myjsp.jsp in the browser.
    Output of KJS
    [16/Mar/2002 14:46:06:5] info: ENGINE-ready: ready: 10819
    **********Registered ebnls interceptor ...!
    [16/Mar/2002 14:46:22:4] info: --------------------------------------
    [16/Mar/2002 14:46:22:4] info: JSPRunner: init
    [16/Mar/2002 14:46:22:4] info: --------------------------------------
    [16/Mar/2002 14:46:26:4] info: --------------------------------------
    [16/Mar/2002 14:46:26:4] info: jsp.APPS.helloworld.myjsp: init
    [16/Mar/2002 14:46:26:4] info: --------------------------------------
    The myjsp.jsp coding is...
    <HTML>
    <BODY>
    <H1>This is a .jsp file for testing</H1>
    </BODY>
    </HTML>
    I believe the problem in your case must be that the .jsp file has been placed in a directory where iAS is not able to recognise. I'm sure this will help. Please feel free to raise questions on this.
    Regards
    Ganesh .R
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support

  • Error while calling servlet in WebLogic

    Hi,
    We are trying to call servlet in WebLogic by using http://scrmskr.apac.nsroot.net:7801/forms/HelloWorldServlet URL and getting
    below error.
    ========================================================================
    Error 404--Not Found
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.4.5 404 Not Found
    The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
    If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
    ========================================================================
    Here we are calling HelloWorldServlet servlet which is kept in below path
    /rcrmap2/weblogic/bea/user_projects/domains/frmrep_rcrms/servers/WLS_FORMS/tmp/_WL_user/formsapp_11.1.1/e18uoi/war/WEB-INF/classes
    Entries for HelloWorldServlet in web.xml:
    ========================================================================
    <servlet>
    <servlet-name>HelloWorldServlet</servlet-name>
    <servlet-class>HelloWorldServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>frmservlet</servlet-name>
    <url-pattern>/frmservlet/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>HelloWorldServlet</servlet-name>
    <url-pattern>/HelloWorldServlet*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>lservlet</servlet-name>
    <url-pattern>/lservlet/*</url-pattern>
    </servlet-mapping>
    ========================================================================
    HelloWorldServlet.java:
    ===============================================================================
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class HelloWorldServlet extends HttpServlet {
    public void service(HttpServletRequest req,
    HttpServletResponse res)
    throws IOException
    // Must set the content type first
    res.setContentType("text/html");
    // Now obtain a PrintWriter to insert HTML into
    PrintWriter out = res.getWriter();
    out.println("<html><head><title>" +
    "Hello World!</title></head>");
    out.println("<body><h1>Hello World!</h1></body></html>");
    ===============================================================================
    Please share your inputs as to what needs to be done for the same.
    Thanks & Regards,
    Harish

    Hi Jay,
    Please also find forms.conf_ entries
    ========================================================================
    # Name
    # forms.conf - Forms component Apache directives configuration file.
    # Purpose
    # It should include the weblogic managed server (routing) directives for
    # the servers where Forms applications are deployed and other miscellaneous
    # Forms component OHS directives.
    # Remarks
    # This file is included with the OHS configuration under
    # $OI/config/OHS/<OHS Node Name>/moduleconf sub-directory.
    # virtual mapping for the /forms/html mapping.
    RewriteEngine on
    RewriteRule ^/forms/html/(..*) /workaroundhtml/$1 [PT]
    RewriteRule ^/rcrms/html/(..*) /workaroundhtml/$1 [PT]
    AliasMatch ^/workaroundhtml/(..*) "/rcrmap2/weblogic/bea/rcrms/config/FormsComponent/forms/html/$1"
    AliasMatch ^/forms/frmjscript/(..*) "/rcrmap2/weblogic/bea/user_projects/domains/frmrep_rcrms/servers/WLS_FORMS/tmp/_WL_user/formsapp_11.1.1/e18uoi/war/frmjscript/$1"
    AliasMatch ^/rcrms/icons/(..*) "/rcrmap2/weblogic/bea/ORA_PFRD/forms/java/$1"
    # Virtual path mapping for Forms Java jar and class files (codebase)
    AliasMatch ^/forms/java/(..*) "/rcrmap2/weblogic/bea/ORA_PFRD/forms/java/$1"
    # Virtual path mapping for testcrms (codebase)
    AliasMatch ^/rcrms/java/(..*) "/rcrmap2/weblogic/bea/ORA_PFRD/forms/java/$1"
    AliasMatch ^/forms/(..*) "/rcrmap2/weblogic/bea/user_projects/domains/frmrep_rcrms/servers/WLS_FORMS/tmp/_WL_user/formsapp_11.1.1/e18uoi/war/WEB-INF/classes/$1"
    AliasMatch ^/rcrms/(..*) "/rcrmap2/weblogic/bea/user_projects/domains/frmrep_rcrms/servers/WLS_FORMS/tmp/_WL_user/formsapp_11.1.1/e18uoi/war/WEB-INF/classes/$1"
    AliasMatch ^/rcrms/WebCLAuth/* rcrms
    <Location /forms>
    SetHandler weblogic-handler
    WebLogicHost kauh0079
    WebLogicPort 8001
    </Location>
    ========================================================================
    Thanks & Regards,
    Harish

  • Error while executing Servlet. java.lang. (Error in loading Specific Driver

    Hi all,
    I am getting the following error while running the servlet.
    Error:
    java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver,
    The above error arise while I try to access a data from the database table using servlet through browser, but the same driver works well in jdbc program(jdbc alone).
    Here is how I am load the driver:
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    con=DriverManager.getConnection("jdbc:microsoft:sqlserver://NODE1:1433","**","**");
    con.setCatalog("senthil");
    Here is my software specification:
    Tomcat5.5.26,
    MS SQL Server 2000 Driver.
    Looking forward to your reply,
    Thanks in advance,
    Senthil.

    Hi,
    Thanks for your reply.
    Yes, I am using the Eclipse IDE, and it doesn't shows any error while I save the servlet source file.
    Please find the below source code:
    *1. JDBC program to retrive data from the database table: No issue works well.*
    The below source code works well and I used it to retrive the data from the database table using the jdbc.Here there is no problem, the source code works well.
    package pak;
    import java.sql.*;
    import java.io.*;
    class UserDataDemo
         public static void main(String args[])
              Connection con;
              ResultSet result;
              try
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                   con=DriverManager.getConnection("jdbc:microsoft:sqlserver://NODE1:1433","user_name","password");
                   con.setCatalog("datadase_name");
                   Statement stat=con.createStatement();
                   result=stat.executeQuery("select * from table_name");
                   while(result.next())
                        System.out.println("**************************************");
                        System.out.println("Name :"+result.getString(1));
                        System.out.println("Company :"+result.getString(2));
                        System.out.println("Position:"+result.getString(3));
                        System.out.println("Emp Id :"+result.getInt(4));
                        System.out.println("Place :"+result.getString(5));
              catch(Exception e)
                   System.out.println(e);
    *2.Issue: Servlet program used to retrive data from the data base table through jdbc:*
    Here I am getting above said error : java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
    Please note, here I dosen't get any compile time error(i.e, eclipse ide doesn't shows any error while saving this file).
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    public class ServletTest extends HttpServlet
         String name;
         ResultSet result;
         PrintWriter pw;
         public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException
              Connection con;
              try
                   res.setContentType("text/html");
                   pw=res.getWriter();
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                   con=DriverManager.getConnection("jdbc:microsoft:sqlserver://NODE1:1433","user_name","password");
                   con.setCatalog("database_name");
                   Statement stat=con.createStatement();
                   result=stat.executeQuery("select * from table_name");
                   while(result.next())
                        pw.println(result.getString(1));
              catch(Exception e)
                   pw.println(e);
    Also please note, I have no problem in running the servlet alone.
    Looking forward to your reply,
    Thanks,
    Senthil.

  • While running servlets getting errors 404 or 505 resource not found

    Hi all,
    I'm novice to J2EE.
    I've encountered a problem while accessing the deployed module in weblogic 8.1 server.
    I'm sure that the webapplication module is deployed as i saw my module in administration console & also the status said that it is deployed.
    when i access my web application by specifying the proper server and port no and context root it is showing
    either 505 - resource not found error(http://localhost:7001/Suresh-2/Suresh) or 404 - not found error.( http://localhost:7001/Suresh-2/Suresh)
    Now let me elaborate what i've done till now.
    My webapplication folder structure is : C:\bea\user_projects\domains\mydomain\applications\Suresh\WEB-INF\classes\Sai\ServExamp.class
    My servlet is ServExamp.java
    I created a folder called "Suresh".  In that folder created another folder called "WEB-INF".  In WEB-INF created a folder called "Classes".
    Since my servlet is in package "Sai", the .class file reside in \Suresh\WEB-INF\Classes\Sai\ServExamp.class
    The source code is :
    package Sai;
    import javax.servlet.;*
    import javax.servlet.http.;*
    import java.io.;*
    public class ServExamp extends HttpServlet
    public void doPost(HttpServletRequest req,HttpServletResponse res)throws IOException
    PrintWriter out=res.getWriter();
    java.util.Date today=new java.util.Date();
    out.println("<html>"+"<body>"+
    *"<h1 align=center>HF\'s Chapter1 Servlet </h1>"*
    +"<br>"+today+"</body>"+"</html>");
    Now i'm almost done creating a web application.  Next, I constructed a simple web.xml descriptor that gives a web friendly name for my servlet, and points to the servlet. I constructed  web.xml descriptor file in the WEB-INF folder (C:\bea\user_projects\domains\mydomain\applications\Suresh\WEB-INF\).
    The web.xml file source is :
    *<!DOCTYPE web-app*
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    *"http://java.sun.com/dtd/web-app_2_3.dtd">*
    *<web-app>*
    *<display-name>Hello World Web Application</display-name>*
    *<description>Test Servlet</description>*
    *<servlet>*
    *<servlet-name>ServExamp</servlet-name>*
    *<servlet-class>Sai.ServExamp</servlet-class>*
    *</servlet>*
    *<servlet-mapping>*
    *<servlet-name>ServExamp</servlet-name>*
    *<url-pattern>/Suresh</url-pattern>*
    *</servlet-mapping>*
    *</web-app>*
    Now I have told Weblogic that the URI /Suresh corresponds to my servlet "Sai.ServExamp".
    My Web Application is ready to be deployed at this point. I logged onto Weblogic's admin console,
    *1) clicked on deployments, then navigated to "Web Application Modules" .*
    *2) Clicked "Deploy new Web Application Module"*
    *3) Navigated to the location of your web application folder (Suresh). There was a radio button next to it indicating that I can select that folder as a valid web application.*
    *4) I Clicked that radio button and clicked "Target Module".*
    *5) It informed that my web application "Suresh" will be deployed to myServer.It asked a name for my web application deployment. By default it was "Suresh"*
    I clicked Deploy.
    *6) After deployment, my web application "Suresh" appeared in the "Web Application Modules" tree on the left.*
    I Clicked on "Suresh"( my web application) then clicked the testing tab, then clicked the link shown there(http://localhost:7001/Suresh-2).
    It was not showing  my servlet (showed a 403 error)
    Error - 403
    This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
    I think so it came b'coz I don't have an index.html or index.jsp page.
    *7)Instead,I added my servlet on to the URL it provided.*
    http://localhost:7001/Suresh-2/Suresh
    It is showing these error code: Http: 505 resource not allowed
    The page cannot be displayed
    The page you are looking for cannot be displayed because the address is incorrect.
    Please try the following:
    If you typed the page address in the Address bar, check that it is entered correctly.
    Open the localhost:7001 home page and then look for links to the information you want.
    Click  Search to look for information on the Internet.
    when i just type : http://localhost:7001/   -> Error 404 not found error
    it's showing
    Error 404--Not Found
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    *10.4.5 404 Not Found*
    The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
    If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
    I want to run my web application & any help would be appreciated.
    Thanks in advance.
    with regards,
    S.SayeeNarayanan.
    Note: I even deployed my war file, which i got by execution of (jar cv0f webapp.war . ) command from the root directory of my web application i.e. Suresh
    Then executed my webapplication it is showing
    error-505 resource not allowed.
    --------------------------------------------------------------------------------------------

    nammathamizhan wrote:
    Hi all,
    I'm novice to J2EE.
    You're also a novice to this forum.
    First, turn off the bold font.
    Second, post your question once and only once to a single forum. You only waited an hour before reposting your question. That's not the way this works. Asking your question multiple times will not increase the likelihood that you''ll get an answer. As a matter of fact, you're guaranteed nothing at all. Give it your best effort and hope for success. This isn't a paid consultancy - we're volunteers.
    I've encountered a problem while accessing the deployed module in weblogic 8.1 server.
    I'm sure that the webapplication module is deployed as i saw my module in administration console & also the status said that it is deployed.
    when i access my web application by specifying the proper server and port no and context root it is showing
    either 505 - resource not found error(http://localhost:7001/Suresh-2/Suresh) or 404 - not found error.( http://localhost:7001/Suresh-2/Suresh)
    If you're correct, and it's deployed, that would suggest that the URL you gave is incorrect.
    >
    Now let me elaborate what i've done till now.Good info - almost too much.
    %

  • Error message from servlet to jsp

    Hi again,
    I have servlet and check error on this servlet then i would like
    to send error message to jsp page.Every error message will send to
    same JSP page.So JSP must receive message from Servlet.Can i do this?
    Please give me details and some sourcecode.I will appreciate for your helps.

    you could do something like this..
    request.setAttribute("error", stringErrormessage);
    Then in the jsp just do
    <%= request.getAttribute("error") %>
    That will print an errormessage.
    Basically, by setting anything on the request and then redirecting to that page you cn display it...
    //Johan

  • Error: Invalid element 'servlet' in content of 'web-app'

    Hi,
    I m working on a project that includes JSPs, whenever I wanna add JSP to my project it shows following compilation error:
    Invalid element 'servlet' in content of 'web-app', expected elements '[error-page, taglib, resource-env-ref, resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref, ejb-local-ref]'
    I have thoroughly checked the web.xml. It is perfectly alright. It is as follows:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    <servlet>
    <servlet-name>myServlet</servlet-name>
    <servlet-class>com.project.MainServlet</servlet-class>
    <init-param>
    Long postings are being truncated to ~1 kB at this time.

    The Complete web.xml is as follows:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    <servlet>
    <servlet-name>montana</servlet-name>
    <servlet-class>com.masstech.montana.boundary.uii.MainServlet</servlet-class>
    <init-param>
    <param-name>db</param-name>
    <param-value>MontanaDS</param-value>
    </init-param>
    <init-param>
    <param-name>user</param-name>
    <param-value>MS</param-value>
    </init-param>
    <init-param>
    <param-name>password</param-name>
    <param-value>MS</param-value>
    </init-param>
    </servlet>
    <servlet>
    <servlet-n[i]Long postings are being truncated to ~1 kB at this time.

  • Trying to download CS6 on my mac pro. when i click on Download, under my orders, it brings up an error page: JRun Servlet error, 413 Header Length to Large. It's been doing this each time I've tried that last few days. What can I do to download this?

    Trying to download CS6 on my mac pro. when i click on Download, under my orders, it brings up an error page: JRun Servlet error, 413 Header Length to Large. It's been doing this each time I've tried that last few days. What can I do to download this?

    clear your adobe.com cookies or use a different browser.

  • XSLT Servlet with error..

    I have the following XSLT servlet code,,,,,
    import java.io.*;
    import java.lang.*;
    import java.util.*;
    import java.net.*;
    import java.beans.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.Source;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.stream.StreamResult;
    import com.allisontransmission.requestJB;
    import org.apache.xml.utils.XMLString;
    /*import org.xml.sax.SAXException;
    import org.apache.xalan.xslt.XSLTProcessorFactory;
    import org.apache.xalan.xslt.XSLTInputSource;
    import org.apache.xalan.xslt.XSLTResultTarget;
    import org.apache.xalan.xslt.XSLTProcessor;*/
    public class ViewPurchaseOrder extends HttpServlet {
    com.allisontransmission.requestJB requestBean = new com.allisontransmission.requestJB();
    public boolean isValid(HttpSession localSession) {
    if (localSession.getValue("VendorID") != null) {
    return true;
    } else {
    return false;
    public void renderXML(HttpServletRequest req, PrintWriter out) {
    try {
    TransformerFactory tFactory = TransformerFactory.newInstance();
    // tFactory.setAttribute("UseValidation", false);
    Source xmlSource = new StreamSource(new File(requestBean.getProperty("DataPath")+"purchaseorders/" + req.getParameter("FileToView")).toURL().toExternalForm());
    Source xslSource = new StreamSource(new File(requestBean.getProperty("ApplicationPath")+"purchaseorder/purchaseorders.xsl").toURL().toExternalForm());
    Transformer transformer = tFactory.newTransformer(xslSource);
    transformer.transform(xmlSource,new StreamResult(out));
    /*// Process Requested XML doc in Xalan
    XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
    // Added 01/04/01
    processor.getXMLProcessorLiaison().setUseValidation(false);
    processor.process(new XSLTInputSource("http://localhost/data/purchaseorders/" + req.getParameter("FileToView")),
    new XSLTInputSource("http://localhost/purchaseorder/purchaseorders.xsl"),
    new XSLTResultTarget(out));*/
    } catch (Exception e) {out.print(e);}
    and rest ........
    i am getting error in my jsp as;
    javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.apache.xml.utils.WrappedRuntimeException: Could not find variable with the name of lineItem
    Here the variable lineItem is in the xsl file.,,as
    <td id="table-bordered-li-inner" colspan="7">
    <xsl:apply-templates select="E1EDPT1"><xsl:with-param name="lineItem" select="POSEX"/></xsl:apply-templates>
    <table><xsl:apply-templates select="/ZORDCHG05/IDOC/E1EDK01/Z1CHANGEHIST"><xsl:with-param name="lineItem" select="POSEX"/></xsl:apply-templates></table>
    </td>
    Thanks for any help.......
    [email protected]

    Is lineitem param also declared in the E1EDPT1 element xsl:template?
    <xsl:template match="E1EDPT1">
    <xsl:param name="lineitem"/>
    </xsl:template>

  • Error:    package javax.servlet.http does not exist

    Hi all,
    How do I import javax.servlet?
    package com.example.web;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class BeerSelect extends HttpServlet {
      public void doPost(HttpServletRequest request,
                         HttpServletResponse response)
                         throws IOException, ServletException {
        response.setContentType("text/html");
        PrintWriter out = response.getWrite();
        out.println ("Beer Selection Advide<br>");
        String c = request.getParameter("color");
        out.println ("<br>Got beer color " + c);
    }What does this error mean? The error message:
    Compiling 1 source file to C:\Program Files\Apache Software Foundation\MyProjects\J2EE\build\classes
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:3:
    package javax.servlet does not exist
    import javax.servlet.*;
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:4:
    package javax.servlet.http does not exist
    import javax.servlet.http.*;
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:7:
    cannot find symbol
    symbol: class HttpServlet
    public class BeerSelect extends HttpServlet {
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:8:
    cannot find symbol
    symbol  : class HttpServletRequest
    location: class com.example.web.BeerSelect
      public void doPost(HttpServletRequest request,
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:9:
    cannot find symbol
    symbol  : class HttpServletResponse
    location: class com.example.web.BeerSelect
                         HttpServletResponse response)
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:10:
    cannot find symbol
    symbol  : class ServletException
    location: class com.example.web.BeerSelect
                         throws IOException, ServletException {
    6 errors
    BUILD FAILED (total time: 0 seconds)Thank you.

    Hi,
    The file servlet-api.jar / servlet.jar is not available in your classpath.
    To compile an Servlet you need the jar file to be in classpath.
    The jar file can be found in your webserver / application server lib folder.
    Regards,
    Zack

  • ANT script genrated error: package javax.servlet does not exist

    Hi there,
    I am running ANT and confronted this message:
        [javac] Compiling 1 source file to C:\eclipseProjects\tomcat_test
        [javac] C:\eclipseProjects\tomcat_test\WEB-INF\src\WebTest.java:4: package javax.servlet does not exist
        [javac] import javax.servlet.ServletException;
        [javac] ^I googled around and found this solution:
    servlet-api.jar is the jarfile that contains javax.servlet.ServletException and javax.servlet.http.* which are imported by WebTest.java and must therefore be found in the classpath. If javac doesn't find this jar (or the javax.servlet packages), it will say (or shout, depending on my and javac's mood): [the error message]
    well...I set in the classpath the location of the servlet-api.jar
    (found at: C:\Tomcat\common\lib)
    I set it with the environment variable (windows xp)
    Just as it's shown here: http://www.cs.usask.ca/~wew036/latex/env-env.jpg
    NOTHING :-(
    could anyone assist, thanks

    Hi..seems u r new to J2ee.. dont worry its a very small problem:
    Here is the solution.. yes u have to edit the environment variables:..
    I am using J2EE sdk 1.4 and running on xp
    This is the classpath setting:
    C:\Sun\AppServer\lib\j2ee.jar;
    This is the PATH setting
    C:\Sun\AppServer\bin;
    Good Luck :)

  • Oracle XSQL Servlet Parse Error when anchoring a link to an image

    I have a database of document links that I wish to portray in a table as graphic images. In other words, each image is a hypertext link to the document.
    From my HTML 101 I used to do this as follows:
    <IMG SRC="image.gif">
    Note, no </IMG> end tag, but this produces an image that I can click to access that document. Lousy form, but it works.
    When I run my XSL with corresponding XSQL file to create the HTML file I get the following Servlet Parse Error:
    Oracle XSQL Servlet Page Processor 1.0.1.0 (Production)
    XSQL-006: XSLT stylesheet is not well-formed: ucmDatabase3.xsl
    XML parse error at line 66, char 15
    End tag does not match start tag 'img'
    I then added the </IMG> end tag,
    <IMG SRC="image.gif"> </IMG>
    which satisfies the parser, but now I get my graphic image AND the underlined linked text together in the same table cell, which SUCKS...
    Is there a way around this madness?
    Thanks for your comments..
    Jon Kotas
    Boeing
    Canoga Park, CA

    Remember that an XSLT stylesheet is, in particular, a well-formed XML document. In a well-formed XML document, you
    cannot have an unterminated element like:
      <foo>
        <bar>  <!-- This elemenent is not closed correctly -->
      </foo>So, in your example, you're running into the problem with
    your <IMG> tag, since you have:
      <A>
        <IMG src="...">  <!-- This elt is not closed correctly -->
      </A>You just need to close the IMG tag by changing the closing > to /> instead, like this:
      <A>
        <IMG src="..."/>  <!-- This elt *IS* closed correctly -->
      </A>When it's written out to the browser, you'll see that the
    trailing slash will be removed, so the browser will be
    happy, too.

Maybe you are looking for

  • Amount of mail messages slowing the app down?

    My mail app seems to be taking longer than before to fetch messages and I was wondering if it had anything to do with the amount of mail messages in my various mailboxes. Can someone tell me, should I be clearing out old mail messages or is it safe t

  • Apex 4.2  passing value from one item to other page

    I have a page where i accept a starting date and ending date as a parameter its source i set it as preference or application item Now in the other page I calls a jasper report.. so it refers the first page.. I am not able to access the start_date whi

  • Integration Process w/ return code 99

    Have a very weird situation with an integration process. In our development environment, in SXI_CACHE, it returns a return code of 99 signalling some type of error. The weird problem is that the process works just fine. It's an IDOC to flat file scen

  • Finder Icons

    Guys...im a new mac user with a new macbook. Now that i have downloaded many apps for my finder, there are a lot of icons there. Personally, I prefer the icon style suppose to the others. Now most of you probably now that on your desktop you can "sna

  • Installed latest version and now my entire library has disappeared. How do I get it back?

    As above. Newest version kept crashing and now I can get it to work but it has installed an empty program Library. I have no idea where my content has gone.