url redirect in tomcat 8
I have an application iDashboards it is based on tomcat. It has a web license or a named user license we use both however now they want to restrict access to the link that is used for the web license (as for now it is open to everyone) The main url is https://idashboards.outreach.psu.edu/idashboards The url for the web is the same with stuff added to the end of the default url. Is there a way in tomcat to only redirect the link for the web license url.
Re: URL Redirect in Tomcat 6
On 10/12/2009 05:38, bharati wrote: Hi, Iam using Tomcat 6. In my applicaion, when Users entered any url like 'www.google.com' then it will check for the status of the User. If he is Inactive, then it will send a http packet to redirect to the particular URL: like http://192.168.100.125:8080/; . Tomcat is listening to this port 8080. My question is: how do I get the url from tomcat..? If manually user types the url http://192.168.100.125:8080/ then it is displaying proper page to login. But in this case, Internet User does not know the URL. so...i need to get the URL from Tomcat which is listening to 8080 Port. Please help me. Thanks in advance. I'm baffled, I don't know about anyone else... Perhaps you could rephrase your question in a way that might allow us to help you? http://catb.org/~esr/faqs/smart-questions.html p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: URL Redirect in Tomcat 6
I guess she wants to display Customizable error responses, when application fails to respond (error code like 404 etc). Though, I agree, the question is not properly framed... With best regards, Nishant Hadole Siemens IT Solutions and Services SIS PRO SI-I Tel.: +91 22 2495 7816 Fax: +91 22 6660 8521 Mailto: nishant.had...@siemens.com www.siemens.co.in -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Thursday, 10 December, 2009 02:29 PM To: users@tomcat.apache.org Subject: Re: URL Redirect in Tomcat 6 On 10/12/2009 05:38, bharati wrote: Hi, Iam using Tomcat 6. In my applicaion, when Users entered any url like 'www.google.com' then it will check for the status of the User. If he is Inactive, then it will send a http packet to redirect to the particular URL: like http://192.168.100.125:8080/; . Tomcat is listening to this port 8080. My question is: how do I get the url from tomcat..? If manually user types the url http://192.168.100.125:8080/ then it is displaying proper page to login. But in this case, Internet User does not know the URL. so...i need to get the URL from Tomcat which is listening to 8080 Port. Please help me. Thanks in advance. I'm baffled, I don't know about anyone else... Perhaps you could rephrase your question in a way that might allow us to help you? http://catb.org/~esr/faqs/smart-questions.html p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: URL Redirect in Tomcat 6
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 To whom it may concern, On 12/10/2009 12:38 AM, bharati wrote: Iam using Tomcat 6. In my applicaion, when Users entered any url like 'www.google.com' then it will check for the status of the User. Where does a user enter such a URL? Into the web browser's address bar? If so, your application is not doing anything in this case (since presumably the request will go to www.google.com). If he is Inactive, then it will send a http packet to redirect to the particular URL: like http://192.168.100.125:8080/; . Tomcat is listening to this port 8080. Okay, sounds good. My question is: how do I get the url from tomcat..? Could it be as simple as request.getRequestURL()? This will return http://192.168.100.125:8080/; in the above example. If you're trying to get the string www.google.com, you'll probably have to try: request.getHeader(Referer) (note the intentional, historic misspelling of referer) This may be NULL if the client has been configured not to send the URL of the referring page, though. Is that what you were looking for? I agree with the other responses that your question was quite unclear. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkshfyIACgkQ9CaO5/Lv0PAJ8wCeKmg8Gj7/AIZb4FM5pWKyr0uI fY8An1sUIwWWCvsGKZXH2kQUs+oe403w =Qxrl -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
URL Redirect in Tomcat 6
Hi, Iam using Tomcat 6. In my applicaion, when Users entered any url like 'www.google.com' then it will check for the status of the User. If he is Inactive, then it will send a http packet to redirect to the particular URL: like http://192.168.100.125:8080/; . Tomcat is listening to this port 8080. My question is: how do I get the url from tomcat..? If manually user types the url http://192.168.100.125:8080/ then it is displaying proper page to login. But in this case, Internet User does not know the URL. so...i need to get the URL from Tomcat which is listening to 8080 Port. Please help me. Thanks in advance. -- View this message in context: http://old.nabble.com/URL-Redirect-in-Tomcat-6-tp26722413p26722413.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to configure Apache-https redirect to Tomcat-http
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin, BurnInHell wrote: | Since I want to access the application from outside and I have no access | to the firewall which is only enabeling https I want to access my | application over https://server.domain/app using: | | proxypass /app http://localhost:8080/myapp | | This does not work, because when trying to access https://server.domain/app, | he redirects me to http://server.domain/myapp which does not exist. What component is performing the redirect? Proxypass should not be issuing any redirects, so what is doing it? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhO2tAACgkQ9CaO5/Lv0PA7vQCgwyyKL2w2VjgI01puSG25TgxE jrcAnibGtYd2sUy6dbw07dIJMuw+wThq =C950 -END PGP SIGNATURE- - 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 configure Apache-https redirect to Tomcat-http
Hi, I've searched the Internet for a long time before I asked here this question, but knowing I'm a noob in this sector, it hopefully is trivial: I have one server running with apache2 and tomcat6. Moreover I have a webapplication I can locally access over http://myserver:8080/myapp Since I want to access the application from outside and I have no access to the firewall which is only enabeling https I want to access my application over https://server.domain/app using proxypass /app http://localhost:8080/myapp This does not work, because when trying to access https://server.domain/app, he redirects me to http://server.domain/myapp which does not exist. If any relevant Information is missing, please ask me. What do I have to do? -- View this message in context: http://www.nabble.com/How-to-configure-Apache-https-redirect-to-Tomcat-http-tp17640708p17640708.html Sent from the Tomcat - User mailing list archive at Nabble.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]
Apache HTTP Server Redirect to Tomcat
See Thread at: http://www.techienuggets.com/Detail?tx=33186 Posted on behalf of a User Hi, I'm using an Apache HTTP server that connects to Tomcat via mod_jk. All my servlet mappings work correctly. My question is that I want my default page for the Apache http server to be a servlet rather than index.html. I have tried changing DirectoryIndex in my http.conf but it gives a 503 error for entry like /myServlet. I think it expects a file name. How can I do this? Thanks - 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: Redirect in Tomcat 5.5 Not Working
It worked. Thanks. Latesha Williams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] We are running Tomcat 5.5.20 as a standalone web server for a third-party's web and servlet applications. On this server (Linux), Iptables is redirecting ports 80 to 8080 and 443 to 8443 (to run Tomcat as regular user.) In addition, we are interested in configuring Tomcat so that requests to port 8080 (default ports for both applications) are automatically redirected to port 8443. After performing the following steps below, the redirect does not work. In a web browser, both ports (8080 8443) can be accessed directly, but only want port 8443 available for use. Any ideas on how to fix are appreciated. (1) Created a self-signed certificate and changed the default keystore pasword. (2) Un-commented the SSL HTTP/1.1 Connector section in server.xml (see below). Connector port=8443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS keystoreFile=/some/file/path keystorePass=somepassword / (3) In file, $CATALINA_HOME/conf/web.xml, added the following: security-constraint web-resource-collection web-resource-nameEntire Application/web-resource-name url-pattern*/url-pattern This should be url-pattern/*/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint (4)Restarted Tomcat. -- Latesha Williams Applications Support, Information Technology American Museum of Natural History [EMAIL PROTECTED] 212.769.5947 917.837.2460 - 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] -- Latesha Williams Applications Support, Information Technology American Museum of Natural History [EMAIL PROTECTED] 212.769.5947 917.837.2460 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Redirect in Tomcat 5.5 Not Working
We are running Tomcat 5.5.20 as a standalone web server for a third-party's web and servlet applications. On this server (Linux), Iptables is redirecting ports 80 to 8080 and 443 to 8443 (to run Tomcat as regular user.) In addition, we are interested in configuring Tomcat so that requests to port 8080 (default ports for both applications) are automatically redirected to port 8443. After performing the following steps below, the redirect does not work. In a web browser, both ports (8080 8443) can be accessed directly, but only want port 8443 available for use. Any ideas on how to fix are appreciated. (1) Created a self-signed certificate and changed the default keystore pasword. (2) Un-commented the SSL HTTP/1.1 Connector section in server.xml (see below). Connector port=8443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS keystoreFile=/some/file/path keystorePass=somepassword / (3) In file, $CATALINA_HOME/conf/web.xml, added the following: security-constraint web-resource-collection web-resource-nameEntire Application/web-resource-name url-pattern*/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint (4)Restarted Tomcat. -- Latesha Williams Applications Support, Information Technology American Museum of Natural History [EMAIL PROTECTED] 212.769.5947 917.837.2460 - 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: Redirect in Tomcat 5.5 Not Working
Latesha Williams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] We are running Tomcat 5.5.20 as a standalone web server for a third-party's web and servlet applications. On this server (Linux), Iptables is redirecting ports 80 to 8080 and 443 to 8443 (to run Tomcat as regular user.) In addition, we are interested in configuring Tomcat so that requests to port 8080 (default ports for both applications) are automatically redirected to port 8443. After performing the following steps below, the redirect does not work. In a web browser, both ports (8080 8443) can be accessed directly, but only want port 8443 available for use. Any ideas on how to fix are appreciated. (1) Created a self-signed certificate and changed the default keystore pasword. (2) Un-commented the SSL HTTP/1.1 Connector section in server.xml (see below). Connector port=8443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS keystoreFile=/some/file/path keystorePass=somepassword / (3) In file, $CATALINA_HOME/conf/web.xml, added the following: security-constraint web-resource-collection web-resource-nameEntire Application/web-resource-name url-pattern*/url-pattern This should be url-pattern/*/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint (4)Restarted Tomcat. -- Latesha Williams Applications Support, Information Technology American Museum of Natural History [EMAIL PROTECTED] 212.769.5947 917.837.2460 - 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]
302 Redirect on Tomcat 5.x+
I heard somewhere that tomcat 4 and below uses a 302 redirect on the home (index) page. Is this still the case with 5.x+? Thanks! _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - 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: 302 Redirect on Tomcat 5.x+
Rob L [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I heard somewhere that tomcat 4 and below uses a 302 redirect on the home (index) page. Is this still the case with 5.x+? No. Tomcat 5.x+ serves http://www.myserver.com/myapp/ directly. However, it will 302 a request for http://www.myserver.com/myapp to http://www.myserver.com/myapp/ (similar to what Apache Httpd does). Thanks! _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - 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]
redirect with tomcat
Hi there, I'm using tomcat 5.5 and want to redirect some requests to another URL. For example the URL localhost:80/siteA should be forwarded to localhost:8080/siteB. Of course on Port 8080 listen another web-server. Does anybody know a good explanation how to do that ? I've tried with filters in catalina_home/conf/web.xml and put the classes in the catalina_home/server/classes and also by defining forwarding-rules in a rules.xml file. But all with no success. Thanks for your answer. Lothar __ Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: redirect with tomcat
We've used UrlRewriteFilter with good success so far: http://tuckey.org/urlrewrite/ David Lothar Krenzien wrote: Hi there, I'm using tomcat 5.5 and want to redirect some requests to another URL. For example the URL localhost:80/siteA should be forwarded to localhost:8080/siteB. Of course on Port 8080 listen another web-server. Does anybody know a good explanation how to do that ? I've tried with filters in catalina_home/conf/web.xml and put the classes in the catalina_home/server/classes and also by defining forwarding-rules in a rules.xml file. But all with no success. Thanks for your answer. Lothar __ Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 - 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: redirect with tomcat
Hi David , it looks interesting. But what I don't understand, when I define the filter in the project web.xml how does tomcat knows where to look when the entered url in the browser contains a project name which doesn't exits ? I think, when a user enters localhost:80/siteB I need to have a project in my webapp dir called projectB. What I want is, to redirect some specific urls to another server . My previous post contains a mistake : localhost:80/siteB should be forwared to localhost:8080/siteB because I don't have an app siteB, but the clients would like to use only one hostname. Thanks, Lothar -Ursprüngliche Nachricht- Von: Tomcat Users List users@tomcat.apache.org Gesendet: 16.03.06 19:36:46 An: Tomcat Users List users@tomcat.apache.org Betreff: Re: redirect with tomcat We've used UrlRewriteFilter with good success so far: http://tuckey.org/urlrewrite/ David Lothar Krenzien wrote: Hi there, I'm using tomcat 5.5 and want to redirect some requests to another URL. For example the URL localhost:80/siteA should be forwarded to localhost:8080/siteB. Of course on Port 8080 listen another web-server. Does anybody know a good explanation how to do that ? I've tried with filters in catalina_home/conf/web.xml and put the classes in the catalina_home/server/classes and also by defining forwarding-rules in a rules.xml file. But all with no success. Thanks for your answer. Lothar __ Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 - 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] __ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: redirect with tomcat
Well, you should check out the url rewrite documention for details. In your webapp's web.xml, you put something like this in to tell it you want it to examine all URLs that come into the web app: filter filter-nameUrlRewriteFilter/filter-name filter-classorg.tuckey.web.filters.urlrewrite.UrlRewriteFilter/filter-class init-param param-namelogLevel/param-name param-valuelog4j/param-value /init-param init-param param-nameconfReloadCheckInterval/param-name param-value60/param-value /init-param /filter filter-mapping filter-nameUrlRewriteFilter/filter-name url-pattern/*/url-pattern /filter-mapping Note that I have set the logLevel to 'log4j' because that's what we use, but you can set it values like DEBUG, etc. or 'commons' if you use the commons logging. In the same WEB-INF location where web.xml is defined, you configure the urlrewrite.xml file, with something like: ?xml version=1.0 encoding=utf-8? !DOCTYPE urlrewrite PUBLIC -//tuckey.org//DTD UrlRewrite 2.5//EN http://tuckey.org/res/dtds/urlrewrite2.5.dtd; !-- Configuration file for UrlRewriteFilter http://tuckey.org/urlrewrite/ -- urlrewrite rule note Anything coming to / or any number of subsequent slashes should just go to the public site. /note from^/siteB(.*)$/from to type=redirecthttp://localhost:8080/sideB$1/to /rule Note that the actual rule depends a bit on where you define this. The above from entry assumes that /siteB is specified and being processed by the root webapp (context /). If you are defining url rewrite in a webapp with a context of '/siteB' then you would assume the /siteB/ context path and use a from of just: /(.*)$ No doubt there are better ways to configure it, but I'm not a URL rewrite expert. But what you are doing sounds very straightforward and it should work for you. David Lothar Krenzien wrote: Hi David , it looks interesting. But what I don't understand, when I define the filter in the project web.xml how does tomcat knows where to look when the entered url in the browser contains a project name which doesn't exits ? I think, when a user enters localhost:80/siteB I need to have a project in my webapp dir called projectB. What I want is, to redirect some specific urls to another server . My previous post contains a mistake : localhost:80/siteB should be forwared to localhost:8080/siteB because I don't have an app siteB, but the clients would like to use only one hostname. Thanks, Lothar -Ursprüngliche Nachricht- Von: Tomcat Users List users@tomcat.apache.org Gesendet: 16.03.06 19:36:46 An: Tomcat Users List users@tomcat.apache.org Betreff: Re: redirect with tomcat We've used UrlRewriteFilter with good success so far: http://tuckey.org/urlrewrite/ David Lothar Krenzien wrote: Hi there, I'm using tomcat 5.5 and want to redirect some requests to another URL. For example the URL localhost:80/siteA should be forwarded to localhost:8080/siteB. Of course on Port 8080 listen another web-server. Does anybody know a good explanation how to do that ? I've tried with filters in catalina_home/conf/web.xml and put the classes in the catalina_home/server/classes and also by defining forwarding-rules in a rules.xml file. But all with no success. Thanks for your answer. Lothar __ Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 - 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] __ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]