RE: How to configure a custom page for JSP 404 errors?
You also MUST set in your error page the faloving tag: %@ page isErrorPage=true % Hades -Original Message- From: Ryan Lubke [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 10:29 PM To: [EMAIL PROTECTED] Subject: Re: How to configure a custom page for JSP 404 errors? Hi Pierce, From what I've been able to gather, you should be able to set the error page using the error-page directive within the deployment descriptor for a web app (web.xml). error-page error-code404/error-code location/error.jsp/location /error-page Looking through the bug database, there was an open issue regarding the use of static html pages within the location tag. I'm uncertain at this time what release it's actually fixed in, but if you try it and get a stacktrace, then I guess you know :) The bug report can be found here: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=291 I did find this information in the archives. Try looking at the results of the following search: http://mikal.org/interests/java/tomcat/archive/search?search=error+page+ custom+404 I'm sure those who are more experiences could expand/correct on this information. Hope this helps. -rl Courtney, Pierce wrote: Hello, This question probably has come up before, I just can't find it in the archives I am using Tomcat 3.2.2 standalone (not with Apache). How can I configure a particular page (servlet, static html, or jsp) to be the default page that comes up if the requested jsp is not found, instead of the 404 error. In other words, if a user requests: http://myTomcatSite.com/somePage.jsp I want to have somePage.jsp come up if it exists. But if somePage.jsp does not exist, I *don't* want the default 404 error to be displayed. Instead I want some custom page (a servlet actually) to be processed. I don't really care if this is achieved with a client-side redirect or a server-side include/forward. I have tried using the DefaultServlet, which doesn't seem to work. I have also set up my own servlet against url-pattern /* /url-pattern. This works for servlets only, not JSPs. It seems the basic problem is that any URI that matches *.jsp. gets processed by the JspServlet. So it is not determined if the .jsp file actually exists or not until the JspServlet is triggered. Can this custom error page functionality be configured somehow in Tomcat? Thanks for any help, Pierce Courtney [EMAIL PROTECTED]
Apache and servlet maping....
Hi I've installed Apache recently; I'm also using Tomcat. The problem seems to be that Apache does not want to allow my servlet mappings. I have some files whit a specific extension lets call them .myext. I've configured Tomcat to map a servlet to all .myext files. I've added JkMount /myapp/*.myext ajp12 and even JkMount /*.myext ajp12 to the httpd.conf file. The idea is that this .myext files are some "restricted" files i do not want to grant access to them. So the servlet was redirecting all the requests for these files to an "access denied" jsp. All these was working when Tomcat was stand alone... now it looks like Apache is serving all requests for .myext... what can I do ? Hades
RE: Welcome File : index.jsp
welcome-file-list welcome-file/index.jsp/welcome-file /welcome-file-list Make sure it's in your aplication directory and not the one in the conf Hades -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 17, 2001 12:42 AM To: [EMAIL PROTECTED] Subject: RE: Welcome File : index.jsp Better yet, could someone please send me a functioning copy of web.xml that sits in the WEB-INF directory of your context and that loads index.jsp as a default file for that context. Thanks in advance. [EMAIL PROTECTED] on 04/16/2001 12:44:42 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: Suha Yacoub/IL/ONE) Subject: RE: Welcome File : index.jsp Hello, I looked at the web.xml which I copied from TOMCAT_HOME/conf and it complies with the dtd that it refers to on the Sun site: http://java.sun.com/j2ee/dtds/web-app_2_2.dtd I'm still trying to get tomcat to load index.jsp when I hit the context directory. No luck yet. A few questions: 1) This web.xml defines a couple of servlets: - default (servlet mapping /servlet/*) - invoker (servlet mapping /*.jsp) Do I need these, if this is already defined in server.xml? 2) Should I define index.jsp as a servlet. If so, what should the value be for : - load-on-startup - servlet-class 3) Should I define all the mime types within each context or is this unnecessary? Can I remove these tags? 4) My welcome-file-list tag is ok with only one child welcome-fileindex.jsp/welcome-file. I apologize if there's documentation about this and I missed it. Thanks, suha. The web.xml file also contains a long list Michael Wentzel [EMAIL PROTECTED] on 04/10/2001 01:06:16 PM Please respond to [EMAIL PROTECTED] To: "'[EMAIL PROTECTED]'" [EMAIL PROTECTED] cc:(bcc: Suha Yacoub/IL/ONE) Subject: RE: Welcome File : index.html I'm having a similar problem. I'm running tomcat in-process within apache. Will I need to set the welcome file setting on apache? I tried setting index.jsp as my welcome file in web.xml but the browser/server ignores this setting. I restarted both apache and tomcat. You might want to make sure that the xml complies with the dtd found in TOMCAT_HOME/conf/. If these items are out of order then they are ignored at server startup. In this case it's the server ignoring the welcome-file not the browser. And of course, as mentioned before, make sure you are using the right ordering for your welcom-file(s) if you have multiples. --- Michael Wentzel Software Developer Software As We Think - http://www.aswethink.com
RE: is it possible? (Modal Dialog thru Applet)
You could use showModalDialog, java script method, but it's suported only by IE4+ Syntax: vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures]) Hades -Original Message- From: Sunil Chandurkar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 17, 2001 4:14 PM To: [EMAIL PROTECTED] Subject: is it possible? (Modal Dialog thru Applet) Hello All I need some more guidance on getting Modal Dialog Box from Applet. I could generate dialog box from applet on some press button, but all those are modeless dialog boxes. I have tried this stuff by calling Javascript, but there is restriction in Java script on calling modal dialog boxes, because there are alert and confirm dialog boxes in java script, but i want my own customize dialog box.. popup from applet on pressign some button. But, is it possible to popup our own customize dialog box from Browser(Applet)? thanx in advance /sunil _ Get LifeTime Free email Visit --- http://www.nagpurcity.net
RE: Hades - RE: is it possible? (Modal Dialog thru Applet)
Sorry, but which version of NetScape are you talking about ??? I've tried whit NetScape 4.7 and it's not suported Hades -Original Message- From: Sunil Chandurkar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 17, 2001 6:34 PM To: [EMAIL PROTECTED] Subject: Hades - RE: is it possible? (Modal Dialog thru Applet) Will it work with Netscape also. /sunil --- "Hunor Nam" [EMAIL PROTECTED] wrote: You could use showModalDialog, java script method, but it's suported only by IE4+ Syntax: vReturnValue =3D window.showModalDialog(sURL [, vArguments] [, sFeatures]) Hades -Original Message- From: Sunil Chandurkar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 17, 2001 4:14 PM To: [EMAIL PROTECTED] Subject: is it possible? (Modal Dialog thru Applet) Hello All I need some more guidance on getting Modal Dialog Box from Applet. I could generate dialog box from applet on some press button, but all those are modeless dialog boxes. I have tried this stuff by calling Javascript, but there is restriction in Java script on calling modal dialog boxes, because there are alert and confirm dialog boxes in java script, but i want my own customize dialog box.. popup from applet on pressign some button. But, is it possible to popup our own customize dialog box from Browser(Applet)? thanx in advance /sunil _ Get LifeTime Free email Visit --- http://www.nagpurcity.net _ Get LifeTime Free email Visit --- http://www.nagpurcity.net
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...
RE: Index files and CGI UNDER TOMCAT
Hi again, Well, Danny thanks a lot. Your idea was god. Almost perfect for my needs. There is a big "bubu" anyhow... This is how things look now: Part of web.xml : servlet servlet-name indexOfOneApp /servlet-name servlet-classapp.utils.tomcat.indexOfOneApp /servlet-class /servlet servlet-mapping servlet-nameindexOfOneApp /servlet-name url-pattern/OneApp/*/url-pattern /servlet-mapping the indexOfOneApp servlet: public class indexOfOneApp extends HttpServlet { public void init(ServletConfig conf) throws ServletException { super.init(conf); } public void doGet(HttpServletRequest req,HttpServletResponse res) throws IOException { res.sendRedirect("/app/oneapp/oneapp.jsp"); } } Well what happens now is that (I think) because the oneapp.jsp is itself under app/oneapp/ it gets traped in an infinit loop (I have tried putting a System.out.println ("something") in the doGet method... well, it was printing "something" all over again...) Pleas do assist me further (I really need some god ideas...) Thanks again ! Hades -Original Message- From: Danny Angus [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 11:58 AM To: [EMAIL PROTECTED] Subject: RE: Index files and CGI UNDER TOMCAT 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...
RE: error-page directive throw a java.lang.StackOverflowError
Hi I had a similar problem my self... Here is how i solvedit: I renamed the 404.jsp to something else... like badrequest.jsp or something... (not sure if requeired) And make sure to add this to your error page ! :%@ page isErrorPage="true" % Hades -Original Message- From: Arne Borkowski (borko.net) [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 3:40 PM To: [EMAIL PROTECTED] Subject: RE: error-page directive throw a java.lang.StackOverflowError Hi, I am using Tomcat 3.2.1 under RedHat Linux and also tried to configure my own error-page entries in the WEB.XML of the context in question. And it failed with a similar error (stack overflow) flodding my console with lines like Ctx( ): 404 R( + /nono.xml + null ) null I set Cocoon's Tomcat context to "/" making my Apache and Cocoon conext pointing to .../htdocs directory. So far so good. Only too bad, that ERROR 404 (and others are not handled properly). BTW: if I use the Tomcat context "/cocoon" things are *no* better regarding error-page behaviour! Does any of you know where I do wrong? Regards, Arne -Original Message- From: Stphane BAUDET [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 11:45 AM To: [EMAIL PROTECTED] Subject: error-page directive throw a java.lang.StackOverflowError Hello, I'm using Tomcat 3.2.1 under Windows 2000. In my web.xml descriptor, I've set up this error-page directive error-page error-code404/error-code location/404.html/location /error-page 404.html is a the root of my context. When I type an incorrect URL, I've got a 500 response, and a java.lang.StackOverflowError exception in thrown. Any idea ??? In the log I've got: Plenty of these lines: 2001-04-12 10:56:12 - Ctx( /glextra ): Get real path /404.html C:\tomcat321\webapps\glextra\404.html C:\tomcat321\webapps\glextra 2001-04-12 10:56:12 - Ctx( /glextra ): Get real path /default.jsp2 C:\tomcat321\webapps\glextra\default.jsp2 C:\tomcat321\webapps\glextra Than: 2001-04-12 10:56:12 - Ctx( /glextra ): Exception in: R( /glextra + /default.jsp2 + null) - java.lang.StackOverflowError at java.lang.Exception.init(Exception.java:38) at java.io.IOException.init(IOException.java:43) at java.io.FileNotFoundException.init(FileNotFoundException.java:62) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:64) at java.io.FileInputStream.init(FileInputStream.java:95) at org.apache.tomcat.request.FileHandler.doService(StaticInterceptor. java:365) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.handleStatus(ContextManager. java:1049) at org.apache.tomcat.request.FileHandler.doService(StaticInterceptor. java:387) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.handleStatus(ContextManager. java:1049) at org.apache.tomcat.request.FileHandler.doService(StaticInterceptor. java:387) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.handleStatus(ContextManager. java:1049) at org.apache.tomcat.request.FileHandler.doService(StaticInterceptor. java:387) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.handleStatus(ContextManager. java:1049) at org.apache.tomcat.request.FileHandler.doService(StaticInterceptor. java:387) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.handleStatus(ContextManager. java:1049) at org.apache.tomcat.request.FileHandler.doService(StaticInterceptor. java:387) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.handleStatus(ContextManager. java:1049) at org.apache.tomcat.request.FileHandler.doService(StaticInterceptor. java:387) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.handleStatus(ContextManager. java:1049) at org.apache.tomcat.request.FileHandler.doService(StaticInterceptor. java:387) at org.apache.tomcat.core.Handler.service(Handler.java:286) at
RE: Index files and CGI UNDER TOMCAT
Yep your right but anyhow I managed to solve the problem useing errorpages... if interested here is the solution...: I suppressed folder browseing and I made the error page to check the URI and if it has the needed patern (OneApp) I make a forward to oneappindex if it has the SecondApp patern I forward to secondappindex and so on... :-) Thanks a lot By the way I used your idea in a another problem (so dont thing you were not apricieted :-) ) Hades -Original Message- From: Danny Angus [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 4:23 PM To: [EMAIL PROTECTED] Subject: RE: Index files and CGI UNDER TOMCAT if you leave the * out of the URL pattern you'll only get directories, not files in them, does that help? or try /OneApp/*/ I don't know how hot pattern matching is in the config parser, but I'd expect that to match anything ending with / even things with / in them, which is therefore any directory but no file... /OneApp/*/ should match .. /OneApp/subdir/ and /OneApp/subdir/subsubdir/ not /OneApp/subdir/file.xyz It would be cool if you could use regex in URL pattern.. d -Original Message- From: Hunor Nam [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 12:25 PM To: [EMAIL PROTECTED] Subject: RE: Index files and CGI UNDER TOMCAT Hi again, Well, Danny thanks a lot. Your idea was god. Almost perfect for my needs. There is a big "bubu" anyhow... This is how things look now: Part of web.xml : servlet servlet-name indexOfOneApp /servlet-name servlet-classapp.utils.tomcat.indexOfOneApp /servlet-class /servlet servlet-mapping servlet-nameindexOfOneApp /servlet-name url-pattern/OneApp/*/url-pattern /servlet-mapping the indexOfOneApp servlet: public class indexOfOneApp extends HttpServlet { public void init(ServletConfig conf) throws ServletException { super.init(conf); } public void doGet(HttpServletRequest req,HttpServletResponse res) throws IOException { res.sendRedirect("/app/oneapp/oneapp.jsp"); } } Well what happens now is that (I think) because the oneapp.jsp is itself under app/oneapp/ it gets traped in an infinit loop (I have tried putting a System.out.println ("something") in the doGet method... well, it was printing "something" all over again...) Pleas do assist me further (I really need some god ideas...) Thanks again ! Hades -Original Message- From: Danny Angus [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 11:58 AM To: [EMAIL PROTECTED] Subject: RE: Index files and CGI UNDER TOMCAT 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
RE: Index files and CGI UNDER TOMCAT
Wel, I made that in Tomcat Stand Alone, every web server has its own way (I think...) But here is what you have to do in Tomcat: In the server.xml : locate : RequestInterceptor className="org.apache.tomcat.request.StaticInterceptor" debug="0" suppress="false" / and rewrite it to : RequestInterceptor className="org.apache.tomcat.request.StaticInterceptor" debug="0" suppress="true" / This works for me... if its not workin' for you than try seting : suppress="true" in other request interceptors . God luck Hades -Original Message- From: Stphane BAUDET [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 4:37 PM To: [EMAIL PROTECTED] Subject: Re: Index files and CGI UNDER TOMCAT What do you mean by suppress folder browsing ? How to you do this ? Hunor Nam a crit : Yep your right but anyhow I managed to solve the problem useing errorpages... if interested here is the solution...: I suppressed folder browseing and I made the error page to check the URI and if it has the needed patern (OneApp) I make a forward to oneappindex if it has the SecondApp patern I forward to secondappindex and so on... :-) Thanks a lot By the way I used your idea in a another problem (so dont thing you were not apricieted :-) ) Hades -Original Message- From: Danny Angus [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 4:23 PM To: [EMAIL PROTECTED] Subject: RE: Index files and CGI UNDER TOMCAT if you leave the * out of the URL pattern you'll only get directories, not files in them, does that help? or try /OneApp/*/ I don't know how hot pattern matching is in the config parser, but I'd expect that to match anything ending with / even things with / in them, which is therefore any directory but no file... /OneApp/*/ should match .. /OneApp/subdir/ and /OneApp/subdir/subsubdir/ not /OneApp/subdir/file.xyz It would be cool if you could use regex in URL pattern.. d -Original Message- From: Hunor Nam [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 12:25 PM To: [EMAIL PROTECTED] Subject: RE: Index files and CGI UNDER TOMCAT Hi again, Well, Danny thanks a lot. Your idea was god. Almost perfect for my needs. There is a big "bubu" anyhow... This is how things look now: Part of web.xml : servlet servlet-name indexOfOneApp /servlet-name servlet-classapp.utils.tomcat.indexOfOneApp /servlet-class /servlet servlet-mapping servlet-nameindexOfOneApp /servlet-name url-pattern/OneApp/*/url-pattern /servlet-mapping the indexOfOneApp servlet: public class indexOfOneApp extends HttpServlet { public void init(ServletConfig conf) throws ServletException { super.init(conf); } public void doGet(HttpServletRequest req,HttpServletResponse res) throws IOException { res.sendRedirect("/app/oneapp/oneapp.jsp"); } } Well what happens now is that (I think) because the oneapp.jsp is itself under app/oneapp/ it gets traped in an infinit loop (I have tried putting a System.out.println ("something") in the doGet method... well, it was printing "something" all over again...) Pleas do assist me further (I really need some god ideas...) Thanks again ! Hades -Original Message- From: Danny Angus [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 11:58 AM To: [EMAIL PROTECTED] Subject: RE: Index files and CGI UNDER TOMCAT 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... i
RE: Welcome File : index.html
Hi. I have a similar problem... My app. has many folders and I do not want to put an index file in each of them... Especially that it has more sub app.'s 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...) Problem nr 2 is: how can I restrict folder browsing Thanx Hades -Original Message- From: Ed Robbins [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 3:03 PM To: [EMAIL PROTECTED] Subject: Re: Welcome File : index.html Joar Vatnaland wrote: How did you change the welcome-file, did you just append an welcome-filesample.html/welcome-file after the other entries? My guess is that it goes through the list and starts with the first file it finds. So if an index.jsp or index.html still exists in your directory, then that will still be the starting file. Either remove the index file from the directory, or place your entry ahead of any other wellcome-file entry. Joar is right, if there is a list it will go through the list until it finds the first match. Also, make sure you have the welcome-file tag within a welcome-file-list tag, so it should look like the following: welcome-file-list welcome-filewelcome.html/welcome-file welcome-fileindex.html/welcome-file welcome-filehome.html/welcome-file welcome-file-list Don't forget that each web app has it's own web.xml file and you want to put it in the appropriate file. Ed Joar -Original Message- From: Sunil Chandurkar [mailto:[EMAIL PROTECTED]] Sent: 10 April 2001 16:09 To: [EMAIL PROTECTED] Subject: Welcome File : index.html Hello can i change welcome file index.html to my sample.html I have tried this by changing contents of welcome-file tag of file web.xml still it didn't work.. please let me know the way... Thanx in advance regards sunil _ Get LifeTime Free email Visit --- http://www.nagpurcity.net