Tomcat classpath and servlets outside of WEB-INF

Discussion in 'Java' started by Jim, Aug 11, 2003.

  1. Jim

    Jim Guest

    Hi,
    Does anybody know if it is possible to execute servlets outside the
    WEB-INF directory? Somebody at work thinks that setting the classpath
    would help. But I have had no luck so far. I'm currently on a
    Win2000 box running Apache, Tomcat 4.1.18, j2sdk 1.4.2. And I found
    out (to my dismay) that symbolic linking doesn't work with Windows. I
    don't even know if symbolic linking would work if it was a linux box.
    People at work say that Tomcat has worked and it was executing
    servlets outside the WEB-INF directory. They are very sure on this
    point. But it broke, and they decided to deleted the entire
    installation (conf file and all). And the person who got it to work
    is no longer here. So I'm at square one. Jserv had been running the
    servlets, but the company wants to move forward. The servlets had
    been mapped to Jserv through the classpath.

    Any help or ideas would be greatly appreciated.
    Jim
     
    Jim, Aug 11, 2003
    #1
    1. Advertising

  2. Jim wrote:

    > Hi,
    > Does anybody know if it is possible to execute servlets outside the
    > WEB-INF directory? Somebody at work thinks that setting the classpath
    > would help. But I have had no luck so far. I'm currently on a
    > Win2000 box running Apache, Tomcat 4.1.18, j2sdk 1.4.2. And I found
    > out (to my dismay) that symbolic linking doesn't work with Windows. I
    > don't even know if symbolic linking would work if it was a linux box.
    > People at work say that Tomcat has worked and it was executing
    > servlets outside the WEB-INF directory. They are very sure on this
    > point. But it broke, and they decided to deleted the entire
    > installation (conf file and all). And the person who got it to work
    > is no longer here. So I'm at square one. Jserv had been running the
    > servlets, but the company wants to move forward. The servlets had
    > been mapped to Jserv through the classpath.
    >
    > Any help or ideas would be greatly appreciated.
    > Jim


    Newer versions of tomcat now ship with symbolic links in webapps disabled.
    you should check the config file (don't know the exact key :), but it should
    be possible to re-enable it.

    --
    mvg,
    Christophe Vanfleteren
     
    Christophe Vanfleteren, Aug 11, 2003
    #2
    1. Advertising

  3. Jim

    Jim Guest

    Juha Laiho <> wrote in message news:<bhb6un$26v$-int>...
    > (Jim) said:
    > > Does anybody know if it is possible to execute servlets outside the
    > >WEB-INF directory?

    >
    > It might work with CLASSPATH tricks, but why do you need this?
    >
    > If you told what is the problem you're trying to solve with this, perhaps
    > someone would be able to propose some solution to the actual problem.


    The project I'm interning on has been around for several years. They
    have a directory structure like so:

    C:\Main_App_dir\Minor_App\Directories_of_classes
    C:\Main_App_dir\Supporting_App\...\Dir_with_classes
    C:\Main_App_dir\Other_Supporting_App\...\Dir_with_classes

    The project had been using JServ to run the servlets by passing the
    Classpaths through a file to JServ. And I can't change the directory
    structure because class A in
    C:\Main_App_dir\Supporting_App\...\Dir_with_classes calls class B in
    C:\Main_App_dir\Other_Supporting_App\...\Dir_with_classes.

    Now the project leaders want to move to Tomcat. Any suggestions? Is
    there a source code example of a webappclassloader that can be forced
    to load from any directory?

    Jim
     
    Jim, Aug 13, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. pradeep gummi
    Replies:
    1
    Views:
    964
    dhek bhun kho
    Sep 5, 2003
  2. M
    Replies:
    5
    Views:
    448
    Christophe Vanfleteren
    Sep 20, 2003
  3. Matthew Macchia
    Replies:
    3
    Views:
    1,100
    Roedy Green
    Apr 13, 2004
  4. Hans
    Replies:
    3
    Views:
    2,618
    Ryan Stewart
    May 16, 2004
  5. Steve Sobol
    Replies:
    1
    Views:
    6,390
    Raymond DeCampo
    Aug 10, 2005
Loading...

Share This Page