Re: url-pattern troubles...
Thanks all. As long as I am not missing something and thats how it works, I guess nothing much I can do about it. Av - Original Message From: Reich, Matthias [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Friday, May 11, 2007 4:09:02 AM Subject: RE: url-pattern troubles... The annoying thing about it is, that you cannot use a pattern that says ignore /protected/include. Thus, you must specify patterns for all subdirectories that shall be protected separately. Matthias -Original Message- From: Hassan Schroeder [mailto:[EMAIL PROTECTED] Sent: Friday, May 11, 2007 2:45 AM To: Tomcat Users List Subject: Re: url-pattern troubles... On 5/10/07, webzo [EMAIL PROTECTED] wrote: Ok, this should have been simple. But Tomcat doesn't seem to be doing what I thought it would- I have a bunch of jsp files under a directory called protected. I want a filter to be invoked when these files are accessed. I also have a directory called includes under protected. I DON'T want the filter to be invoked when files under includes are accessed. I cannot change this directory structure. I used the pattern /protected/*.jsp for the filter in question BZZZT. See the Servlet Spec -- SRV.11.2 Your pattern is invalid (and so is /*.jsp -- if that actually worked, it's a bug.) The url-pattern isn't a wide-open regexp, so I think you'll have to change your Filter to ignore the includes subdirectory, unless you can differentiate based on the request type (client request, forward, include -- see SRV.6.2.5). HTH, -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
url-pattern troubles...
Ok, this should have been simple. But Tomcat doesn't seem to be doing what I thought it would- I have a bunch of jsp files under a directory called protected. I want a filter to be invoked when these files are accessed. I also have a directory called includes under protected. I DON'T want the filter to be invoked when files under includes are accessed. I cannot change this directory structure. I used the pattern /protected/*.jsp for the filter in question and hoped that Tomcat will realize that I want the filter invoked only for those files under protected. However, Tomcat doesn't like the pattern (I get a stacktrace- Invalid url-pattern...). Tomcat doesn't complain about /*.jsp or /protected/* (except it invokes the filter for all the files under /protected/includes), but it complains about /protected/*.jsp. So, whats the pattern to use? Thanks, Av. Food fight? Enjoy some healthy debate in the Yahoo! Answers Food Drink QA. http://answers.yahoo.com/dir/?link=listsid=396545367 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to programatically determine connector's port numbers?
Thanks for the response. Actually, I know for a fact that there will be only 1 port each for SSL and Non-SSL access. I just need to be able to query their values programatically so that I may use them to set up certain parameters that will be used by other parts of the code... Thanks, Av. - Original Message From: Hassan Schroeder [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, May 8, 2007 8:04:25 PM Subject: Re: How to programatically determine connector's port numbers? On 5/8/07, webzo [EMAIL PROTECTED] wrote: Hmm, come to think of it, I saw that one. However, that kind of doesn't solve my problem. OK, since you didn't describe that problem before... I am in a class that is loaded earlier than the webapps (Bootstrapper kind of class which is loaded when the webapp is being loaded first time). I am trying to get BOTH the Non-SSL and SSL ports at that point. Ideas? I think you have an architectural issue. Correct me if I'm wrong but you seem to assume that only one of each (non-SSL and SSL ports) could be configured. Since there's nothing in the Servlet spec that dictates that (AFAIK), the value of the non-SSL port(s) could be a collection, so why not just get the port value from the request, when it's meaningful? :-) But perhaps if you describe the problem more explicitly... -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to programatically determine connector's port numbers?
Thanks, I will check that out. - Original Message From: Caldarale, Charles R [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, May 8, 2007 8:13:17 PM Subject: RE: How to programatically determine connector's port numbers? From: webzo [mailto:[EMAIL PROTECTED] Subject: Re: How to programatically determine connector's port numbers? I am in a class that is loaded earlier than the webapps (Bootstrapper kind of class which is loaded when the webapp is being loaded first time). I am trying to get BOTH the Non-SSL and SSL ports at that point. Ideas? Take a look at the code in Tomcat's manager and admin apps as well as that in Lambda Probe. I believe all of these use Tomcat's MX beans to extract the information displayed, which includes port numbers among many other things. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to programatically determine connector's port numbers?
Hello all, Is there a way to programmatically determine (using Java) the port numbers that have been set up (in server.xml) for use by the SSL and Non/SSL connectors? By default they are 8080 and 8443 but I need to be able to determine it programmatically as well. Thanks. Av. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to programatically determine connector's port numbers?
Thanks for the response. Thats what I figured, that it would be available via ServletRequest or ServletContext. But I don't see any methods to get it. Maybe it is set as an attribute within one of these classes? Any ideas which method would help me? Av. - Original Message From: Hassan Schroeder [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, May 8, 2007 3:15:19 PM Subject: Re: How to programatically determine connector's port numbers? On 5/8/07, webzo [EMAIL PROTECTED] wrote: Is there a way to programmatically determine (using Java) the port numbers that have been set up (in server.xml) for use by the SSL and Non/SSL connectors? You can get them from the ServletRequest object, a more portable approach than extracting them from a container-specific config file. HTH, -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to programatically determine connector's port numbers?
Hmm, come to think of it, I saw that one. However, that kind of doesn't solve my problem. I am in a class that is loaded earlier than the webapps (Bootstrapper kind of class which is loaded when the webapp is being loaded first time). I am trying to get BOTH the Non-SSL and SSL ports at that point. Ideas? Thanks for the response. Av. - Original Message From: Hassan Schroeder [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, May 8, 2007 4:41:24 PM Subject: Re: How to programatically determine connector's port numbers? On 5/8/07, webzo [EMAIL PROTECTED] wrote: Thats what I figured, that it would be available via ServletRequest or ServletContext. But I don't see any methods to get it. In the Servlet 2.4 API doc -- the one I happened to have open :-) -- ServletRequest.getServerPort() HTH, -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to avoid infinite loop during filter processing?
Hello, I am trying to something fairly simple and have a problem- Basically, I use a filter that intercepts access to ALL jsp pages, determines whether the user needs to be authenticated. If authentication is required, the filter passes it on to the next filter (filterchain.doFilter( ) ), else continues on to to originally requested page. Problem is, when I try to redirect to the originally requested page (because no authentication is required), the redirect is also again intercepted by the filter and we go through the same loop again- infinite loop. Is there a way to avoid this? Thanks. Av. Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]