Re: tomcat url rewrite
to Christopher Schultz-2: I try to rewrite some relative path to absolute path for CSS and image. And it work!!! So i think i find the solution for this. The / char will not let me get error, just check the relative path. Thanks for your help! -- View this message in context: http://www.nabble.com/tomcat---url-rewrite-tp25395691p25531387.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: tomcat url rewrite
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 William, On 9/17/2009 10:30 PM, WILLIAMer wrote: If you always start your URLs with a '/', then you shouldn't have a problem. Could you explain this Sentence to me? Uh... you should make sure all your URLs are absolute, not relative. IF you have any URLs being generated in your application that contain .. or don't start with a / (or, better yet, request.getContxtPath() + / ...), then you should fix them. In my jsp, i write a href=./item_s:property value=item /.html . Now, i need to change this link path to absolute path, right? Yes. You should do this instead: a href=%= request.getContextPath() %/item_s:property value=item /.html ... /a Unfortunately, in this case, you are also not running your URL through response.encodeURL, which you should always do. I'm not sure what the best way to do that with JSTL or whatever tag libraries you are using, so you'll have to look into that. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqzrVIACgkQ9CaO5/Lv0PB40ACgkzHJAjRFoFtf0B8knBrQuK2g gWEAn1luBNCUczk5k4he79XFzQX63rmd =wG4V -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 William, On 9/16/2009 10:04 PM, WILLIAMer wrote: Let me say sorry for i didnt description the error. The error like the path is mapping incorrectly. So, what error message do you get? So the image or css are not display because of the path not find. Hmm... A part of my application structure like under /tomcat/webapps/myApp/images /css /Admin/index.jsp /index.jsp I set my application to be ROOT. The url http://myDomain/ will go my application instead of http://myDomain/myApp. Why i say http://myDomain/item_pd12/34.html let me confuse? Because i didnt have the directory named item_pd12. Oh, that will certainly be a problem. This is one of the hazards of playing games with your URLs: if you use relative URLs for static content, things break when you change the base URL of the web page. The solution? Always use fully-qualified URLs (see HttpServletResponse.encodeURL and request.getContextPath). In my jsp code, i really write some code for image or css path. Something like %String sImagePath = /myApp/images;%. For this case http://myDomain/item_pd12/34.html. I guess tomcat will to find the directory named item_pd12 under /myApp dir and didnt find my images though the sImagePath. If you always start your URLs with a '/', then you shouldn't have a problem. Another question, after i touch http://myDomain/item_pd12/34.html, link other page would stuck with http://myDomain/item_pd12/otherPage. But the really url i want would like http://myDomain/otherPage. Then write your URLs properly, starting with a '/'. Maybe i need to improve my code though something like relative path instead of absolute path. No, you need an absolute path instead of a relative path. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqyaNwACgkQ9CaO5/Lv0PBf3gCdHS61t5JZg2ZSjDXBQ5HxKI3N 5WAAni4/4yAaydwW41EOZ149jmFp6+XG =5jHd -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
Hi, Christopher Schultz-2 If you always start your URLs with a '/', then you shouldn't have a problem. Could you explain this Sentence to me? In my jsp, i write a href=./item_s:property value=item /.html . Now, i need to change this link path to absolute path, right? Thanks for your help. -- View this message in context: http://www.nabble.com/tomcat---url-rewrite-tp25395691p25502211.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: tomcat url rewrite
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 William, On 9/15/2009 9:45 PM, WILLIAMer wrote: There is no error with url rewrite. For item pd1234, The url would be http://myDomain/item_pd1234.html and its fine. Ok. For item pd12/34 The url would be http://myDomain/item_pd12/34.html and got error. What error? Because tomcat seems there is a directory named item_pd12under my application. Tomcat does not care a lick about slashes anywhere in the URL. I would venture a guess that either your URL mappings are incorrect or your code does not gracefully handle a / in an item id. So, i say if the item include / char would get error. At first, i didnt know the problem belong to tomcat or url-rewrite. Now, thanks the replies in this post. I know this is not tomcat problem. I believe this is an application problem. Check your code to see how product ids are being parsed. Again, what error are you getting? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqxUkwACgkQ9CaO5/Lv0PAm9QCdEbk+CeaNm1tPqM+FwIOa05Sd CAsAoIbD+idmngmHVswTKDwKRp0yKyxi =ygrS -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
Hi, Christopher Schultz-2 Let me say sorry for i didnt description the error. The error like the path is mapping incorrectly. So the image or css are not display because of the path not find. A part of my application structure like under /tomcat/webapps/myApp/images /css /Admin/index.jsp /index.jsp I set my application to be ROOT. The url http://myDomain/ will go my application instead of http://myDomain/myApp. Why i say http://myDomain/item_pd12/34.html let me confuse? Because i didnt have the directory named item_pd12. See my structure, if i want to see the Admin index page, i will type the url http://myDomain/Admin/index.jsp. So i think the / let tomcat explain there has directory relationship. Is it wrong idea? In my jsp code, i really write some code for image or css path. Something like %String sImagePath = /myApp/images;%. For this case http://myDomain/item_pd12/34.html. I guess tomcat will to find the directory named item_pd12 under /myApp dir and didnt find my images though the sImagePath. Another question, after i touch http://myDomain/item_pd12/34.html, link other page would stuck with http://myDomain/item_pd12/otherPage. But the really url i want would like http://myDomain/otherPage. Maybe i need to improve my code though something like relative path instead of absolute path. Thanks for your patience. -- View this message in context: http://www.nabble.com/tomcat---url-rewrite-tp25395691p25483993.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: tomcat url rewrite
From: WILLIAMer [mailto:william.tz...@echannelopen.com.tw] Subject: Re: tomcat url rewrite The error like the path is mapping incorrectly. What do you have in WEB-INF/web.xml for your webapp? I set my application to be ROOT. How? Why i say http://myDomain/item_pd12/34.html let me confuse? Because i didnt have the directory named item_pd12. No, it's because you have incorrect servlet-mapping in the WEB-INF/web.xml for your webapp. So i think the / let tomcat explain there has directory relationship. Is it wrong idea? It's the wrong idea. Tomcat doesn't care about directories, only about the servlet-mapping elements you have specified. Post your WEB-INF/web.xml so we can take a look at it. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 William, On 9/14/2009 9:43 PM, WILLIAMer wrote: I got the problem if the item name(from database) have / char, the full url path http://myDomain//item_1/23.html would be error. Where does the error occur? Does the URL re-writer fail to re-write the URL for you in that case? Maybe i let the item have / char doesnt use this rule. Just go /getItemPage?itemname=1/23 to Avoid th error. I'm not sure why this would fail. If you give us more information, we might be able to help. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqv0A0ACgkQ9CaO5/Lv0PCvuwCePBcnMp6YldW12hZ9kDmDm+Bf HcIAniQCkONNL5tyG8yVtiB6pjiQcFGG =Dg7K -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
Hi, Christopher Schultz-2 There is no error with url rewrite. For item pd1234, The url would be http://myDomain/item_pd1234.html and its fine. For item pd12/34 The url would be http://myDomain/item_pd12/34.html and got error. Because tomcat seems there is a directory named item_pd12under my application. So, i say if the item include / char would get error. At first, i didnt know the problem belong to tomcat or url-rewrite. Now, thanks the replies in this post. I know this is not tomcat problem. -- View this message in context: http://www.nabble.com/tomcat---url-rewrite-tp25395691p25464594.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: tomcat url rewrite
On 14/09/2009 03:05, WILLIAMer wrote: I think look up the url in database is not a Immediately way to me. Because most of item not have the / char in name. My original url would like http://myDomain/getItemPage?itemName=xxx After the url rewrite rule, url become http://myDomain/item_xxx.html If the item name like abc/def, http://myDomain/item_abc/def.html will get error. Because tomcat explain there is a directory named item_abc. I think the tomcat is right. Tomcat won't do that. The behaviour you describe is the action of the default servlet. I recommend that you familiarise yourself with the Servlet Spec and the properties of the HttpServletRequest and HttpServletResponse objects. If you configure a servlet Filter then you can examine the full path and act on it as needed. Very simple e.g. String rUri = hreq.getRequestURI(); // rUri = /item_abc/def.html String item = rUri.replaceAll(\\/item_([\\w\\/]+)\\.html, $1); // item = abc/def then you can skip the redirect step, your Filter would just need to contain the same code as the servlet doing the existing work. p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
I use http://tuckey.org/urlrewrite/ url rewriter filter for doing url rewrite. And i write the rule in urlrewrite.xml. My rule like under rule from/item_(.*).html/from to type=forward/getItemPage?itemName=$1/to /rule If there is a url like /item_xxx.html, the url rewriter filter will redirect to /getItemPage.action?itemName=xxx In my some jsp, i write some code for link. It look like a href=./item_s:property value=item /.html s:property value=item //a s: is struts2 tag-lib, and the property value item is from database. In there i got the a part of answer is the parse of tomcat is right. The / char would make tomcat explain the directory Relation. Thanks all, thanks Pid-6. To Pid-6, You maybe misunderstanding my text. The url rewrite is not through tomcat or default servlet. -- View this message in context: http://www.nabble.com/tomcat---url-rewrite-tp25395691p25433340.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: tomcat url rewrite
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 William, On 9/13/2009 10:05 PM, WILLIAMer wrote: I think look up the url in database is not a Immediately way to me. Because most of item not have the / char in name. My original url would like http://myDomain/getItemPage?itemName=xxx After the url rewrite rule, url become http://myDomain/item_xxx.html This just really doesn't seem like a difficult thing to do at all. All you're doing is re-writing /item_123.html to /getItemPage?itemname=123 (whether it includes extra /s or not). This should be trivially done with urlrewrite (http://tuckey.org/urlrewrite/). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkquUGcACgkQ9CaO5/Lv0PDfyACgoGveRwbmibDZwRRd80elHkcf MXgAn2iNos+LAnFZSgERX5hc7D1ikGEV =56AS -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
To Christopher Schultz-2, See my previous post, i have used urlrewrite( http://tuckey.org/urlrewrite/ http://tuckey.org/urlrewrite/ ) I already write the rule in rewrite.xml for /item_123.html to /getItemPage?itemname=123 I got the problem if the item name(from database) have / char, the full url path http://myDomain//item_1/23.html would be error. Maybe i let the item have / char doesnt use this rule. Just go /getItemPage?itemname=1/23 to Avoid th error. Thanks your reply. -- View this message in context: http://www.nabble.com/tomcat---url-rewrite-tp25395691p25446546.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: tomcat url rewrite
I think look up the url in database is not a Immediately way to me. Because most of item not have the / char in name. My original url would like http://myDomain/getItemPage?itemName=xxx After the url rewrite rule, url become http://myDomain/item_xxx.html If the item name like abc/def, http://myDomain/item_abc/def.html will get error. Because tomcat explain there is a directory named item_abc. I think the tomcat is right. -- View this message in context: http://www.nabble.com/tomcat---url-rewrite-tp25395691p25429315.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
tomcat url rewrite
I get a problem with the URL. My application has url rewrite for SEO. I use this format http://mydomain/item.html for display. There is an error that if the item name like LF/123, then the url become http://mydomain/LF/123.html. Because of the name include / character. I got the error like tomcat think i has a directory named LF under my application root directory. I dont know this question belong tomcat or url rewrite. -- View this message in context: http://www.nabble.com/tomcat---url-rewrite-tp25395691p25395691.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: tomcat url rewrite
WILLIAMer wrote: I get a problem with the URL. My application has url rewrite for SEO. I use this format http://mydomain/item.html for display. There is an error that if the item name like LF/123, then the url become http://mydomain/LF/123.html. Because of the name include / character. I got the error like tomcat think i has a directory named LF under my application root directory. I dont know this question belong tomcat or url rewrite. William, Tomcat is right. I think it is the concept of your application that needs to be revisited. The / character is *universally* considered as a path separator under HTTP, and as a directory separator under most OS (including Windows). You may be able to find some solution that will work in some cases, but you will anyway have problems with this sooner or later somwhere else. I suggest that you change your item names, rather than trying to patch this stuff left and right. You will save yourself a lot of trouble in the long run. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
On 11/09/2009 08:07, André Warnier wrote: WILLIAMer wrote: I get a problem with the URL. My application has url rewrite for SEO. I use this format http://mydomain/item.html for display. There is an error that if the item name like LF/123, then the url become http://mydomain/LF/123.html. Because of the name include / character. I got the error like tomcat think i has a directory named LF under my application root directory. I dont know this question belong tomcat or url rewrite. William, Tomcat is right. I think it is the concept of your application that needs to be revisited. The / character is *universally* considered as a path separator under HTTP, and as a directory separator under most OS (including Windows). You may be able to find some solution that will work in some cases, but you will anyway have problems with this sooner or later somwhere else. I suggest that you change your item names, rather than trying to patch this stuff left and right. You will save yourself a lot of trouble in the long run. As a wise* old man once said: SEO - 'tis the very Devil's work m'lord. This type of problem falls firmly into the try-and-build-properly rather-than-fix-it-with-solutions-that-use-constantly-moving-goalposts. Is it all static content, or are you loading from a database? p * Or possibly, a wizened old man. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
Thanks for replies. To awarnier: Change the item name will lost the SEO for this item. To Pid-6: It is dynamic page and item data are from database. I use url rewrite for looking like static page. So the tomcat is right. I must think another way. Thanks all. -- View this message in context: http://www.nabble.com/tomcat---url-rewrite-tp25395691p25398479.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: tomcat url rewrite
On 11/09/2009 11:18, WILLIAMer wrote: Thanks for replies. To awarnier: Change the item name will lost the SEO for this item. To Pid-6: It is dynamic page and item data are from database. I use url rewrite for looking like static page. Why not just make the URLs in such a way that you can look them up in the database? A servlet Filter could perform the same task in one go that your rewrite db lookup is doing. /some/path/to/file.ext Parse the URL, look up the page or object in the DB and then perform a forward using a RequestDispatcher. p So the tomcat is right. I must think another way. Thanks all. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat url rewrite
On Fri, Sep 11, 2009 at 4:01 AM, Pid p...@pidster.com wrote: Why not just make the URLs in such a way that you can look them up in the database? A servlet Filter could perform the same task in one go that your rewrite db lookup is doing. Exactly -- your URL is only a problem if you're passing the request unaltered to the default servlet -- so don't do that. :-) /some/path/to/file.ext And I have to ask -- why are you deliberately adding the ugly and meaningless .html to the end? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat URL Rewrite. Help with configuration.
THERE'S NO context.xml. Also, since my app is a third party (not properly Tomcat or Apache's) server.xml does not contain any information ab them. Server.xml was uploaded. Thanks for the reply. Caldarale, Charles R wrote: From: Rodro [mailto:rodrigo_alle...@ibi.com] Subject: Re: Tomcat URL Rewrite. Help with configuration. Though redirection didn't work, but furthermore when I try to see http://localhost:8080/rewrite-status, I get the below error: Estado HTTP 404 - /rewrite-status That would be expected, since you don't appear to have a webapp named rewrite-status. You likely do not have your webapp deployed properly. If you want your webapp to be the default one, it must be named ROOT (case sensitive, even on Windows). Post your server.xml and the META-INF/context.xml file from your webapp (if it exists). - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org http://www.nabble.com/file/p22588199/server.xml server.xml -- View this message in context: http://www.nabble.com/Tomcat-URL-Rewrite.-Help-with-configuration.-tp22446210p22588199.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: Tomcat URL Rewrite. Help with configuration.
Dear awarnier. Ok, Now I found such WEB-INF directory (in my app it's C:\ibi\WebFOCUS76\webapps\webfocus76\WEB-INF), and followed the installation and configuration steps. 1) copied urlrewrite.xml into such WEB-INF 2) edited web.xml with the below lines: filter filter-nameUrlRewriteFilter/filter-name filter-classorg.tuckey.web.filters.urlrewrite.UrlRewriteFilter/filter-class /filter filter-mapping filter-nameUrlRewriteFilter/filter-name url-pattern/*/url-pattern /filter-mapping 3) edited urlrewrite with my own rewriting config: rule from/car/from to type=redirect/ibi_apps/WFServlet?IBIF_ex=carinst/to /rule 4) copied urlrewrite-2.6.0.jar into WEB-INF/lib directory 5) restarted Tomcat Though redirection didn't work, but furthermore when I try to see http://localhost:8080/rewrite-status, I get the below error: Estado HTTP 404 - /rewrite-status type Informe de estado mensaje /rewrite-status descripción El recurso requerido (/rewrite-status) no está disponible. Apache Tomcat/5.5.25 Already looked into urlrewrite.xml and such rule is there: rule note The rule means that requests to /test/status/ will be redirected to /rewrite-status the url will be rewritten. /note from/test/status//from to type=redirect%{context-path}/rewrite-status/to /rule WHAT AM I DOING WRONG??? APPRECIATTE YOUR HELP ON THIS. Rodrigo. awarnier wrote: Rodro wrote: Dear Tomcat Users. I'm trying to do a URL masking on Tomcat 5.5.25. What I specifically want to do is: I execute (call) an app with the following URL: http://localhost:8080/ibi_apps/WFServlet?IBIF_ex=carinst Now, I need to mask the URL to get the same result calling the app as: http://localhost:8080/car i.e. mask /ibi_apps/WFServlet?IBIF_ex=carinst as /car. I found a Solution with URLREWRITE on http://tuckey.org/urlrewrite/manual/2.6 Under Install I see on STEP 1:“Download the zip (or tar.gz) and extract it into your context'sdirectory ie, so that urlrewrite.xml goes into the WEB-INF directory”. However, looking into my file directory I found 6 WEB-INF directories: C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\ROOT C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\tomcat-docs C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\webapps\admin C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\webapps\host-manager C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\webapps\manager C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\tomcat-docs\appdev\sample\web In which one should I extract the zip file into? Thanks and best regards. Rodrigo Allende. Rodrigo, somewhere above there, you mention your original URL http://localhost:8080/ibi_apps/WFServlet?IBIF_ex=carinst So, apart from all the webapp/* directories which you are mentioning just above here, you must have a /ibi_apps/WEB-INF directory somewhere, no ? If you do, then that's the one in which you should unpack that zip. And if you don't, then there is something that you are not telling us.. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Tomcat-URL-Rewrite.-Help-with-configuration.-tp22446210p22461196.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: Tomcat URL Rewrite. Help with configuration.
Rodrigo, What is the error message in English? And i think this one is just an example config file coming with urlrewriter. If you do not need it, you can just delete it. rule note The rule means that requests to /test/status/ will be redirected to /rewrite-status the url will be rewritten. /note from/test/status//from to type=redirect%{context-path}/rewrite-status/to /rule -Ben On Wed, Mar 11, 2009 at 2:09 PM, Rodro rodrigo_alle...@ibi.com wrote: Dear awarnier. Ok, Now I found such WEB-INF directory (in my app it's C:\ibi\WebFOCUS76\webapps\webfocus76\WEB-INF), and followed the installation and configuration steps. 1) copied urlrewrite.xml into such WEB-INF 2) edited web.xml with the below lines: filter filter-nameUrlRewriteFilter/filter-name filter-classorg.tuckey.web.filters.urlrewrite.UrlRewriteFilter/filter-class /filter filter-mapping filter-nameUrlRewriteFilter/filter-name url-pattern/*/url-pattern /filter-mapping 3) edited urlrewrite with my own rewriting config: rule from/car/from to type=redirect/ibi_apps/WFServlet?IBIF_ex=carinst/to /rule 4) copied urlrewrite-2.6.0.jar into WEB-INF/lib directory 5) restarted Tomcat Though redirection didn't work, but furthermore when I try to see http://localhost:8080/rewrite-status, I get the below error: Estado HTTP 404 - /rewrite-status type Informe de estado mensaje /rewrite-status descripción El recurso requerido (/rewrite-status) no está disponible. Apache Tomcat/5.5.25 Already looked into urlrewrite.xml and such rule is there: rule note The rule means that requests to /test/status/ will be redirected to /rewrite-status the url will be rewritten. /note from/test/status//from to type=redirect%{context-path}/rewrite-status/to /rule WHAT AM I DOING WRONG??? APPRECIATTE YOUR HELP ON THIS. Rodrigo. awarnier wrote: Rodro wrote: Dear Tomcat Users. I'm trying to do a URL masking on Tomcat 5.5.25. What I specifically want to do is: I execute (call) an app with the following URL: http://localhost:8080/ibi_apps/WFServlet?IBIF_ex=carinst Now, I need to mask the URL to get the same result calling the app as: http://localhost:8080/car i.e. mask /ibi_apps/WFServlet?IBIF_ex=carinst as /car. I found a Solution with URLREWRITE on http://tuckey.org/urlrewrite/manual/2.6 Under Install I see on STEP 1:“Download the zip (or tar.gz) and extract it into your context'sdirectory ie, so that urlrewrite.xml goes into the WEB-INF directory”. However, looking into my file directory I found 6 WEB-INF directories: C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\ROOT C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\tomcat-docs C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\webapps\admin C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\webapps\host-manager C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\webapps\manager C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\tomcat-docs\appdev\sample\web In which one should I extract the zip file into? Thanks and best regards. Rodrigo Allende. Rodrigo, somewhere above there, you mention your original URL http://localhost:8080/ibi_apps/WFServlet?IBIF_ex=carinst So, apart from all the webapp/* directories which you are mentioning just above here, you must have a /ibi_apps/WEB-INF directory somewhere, no ? If you do, then that's the one in which you should unpack that zip. And if you don't, then there is something that you are not telling us.. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Tomcat-URL-Rewrite.-Help-with-configuration.-tp22446210p22461196.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: Tomcat URL Rewrite. Help with configuration.
From: Rodro [mailto:rodrigo_alle...@ibi.com] Subject: Re: Tomcat URL Rewrite. Help with configuration. Though redirection didn't work, but furthermore when I try to see http://localhost:8080/rewrite-status, I get the below error: Estado HTTP 404 - /rewrite-status That would be expected, since you don't appear to have a webapp named rewrite-status. You likely do not have your webapp deployed properly. If you want your webapp to be the default one, it must be named ROOT (case sensitive, even on Windows). Post your server.xml and the META-INF/context.xml file from your webapp (if it exists). - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat URL Rewrite. Help with configuration.
According to the documentation, such context should give you a wellcome page to the urlrewriting service, but yes I don't need it indeed. The error message in English is: HTTP Status 404 - /rewrite-status type Status report message /rewrite-status description The requested resource (/rewrite-status) is not available. Apache Tomcat/5.5.25 Ben Hu wrote: Rodrigo, What is the error message in English? And i think this one is just an example config file coming with urlrewriter. If you do not need it, you can just delete it. rule note The rule means that requests to /test/status/ will be redirected to /rewrite-status the url will be rewritten. /note from/test/status//from to type=redirect%{context-path}/rewrite-status/to /rule -Ben On Wed, Mar 11, 2009 at 2:09 PM, Rodro rodrigo_alle...@ibi.com wrote: Dear awarnier. Ok, Now I found such WEB-INF directory (in my app it's C:\ibi\WebFOCUS76\webapps\webfocus76\WEB-INF), and followed the installation and configuration steps. 1) copied urlrewrite.xml into such WEB-INF 2) edited web.xml with the below lines: filter filter-nameUrlRewriteFilter/filter-name filter-classorg.tuckey.web.filters.urlrewrite.UrlRewriteFilter/filter-class /filter filter-mapping filter-nameUrlRewriteFilter/filter-name url-pattern/*/url-pattern /filter-mapping 3) edited urlrewrite with my own rewriting config: rule from/car/from to type=redirect/ibi_apps/WFServlet?IBIF_ex=carinst/to /rule 4) copied urlrewrite-2.6.0.jar into WEB-INF/lib directory 5) restarted Tomcat Though redirection didn't work, but furthermore when I try to see http://localhost:8080/rewrite-status, I get the below error: Estado HTTP 404 - /rewrite-status type Informe de estado mensaje /rewrite-status descripción El recurso requerido (/rewrite-status) no está disponible. Apache Tomcat/5.5.25 Already looked into urlrewrite.xml and such rule is there: rule note The rule means that requests to /test/status/ will be redirected to /rewrite-status the url will be rewritten. /note from/test/status//from to type=redirect%{context-path}/rewrite-status/to /rule WHAT AM I DOING WRONG??? APPRECIATTE YOUR HELP ON THIS. Rodrigo. awarnier wrote: Rodro wrote: Dear Tomcat Users. I'm trying to do a URL masking on Tomcat 5.5.25. What I specifically want to do is: I execute (call) an app with the following URL: http://localhost:8080/ibi_apps/WFServlet?IBIF_ex=carinst Now, I need to mask the URL to get the same result calling the app as: http://localhost:8080/car i.e. mask /ibi_apps/WFServlet?IBIF_ex=carinst as /car. I found a Solution with URLREWRITE on http://tuckey.org/urlrewrite/manual/2.6 Under Install I see on STEP 1:“Download the zip (or tar.gz) and extract it into your context'sdirectory ie, so that urlrewrite.xml goes into the WEB-INF directory”. However, looking into my file directory I found 6 WEB-INF directories: C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\ROOT C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\tomcat-docs C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\webapps\admin C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\webapps\host-manager C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\webapps\manager C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\tomcat-docs\appdev\sample\web In which one should I extract the zip file into? Thanks and best regards. Rodrigo Allende. Rodrigo, somewhere above there, you mention your original URL http://localhost:8080/ibi_apps/WFServlet?IBIF_ex=carinst So, apart from all the webapp/* directories which you are mentioning just above here, you must have a /ibi_apps/WEB-INF directory somewhere, no ? If you do, then that's the one in which you should unpack that zip. And if you don't, then there is something that you are not telling us.. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Tomcat-URL-Rewrite.-Help-with-configuration.-tp22446210p22461196.html Sent from the Tomcat - User mailing list archive at Nabble.com
Tomcat URL Rewrite. Help with configuration.
Dear Tomcat Users. I'm trying to do a URL masking on Tomcat 5.5.25. What I specifically want to do is: I execute (call) an app with the following URL: http://localhost:8080/ibi_apps/WFServlet?IBIF_ex=carinst Now, I need to mask the URL to get the same result calling the app as: http://localhost:8080/car i.e. mask /ibi_apps/WFServlet?IBIF_ex=carinst as /car. I found a Solution with URLREWRITE on http://tuckey.org/urlrewrite/manual/2.6 Under Install I see on STEP 1:“Download the zip (or tar.gz) and extract it into your context'sdirectory ie, so that urlrewrite.xml goes into the WEB-INF directory”. However, looking into my file directory I found 6 WEB-INF directories: C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\ROOT C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\tomcat-docs C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\webapps\admin C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\webapps\host-manager C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\webapps\manager C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\tomcat-docs\appdev\sample\web In which one should I extract the zip file into? Thanks and best regards. Rodrigo Allende. -- View this message in context: http://www.nabble.com/Tomcat-URL-Rewrite.-Help-with-configuration.-tp22446210p22446210.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: Tomcat URL Rewrite. Help with configuration.
Rodro wrote: Dear Tomcat Users. I'm trying to do a URL masking on Tomcat 5.5.25. What I specifically want to do is: I execute (call) an app with the following URL: http://localhost:8080/ibi_apps/WFServlet?IBIF_ex=carinst Now, I need to mask the URL to get the same result calling the app as: http://localhost:8080/car i.e. mask /ibi_apps/WFServlet?IBIF_ex=carinst as /car. I found a Solution with URLREWRITE on http://tuckey.org/urlrewrite/manual/2.6 Under Install I see on STEP 1:“Download the zip (or tar.gz) and extract it into your context'sdirectory ie, so that urlrewrite.xml goes into the WEB-INF directory”. However, looking into my file directory I found 6 WEB-INF directories: C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\ROOT C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\tomcat-docs C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\webapps\admin C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\webapps\host-manager C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\webapps\manager C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\tomcat-docs\appdev\sample\web In which one should I extract the zip file into? Thanks and best regards. Rodrigo Allende. Rodrigo, somewhere above there, you mention your original URL http://localhost:8080/ibi_apps/WFServlet?IBIF_ex=carinst So, apart from all the webapp/* directories which you are mentioning just above here, you must have a /ibi_apps/WEB-INF directory somewhere, no ? If you do, then that's the one in which you should unpack that zip. And if you don't, then there is something that you are not telling us.. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org