connect tomcat and apache by mod_jk2
Hi, ALL. I have connect tomcat and apache by mod_jk2 at the same machine(solaris). I can see the application page with http://localhost:4080/ or http://localhost/ by apache. Now, i need to move tomcat to another machine in LAN. So i change the workers2.properties setting like under ---original(tomcat and apache at same machine)--- # Example socket channel, explicitly set port and host. [channel.socket:127.0.0.1:4009] tomcatId=127.0.0.1:4009 port=4009 host=127.0.0.1 # define the worker [ajp13:127.0.0.1:4009] channel=channel.socket:127.0.0.1:4009 [uri:www.154test.com/*] worker=ajp13:127.0.0.1:4009 ---modify(tomcat and apache at separate machine)--- # Example socket channel, explicitly set port and host. [channel.socket:192.168.1.153:4009] tomcatId=192.168.1.153:4009 port=4009 host=192.168.1.153 # define the worker [ajp13:192.168.1.153:4009] channel=channel.socket:192.168.1.153:4009 [uri:www.153test.com/*] worker=ajp13:192.168.1.153:4009 But it didnt work. I didnt see any error in log. under is part of log [Wed Jan 06 23:19:01 2010] [notice] mod_jk2 child 3 initialized [Wed Jan 06 23:19:01 2010] [notice] jk2_init() Found child 4692 in scoreboard sl ot 4 [Wed Jan 06 23:19:01 2010] [notice] channelApr.resolve(): create AF_NET 192.168 .1.153 4009 [Wed Jan 06 23:19:01 2010] [notice] jk2_init() Setting scoreboard slot 0 for chi ld 4693 [Wed Jan 06 23:19:01 2010] [notice] channelApr.resolve(): create AF_NET 192.168 .1.153 4009 [Wed Jan 06 23:19:01 2010] [notice] workerEnv.init() ok /usr/local/apache/conf/w orkers2.properties [Wed Jan 06 23:19:01 2010] [notice] mod_jk2 child 4 initialized [Wed Jan 06 23:19:01 2010] [notice] workerEnv.init() ok /usr/local/apache/conf/w orkers2.properties [Wed Jan 06 23:19:01 2010] [notice] mod_jk2 child 4693 initialized [Wed Jan 06 23:19:01 2010] [notice] jk2_init() Found child 4694 in scoreboard sl ot 6 [Wed Jan 06 23:19:01 2010] [notice] channelApr.resolve(): create AF_NET 192.168 .1.153 4009 [Wed Jan 06 23:19:01 2010] [notice] workerEnv.init() ok /usr/local/apache/conf/w orkers2.properties [Wed Jan 06 23:19:01 2010] [notice] mod_jk2 child 6 initialized It seems apache catch 192.168.1.153 4009 from the line channelApr.resolve(): create AF_NET 192.168.1.153 4009 I really cant see the page with http://192.168.1.153/ But http://192.168.1.153:4080/ is work. Anyone can help me? Thanks. -- View this message in context: http://old.nabble.com/connect-tomcat-and-apache-by-mod_jk2-tp27027779p27027779.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
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
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
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
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
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
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
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
Set application default
Hi all! I wanna make my application as default(ROOT). My application name is Com under the webapps directory. The application url is http://MyDomain/Com . I want to change the url to http://MyDomain/ . I add Context path= docBase=Com reloadable=true crossContext=true debug=0/ in server.xml. Restart tomcat and it work. Now this application is under Solaris machine. Then i try the same method add one line in server.xml and restart tomcat. But it not work. Now this application is under Windows server 2003. My tomcat version is 5.5.20. The tomcat in Solaris and windows server 2003 is the same version. Why it work with Solaris operating system but windows fail? I dont wanna change my application name to ROOT for this purpose. -- View this message in context: http://www.nabble.com/Set-application-default-tp20296568p20296568.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]
RE: tomcat with jcaptcha
Thanks for reply ,Sameer :) for me, webapps | - eCom - Admin - Login.jsp - Account - *.jsp eCom is a webapps and Admin is a directory under eCom , right? I just strange why i set the eCom default apps(it means root dir/path), the sessions are different between eCom and Admin. If i dont set the eCom default, the session is the same between eCom and Admin. I need to set eCom default for making url like http://myDomain/; , but not http://myDomain/eCom/; Now, i can set the eCom default.But i cant work out the sessions. -- View this message in context: http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p1897.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]
Re: tomcat with jcaptcha
Thanks Johnny, and Sammer reply me by e-mail :) I think move the data under eCom to ROOT directory and delete the eCom directory is a way to help me work out this. Likes Johnny says, if i set the eCom default, there are two directories - eCom and ROOT. I think i understand why the session different. for examples, (i set eCom default, so there are eCom and ROOT under webapps) ROOT - Admin - Login.jsp eCom - Admin - Login.jsp The url http://myDomain/; will go ROOT and get session A. The url http://myDomain/Admin/Login.jsp; and get session B. I just confuse why get session B but not session A. It seems go the ROOT path(directory), right? But in fact, the sencond url direct to the eCom/Admin/Login.jsp not ROOT/Admin/Login.jsp. I try the url http://myDomain/eCom; get the session B, too. Of course, the url http//myDomain/eCom/Admin/Login.jsp get the session B. Thanks all helps :) -- View this message in context: http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p18353005.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]
RE: tomcat with jcaptcha
I trace the jcaptcha code. Jcaptcha set a parameter name captchaId in session when this servlet use(when link to login.page). And when user submit the form.Its will get captchaId from session. Then compare the two captchaId. So i system out the captchaId, and see whats wrong. when i link http://myDomain/eCom/Login.jsp, the first captchaId i can see in tomcat console. Then i submit. Its work and I see the second captchaId is the same with first. But another http://myDomain/Login.jsp, the two captcahId are different. I think that session cause the jcaptcha not work. How could i work out this? And i still let the dir eCom with my root dir. Because i must let the url like http://myDomain/;. -- View this message in context: http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p18310916.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]
Re: tomcat with jcaptcha
Sorry my english is poor. I use the version 5.5.20. and i add one line like under let the eCom becomes root in tomcat/conf/server.xml Context path= docBase=eCom debug=0/ before tag /Host markt-2 wrote: WILLIAMer wrote: Sorry i forget to write down the environment. The application used by tomcat version 5.5 and LINUX. There are currently 27 different 5.5.x versions. Knowing which one you are using would help. You still haven't told us how you made eCom the 'default' webapp. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p18311025.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]
Re: tomcat with jcaptcha
I think i find why the sessions are different. The Login.jsp i put in eCom/Admin/. for example: link http://myDomain/;, the session is A, link http://myDomain/Admin/;, the session is B, link http://myDomain/eCom/Admin/, ths session is B, link http://myDomain/eCom/;, the session is B, why i set the the eCom become the root dir, but these dirs under eCom cant get the same session when use root path. Is there any approach to setting? -- View this message in context: http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p18311821.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]
Re: tomcat with jcaptcha
Thanks for replies :) Sorry, my english is hard to read! I google for how to set the apps to default(ROOT) though chinese keywords, there are kinds of lists. However, i read different version have different approach. I try some and get useful with add one line code that i wrote that post before. Now, i think i just only one question :) I know the sessions cant share with two directory(apps). But iinclude parent and child directory? The dir Admin just under the dir eCom. I get the same session at Admin and eCom if no set the eCom default. But i set eCom default, the sessions are different between Admin and eCom. I think that i set the eCom become ROOT and these directories under eCom will be set(include Admin), too. -- View this message in context: http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p18330689.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]
RE: tomcat with jcaptcha
MY webapps tree: eCom-Admin -Login.jsp -Account - some .jsp -Other directory I think Admin and eCom are not two webapps And Admin is not a webapps deployed inside eCom, right? Caldarale, Charles R wrote: From: WILLIAMer [mailto:[EMAIL PROTECTED] Subject: Re: tomcat with jcaptcha Now, i think i just only one question :) I know the sessions cant share with two directory(apps). But iinclude parent and child directory? The dir Admin just under the dir eCom. If you're asking if one webapp can be deployed inside another webapp's directory, the answer is definitely no. Each webapp must be in a separate directory (or war file) immediately under the Host appBase directory, or else in a directory completely outside of the Host appBase. Under no circumstances can webapp deployments overlap. - 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] -- View this message in context: http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p18331041.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]
tomcat with jcaptcha
Hi! all, I have an application named eCom unnder the tomcat/webapps and using jcatpcha with the login page. I set the eCom becomes the root dir(path) with the server.xml. So, http://myDomain/ will equal http://myDomain/eCom/. And its seems ok and work with every page. But there is an error when I try to login. The jcaptcha give me an exception. com.octo.captcha.service.CaptchaServiceException: Invalid ID, could not validat e unexisting or already validated captcha So i try another login page with the http://myDomain/eCom/, but its work fine. In fact , the login page is the same. I think http://myDomain/Login.jsp; and http://myDomain/eCom/Login.jsp; is the same. Because i set the dir eCom become my root dir. I dont know how this error cause? I try to google this exception , but no one likes me. Who can tell me that what different if the dir set to root dir? -- View this message in context: http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p18309636.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]
RE: tomcat with jcaptcha
Sorry i forget to write down the environment. The application used by tomcat version 5.5 and LINUX. Caldarale, Charles R wrote: From: WILLIAMer [mailto:[EMAIL PROTECTED] Subject: tomcat with jcaptcha I have an application named eCom unnder the tomcat/webapps and using jcatpcha with the login page. I set the eCom becomes the root dir(path) with the server.xml. Probably a fatal mistake, but since you didn't bother to tell us the Tomcat version you're using nor the exact mechanism you used to make eCom the default webapp, no one can be sure. - 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] -- View this message in context: http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p18310223.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]