I think something like:

   <servlet-mapping>
        <servlet-name>
            indexServlet
        </servlet-name>
        <url-pattern>
           app_nr*/
        </url-pattern>
    </servlet-mapping>

should take all hits to that path, but not to specified files, to the
indexServlet, which can parse the request URI to decide what to give you,
depending on where you think you are.. because none of these folders will
actually need to exist.
Unless you really want to put files in them ;-)

Its just a hunch, but should be worth a try as the real answer will probably
look something like this.

danny



> -----Original Message-----
> From: Hunor Nam [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 12, 2001 9:03 AM
> To: [EMAIL PROTECTED]
> Subject: Index files and CGI UNDER TOMCAT
>
>
> Hi.
> My problem is:
>
> I need to use the <welcome-file> attribute but in a different way...
>
> Our app. has many folders and I do not want to put an index file in each
> of them...
> Especially that it has more sub applications so I would need different
> index files for different folders... it would be nasty to put one in
> each of them and after that, if something changes to change all the
> files...
> I would like to have some kind of redirection set to some folder levels
> (so everything beneath them to call its own index...)
> Ok so it's not to clear...? Well... I'll try explaining it a little more
> detailed (with some examples)
>
> Lets say the folder structure looks like this:
>
> Main Folder
> +----App nr.1
>       +-----Folder Level1
>               +-----Folder Level2
> +----App nr.2
>       +-----Folder Level1
>               +-----Folder Level2
>
> +----App nr.3
>       +-----Folder Level1
>               +-----Folder Level2
>
> So I need one index file for the Main Folder, that's easy ... but
> everything beneath App nr.1 should go to indexapp nr.1 (and that means
> every Folder Level ...1, 2, 3 and so one)
> The same goes to App nr.2 everything beneath it should go to indexapp
> nr.2.
> OK I would manage handling 3,4 index files but not 20-30 (as how many
> folders we have...)
> I'm not sure if something like this is possible and/or how it's done but
> something like:
>
> "If folder starts whit /app nr.1 go to index nr.1;
>  If folder starts whit /app nr.2 go to index nr.2;
>                And so on"
>
> Problem nr. 2:
> How can I tell tomcat that I do not want some files (having the same
> extension) to be accessible for the end user, those files are actually
> .jsp flies used whit <include file> ?
>
> After all these problems I have an Easter egg for the Tomcat Users (if
> any one is interested), especially that Easter is close... :)
> We developed a module that supports cgi running under Tomcat.
> I say, "We developed it" because we have not found anything like it on
> the net...
> So if there would be any one interested in it we would appreciate some
> feedback so we would optimize and publish the module, at this time it
> was tested whit cgis from Crystal Reports.
>
> Thanks
>       Hades
>
> Ps: sorry for my poor English...
>

Reply via email to