Re: Relative Link Question
On 4/18/06, biai [EMAIL PROTECTED] wrote: But I wanted to go one step forward and that is what I can not do, though I've read it is possible and simple. I want to omit the webapp name from the URL It's beyond me how this can be so confusing. Let's say you have two hosts named 'calvin' and 'hobbes'. Create separate directories like /webapps/calvin /webapps/hobbes In your Host elements specify one of those as the appBase for that host. Put your default webapp for each one in /webapps/calvin/ROOT /webapps/hobbes/ROOT Done. -- Hassan Schroeder [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Relative Link Question
Hi again, Thank you for all the tips. Some resolved my problems, but the appBase still gives me an error. I've read a lot about it but still does not work. In this latest version of testing I only have one Host and it looks like the following: Host name=server-netprof debug=1 appBase=D:\Tomcat 5.5\webapps\netprof unpackWARs=true Aliaswww3novo.netprof.pt/Alias !--Valve className=org.apache.catalina.authenticator.SingleSignOn debug=0/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=domain-b.com_log. suffix=.txt timestamp=true/ -- !-- Root Context Context path= docBase= debug=1/ /Host Can you give me a hint as to what am I doing wrong? Appreciated -- View this message in context: http://www.nabble.com/Relative-Link-Question-t1452173.html#a3971429 Sent from the Tomcat - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Relative Link Question
Have you tried to set your appBase to D:/Tomcat 5.5/webapps/netprof? sometimes back-slashes cause problems. On 4/18/06, biai [EMAIL PROTECTED] wrote: Hi again, Thank you for all the tips. Some resolved my problems, but the appBase still gives me an error. I've read a lot about it but still does not work. In this latest version of testing I only have one Host and it looks like the following: Host name=server-netprof debug=1 appBase=D:\Tomcat 5.5\webapps\netprof unpackWARs=true Aliaswww3novo.netprof.pt/Alias !--Valve className=org.apache.catalina.authenticator.SingleSignOn debug=0/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=domain-b.com_log. suffix=.txt timestamp=true/ -- !-- Root Context Context path= docBase= debug=1/ /Host Can you give me a hint as to what am I doing wrong? Appreciated -- View this message in context: http://www.nabble.com/Relative-Link-Question-t1452173.html#a3971429 Sent from the Tomcat - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marc Farrow
Re: Relative Link Question
Sorry, Did not work must be doing something else wrong -- View this message in context: http://www.nabble.com/Relative-Link-Question-t1452173.html#a3971693 Sent from the Tomcat - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Relative Link Question
Thanks, But I with the rewrite I can solve the problem, as you can see on the othe other posts. But I wanted to go one step forward and that is what I can not do, though I've read it is possible and simple. I want to omit the webapp name from the URL so that instead of accessing: http://myserver/webapp/index.htm for example I would just see or type the following: http://myserver/index.htm Appreciated anyway -- View this message in context: http://www.nabble.com/Relative-Link-Question-t1452173.html#a3971825 Sent from the Tomcat - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Relative Link Question
Hi. I have the same question as you do. When you get the answer, please email me to [EMAIL PROTECTED] Another question I have, is how can I access my website without stating MYAPP in the URL. e.g. instead of using http://myserver.com/myapp/servlet/index.jsp use only http://myserver.com/servlet/index.jsp? Appreciated for any help -- View this message in context: http://www.nabble.com/Relative-Link-Question-t1452173.html#a3950702 Sent from the Tomcat - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Relative Link Question
Hi, you have two options: 1. move your application to the ROOT by renaming your war to ROOT.war (case sensitive) or 2. use mod_rewrite. PETR On 4/17/06, biai [EMAIL PROTECTED] wrote: Hi. I have the same question as you do. When you get the answer, please email me to [EMAIL PROTECTED] Another question I have, is how can I access my website without stating MYAPP in the URL. e.g. instead of using http://myserver.com/myapp/servlet/index.jsp use only http://myserver.com/servlet/index.jsp? Appreciated for any help -- View this message in context: http://www.nabble.com/Relative-Link-Question-t1452173.html#a3950702 Sent from the Tomcat - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Petr Hadraba graphic artist and software designer http://people.hadraba-soft.com/~petr hadrabap AT bluetone DOT cz
Re: Relative Link Question
On 4/17/06, biai [EMAIL PROTECTED] wrote: I have 3 virtual hosts on the server, so I cannot atribute ROOT to all of them. Of course you can; just use a different appBase for each host. HTH, -- Hassan Schroeder [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Relative Link Question
Unless you use special server-side tags, the path is resolved on client. The browser knows nothing about your context. It only knows the server name (myserver.com) and resource name (/images/pic.jpg). Leading slash means starting from the root and that how browser resolves the address. Not being able to have context-relative links sucks, this is one of the reasons why Struts, for example, has html:link tag. On 4/14/06, Steven Huey [EMAIL PROTECTED] wrote: Hello, I've got a setup with Apache 2.2, Mod_Jk 1.2.15, and Tomcat 5.5.16 and things are working pretty well except for relative links in my webapp. When accessing my webapp at http://myserver.com/mywebapp/index.jsp any relative links within subdirectories of the mywebapp directory don't include /mywebapp/ in the URL. For example I have a mywebapp/ includes/ directory and some of the files use links such as: img src=/images/pic.jpg/ Instead of linking to http://myserver.com/mywebapp/images/pic.jpg the link is http://myserver.com/images/pic.jpg. I've read that if I remove the leading / from the links it will work, but I already have a lot of links in this format and am wondering if there is a configuration change or something else I can do to resolve this. Thanks, Steve Huey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Relative Link Question
On 4/17/06, biai [EMAIL PROTECTED] wrote: I'm a newbie in this, so where can I define appbase. First, it's appBase, *not* 'appbase' -- case sensitive. Second, it's well documented in the Tomcat configuration guide. :-) Third, I'd strong recommend putting all your appBases outside of $CATALINA_HOME -- it makes it a lot easier to upgrade, back up, etc. FWIW, -- Hassan Schroeder [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Relative Link Question
Hi, maybe the base / element will solve your problem... PETR On 4/15/06, Arshad Mahmood [EMAIL PROTECTED] wrote: Hi, Hmm. What are you trying to do? Surely your images are not actually in a directory called /webapp/images/ Your images are probably at the top level of your docBase. The webapp is surely just a context that is being mapping to a webapp under tomcat, and you probably want Apache to serve the images anyway (since you're fronting it with Apache). Are the images really not being displayed? What have you set the DocumentRoot to in the apache httpd.conf. Regards. -Original Message- From: Steven Huey [mailto:[EMAIL PROTECTED] Sent: 14 April 2006 23:49 To: users@tomcat.apache.org Subject: Relative Link Question Hello, I've got a setup with Apache 2.2, Mod_Jk 1.2.15, and Tomcat 5.5.16 and things are working pretty well except for relative links in my webapp. When accessing my webapp at http://myserver.com/mywebapp/index.jsp any relative links within subdirectories of the mywebapp directory don't include /mywebapp/ in the URL. For example I have a mywebapp/ includes/ directory and some of the files use links such as: img src=/images/pic.jpg/ Instead of linking to http://myserver.com/mywebapp/images/pic.jpg the link is http://myserver.com/images/pic.jpg. I've read that if I remove the leading / from the links it will work, but I already have a lot of links in this format and am wondering if there is a configuration change or something else I can do to resolve this. Thanks, Steve Huey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Petr Hadraba graphic artist and software designer http://people.hadraba-soft.com/~petr hadrabap AT bluetone DOT cz