Defining a context in Tomcat 5.5.4

I've just setup tomcat 5.5.4 with a plan to migrate my webapps to it from tomcat 5.0.16.
However, under tomcat 5.0.16, you could specifiy a separate xml file in the catalina/localhost folder which held your webapps context info.
Doing this under tomcat 5.5.4 just doesn't seem to work, and I've had to go back to the 'old' tomcat 4 way of adding the <context> directly into the server.xml file, which when cut and paste, works perfectly.
So am I missing something, or did they decide to revert to that mechanism ?

Ok, I thought that link looked familiar, but it still doesn't help..
Here is my <context>.. this works perfectly under 5.0 as a separate xml file in the catalina/localhost folder, but under 5.5, I can only get this context to load by adding it directly to the server.xml...
     <Context path="" docBase="D:\dev\Projects\newk00l\website\games\" reloadable="true" crossContext="false">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_k00l_log." suffix=".txt"
     timestamp="true"/>
<Resource name="jdbc/netk00lextreme" auth="Container"
type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/k00l_extreme?autoReconnect=true"
username="myusername" password="mypassword" maxActive="20" maxIdle="10" maxWait="-1"/>
     </Context>

Similar Messages

  • Remove default context in Tomcat 5.5

    Hi
    Can anyone tell me how to get rid of the default context in Tomcat 5.5 (Linux)? I want to make my own webapp the default context (which is easy in all previous releases) but no matter what I try, it doesn't work. I've tried editing:
    1) conf/server.xml
    2) conf/web.xml
    3) conf/Catalina/localhost/<various>
    3) <myApp>/META-INF/context.xml
    But I can't even make the default context 'stop', let alone make my app take over as the default. If someone could assume it's a fresh installation, "out of the box" as it were, and tell me how to get rid of it, I'd be really grateful
    Thanks!

    Ok, I thought that link looked familiar, but it still doesn't help..
    Here is my <context>.. this works perfectly under 5.0 as a separate xml file in the catalina/localhost folder, but under 5.5, I can only get this context to load by adding it directly to the server.xml...
         <Context path="" docBase="D:\dev\Projects\newk00l\website\games\" reloadable="true" crossContext="false">
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="localhost_k00l_log." suffix=".txt"
         timestamp="true"/>
    <Resource name="jdbc/netk00lextreme" auth="Container"
    type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost/k00l_extreme?autoReconnect=true"
    username="myusername" password="mypassword" maxActive="20" maxIdle="10" maxWait="-1"/>
         </Context>

  • How to setup Context in Tomcat 5.x as compare to 4.x

    Hi All,
    I am having a slight problem in understanding how to set a new context using tomcat 5.x.
    What I used to do with tomcat4.x is that add the collowing
    <Context path="/ddrive" docBase="D:/" reloadable="true"
    crossContext="true" allowLinking="true"/>
    in the server.xml file and from my btowser when I entered
    localhost:8888/ddrive, it would give me directory listing for the mapped drive.
    Now I want to do the same for tocat5.x, however am not being successfull, have tried few options but no success. Wonder if anybody here can point me in right direction so that I can get this done..thanks

    and thats what is driving me nuttttz...cus it does seem like I am doing the right thing but.... here is what I get when I write the following in my browser window.
    http://localhost/ddrive
    Error:
    HTTP Status 404 - /ddrive/
    type Status report
    message /ddrive/
    description The requested resource (/ddrive/) is not available.
    Apache Tomcat/5.5.15

  • Creating my own context in Tomcat 4.1.18. Help.

    Hi
    I have installed and created my own context in Tomcat 4.1.18
    I have created a folder under
    %TOMCAT_HOME%/webapps called Wap
    So my structure is:
    %TOMCAT_HOME%/webapps/Wap/WEB-INF/classes/<MyServlet.class>
    I have also modified the server.xml to include the context
    <!-- Tomcat Examples Context -->
    <Context path="/Wap" docBase="Wap" debug="0"
    reloadable="true" crossContext="true">
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="localhost_examples_log." suffix=".txt"
         timestamp="true"/>
    <Ejb name="ejb/EmplRecord" type="Entity"
    home="com.wombat.empl.EmployeeRecordHome"
    remote="com.wombat.empl.EmployeeRecord"/>
    </Context>
    But when i try to call this servlet thru the brower by saying
    http://localhost:8080/Wap/servlet/MyServlet
    I get the message
    The requested resource (/Wap/servlet/DeviceLocation) is not available
    AM I MISSING SOMETHING??? CAN SOME HELP?

    Two things:
    1) Did you put a web.xml file in %TOMCAT_HOME%/webapps/Wap/WEB-INF ?
    2) Did you put mapping for your new servlet in this file like:
       <servlet>
          <servlet-name>localName</servlet-name>
          <servlet-class>full.package.className</servlet-class>
       </servlet>
       <servlet-mapping>
          <servlet-name>localName</servlet-name>
          <url-pattern>/servlet/path</url-pattern>
       </servlet-mapping>Patrick

  • Define a context parameter not using web.xml

    Dears,
    With a web.xml file, it is possible to define a context parameter available in the web app via de ServetContext.getInitParameters method.
    Is it possible to define a context parameter not using the web.xml file ? Can I, in a java Class, init a custom context parameter ? (for exampel, init as a context param a key/value pair read from a property file).
    PS: the need is that the value (hmac key) currently define in the web.xml needs to be updated monthly. Apparently, under WebSphere (the app server we are using) changing the web.xml of the deployed app it not enought for it to be taken into account.
    Sincerely,
    Beno�t Bertrand

    Is it possible to define a context parameter not
    using the web.xml file ? Can I, in a java Class, init
    a custom context parameter ? (for exampel, init as a
    context param a key/value pair read from a property
    file).Does it necessarily have to be a value retrieved through the context param ? AFAIK, there's no way you could programatically 'set' an init param, which going by the name, 'init param' is quite understandable.
    You could define this value in a property file and read it in, in the init method. You should provide a mechanism to reload the new value after 'x' days. One approach is a Timer that does the job, do have a look at SteveJLuke's recommendations on the same in this thread
    http://forum.java.sun.com/thread.jspa?threadID=637355&tstart=0cheers,
    ram.

  • Defining a webapp in Tomcat 4.0

    Hello there:
    can anyone give me a good tight example or lesson on defining and deploying a webapp on the Tomcat server in a standalone situation? Currently I can view and use
    my JSP apps on Tomcat by creating a directory and placing the files within it. However the servlets that my pages use are not visible to the server. I'm sure this has to do with the server.xml and web.xml config files but I've been up for too many days and I'm just looking for the answer.... :)
    Thanks in advance
    Justin

    Hi
    Suppose you have directory mydir in D:\ , then you can add following line in server.xml file of conf folder of tomcat.
    <Context path="/mycontext"
    docBase="D:\mydir"
    crossContext="false"
    debug="0"
    reloadable="true" >
    </Context>
    Now suppose u have test.jsp in mydir folder, the u can invoke this jsp in browser as follow
    http://localhost:8080/mycontext/test.jsp
    Try it !
    Kind Regards
    Chetan Chandarana

  • Problem with absolute path and context using Tomcat 4

    I added the following line to my server.xml:
    <Context path="/track" docBase="track" />Now I have used absolute paths(ex: /includes/css/style.css) throughout my code and it worked when I served my application from the ROOT context but when I moved it to the /track - the paths did not include the new root context.
    So instead of looking at http://localhost/track/includes/css/style.css it still looks at http://localhost/includes/css/style.css.
    Is there any kind of setting I am missing in the web.xml or server.xml? I really would like to be able to use absolute paths relative to the context root.
    Please help! Thanks in advance.
    -Chris

    Hi,
    I am not sure what exactly you are asking but here is my shot. If one tomcat is serving more than one application then the only way for tomcat to know which application to refer is by looking at the context path. Since you have the context path of /track then it should appear in all of your urls being directed to the server (for both servlet and jsp). Since you have used absolute path in all the cases either you will have to change the absolute path or you will have to define them relative (which is a better idea) to a base dir. Hope it helps.
    I added the following line to my server.xml:
    <Context path="/track" docBase="track"
    />Now I have used absolute paths(ex:
    /includes/css/style.css) throughout my code and it
    worked when I served my application from the ROOT
    context but when I moved it to the /track - the paths
    did not include the new root context.
    So instead of looking at
    http://localhost/track/includes/css/style.css it still
    looks at http://localhost/includes/css/style.css.
    Is there any kind of setting I am missing in the
    web.xml or server.xml? I really would like to be able
    to use absolute paths relative to the context root.
    Please help! Thanks in advance.
    -Chris

  • META-INF/context.xml, Tomcat, META-INF/services

    I presently have a Netbeans project laid out like this:
    src
    src\java
    web
    web\META-INF
    web\META-INF\context.xml
    etc. Tomcat finds that META-INF/context.xml OK and does what I expect with it.
    I have recently added something that is loaded by java.util.ServiceLoader, which requires a META-INF/services/x.y.z file containing the name(s) of the classes that implement x.y.z. After deployment, my webapp's ServiceLoader doesn't find it, because in the target it isn't in WEB-INF/classes/META-INF/services/x.y.z. If I put it into src/java/META-INF/services/x.y.z it works correctly, as it then ends up in the right place. However I'm now concerned that either Tomcat won't find the context.xml if I put it in the same place under src, because it would then not be in /META-INF/context.xml but rather /WEB-INF/classes/META-INF/context.xml, which in turn would mean that I would then need two META-INF directories. I'm about to test that conjecture about Tomcat finding it under WEB-INF/classes/META-INF, but I'm wondering whether I'm doing something basically wrong in the first place here.

    You seem to think that you can have only one META-INF directory; this is simply not true. Keep both your META-INF directories and put the files where they are expected. Yay for using overlapping names :/

  • How to define ctxsys.context index for an ORDDoc column

    I need to use Oracle Text to search on a column that is of type ORDsys.OrdDoc. Can someone point me in the direction of an example please - I note someone pointed out that a USER_DATASTORE is the way to go, but what do I need to put it it? I also wish to use Word to HTML feature of the INSO_FILTER if at all possible.
    thanks
    Brigette

    Hi Brian,
    I don't know how to do this with a SQL query (as the OrdDoc may not be displayable say in SQLPlus), but if you check out the samples at http://otn.oracle.com/sample_code/products/intermedia/htdocs/intermedia_servlet_jsp_samples/imedia_servlet_jsp_readme.htm
    there is a JAva Servlet that works nicely. If you are not a Java person, there are other samples at http://otn.oracle.com/sample_code/products/intermedia/index.html
    keep smiling
    Brigette

  • Jsp:include strange behaviour

    Hi All
    I have a file called bottom.jsp and I want to include this file in all other jsp files in my site. This works fine for the pages that are in the same dir as bottom.jsp but for other pages that have not the same dir as bottom.jsp the links in the bottom.jsp do not refer to their correct destinations anymore.
    All helps appreciated.

    Hi,
    try changing the link in the header.html which points to target.jsp and make it relative to your application root..... then you can use it in any directory...
    header.html in D:\Tests\Web\HeaderTest
    <div align="center">Link</div>
    Hope this works :-)
    Hi Again
    But it seems that your suggestion is not working (or
    maybe something's wrong again with me). My Directory
    structure is:
    D:\Tests
    ���\Web
    ������\HeaderTest
    ���������\
    EB-INF
    ���������\
    ub
    and I have defined a Context in Tomcat like this:
    <Context
         path="/headertest"
         docBase="D:\Tests\Web\HeaderTest"
         debug="0"
         privileged="true"
    />
    and my files are:
    header.html in D:\Tests\Web\HeaderTest
    <div align="center"><a
    href="target.jsp">Link</a></div>
    target.jsp in D:\Tests\Web\HeaderTest
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt
    ">
    <%@ page contentType="text/html; charset=utf-8"
    language="java" import="java.sql.*" errorPage="" %>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    </head>
    <body>
         Sample Page
    </body>
    </html>
    index.jsp in D:\Tests\Web\HeaderTest\sub
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt
    ">
    <%@ page contentType="text/html; charset=utf-8"
    language="java" import="java.sql.*" errorPage="" %>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    </head>
    <body>
         <%@include file="/header.html" %>
    </body>
    </html>
    I have also tried the jsp:include action but again I
    can't get it working. When I include the header.html
    file, I want the link to refer to the
    http://localhost:8080/headertest/target.jsp but I
    don't know why it refers to
    http://localhost:8080/target.jsp which is not
    available.
    Any ideas?
    Lots of thanks again.

  • JSP 2.0 JSLT not processing defined context - Tomcat 5.0.19

    Hi,
    I am using tomcat 5 for my development. If I define the context in server.xml JSLT tag is not processing. I added jslt.jar and standard.jar file in common/lib direcotry.
    I have a simple jsp file p.jsp
    ======================
    p.jsp
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
    JSLT Test
    <br>
    <c:out value="${order.amount + 5}"/>
    Test 1.
    I copied p.jsp into webapps/ROOT directory and started tomcat. Using webbrowser I accessed p.jsp.
    http://localhost:8080/p.jsp
    output:
    ======
    JSLT Test
    ${order.amount + 5}
    Test 2:
    I created new context in server.xml file like this:
    <Context path="/test" docBase="test"
    debug="5" reloadable="true" crossContext="true"/>
    copied p.jsp file into webapps/test direcotry.
    I got the following ouput:
    http://localhost:8080/test/p.jsp
    output:
    ======
    JSLT Test
    ${order.amount + 5}
    Test 3.
    Now I didn't define any context. created directory under webapp/nocontext and copied p.jsp file.
    JSLT Test
    ${order.amount + 5}
    Any idea why this page isnot processing. I looking ouput
    JSLT Test 5.
    SR

    Hi all,
    Just I found the problem. My web.xml file header is worng. The following web.xml is working.
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
    version="2.4">
    <display-name>Welcome to Tomcat</display-name>
    <description>
    Welcome to Tomcat
    </description>
    </web-app>
    http://localhost:8080/test/p.jsp
    output:
    ======
    JSLT Test
    5

  • Tomcat web context with j2ee server

    Hi everybody!
    Can anyone tell me how to add a web context to tomcat when it is running with j2ee server, since it no longer reads the ./conf/server.xml file.
    Thank you.

    Hi!
    Sun's J2sdkee1.3 is built on tomcat server. When tomcat is started up by j2sdkee it doesn't load (or ignores) the ./conf/server.xml file where should be defined the web context used by tomcat, like:
    <Context path="/examples" docBase="D:/path/to/examples"
    debug="0"
    reloadable="true"
    trusted="true" >
    </Context>
    And I cannot find a way to add a context which has a different document base as the one defined in the ./config/web.properties
    thanks.

  • Tomcat 5.5 context.xml, how to configure the Host element

    [Probably this question should be asked elsewhere, if so please advise]
    Dear all,
    I understand that Tomcat 5.5 prefers that your web application comes with a context.xml file under the META-INF folder.
    So I added a context.xml file under the META-INF folder of my web application,
    please have a look below.
    context.xml
    <Context path="" docBase="C://Program Files//Apache Software Foundation//Tomcat 5.5//webapps//test">
         <Resource
              name="jdbc/testDB"
              factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
              auth="Container"
              type="javax.sql.DataSource"
              maxActive="10"
              maxIdle="5"
              maxWait="10000"
              removeAbandoned="true"
              removeAbandonedTimeout="60"
              logAbandoned="true"
              username="username"
              password="password"
              driverClassName="com.mysql.jdbc.Driver"
              url="jdbc:mysql://localhost:3306/test" />
    </Context> Ok, that is good so far, but how do I configure the Host element.
    I mean how do you link a specific Host to a specific Context?
    Before, the Context element was a sub element of the Host element,
    now it is completely separated.
    Host in server.xml
    <Host name="www.test.com" deployOnStartup="true" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
         <Valve
              className="org.apache.catalina.valves.FastCommonAccessLogValve"
              prefix="test_access_log."
              suffix=".txt"
              pattern="common"
              directory="C://Program Files//Apache Software Foundation//Tomcat 5.5//webapps//test//logs"/>
    </Host> I assume that if I modify the appBase of the Host element from webapps to webapps/test then it would work, but if I have several
    Contexts for the specific Host, how should I configure it then?
    Please help by giving examples!

    OK, I have changed the Host's appbase to webapps/mytestapplication.
    I want to deploy a test.war under the appbase:
    webapps/mytestapplication/test.war
    The name of the host is www.test.com
    Because the war file is not named ROOT.war (instead it is named test.war),
    the URL to the test application would be www.test.com/test.
    Now I have several relative anchor links in the test application
    Say for example the test application is deployed and accessed through www.test.com/test.
    Clicking on the aboutus link would change to URL to www.test.com/aboutus.html.
    Instead, for this to work, the URL must be www.test.com/test/aboutus.html.
    Obviously, the easiest solution is to add /test before each anchor link:
    But the there must a different solution.
    Adding a path to Context element did not work:
    <Context path="/test" ...>
    </Context>
    Question:
    1. what is the solution for the anchor scenario above, should I add /test before each link?
    2. Is my configuration (can be seen at the bottom) correct?
    Basically, I have removed the path and docBase attributes from the Context element.
    I have also set autoDeploy to false in the Host element.
    Here are a few paragraphs from the docs:
    autoDeploy attribute of Host element:
    "Finally, note that if you are defining contexts explicitly,
    you should probably turn off automatic application deployment.
    Otherwise, your context will be deployed twice each, and that may cause problems for your app."
    OK, so I set autoDeploy to false since I am defining contexts explicitly, (META-INF/context.xml)
    docBase attribute of Context element:
    The value of this field must not be set when the Context
    is configured using a META-INF/context.xml file as it will be inferred by the automatic deployment process.
    So, I remove the docBase attribute eventhough I am confused a bit.
    This is the part that confuses me:
    If autoDeploy is set to false since I am defining contexts explicitly,
    how can then anything be inferred by the automatic
    deployment process? (please answer!)
    There should not be any automatic deployment process when autoDeploy is set to false.
    path attribute of Context element:
    The value of this field must not be set except when statically defining a Context in server.xml,
    as it will be inferred from the filenames used for either the .xml context file or the docBase.
    Same as the Context element.
    Thanks!
    <Context>
         <Resource
              name="jdbc/testDB"
              factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
              auth="Container"
              type="javax.sql.DataSource"
              maxActive="10"
              maxIdle="5"
              maxWait="10000"
              removeAbandoned="true"
              removeAbandonedTimeout="60"
              logAbandoned="true"
              username="username"
              password="password"
              driverClassName="com.mysql.jdbc.Driver"
              url="jdbc:mysql://localhost:3306/test" />
    </Context>
    <Host name="www.test.com" deployOnStartup="true" debug="0" appBase="webapps/mytestapplication" unpackWARs="true" autoDeploy="false" xmlValidation="false" xmlNamespaceAware="false">
         <Valve
              className="org.apache.catalina.valves.FastCommonAccessLogValve"
              prefix="test_access_log."
              suffix=".txt"
              pattern="common"
              directory="C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/mytestapplication/test/logs"/>
    </Host>

  • Tomcat 5.5.7 and context.xml

    I am having difficulty corrcetly setting up the context.xml file. Perhaps someone can shed some insight as to how to do this...
    I have a .war file called myWar.war I place this in the webapps directory
    I want to use a path of a/b to access it.
    so, if my browser url is
    http://localhost:8080/a/b/html/index.html it will actually access webapp/myWar/html/index.html
    I keep reading things that confuse me as to how to do this. Do I need something called context.xml, ROOT.xml, or myWar.xml. Also do I place it in the conf/Catalina/localhost directory r in the myWar/Meta-Inf directory
    thank you

    I remember reading something about the path value not being recognized for 5.5.x . It seems to validate it in the documentation below. I don't know how to 'fix' it though...
    "The context path of this web application, which is matched against the beginning of each request URI to select the appropriate web application for processing. All of the context paths within a particular Host must be unique. If you specify a context path of an empty string (""), you are defining the default web application for this Host, which will process all requests not assigned to other Contexts. The value of this field must not be set except when statically defining a Context in server.xml, as it will be infered from the filenames used for either the .xml context file or the docBase."

  • Mapping of Web App context root and the physical directory of the web app

    I'm running Weblogic 7.0 on Windows2000.The physical directory of my web application
    is D:\WL8\weblogic81\TestDeploy\build\TestWebApp and under these directory I have
    my JSPS, static HTML and WEB-INF. I define the context path of this web app in
    the weblogic.xml ;-
    <weblogic-web-app>
         <context-root>/testapp</context-root>
    </weblogic-web-app>
    As a result of deploying this web app in the server (or it may be created manually
    also), the following entry gets inserted in the server's config.xml ,-
    <Application Deployed="true" Name="TestWebApp"
    Path="D:\WL8\weblogic81\TestDeploy\build" TwoPhase="true">
    <WebAppComponent Name="TestWebApp" Targets="myserver" URI="TestWebApp"/>
    </Application>
    Now, whenever I make a request of the form "http://localhost:7001/testapp/..",
    it's properly executing my web app. My question is, how does the container knows
    that for any request for the web app with context path as 'testapp', it has to
    server files from D:\WL8\weblogic81\TestDeploy\build\TestWebApp. In the above
    process, nowhere such mapping is specified. I expected something like Tomcat's
    server.xml, where in docbase we clearly specify this mapping between the context
    path and the physical directory. Please help.

    Let me give some more details and hopefully this will make things clearer.
    Say you deploy /foo/bar/myweb.war and in myweb.war you configure a
    context-root of /rob
    During deployment, the server creates an ApplicationMBean with a path of
    /foo/bar/. It then creates a WebAppComponent with a uri of myweb.war.
    Next, deployment calls back on the web container and tells it to deploy
    the WebAppComponent. The web container reads the myweb.war, parses
    descriptors etc. The web container then updates its data structures to
    register that myweb.war has a context path of /rob. (It has to figure
    out all the other servlet mappings as well.)
    When a request for /rob/foo comes in, the web container consults its
    data structures to determine which webapp and servlet receives the
    request. This is not a linear search of all webapps and servlets.
    There's much better ways to do pattern matching.
    Hope this clears things up. Let me know if you still have questions.
    -- Rob
    Arindam Chandra wrote:
    Thanks for the answer. Still one thing is not clear. Whatever context path I declare
    for my web app as the value of <context-root> element in the weblogic.xml (in
    my example it's "/testapp"), it is no where mapped with the "URI" attribute (or
    any other attribute, sub-element whatsoever in the <Application> element).
    Application Deployed="true" Name="TestWebApp"
    Path="D:\WL8\weblogic81\TestDeploy\build" TwoPhase="true">
    <WebAppComponent Name="TestWebApp" Targets="myserver" URI="TestWebApp"/>
    </Application>
    So when a request of the form http://myweblogic.com:7001/testapp/... arrives at
    the server, how does the server knows that it has to serve this request with files
    from D:\WL8\weblogic81\TestDeploy\build\TestWebApp ? It should not be like the
    web container iterates thru all the web application entries in config.xml and
    tries to match with one context-root declaration. I repeat, I expected some mapping
    similar to Tomcat's server.xml, where in the <docbase> element u clearly specify
    the mapping between the context path and the physical directory
    Rob Woollen <[email protected]> wrote:
    Arindam Chandra wrote:
    I'm running Weblogic 7.0 on Windows2000.The physical directory of myweb application
    is D:\WL8\weblogic81\TestDeploy\build\TestWebApp and under these directoryI have
    my JSPS, static HTML and WEB-INF. I define the context path of thisweb app in
    the weblogic.xml ;-
    <weblogic-web-app>
         <context-root>/testapp</context-root>
    </weblogic-web-app>
    As a result of deploying this web app in the server (or it may be createdmanually
    also), the following entry gets inserted in the server's config.xml,-
    <>So the server will look for your web application at the Application Path
    (D:\WL8\weblogic81\TestDeploy\build|) + the web uri (TestWebApp). So
    it
    maps the context-root you've specified /testapp to that path.
    It's a little clearer in the case where you had a full-fledged EAR.
    Then you'r application path would map to the "root" of the EAR, and the
    uris would point to the various modules (eg webapps.)
    -- Rob
    Now, whenever I make a request of the form "http://localhost:7001/testapp/..",
    it's properly executing my web app. My question is, how does the containerknows
    that for any request for the web app with context path as 'testapp',it has to
    server files from D:\WL8\weblogic81\TestDeploy\build\TestWebApp. Inthe above
    process, nowhere such mapping is specified. I expected something likeTomcat's
    server.xml, where in docbase we clearly specify this mapping betweenthe context
    path and the physical directory. Please help.

Maybe you are looking for