Welcome file list
Hi, this is probably a basic question but I could really use a hand. Is there a way to simply read/display www.mydomain.com without redirecting to index.jsp? I found out how to do the opposite in web.xml welcome-file-list welcome-fileindex.jsp/welcome-file welcome-fileindex.html/welcome-file welcome-fileindex.htm/welcome-file /welcome-file-list TIA Steve
welcome-file-list
Hello, I have a web site that I want accessed using the dns name: eg: http://www.purcell.com I have a welcome-file entry which says go to index.jsp. Of course the page loads and the url looks like this: http://www.purcell.com/index.jsp Is there anyway to remove the index.jsp, but display that page. Occasionally I see that when I am surfing and wonder how this is accomplished? Does anyone know how to configure this to show a clean url in browser. (aside from JS). Thanks, Scott
Re: welcome-file-list
If I have correctelly understand the problem, to solve it u just have to add in your web.xml a few lines like this: welcome-file-list welcome-file/index.jsp/welcome-file /welcome-file-list where u can change /index.jsp with any other page that you like to display as your start page. Hope this help, Omar On Thu, 3 Feb 2005 11:48:01 -0600, Scott Purcell [EMAIL PROTECTED] wrote: Hello, I have a web site that I want accessed using the dns name: eg: http://www.purcell.com I have a welcome-file entry which says go to index.jsp. Of course the page loads and the url looks like this: http://www.purcell.com/index.jsp Is there anyway to remove the index.jsp, but display that page. Occasionally I see that when I am surfing and wonder how this is accomplished? Does anyone know how to configure this to show a clean url in browser. (aside from JS). Thanks, Scott -- Adobati Omar [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: welcome-file-list
Tomcat 5 hides index.jsp, tomcat 4 does not. -Tim Scott Purcell wrote: Hello, I have a web site that I want accessed using the dns name: eg: http://www.purcell.com I have a welcome-file entry which says go to index.jsp. Of course the page loads and the url looks like this: http://www.purcell.com/index.jsp Is there anyway to remove the index.jsp, but display that page. Occasionally I see that when I am surfing and wonder how this is accomplished? Does anyone know how to configure this to show a clean url in browser. (aside from JS). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem in Welcome-file-list and security
My very first page is the login screen. If i have specified security constraints, then how can i show the login screen as the first screen. The request should actually go to a secured screen, and this will bring up the login screen. Thats the reason, i require the first page to be secured. Is there any other way i can do this. -Shanmugam- Tim Funk wrote: Security constraints are in the incoming URL. [ Also welcome files *should*(but not required) be single files - not files buried under a directory. Good: welcome-filecowbell.jsp/welcome-file Bad: welcome-filemore/cowbell.jsp/welcome-file ] -Tim shanmugampl wrote: Hi, I am using 5.0.19 I have the following definition in my web.xml file welcome-file-list * welcome-file/jsp/test.jsp/welcome-file* /welcome-file-list security-constraint web-resource-collection web-resource-nameSecured Core Context/web-resource-name * url-pattern/jsp/*/url-pattern* /web-resource-collection auth-constraint role-name*/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/login/login.jsp/form-login-page form-error-page/login/login.jsp/form-error-page /form-login-config /login-config Now if i access my application as http://localhost:8080/appName, the welcome-file is served directly, without going through the security constraints. But if i invoke as. http://localhost:8080/appName/jsp/test.jsp, then the login.jsp page is brought up. The same setup works fine in tomcat 4.1.24 Am i missing something in the configuration or is it a tomcat 5 bug. If it is a bug are there any workarounds - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem in Welcome-file-list and security
Found out the problem. Changing the welcome-file from */jsp/test.jsp* to *jsp/test.jsp *solves the issue. The additional / causes some changes in the url pattern and as a result the request was not considered to be secured one. Thanks for your effort. -Shan- Tim Funk wrote: Make your welcome file index.jsp. Then for that specific URL (/) - have it redirect to jsp/test.jsp. That way the external redirect forces the security constraint to be caught. For example: index.jsp: %@ taglib uri=http://java.sun.com/jstl/core; prefix=c% c:redirect url=jsp/test.jsp/ -Tim shanmugampl wrote: My very first page is the login screen. If i have specified security constraints, then how can i show the login screen as the first screen. The request should actually go to a secured screen, and this will bring up the login screen. Thats the reason, i require the first page to be secured. Is there any other way i can do this. -Shanmugam- Tim Funk wrote: Security constraints are in the incoming URL. [ Also welcome files *should*(but not required) be single files - not files buried under a directory. Good: welcome-filecowbell.jsp/welcome-file Bad: welcome-filemore/cowbell.jsp/welcome-file ] -Tim shanmugampl wrote: Hi, I am using 5.0.19 I have the following definition in my web.xml file welcome-file-list * welcome-file/jsp/test.jsp/welcome-file* /welcome-file-list security-constraint web-resource-collection web-resource-nameSecured Core Context/web-resource-name * url-pattern/jsp/*/url-pattern* /web-resource-collection auth-constraint role-name*/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/login/login.jsp/form-login-page form-error-page/login/login.jsp/form-error-page /form-login-config /login-config Now if i access my application as http://localhost:8080/appName, the welcome-file is served directly, without going through the security constraints. But if i invoke as. http://localhost:8080/appName/jsp/test.jsp, then the login.jsp page is brought up. The same setup works fine in tomcat 4.1.24 Am i missing something in the configuration or is it a tomcat 5 bug. If it is a bug are there any workarounds - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem in Welcome-file-list and security
Security constraints are in the incoming URL. [ Also welcome files *should*(but not required) be single files - not files buried under a directory. Good: welcome-filecowbell.jsp/welcome-file Bad: welcome-filemore/cowbell.jsp/welcome-file ] -Tim shanmugampl wrote: Hi, I am using 5.0.19 I have the following definition in my web.xml file welcome-file-list * welcome-file/jsp/test.jsp/welcome-file* /welcome-file-list security-constraint web-resource-collection web-resource-nameSecured Core Context/web-resource-name * url-pattern/jsp/*/url-pattern* /web-resource-collection auth-constraint role-name*/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/login/login.jsp/form-login-page form-error-page/login/login.jsp/form-error-page /form-login-config /login-config Now if i access my application as http://localhost:8080/appName, the welcome-file is served directly, without going through the security constraints. But if i invoke as. http://localhost:8080/appName/jsp/test.jsp, then the login.jsp page is brought up. The same setup works fine in tomcat 4.1.24 Am i missing something in the configuration or is it a tomcat 5 bug. If it is a bug are there any workarounds - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem in Welcome-file-list and security
Hi, I am using 5.0.19 I have the following definition in my web.xml file welcome-file-list * welcome-file/jsp/test.jsp/welcome-file* /welcome-file-list security-constraint web-resource-collection web-resource-nameSecured Core Context/web-resource-name * url-pattern/jsp/*/url-pattern* /web-resource-collection auth-constraint role-name*/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/login/login.jsp/form-login-page form-error-page/login/login.jsp/form-error-page /form-login-config /login-config Now if i access my application as http://localhost:8080/appName, the welcome-file is served directly, without going through the security constraints. But if i invoke as. http://localhost:8080/appName/jsp/test.jsp, then the login.jsp page is brought up. The same setup works fine in tomcat 4.1.24 Am i missing something in the configuration or is it a tomcat 5 bug. If it is a bug are there any workarounds Thanks Shanmugam Pl
Struts in welcome-file-list
Hi all, I tried to get a page from my Struts application as default page in the welcome file list (see below) but it doesn't work, it keeps going to index.html. Am I doing something wrong or is it simply not possible? I did this: welcome-file-list welcome-filestart.do/welcome-file welcome-fileindex.html/welcome-file /welcome-file-list I also tried just start and /start.do , both didn't work either. Thanks and regards, Jeroen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts in welcome-file-list
As part of the servlet 2.2/2.3 spec, you are not allowed to use a servlet/action as a welcome-file - only .html or .jsp (I think). This is changing in the servlet 2.4 spec. Matt -Original Message- From: Jeroen Breedveld [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 8:28 AM To: [EMAIL PROTECTED] Subject: Struts in welcome-file-list Hi all, I tried to get a page from my Struts application as default page in the welcome file list (see below) but it doesn't work, it keeps going to index.html. Am I doing something wrong or is it simply not possible? I did this: welcome-file-list welcome-filestart.do/welcome-file welcome-fileindex.html/welcome-file /welcome-file-list I also tried just start and /start.do , both didn't work either. Thanks and regards, Jeroen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
welcome-file-list
Is it possible to have a servlet be the welcome-file parameter in a welcome-file-list? If so, how do I invoke the servlet? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: welcome-file-list
Yes, it is, in as much as any .jsp file IS a servlet. Why don't you describe more about what you want to achieve. For example what URL do you want your users to type in and what do you want served first? Andoni. - Original Message - From: Anderson, M. Paul [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, November 18, 2002 2:35 PM Subject: welcome-file-list Is it possible to have a servlet be the welcome-file parameter in a welcome-file-list? If so, how do I invoke the servlet? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: welcome-file-list
Hi, Searching the archives would've yielded many answers to this question. Not directly. You can have a JSP, which is compiled into a servlet. Or you can have a JSP or plain HTML page which redirect to a servlet. The next servlet specification, v2.4, which is getting very close to final, will allow you to specify a servlet directly as the welcome file for your webapp. Yoav Shapira Millennium ChemInformatics -Original Message- From: Anderson, M. Paul [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 9:35 AM To: 'Tomcat Users List' Subject: welcome-file-list Is it possible to have a servlet be the welcome-file parameter in a welcome-file-list? If so, how do I invoke the servlet? -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: welcome-file-list
ok...essentially I have a url of the form www.whatever.org/MyServlet/ServletMappedName where the servlet is titled MyServlet and is mapped to ServletMappedName in the web.xml file so that I can avoid the servlet/package.MyServlet portion of the url. I'd prefer to just call www.whatever.org/MyServlet and have it invoke the servlet that gets invoked when /ServletMappedName is added to it. A little background on the site... MyServlet is essentially a filter which handles all page requests for the site. This configuration allows me to monitor and authenticate all page requests. When MyServlet starts up it sends the user a Login.jsp page which sends authentication parameters back to MyServlet and allows/disallows the user access. Every page on the entire site runs through the MyServlet filter. I don't know if this was the best setup but it was my first servlet/jsp site and it seemed logical. -Original Message- From: Andoni [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 9:45 AM To: Tomcat Users List Subject: Re: welcome-file-list Yes, it is, in as much as any .jsp file IS a servlet. Why don't you describe more about what you want to achieve. For example what URL do you want your users to type in and what do you want served first? Andoni. - Original Message - From: Anderson, M. Paul [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, November 18, 2002 2:35 PM Subject: welcome-file-list Is it possible to have a servlet be the welcome-file parameter in a welcome-file-list? If so, how do I invoke the servlet? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: welcome-file-list
Hi, That's not a bad initial design. A better alternative would be to have an Authentication filter (mapped to /*), a monitor filter (mapped to /*), and your servlet mapped to /ServletMappedName. That'll make things a lot simpler, decoupled, robust, etc. Yoav Shapira Millennium ChemInformatics -Original Message- From: Anderson, M. Paul [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 10:10 AM To: 'Tomcat Users List' Subject: RE: welcome-file-list ok...essentially I have a url of the form www.whatever.org/MyServlet/ServletMappedName where the servlet is titled MyServlet and is mapped to ServletMappedName in the web.xml file so that I can avoid the servlet/package.MyServlet portion of the url. I'd prefer to just call www.whatever.org/MyServlet and have it invoke the servlet that gets invoked when /ServletMappedName is added to it. A little background on the site... MyServlet is essentially a filter which handles all page requests for the site. This configuration allows me to monitor and authenticate all page requests. When MyServlet starts up it sends the user a Login.jsp page which sends authentication parameters back to MyServlet and allows/disallows the user access. Every page on the entire site runs through the MyServlet filter. I don't know if this was the best setup but it was my first servlet/jsp site and it seemed logical. -Original Message- From: Andoni [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 9:45 AM To: Tomcat Users List Subject: Re: welcome-file-list Yes, it is, in as much as any .jsp file IS a servlet. Why don't you describe more about what you want to achieve. For example what URL do you want your users to type in and what do you want served first? Andoni. - Original Message - From: Anderson, M. Paul [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, November 18, 2002 2:35 PM Subject: welcome-file-list Is it possible to have a servlet be the welcome-file parameter in a welcome-file-list? If so, how do I invoke the servlet? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: welcome-file-list
ok...bear with my skill level here...you're suggesting the Authentication filter and monitor filter would be separate servlets? Then when the user typed the www.whatever.org/, which one would be invoked? What would occur if the user typed www.whatever.org/MyServlet directly before the authenticator has authenticated the user? Does the authenticator and the monitor both recieve a request when a user types www.whatever.org? -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 10:13 AM To: Tomcat Users List Subject: RE: welcome-file-list Hi, That's not a bad initial design. A better alternative would be to have an Authentication filter (mapped to /*), a monitor filter (mapped to /*), and your servlet mapped to /ServletMappedName. That'll make things a lot simpler, decoupled, robust, etc. Yoav Shapira Millennium ChemInformatics -Original Message- From: Anderson, M. Paul [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 10:10 AM To: 'Tomcat Users List' Subject: RE: welcome-file-list ok...essentially I have a url of the form www.whatever.org/MyServlet/ServletMappedName where the servlet is titled MyServlet and is mapped to ServletMappedName in the web.xml file so that I can avoid the servlet/package.MyServlet portion of the url. I'd prefer to just call www.whatever.org/MyServlet and have it invoke the servlet that gets invoked when /ServletMappedName is added to it. A little background on the site... MyServlet is essentially a filter which handles all page requests for the site. This configuration allows me to monitor and authenticate all page requests. When MyServlet starts up it sends the user a Login.jsp page which sends authentication parameters back to MyServlet and allows/disallows the user access. Every page on the entire site runs through the MyServlet filter. I don't know if this was the best setup but it was my first servlet/jsp site and it seemed logical. -Original Message- From: Andoni [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 9:45 AM To: Tomcat Users List Subject: Re: welcome-file-list Yes, it is, in as much as any .jsp file IS a servlet. Why don't you describe more about what you want to achieve. For example what URL do you want your users to type in and what do you want served first? Andoni. - Original Message - From: Anderson, M. Paul [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, November 18, 2002 2:35 PM Subject: welcome-file-list Is it possible to have a servlet be the welcome-file parameter in a welcome-file-list? If so, how do I invoke the servlet? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: welcome-file-list
Have you tried to create a host element in Tomcat around your context and thereby remove the need for anything after the www.whatever.org? Andoni. PS: Are you using Apache Virtual Hosting? - Original Message - From: Anderson, M. Paul [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, November 18, 2002 3:09 PM Subject: RE: welcome-file-list ok...essentially I have a url of the form www.whatever.org/MyServlet/ServletMappedName where the servlet is titled MyServlet and is mapped to ServletMappedName in the web.xml file so that I can avoid the servlet/package.MyServlet portion of the url. I'd prefer to just call www.whatever.org/MyServlet and have it invoke the servlet that gets invoked when /ServletMappedName is added to it. A little background on the site... MyServlet is essentially a filter which handles all page requests for the site. This configuration allows me to monitor and authenticate all page requests. When MyServlet starts up it sends the user a Login.jsp page which sends authentication parameters back to MyServlet and allows/disallows the user access. Every page on the entire site runs through the MyServlet filter. I don't know if this was the best setup but it was my first servlet/jsp site and it seemed logical. -Original Message- From: Andoni [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 9:45 AM To: Tomcat Users List Subject: Re: welcome-file-list Yes, it is, in as much as any .jsp file IS a servlet. Why don't you describe more about what you want to achieve. For example what URL do you want your users to type in and what do you want served first? Andoni. - Original Message - From: Anderson, M. Paul [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, November 18, 2002 2:35 PM Subject: welcome-file-list Is it possible to have a servlet be the welcome-file parameter in a welcome-file-list? If so, how do I invoke the servlet? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: welcome-file-list
ok...you're getting beyond my limited knowledge already...I'm am not certain as to what you mean by creating a host element in tomcat. As for Apache Virtual Hosting...is that when the tomcat is listening on more then one port but all are handled as if they each called the same port? -Original Message- From: Andoni [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 10:26 AM To: Tomcat Users List Subject: Re: welcome-file-list Have you tried to create a host element in Tomcat around your context and thereby remove the need for anything after the www.whatever.org? Andoni. PS: Are you using Apache Virtual Hosting? - Original Message - From: Anderson, M. Paul [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, November 18, 2002 3:09 PM Subject: RE: welcome-file-list ok...essentially I have a url of the form www.whatever.org/MyServlet/ServletMappedName where the servlet is titled MyServlet and is mapped to ServletMappedName in the web.xml file so that I can avoid the servlet/package.MyServlet portion of the url. I'd prefer to just call www.whatever.org/MyServlet and have it invoke the servlet that gets invoked when /ServletMappedName is added to it. A little background on the site... MyServlet is essentially a filter which handles all page requests for the site. This configuration allows me to monitor and authenticate all page requests. When MyServlet starts up it sends the user a Login.jsp page which sends authentication parameters back to MyServlet and allows/disallows the user access. Every page on the entire site runs through the MyServlet filter. I don't know if this was the best setup but it was my first servlet/jsp site and it seemed logical. -Original Message- From: Andoni [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 9:45 AM To: Tomcat Users List Subject: Re: welcome-file-list Yes, it is, in as much as any .jsp file IS a servlet. Why don't you describe more about what you want to achieve. For example what URL do you want your users to type in and what do you want served first? Andoni. - Original Message - From: Anderson, M. Paul [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, November 18, 2002 2:35 PM Subject: welcome-file-list Is it possible to have a servlet be the welcome-file parameter in a welcome-file-list? If so, how do I invoke the servlet? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: welcome-file-list
Hi, ok...bear with my skill level here...you're suggesting the Authentication filter and monitor filter would be separate servlets? Then when the user No. I'm suggesting they be proper filters, per the servlet spec v2.3. Specifically, you'd have two things that implement javax.servlet.filter: public class MyAuthenticationFilter implements Filter { ... } public class MyMonitorFilter implements Filter { ... } And then in your web.xml: web-app ... filter filter-nameMyAuthenticator/filter-name filter-classcom.mycompany.MyAuthenticationFilter/filter-class /filter filter filter-nameMyMonitor/filter-name filter-classcom.mycompany.MyMonitorFilter/filter-class /filter filter-mapping filter-nameMyAuthenticator/filter-name url-pattern/*/url-pattern /filter-mapping filter-mapping filter-nameMyMonitor/filter-name url-pattern/*/url-pattern /filter-mapping ... servlet servlet-nameMyMappedServlet/servlet-name servlet-classcom.mycompany.MyServlet/servlet-class /servlet servlet-mapping servlet-nameMyMappedServlet/servlet-name url-pattern/MyMappedServlet/url-pattern /servlet-mapping ... /web-app typed the www.whatever.org/, which one would be invoked? What would occur if the user typed www.whatever.org/MyServlet directly before the authenticator has authenticated the user? Does the authenticator and the monitor both recieve a request when a user types www.whatever.org? Requests for your servlet would be intercepted by both filters before (and after) the servlet gets them. If you need help on the filter design / implementation, post that question and we'll be glad to help ;) Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: welcome-file-list
That is some good information which I wish I knew before I started the site! What do you think the learning curve is on using filters and would it be worth the effort (dicounting the time/cost factor) to reorganize my design using proper filters? What would be the major benefits of making this change? One last newby (and possibly very stupid) question...when you write filter-classcom.mycompany.MyAuthenticationFilter/filter-class the com.mycompany is simply indicating the package that MyAuthenticationFilter is in, right, or am I completely missing what that indicates. Sorry for the very basic questions but I sincerely appreciate your help!! -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 10:36 AM To: Tomcat Users List Subject: RE: welcome-file-list Hi, ok...bear with my skill level here...you're suggesting the Authentication filter and monitor filter would be separate servlets? Then when the user No. I'm suggesting they be proper filters, per the servlet spec v2.3. Specifically, you'd have two things that implement javax.servlet.filter: public class MyAuthenticationFilter implements Filter { ... } public class MyMonitorFilter implements Filter { ... } And then in your web.xml: web-app ... filter filter-nameMyAuthenticator/filter-name filter-classcom.mycompany.MyAuthenticationFilter/filter-class /filter filter filter-nameMyMonitor/filter-name filter-classcom.mycompany.MyMonitorFilter/filter-class /filter filter-mapping filter-nameMyAuthenticator/filter-name url-pattern/*/url-pattern /filter-mapping filter-mapping filter-nameMyMonitor/filter-name url-pattern/*/url-pattern /filter-mapping ... servlet servlet-nameMyMappedServlet/servlet-name servlet-classcom.mycompany.MyServlet/servlet-class /servlet servlet-mapping servlet-nameMyMappedServlet/servlet-name url-pattern/MyMappedServlet/url-pattern /servlet-mapping ... /web-app typed the www.whatever.org/, which one would be invoked? What would occur if the user typed www.whatever.org/MyServlet directly before the authenticator has authenticated the user? Does the authenticator and the monitor both recieve a request when a user types www.whatever.org? Requests for your servlet would be intercepted by both filters before (and after) the servlet gets them. If you need help on the filter design / implementation, post that question and we'll be glad to help ;) Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: welcome-file-list
Howdy, What do you think the learning curve is on using filters and would it be The learning curve for these types of filters (authenticators, loggers) is short and not steep. This is a good place to start: http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html worth the effort (dicounting the time/cost factor) to reorganize my design using proper filters? What would be the major benefits of making this change? The major benefits would be: - Decoupling of authentication and logging from the business code, and from each other. This really opens up a lot of architecture possibilities when you need to scale up / increase uptime/reliability (e.g. via clustering) etc. - The ability to selectively authenticate certain requests and not others in a clean way. The business code is untouched. - The ability to selectively log different things about different requests in a clean way. - The ability to monitor one set of things for requests, and one different set of things (e.g. content-length) about responses. - You would still be container-independent. - You will have learned about filters and have a clean, easy to understand, easy to maintain design. One last newby (and possibly very stupid) question...when you write filter-classcom.mycompany.MyAuthenticationFilter/filter-class the com.mycompany is simply indicating the package that MyAuthenticationFilter is in, right, or am I completely missing what that indicates. Sorry for It's simply the fully-qualified class name of the servlet class. Your understanding is correct. Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: welcome-file-list
Thanks Yoav...I have some other modifications that were just giving to me for the site and I think I may try to implement the architecture you suggested at the same time. I will check out some tutorials and see what I can come up with. Your help is much appreciated! Any thoughts on how to implement a discussion thread? I need to allow users to enter a comment and then allow other users to follow up on that comment creating a comment thread... just like this user list does. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 12:00 PM To: Tomcat Users List Subject: RE: welcome-file-list Howdy, What do you think the learning curve is on using filters and would it be The learning curve for these types of filters (authenticators, loggers) is short and not steep. This is a good place to start: http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html worth the effort (dicounting the time/cost factor) to reorganize my design using proper filters? What would be the major benefits of making this change? The major benefits would be: - Decoupling of authentication and logging from the business code, and from each other. This really opens up a lot of architecture possibilities when you need to scale up / increase uptime/reliability (e.g. via clustering) etc. - The ability to selectively authenticate certain requests and not others in a clean way. The business code is untouched. - The ability to selectively log different things about different requests in a clean way. - The ability to monitor one set of things for requests, and one different set of things (e.g. content-length) about responses. - You would still be container-independent. - You will have learned about filters and have a clean, easy to understand, easy to maintain design. One last newby (and possibly very stupid) question...when you write filter-classcom.mycompany.MyAuthenticationFilter/filter-class the com.mycompany is simply indicating the package that MyAuthenticationFilter is in, right, or am I completely missing what that indicates. Sorry for It's simply the fully-qualified class name of the servlet class. Your understanding is correct. Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: welcome-file-list
Andoni wrote: Yes, it is, in as much as any .jsp file IS a servlet. A servlet may not be specified as a welcome-file. I suppose you could re-write your servlet as a JSP and then use that, but that certainly wouldn't be my recommended course of action. There's a fairly simple way to solve this and I posted a workaround for this a couple of days ago. Here's the article thread: http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg73666.html Cheers, -- jon Why don't you describe more about what you want to achieve. For example what URL do you want your users to type in and what do you want served first? Andoni. -- Jon Eaves [EMAIL PROTECTED] http://www.eaves.org/jon/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: tomcat 4 apache mod_webapp welcome-file-list
Did anyone ever come up with an answer for this? I've searched exhaustively about this with no luck. Maybe I'm just missing something, but... I am experiencing the same thing with Tomcat 4.0.2-LE / JVM 1.4.0 / Apache 1.3.23. This is REALLY annoying, but if someone could tell me what I'm doing wrong, I'd love to know. Here is my web.xml: ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.d td web-app servlet servlet-namePostMultipartServlet/servlet-name display-namePostMultipartServlet/display-name descriptionmultipart/form-data test servlet/description servlet-classorg.athlonia.servlet.test.PostMultipartServlet/servlet-class /servlet servlet-mapping servlet-namePostMultipartServlet/servlet-name url-pattern/PostMultipartServlet/url-pattern /servlet-mapping session-config session-timeout 30 /session-timeout /session-config welcome-file-list welcome-fileindex.html/welcome-file /welcome-file-list /web-app when I try to hit the page: http://localhost/multipart/ I get a page cannot be displayed error in IE 5.5, saying something about a dns error. If I do http://localhost/multipart/index.html, I get the desired page. My httpd.conf mod_webapp section looks like this: # # Webapp: Tomcat (Catalina) 4.0 connector # IfModule mod_webapp.c WebAppConnection warpConnection warp localhost:8008 WebAppDeploy examples warpConnection /examples/ WebAppDeploy multipart warpConnection /multipart/ /IfModule Let's see.. what else... My server.xml section looks like this: -- snip -- !-- Define an Apache-Connector Service -- Service name=Tomcat-Apache Connector className=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=75 enableLookups=false appBase=/home/httpd/webapps acceptCount=10 debug=0/ !-- Replace localhost with what your Apache ServerName is set to -- Engine className=org.apache.catalina.connector.warp.WarpEngine name=Apache defaultHost=www.athlonia.org debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger directory=/var/log/catalina prefix=apache_catalina_ suffix=.log timestamp=true/ !-- Because this Realm is here, an instance will be shared globally -- Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=localhost debug=0 appBase=/home/httpd/webapps unpackWARs=false Valve className=org.apache.catalina.authenticator.SingleSignOn debug=0/ Valve className=org.apache.catalina.valves.AccessLogValve directory=/var/log/catalina prefix=localhost_access_ suffix=.log pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=/var/log/catalina prefix=localhost_ suffix=.log timestamp=true/ !-- Multipart Test Webapp Context -- Context path=/multipart docBase=multipart.war debug=0 Logger className=org.apache.catalina.logger.FileLogger directory=/var/log/catalina prefix=webapp_localhost_multipart_ suffix=.log timestamp=true/ /Context /Host /Service -- snip -- Also, I noticed that the web.xml for the examples doesn't have a welcome-file-list section, but it's behavior seems correct, with the exception that it's index.html is in a /jsp or /servlet subdirectory. I tried removing the welcome-file-list section from my web.xml and still got the same incorrect behavior as with it in place. So... Any information would be much appreciated! Thanks. Kendal L. Montgomery ...the comPuter Wizard... [EMAIL PROTECTED] _-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_ Click here for Qwest's 5 cent State-to-State flat rate calling plan, plus get your own 800 number at no charge! http://qwesteferral.com/r.jsp?a=RyYO5xpYanlfVU541Lz2HA$$ _-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_ -Original Message- From: Dom [mailto:[EMAIL PROTECTED]] Sent: Friday, October 05, 2001 2:15 PM To: [EMAIL PROTECTED]; Tomcat Developer List Subject: tomcat 4 apache mod_webapp welcome-file-list Tomcat 4 + Apache + mod_webapp.so : It looks like welcome-file-list in web.xml doesn't work with web applications in virtual hosts ? Dom -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Problems with XML parsing: welcome-file-list (web.xml)
everytime i try to deploy my application i get the following message: PARSE error at line 18 column -1org.xml.sax.SAXParseException: org.apache.crimson.parser/V-036 web-app servletStarting service Tomcat-ApacheApache Tomcat/4.0-b3 and the reason for this are in the web.xml: web-app welcome-file-list welcome-filetechSupp.html/welcome-file /welcome-file-list servlet --line 18 servlet-nametechSup... without the welcome-file-list tags the deploying - is no problem. but with it i get a the parse error. but i don´t know why. please help thx christian kuehrt
RE: Problems with XML parsing: welcome-file-list (web.xml)
That is easy. Look into conf/web.dtd. welcome-file-list need not preceede the servlet. Regards Jan On Monday, May 28, 2001 1:57 PM, christian kuehrt [SMTP:[EMAIL PROTECTED]] wrote: everytime i try to deploy my application i get the following message: PARSE error at line 18 column -1 org.xml.sax.SAXParseException: org.apache.crimson.parser/V-036 web-app servlet Starting service Tomcat-Apache Apache Tomcat/4.0-b3 and the reason for this are in the web.xml: web-app welcome-file-list welcome-filetechSupp.html/welcome-file /welcome-file-list servlet--line 18 servlet-nametechSup... without the welcome-file-list tags the deploying - is no problem. but with it i get a the parse error. but i don´t know why. please help thx christian kuehrt __ Tato komunikace je urcena vyhradne pro adresata a je duverna. This communication is intended solely for the addressee and is confidential.
Re: Problems with XML parsing: welcome-file-list (web.xml)
thanks for your help i´didnt know that the order of the tags plays an important role ciao curt - Original Message - From: Pernica, Jan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 28, 2001 2:02 PM Subject: RE: Problems with XML parsing: welcome-file-list (web.xml) That is easy. Look into conf/web.dtd. welcome-file-list need not preceede the servlet. Regards Jan On Monday, May 28, 2001 1:57 PM, christian kuehrt [SMTP:[EMAIL PROTECTED]] wrote: everytime i try to deploy my application i get the following message: PARSE error at line 18 column -1 org.xml.sax.SAXParseException: org.apache.crimson.parser/V-036 web-app servlet Starting service Tomcat-Apache Apache Tomcat/4.0-b3 and the reason for this are in the web.xml: web-app welcome-file-list welcome-filetechSupp.html/welcome-file /welcome-file-list servlet--line 18 servlet-nametechSup... without the welcome-file-list tags the deploying - is no problem. but with it i get a the parse error. but i don´t know why. please help thx christian kuehrt __ Tato komunikace je urcena vyhradne pro adresata a je duverna. This communication is intended solely for the addressee and is confidential.
[TC321] welcome-file-list behaviour
Hi All, Hope all is well! I've noticed in the TC321 source base that the 'welcome file' specified in the web.xml actually checks to see if this file exists before using it. See StaticInterceptor.java, lines 270, and 297 270: File f = new File(dir, fileName); if (f.exists()) { return fileName; } 297: if ((new File(retPath)).exists()) { int pathPos = retPath.lastIndexOf (fbasen); return retPath.substring (pathPos); } (perhaps I'm looking at the wrong methods though ?) This potentially causes headaches for Cocoon 2 users, as in Cocoon 2 it's possible to specify a URL which does not actually relate to a real file. eg: in a Cocoon 2 sitemap !-- start page -- map:match pattern=start.xml map:generate type=serverpages src=client/frontend/start.xml/ map:transform src=stylesheets/html/start.xsl/ map:serialize/ /map:match (There are more complex examples, where the data may not even be located on the same system as tomcat itself) Having TC321 check for the existance of the file causes headaches because if a Cocoon 2 user does something like the above, they can't use that URL as the welcome file. Note, for pure Cocoon 2 applications this is however, not a problem as Cocoon 2 can handle the start page itself with an internal redirect. !-- start page -- map:match pattern= map:redirect-to uri=start.xml/ /map:match However for hybrid environments where not all requests go through Cocoon 2 the above statement mightn't work - it depends on the particular servlet-mapping settings. Must Tomcat make this check for existance of the file ? Would it be ok if a suitable warning message is logged, but the welcome filename is still used ? Cheers, Marcus -- . ,,$, Marcus Crafter ;$' ':Computer Systems Engineer $: : Open Software Associates GmbH $ o_)$$$: 82-84 Mainzer Landstrasse ;$,_/\ :' 60327 Frankfurt Germany ' /( \_' Email : [EMAIL PROTECTED] .Business Hours : +49 69 9757 200 : After Hours: +49 69 49086750
welcome-file-list Tomcat 3.21 / RH7 Linux
I switched from Tomcat 3.14 to 3.21 to resolve a header issue where I was getting a "text/plain" header in a Servlet when res.setContentType("text/html"); Now, Tomcat 3.21 won't load a default page when the welcome-file-list includes index.html, index.htm, and index.jsp On top of all this, Tomcat 4.0 on Windows 2k Professional sets a cookie when the JSP states session="false" It would be nice if Apache.org would go from stable release to stable release instead of beta to beta, or if anything on God's green earth would work as advertised ! There, now I've vented. My immediate problem is getting Tomcat to load a default index page. Has this happened to anyone else and what can be done. I've searched the archives and not found anything. Of course, I searched using "welcome-file" and the string was not to be found in any of the hits. That's been my day for the most part. Any help is appreciated. Sincerely, Neill Laney http://home.nc.rr.com/nlaney -- Web Developer/Technical Support Specialist. Resume online at http://home.nc.rr.com/nlaney/nml/resume.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
attitude adjusted - welcome-file-list
has anyone had any trouble with default index.jsp, index.htm, or index.html not being served when the application root is requested by the browser? Tomcat 3.21 TIA Sincerely, Neill Laney http://home.nc.rr.com/nlaney -- Web Developer/Technical Support Specialist. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: welcome-file-list is not working
Juan Pablo Goldfinger wrote: Hi: I have wrote in the web.xml of each tomca context, and nobody work!!! How I can work the welcome-file-list of the web.xml? Thanks, juan You will do much better asking a Tomcat-specific question on the TOMCAT-USER mailing list, rather than here. To save duplicated work, I will answer here this time, and cross-post to TOMCAT-USER so it shows up in the message archives. Historically, the most common problems getting welcome files to work have been: * Not following the required syntax of the web.xml file. * Trying to run Tomcat behind Apache - Apache does not read the web.xml file, so you will need to use httpd.conf directives (DirectoryIndex) to emulate this. Without more details about what you are doing, it is impossible to be more specific. Craig McClanahan
welcome-file-list
Hello! I am trying to have all my http request foward to a mainServlet first and after few verification send it to the appropriate page. For example, if you type http://mylocalhost/ if should go directly to myapp/servlet/mainServlet which reside in Tomcat. However if you type http://mylocalhost/hello.html, it should go to my Apache web server. I am using Apache+Tomcat combination. Someone told me once that I could use welcome-file-list but I haven't been able to find any doc Ideas? Thanks in advance! Cheers, Francis
Re: welcome-file-list
I want to execute a servlet as a welcome-file. how do i do this? i thought i'd put this in web.xml: servlet-mapping servlet-nametest/servlet-name url-pattern*.do/url-pattern /servlet-mapping welcome-file-list welcome-file index.do /welcome-file /welcome-file-list but that doesn't. i can't find the file index.do so it just skips the welcome file (including those defined in the general web.xml because welcome-file-list is overwritten i guess) and simply display the dir listing. greetz, Sam. - Original Message - From: "Tran, Francis" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 13, 2000 11:14 AM Subject: welcome-file-list Hello! I am trying to have all my http request foward to a mainServlet first and after few verification send it to the appropriate page. For example, if you type http://mylocalhost/ if should go directly to myapp/servlet/mainServlet which reside in Tomcat. However if you type http://mylocalhost/hello.html, it should go to my Apache web server. I am using Apache+Tomcat combination. Someone told me once that I could use welcome-file-list but I haven't been able to find any doc Ideas? Thanks in advance! Cheers, Francis