Urgent - Servlet with Property file

Hi all,
I have a servlet which ueses a property file to get the Database information such as Driver, URL etc. The content of the property file is
dbDriver=sun.jdbc.odbc.JdbcOdbcDriver
dbDSN=jdbc:odbc:Sundar
dbUser=
dbPassword=
The servlet has the following code to get connection with the DB
Connection con;
Statement stmt;
     String s = null;
     String dbDriver="";
     String dbDSN="";
     String dbUser="";
     String dbPassword="";     
     public void init()
     try {
String propsfilename = "db.props";
InputStream is = getClass().getResourceAsStream("/" + propsfilename);
     Properties p = new Properties();
     p.load(is);
     dbDriver = p.getProperty("dbDriver");
     dbDSN = p.getProperty("dbDSN");
     dbUser = p.getProperty("dbUser");
     dbPassword = p.getProperty("dbPassword");
} catch (Exception e) {
          throw new RuntimeException("UNABLE TO INITIALIZE, EXITING...");
public String DataBaseConnection()
     init();          
try
     Class.forName(dbDriver);               
     con = DriverManager.getConnection(dbDSN,dbUser,dbPassword);
stmt = con.createStatement();
catch (ClassNotFoundException e1)
e1.printStackTrace();
catch (SQLException e2)
e2.printStackTrace();
The following exception is thrown when i access the servlet through the browser.
java.lang.ClassNotFoundException: sun/jdbc/odbc/JdbcOdbcDriver
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Class.java:120)
     at DataTrans.DataBaseTrans.DataBaseConnection(DataBaseTrans.java:52)
     at sitespider.searchlinks(sitespider.java:207)
     at sitespider.doGet(sitespider.java:42)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
     at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1013)
     at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:925)
     at allaire.jrun.servlet.JRunNamedDispatcher.forward(../servlet/JRunNamedDispatcher.java:34)
     at allaire.jrun.servlet.Invoker.service(../servlet/Invoker.java:84)
     at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1013)
     at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:925)
     at allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDispatcher.java:88)
     at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1131)
     at allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:330)
     at allaire.jrun.jrpp.ProxyEndpoint.run(../jrpp/ProxyEndpoint.java:382)
     at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
     at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)
I am using the following servers
IIS 5.0 with JRun 3.1
Adv tanx
Sundar

Hi
I tested your code . The problem is that the property file have some spaces after the string. Use The trim(); function or check the blank spaces in the property file.
hope it will help
Mallesh

