Discussions

Web tier: servlets, JSP, Web frameworks: Directory Structure of Weblogic6.1?

  1. Directory Structure of Weblogic6.1? (4 messages)

    Hi ,
    Iam using Weblogic6.1 Application Server.Generally we used to deploy jsp and servlets in default directory which is as follows : we used to copy jsp file in "WL_HOME\config\mydomain\applications\DefaultWebApp" and servlets in WL_HOME\config\mydomain\applications\DefaultWebApp\
    WEB-INF\classes. (Where WL_HOME is the directory of WebLogic Server installation, and mydomain is the name you specified as the WebLogic Admin Domain Name during installation.)


    My question is I want to create my own web application directory structure that should not belong to above directory structure but it should be as follows :C:\bea\wlserver6.1\MyWebApplication...so what all the things I need to do for creating my own directory structure such as how my directory structure should look like,what all xml files need to be copy in my corresponding folders,what all the configurations I should make to weblogic server so that it should work properly for my own Web application directory structure

    Thanks in advance

    Regards
    Liyakhat

    Threaded Messages (4)

  2. Directory Structure of Weblogic6.1?[ Go to top ]

    The good news is that the directory structure is specified in the servlet standard, so the same thing you do for Weblogic should work for any J2EE 1.2+ compliant server:

    [your-directory]/WEB-INF/web.xml: Configuration
    [your-directory]/WEB-INF/classes: Class files (including servlets)
    [your-directory]/WEB-INF/lib: JAR library files
    [your-directory]/: HTML, JSP and Images go outside of WEB-INF

    Some twists:

    1. Every application other than the DefaultWebApp needs a "context path", which by default is your directory name. The context path needs to be pre-pended to all URLs for your application:

    http:///[your-directory]/YourServlet

    2. You have to put your application directory in a specific location, which depends on the server you are using:

    WL_HOME\config\mydomain\applications\[your-directory]

    3. For even more portable deployment, you can package your code into a WAR (Web Archive) file, which is just a JAR file containing your files in the correct directory structure, with a ".war" instead of ".jar" extension.
  3. Directory Structure of Weblogic6.1?[ Go to top ]

    The good news is that the directory structure is specified in the servlet standard, so the same thing you do for Weblogic should work for any J2EE 1.2+ compliant server:

    >
    > [your-directory]/WEB-INF/web.xml: Configuration
    > [your-directory]/WEB-INF/classes: Class files (including servlets)
    > [your-directory]/WEB-INF/lib: JAR library files
    > [your-directory]/: HTML, JSP and Images go outside of WEB-INF
    >
    > Some twists:
    >
    > 1. Every application other than the DefaultWebApp needs a "context path", which by default is your directory name. The context path needs to be pre-pended to all URLs for your application:
    >
    > http:///[your-directory]/YourServlet
    >
    > 2. You have to put your application directory in a specific location, which depends on the server you are using:
    >
    > WL_HOME\config\mydomain\applications\[your-directory]
    >
    > 3. For even more portable deployment, you can package your code into a WAR (Web Archive) file, which is just a JAR file containing your files in the correct directory structure, with a ".war" instead of ".jar" extension.

    But I want to create my own directory structure in C:\bea\wlserver6.1\MyWebApplication but not in WL_HOME\config\mydomain\applications\[your-directory].so please help me what all the changes I need to make so that my application should work properly and how do I change the "Context-path",xml files so that it should point to my own webapplication directory.I will be very grateful if explanation in detail with an example such as "Hello World" program
  4. Directory Structure of Weblogic6.1?[ Go to top ]

    Why do you need a directory outside Weblogic's standard applications directory? I think that what you want to do is theoretically possible, but would involve a huge amount of work for no particular benefit.

    I suggest you stick with the standard directory structure.
  5. Directory Structure of Weblogic6.1?[ Go to top ]

    Why do you need a directory outside Weblogic's standard applications directory? I think that what you want to do is theoretically possible, but would involve a huge amount of work for no particular benefit.

    >
    > I suggest you stick with the standard directory structure.

    Well don't mix apples with pears....

    a) your app-structure must follow the web-app-directory structure as per sun's specs.

    b) WLS allows you to load web-applications either in expanded directory-structure or packed as a war

    c) using the config.xml or (better for the apprentice) using the WLS-console application you can deploy an application from any place in your filesystem you like. EG. deploy WLS to C:/wls61... and your application to C:/data/mywebapp...
    Works sweet as an applepie. The descriptions in WLS doc usually is sufficient...

    hope this helps
    Alexander