Similar Messages

  • Deploy servlet with WAR file

    Has anyone successfully deployed servlets using WAR file?I think I did everything right. The WAR file was deployed. But I can't accesss it.
              

    I use .war files for deploying servlets in WLS 6.0 - they are much easier
              than exploded dirs...
              Usually, when I have a problem accessing the servlet once deployed, it's
              almost always the deployment descriptor.
              "Randy" <[email protected]> wrote in message
              news:3b311258$[email protected]..
              > Has anyone successfully deployed servlets using WAR file?I think I did
              everything right. The WAR file was deployed. But I can't accesss it.
              

  • URGENT Servlet with RMI ConnectionException

    i have an object with two personalities: Servlet and RMI.
    However when i invoke it using the web browser, the following exceptions pop out:
    <!--
    java.rmi.ConnectException: Connection refused to host: 172.20.134.24; nested exc
    eption is:
    java.net.ConnectException: Connection refused: connect
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at IncomingSMSController.init(IncomingSMSController.java:43)
    at IncomingSMSController.init(IncomingSMSController.java:35)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
    java:916)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.jav
    -->
    the way i code my program is as follow:
    <!--
         protected void init()throws ServletException{
              try{
                   System.out.println("\n<<IN>>");
                   Registry reg=LocateRegistry.getRegistry();
                   System.out.println("\n<<"+reg+">>");
                   reg.rebind("ControllerInterface",this);
                   bound=true;
                   System.out.println("Server now bound to IncomingSMSController");
              }catch(Exception e){
                   System.out.println("Error binding");
                   e.printStackTrace();     
    public static void main(String[] args)throws RemoteException,ServletException{
    Controller con=new Controller();
    con.init();
    -->
    Anyone please help thanks. i have been asking this question here for many time and no one reply may i know at least why?
    thanks.

    Hi,
    I see the java doc of LocateRegsitry and you can read :
    LocateRegistry is used to obtain a reference to a bootstrap remote object registry on a particular host (including the local host), or
    to create a remote object registry that accepts calls on a specific port.
    Note that a getRegistry call does not actually make a
    connection to the remote host. It simply creates a local reference to
    the remote registry and will succeed even if no registry is running on
    the remote host. Therefore, a subsequent method invocation to a remote
    registry returned as a result of this method may fail.
    So may be the exception, throw when you call rebind, is due to non active registry in local machine. You can try to execute your servlet
    after activate your registry via LocateRegistry.createRegistry(int port)
    Hope this help

  • Urgent help with jar file

    I'm writing a program in VB that calls on a JAR file. It has been working great for weeks. Last night, I moved the JAR file to a new location on my machine, and it suddenly stopped working at all.
    I know nothing about Java. Do I need to recompile the file? I tried moving the whole directory back to its original location but it didn't help.
    Thanks in advance.

    Dude I'm telling you straight up, the program has a bug. The evidence is in the error message. Maybe the bug was not manifested before, but it was there.
    Do you have access to the source? Do you know how to compile it? You should recompile it with the -g flag to include debug information. Then the error message will include a method name and line number for the offending portion of code. If you're not able to figure it out yourself, you could post that portion of code here for someone to comment on.

  • Deploying Servlet with HTML file on Tomcat

    Hi ,
    I created a servlet and an html file. The html file accepts user data and passes it to servlet.
    I want to deploy these two files using Tomcat server. Please tell me a sure procedure for deploying both files.
    Regards,
    ap.

    First of all its better to make a jsp rather than one HTML and a servlet but anyhow in order to deploy it first build your project and create a war file which should contain your HTML and servlet and the web.xml.
    Then place this war file inside the webapps folder of tomcat.Start the tomcat and hit your HTML on the browser....

  • Urgent Help With Connections File Needed Please

    Hello All!
    I am getting the following error when I attempt to test my
    live site. I am testing database connectivity within my site that
    is hosted by GoDaddy. All pages are ASP and the database is stored
    in the root directory in GoDaddy's folder called "access_db". The
    folder has read/write access.
    Here is the error:
    Microsoft JET Database Engine error '80040e4d'
    Cannot start your application. The workgroup information file
    is missing or opened exclusively by another user.
    /sitename/requestquote/index.asp, line 130
    Here is the code from the connections file:
    <%
    ' FileName="Connection_ado_conn_string.htm"
    ' Type="ADO"
    ' DesigntimeType="ADO"
    ' HTTP="false"
    ' Catalog=""
    ' Schema=""
    Dim MM_connNAME_STRING
    MM_connNAME_STRING =
    "Provider=Microsoft.Jet.OLEDB.4.0;DataSource=username\access_db\filename.mdb;UserId=usern ame;Password=password;"
    %>
    The error above refrences "/sitename/requestquote/index.asp,
    line 130", and here is the code:
    rs_quote.ActiveConnection = MM_connNAME_STRING
    Please help.
    Thanks - Matt

    Sorry Tim? This is Dave. Did you read what said? I'm not
    Matt.
    Dave
    "TC2112" <[email protected]> wrote in message
    news:[email protected]...
    > It could be, you'd have to check in the control panel to
    make sure
    > permissions are set to read and write.
    > Have you tried changing the path in your connection
    string to the GoDaddy
    > path and uploading the file?
    > The info I posted tells you how to find out what the
    path on GoDaddy is.
    >
    > Tim
    >
    >
    > "Baxter" <baxter(RemoveThe :-)@gtlakes.com> wrote
    in message
    > news:[email protected]...
    > > Tim,
    > > Very good reply! I have no experience with GD other
    than the complaints
    I
    > > have read here about connections to databases etc.
    I think that if his
    > > connection test is ok that it has to be a
    permissions issue? What do you
    > > think?
    > > Dave
    > > "TC2112" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> Hello,
    > >>
    > >> Sorry if some of this is repetitive in respect
    to what others have
    > >> advised
    > >> in this thread.
    > >> It's an answer I gave someone with similar
    problems a while ago.
    > >> It does answer your question about the
    successful path on your local
    > > server
    > >> being different than the path on GDs server.
    > >> There are also instructions on how to find the
    path on GD's server if
    > > needed
    > >> for DNS-Less connection.
    > >>
    > >>
    > >> Option 1:
    > >> You can try using a map path function like this
    in your connection
    > >> string:
    > >> access_db is the folder the database is in and
    mydatabase.mdb is the
    > > access
    > >> file.
    > >> Substitute your names.
    > >>
    > >> STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=" &
    > >> Server.MapPath("access_db") &
    "\mydatabase.mdb;User Id=admin;Password="
    > >>
    > >> -or-
    > >>
    > >> Option 2:
    > >> You could try an OLEDB DSN-Less connection
    instead of using a DSN. It's
    > > not
    > >> hard to do.
    > >>
    > >> Step 1 is to figure out the location of the
    root directory on the
    host's
    > >> server..That's very easy to do yourself.
    > >>
    > >> Just make an asp page (I named mine
    "findit.asp"), and put the
    following
    > >> code between the <body> tags, like so:
    > >> <body>
    > >> <%
    > >> Response.Write("The location of this page
    is:<br>")
    > >>
    Response.Write(Request.ServerVariables("PATH_TRANSLATED") &
    "<br>")
    > >> Response.Write("The location of my root
    directory is:<br>")
    > >> Response.Write(Server.MapPath("\"))
    > >> Response.Write Path
    > >> %>
    > >> </body>
    > >>
    > >>
    > >> Upload it to the same location as your site's
    home page.
    > >> Once your new asp page is uploaded, just
    navigate to that page in your
    > >> browser.
    > >>
    > >> For a site on GD the "findit.asp" page displays
    something like this:
    > >>
    > >> The location of this page is:
    > >> d:\hosting\mysite\findit.asp
    > >> The location of my root directory is:
    > >> d:\hosting\mysite
    > >>
    > >> Now that you know the root directory location
    on their server, you can
    > >> figure out the path to your database.
    > >> Let's say that the folder your database is in
    is named _private, and
    it
    > >> happens to be in the root
    > >> directory along with your home page.
    > >>
    > >> Next, just add the database folder name
    (_private) and the database
    > >> inside's name (mydatabase.mdb) to the root
    directory location:
    > >>
    > >> d:hosting\mysite\_private\mydatabase.mdb
    > >>
    > >> That's your Data Source path.
    > >>
    > >> The connection string would look something like
    this:
    > >>
    > >> = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    > >>
    Source=d:hosting\mysite\_private\mydatabase.mdb;User
    ID=;Password=;"
    > >>
    > >> (the code above may appear wrapped (two lines)
    in the forum/ng but it's
    > > one
    > >> line with no return within)
    > >>
    > >> IMPORTANT: If you are using a local testing
    server, make a copy of your
    > >> connection asp page as a backup.
    > >> The reason? The connection information you are
    going to put in this
    file
    > >> will only work on the host's server.
    > >> Once you upload the new connection.asp page
    with the changes for the
    > >> host,
    > >> you'll need to change your local copy back to
    your local connection so
    it
    > >> will work on
    > >> your local testing server.
    > >>
    > >> Upload to server.
    > >>
    > >> Please note: From now on, when you upload (or
    "put" if you're using DW)
    > >> files that refer to your connection asp page
    you're going to get a
    > >> warning
    > >> that your connection asp on the host is
    different than your local copy.
    > >> Always say "No" to updating it, or you'll
    replace the GD DSN-Less
    > > connection
    > >> with your local one.
    > >>
    > >>
    > >> Did you set the appropriate read/write
    permissions on the
    > > directory(folder)
    > >> your database is in?
    > >> You can do that in GD's control panel.
    Hosting> Select your site >
    Manage
    > > to
    > >> open it.
    > >>
    > >> I hope this helps.
    > >>
    > >> For what it's worth, I only use GD for domain
    names now.
    > >> I had numerous problems with some sites hosted
    there, switched them to
    > >> HostMySite and haven't had any.
    > >>
    > >> Take care,
    > >> Tim
    > >>
    > >>
    > >>
    > >>
    > >>
    > >> "Baxter" <baxter(RemoveThe
    :-)@gtlakes.com> wrote in message
    > >> news:[email protected]...
    > >> > Baxter - I get "Connection was Made
    Successfully" if connection to
    the
    > >> > database was made Successfully not sure
    what's going on here? When
    you
    > >> > look
    > >> > at your site files in Dreamwerer on the
    server is there a folder
    named
    > >> > access_db? If so is your data base in that
    folder? The database needs
    > >> > permissions set to read and write to that
    file. Have you checked
    > >> > permissions
    > >> > on the site? does GD give you a control
    panel so that you can set the
    > >> > permissions your self? I have never used
    GD but have seen where
    people
    > >> > have
    > >> > had lots of problems with them when using
    a scripting language. I
    don't
    > >> > know
    > >> > what else it could be at this point.
    > >> > Dave
    > >> > "mtrueblood"
    <[email protected]> wrote in message
    > >> > news:[email protected]...
    > >> >> Baxter - I get "Connection was Made
    Successfully" with the
    credentials
    > >> >> you
    > >> > gave
    > >> >> me. My site works just fine on my
    local machine with
    > > access_trueblood.dsn
    > >> > (it
    > >> >> also worked with the dsn I initally
    created for the site). All pages
    > >> > display
    > >> >> and I get no errors. I think where the
    issue may be, now I am
    guessing
    > >> > here, is
    > >> >> that my connection refrences a
    database located in the folder
    > >> >>
    C:\Users\Administrator\Websites\Sitename\access_db, but once I
    upload
    > > my
    > >> > site,
    > >> >> the database still sits in access_db,
    but the root folder possibly
    has
    > >> > changed
    > >> >> (maybe causing the connection to
    fail).
    > >> >>
    > >> >> Dooza - I don't understand how I can
    use "c:myDsnFile.dsn", when
    once
    > > I
    > >> > upload
    > >> >> my site, "c:myDsnFile.dsn" would then
    not be the location of my dsn.
    > >> >> "c:myDsnFile.dsn" refrences a file on
    my computer. I am using an
    > >> >> online
    > >> > hosting
    > >> >> company. Am I not understanding you
    correctly? See note above. I did
    > > use
    > >> > your
    > >> >> information and got the following
    browser error:
    > >> >>
    > >> >> Microsoft OLE DB Provider for ODBC
    Drivers error '80004005'
    > >> >> General error: Invalid file dsn ''
    > >> >> /sitename/contactus/index.asp, line
    130
    > >> >>
    > >> >> line 130 -
    rs_contactus.ActiveConnection = MM_connTrueblood_STRING
    > >> >>
    > >> >> I am researching on how to do a
    dsn-less connection, unless I can
    get
    > >> > this
    > >> >> figured out.
    > >> >>
    > >> >> Thanks - Matt
    > >> >>
    > >> >
    > >> >
    > >>
    > >>
    > >
    > >
    >
    >

  • How can we locate the property file and read from it in .js page?

    HI
    I am having an static html page where in the url is hardcoded,so i wanted to read it from a property file and which can be done by using .js files
    i wanted to know how to deal with property files in .js?
    Thankx

    I assume you know that Java and JavaScript only share a name and they are both programming languages but little else.
    You can load JavaScript in Java 6. However for questions on what the JavaScript should do I suggest you try a javascript forum.

  • Strategy to read a property file

              Hi all
              I'd like to know what could a good strategy with property files,where should I
              put them? Is it a good idea to put it in the war file? If so then how to read
              it from a jsp ?
              Thanks a lot
              Francesco
              

    Or you can put them in your /WEB-INF/classes directory and read them
              this.getClass().getResourceAsStream("/yourp.properties");
              Note that you need to put the / before the name (refer to the
              java.lang.Class documentation)
              Or if you have an ear application do:
              put your properties files in directory that you place in the ear file:
              /propertiesDir/myprop.properties
              in the manifest file of your war put a Class-Path = propertiesDir
              entry
              again do:
              this.getClass().getResourceAsStream("/myprop.properties");
              Simone
              Dimitri Rakitine <[email protected]> wrote in message news:<[email protected]>...
              > You can put it in a war (say, in /WEB-INF/) and use
              > application.getResourceAsStream("/WEB-INF/your.properties")
              > to read it
              >
              > Francesco <[email protected]> wrote:
              >
              > > Hi all
              > > I'd like to know what could a good strategy with property files,where should I
              > > put them? Is it a good idea to put it in the war file? If so then how to read
              > > it from a jsp ?
              > > Thanks a lot
              > > Francesco
              

  • How to read a property file..urgent

    Hi ,
    This is kinda urgent if you can help! I am a new bee to servlet and java.
    My JSP calls a java class file. In the class file i establish my connection to database.
    My requirement is to read a property file for the database name, username and password and connet to the database using JDBC(database is oracle).
    which class to use. I know something about properties class. Is there any other class which can read my property file.
    Or is there any other all together a better way to do it.
    thanks in advance
    Amit

    Inside your WAR file somewhere under the WEB-INF directory. This space is protected, whereas the ROOT (of course) is not. Unless you would like someone else to read your properties file...
    Once you decide where you want it, post the section of code where you load the properties file, we can probably help you figure out where you path is wrong.

  • How to upload a file into server using j2ee jsp and servlet with bean?

    How to upload a file into server using j2ee jsp and servlet with bean? Please give me the reference or url about how to do that. If related to struts is more suitable.
    Anyone help me please!

    u don't need j2ee and struts to do file uploading. An example is as such
    in JSP. u use the <input> file tag like
    <input type="file"....>You need a bean to capture the file contents like
    class FileUploadObj {
        private FormFile srcFile;
        private byte[] fileContent;
        // all the getter and setter methods
    }Then in the servlet, you process the file for uploading
        * The following loads the uploaded binary data into a byte Array.
        FileUploadObj form = new FileUploadObj();
        byte[] byteArr = null;
        if (form.signFile != null) {
            int filesize = form.srcFile.getFileSize();
            byteArr = new byte[filesize];
            ByteArrayInputStream bytein = new ByteArrayInputStream (form.srcFile.getFileData());
            bytein.read(byteArr);
            bytein.close();
            form.setFileContent(byteArr);
        // Write file content using Writer class into the destination file in the server.
        ...

  • I cant use the highlight, underline, or strikethrough function in a specific pdf file. The file isnt locked. I used to highlight texts from that file before the latest update. The problem occurs only with that file. Urgent need. Please help. Thanks!

    i cant use the highlight, underline, or strikethrough function in a specific pdf file. The file isnt locked. I used to highlight texts from that file before the latest update. The problem occurs only with that file. Urgent need. Please help. Thanks!

    Chester31,
    Thank you very much for sharing your file with us!  Now that we are able to reproduce the problem at our end, you may stop sharing the file on Acrobat.com.
    Do you know when this problem (for not being able to add new highlight/strikeout/underline) has started?  Did you update your iOS from 7.x to 8.0 recently?
    We will continue investigating the problem and let you know what we find.
    Thank you again for your help.

  • UTF-8 encoded property files with RessourceBundle

    Hello everybody!
    Is there a way to force RessourceBundle to use a specific kind of encoding for the property files I've defined?
    I plan to encode the property files for my application using UTF-8. This will avoid problems, when e.g. the labels for some buttons will get names in Spanish, German, Frensh etc..
    Problem: the class RessourceBundle seems to use an InputStream and not a Reader. Therefore I have problems forcing the encoding UTF-8 used in my property files.
    Is there any solution to this?
    Kind regards and thank's for your response,
    Marcus.

    Hi Marcus,
    You should be able to do what you're trying. Instead of backing your resource bundle with properties files, use a ListResourceBundle and back it with the corresponding class files. Create your *.java files in UTF8 and use the -encoding UTF8 argument to javac. Any *.java files you've previously created in ASCII will compile correctly using -encoding UTF8 (one of the nice features of UTF8).
    see here: http://java.sun.com/docs/books/tutorial/i18n/resbundle/list.html
    Also, see the following 1.4 Java docs for internationalization:
    start here: http://java.sun.com/j2se/1.4/docs/guide/intl/index.html
    and follow links, especially the link to the internationalization tutorial:
    http://java.sun.com/docs/books/tutorial/i18n/index.html
    to the encoding document:
    http://java.sun.com/j2se/1.4/docs/guide/intl/encoding.doc.html
    and the link to the internationalization FAQ
    http://java.sun.com/j2se/1.4/docs/guide/intl/faq.html
    regards,
    Joe

  • Loading property files from a class and not a servlet...

    Hi, I was wondering if anyone has a good solution for loading property files from a class instead of a servlet. I would like to load the property file similarly to how it is done from HttpServlet.
    Here is the large picture. I have a tag library that calls a class which needs to access a database. The class needs to know what DB to access so it needs to look at some property file. The problem is that I don't want to hardcode the properties or the path of where the property file exists. I hope this all makes sense.
    Thanks.
    -PV

    I use the getResource method in the java.lang.Class class. Read about this method in the api.
    Anyways this is roughly how it's : you must put your properties file in the classpath. Then in your class :
    Properties prop = new Properties();
    URL url = this.getClass().getResource("/config/db.properties");
    prop.load(url.openStream());In this case, you must put the "config" (where you've written your db.properties file) directory's parent in the classpath.

  • How to deal with a property file and EJB

    Hello,
    I'm quite new to the EJB technology.
    My problem is, how to handle a property file?
    Let's say I have a custom 'property.xml' (that holds some application specific constants) somewhere in my EJB jar or in a related jar (so it is in the classapth).
    Usually (not with EJB) I would write a class (let's name it 'Props', see below) which reads the property file once and initialize some public static members.
    In an object (see below 'MyClass') I would then use 'Props.memberName' if I want to have access to a constant property.
    class with public static constants members; read the file only once; properties are in memory ...
    public class Props
      public static String FOO = null;
      static
        Properties props = new Properties();          
        try
          props.loadFromXML(CConstants.class.getClass().getClassLoader().getResourceAsStream("propertyFile.xml"));
          FOO = props.getProperty("FOO");
        catch(Exception e){...}
    }The class that uses the properties<br>
    public class MyClass
      public void doSomething()
        String s = Props.FOO + " BAR";
    }But unfortunately static things are not allowed in EJB ...
    What is the preferred way to get access to the properties?
    To read the file each time an EJB is used, will cause much disc-I/O and xml parsing (this is very unefficient).
    Is there no mechanism to read such things once only?
    I would be very pleased to get an answer, because I don't know how to solve this problem
    Thanks

    Use the @Resource annotation on fields representing the application-specific constants. Override those values as you see fit with the standard ejb-jar.xml file's env-entry element.

  • Unable to deploy a simple servlet using WAR file on Oracle9iAS v9.0.3

    Hi All,
    I am facing problem while deploying a simple servlet using WAR file on Oracle 9i App Server.
    I have installed Oracle9iAS J2EE and Web Cache v9.0.3 on Windows 2000 server.
    It includes:
         - Oracle HTTP Server
         - Oracle9iAS Containers for J2EE
         - Oracle9iAS Web Cache
         - Oracle Enterprise Manager
    The release of installed Oracle9iAS is Release 2 (9.0.3)      
    I referred following link to Deploy Applications Using WAR file:
         http://otn.oracle.com/products/ias/daily/sept12.html
    As mentioned in this documentation I have followed following steps to deploy WAR file:
    1] I have created a war file by name SimpleServlet.war. In SimpleServlet.war, there is a servlet by name Simple which prints time at which servlet was accessed.
    2] I have modified <ora9ias_home>\j2ee\home\config\application.xml and added following web module entry:
         <web-module id="SimpleServlet" path="../../home/applications/SimpleServlet.war" />
    3] To make this module accessible from over the web, I have modified file
         <ora9ias_home>\j2ee\home\config\default-web-site.xml and added following entry:
         <web-app application="SimpleServlet" name="SimpleServlet" root="/SimpleServlet"/>
    4] I saved both the files and started Oracle HTTP Server and accessed page as below:
              http://<server>:7777/SimpleServlet/Simple
    where Simple is servlet in SimpleServlet.war file.          
    In the browser, The page cannot be found is shown to user. I have verified that SimpleServlet.war is extracted to SimpleServlet folder under <ora9ias_home>\j2ee\home\applications folder. I found that Simple.class is stored under WEB-INF/classes folder and web.xml contains correct entry for url pattern for servlet Simple.
    What else could be the problem? Am I placing the war file in wrong place or modifying application.xml or default-web-site.xml in a wrong directory?
    This is very urgent. Please help me with your valuable comments on this.
    Thanks in advance.
    Regards,
    Sandesh

    Hi All,
    I am facing problem while deploying a simple servlet
    using WAR file on Oracle 9i App Server.
    I have installed Oracle9iAS J2EE and Web Cache v9.0.3
    on Windows 2000 server.
    It includes:
         - Oracle HTTP Server
         - Oracle9iAS Containers for J2EE
         - Oracle9iAS Web Cache
         - Oracle Enterprise Manager
    The release of installed Oracle9iAS is Release 2
    (9.0.3)      
    I referred following link to Deploy Applications
    Using WAR file:
         http://otn.oracle.com/products/ias/daily/sept12.html
    As mentioned in this documentation I have followed
    following steps to deploy WAR file:
    1] I have created a war file by name
    SimpleServlet.war. In SimpleServlet.war, there is a
    servlet by name Simple which prints time at which
    servlet was accessed.
    2] I have modified
    <ora9ias_home>\j2ee\home\config\application.xml and
    added following web module entry:
    <web-module id="SimpleServlet"
    path="../../home/applications/SimpleServlet.war" />
    3] To make this module accessible from over the web,
    I have modified file
    <ora9ias_home>\j2ee\home\config\default-web-site.xml
    and added following entry:
    <web-app application="SimpleServlet"
    name="SimpleServlet" root="/SimpleServlet"/>
    4] I saved both the files and started Oracle HTTP
    Server and accessed page as below:
              http://<server>:7777/SimpleServlet/Simple
    where Simple is servlet in SimpleServlet.war file.          
    In the browser, The page cannot be found is shown to
    user. I have verified that SimpleServlet.war is
    extracted to SimpleServlet folder under
    <ora9ias_home>\j2ee\home\applications folder. I found
    that Simple.class is stored under WEB-INF/classes
    folder and web.xml contains correct entry for url
    pattern for servlet Simple.
    What else could be the problem? Am I placing the war
    file in wrong place or modifying application.xml or
    default-web-site.xml in a wrong directory?
    This is very urgent. Please help me with your
    valuable comments on this.
    Thanks in advance.
    Regards,
    SandeshHave you restarted you http server and then tried to load it again? Are you using the right port; maybe you have to use port 7778? Check you server settings in the http server instance. Also check your url binding of you application at Farm > Application Server: infrastructurehost > OC4J_instance > Application: appname > Web Module: modulename
    Good luck!
    rgds Thomas

Maybe you are looking for