Tried setting up two hosts as Yoav suggested. No errors when I start tomcat and the log records deployments within the second deploy directory, but I cannot access those webapps. EG, if I deploy reports.war in the first (default) deploy directory of webapps, I can access it at http://localhost:8080/reports but if I only deploy reports.war in the secondary deploy directory (without putting it in the first), going to the same URL returns nothing. Can one set up two <Host> configurations even if they only have one domain name (as is the case with me). If not, how else can one set up two different deploy directories?
-----Original Message----- From: Green, Jeffrey Sent: Thursday, January 08, 2004 3:25 PM To: 'Tomcat Users List' Subject: RE: Mapping /BAH/ to / Hrm... Tried this and it doesn't quite work for me. In my server.xml, I have one Host defined. Setting its appBase="BAR" simply requires all webapps to be in the $TOMCAT_HOME/BAR directory instead of the $TOMCAT_HOME/webapps directory. The user (at the browser) sees none of this since the path to a webapp is not http://localhost:8080/webapps/myApp.war but is instead http://localhost:8080/myApp.war. Thus, changing the appBase has no effect on what the user sees, only where the files are stored. I must have worded my question wrong. Say for example, we have mycompany.com who has two divisions - Sales and IT. Each wants to use JSP / Servlets, but they want different deploy directories and different paths visible to the user. Thus, sales wants all of its webapps to be at http://mycompany.com:8080/Sales/someSalesWebapp/foo.jsp http://mycompany.com:8080/Sales/anotherSalesWebapp/foo2.jsp Whereas IT wants all of its webapps to be at http://mycompany.com:8080/IT/someITWebapp/bar.jsp http://mycompany.com:8080/IT/anotherITWebapp/bar2.jsp Sales people can copy their .war files to the $SALES_DEPLOY directory and their webapps will be deployed to the /Sales/ space. IT people can copy their .war files to the $IT_DEPLOY directory and their webapps will be deployed to the /IT space. Is such a configuration possible? :) All advice has and will be a huge help. Thanks. -----Original Message----- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, January 08, 2004 12:22 PM To: Tomcat Users List Subject: RE: Mapping /BAH/ to / Howdy, Sure, define a Host with the BAR appBase. (See the Host configuration reference if you're not sure what I mean). Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Green, Jeffrey [mailto:[EMAIL PROTECTED] >Sent: Thursday, January 08, 2004 12:21 PM >To: 'Tomcat Users List' >Subject: RE: Mapping /BAH/ to / > >The balancer is nice, but having to add a balancer filter to each webapp is >not feasible in our setup (where we'd prefer to separate administration >from deployment). Perhaps I could solve this problem by altering how webapps >are >deployed. Is there a way to deploy all webapps in a /BAR/ top level >directory instead of simply in / without changing how users deploy? Thus >if >a user puts a webapp.war file in $DEPLOYDIRECTORY, Tomcat will serve it up >only in http://hostname:8080/BAR/webapp. This should be do-able, right? > >-----Original Message----- >From: Shapira, Yoav [mailto:[EMAIL PROTECTED] >Sent: Thursday, January 08, 2004 11:02 AM >To: Tomcat Users List >Subject: RE: Mapping /BAH/ to / > > > >Howdy, > >>Thanks for the response. How bout if I want the mapping to be for >*all* >>webapps on the appserver? Eg, I want: >> >>http://hostname:8080/FOO/bar to map to /bar >>http://hostname:8080/FOO/sampleWebapp to map to /sampleWebapp >>http://hostname:8080/FOO/anotherWebapp to map to /anotherWebapp >> >>Etc for all webapps in the server. Is this behavior possible? > >Take a look at the balancer webapp's URLStringMatchRule (Balancer ships >with tomcat 5). It's perfect for your needs. You would add the >balancer filter >to your webapp and add a string match rule to balancer's rules.xml file for >every case like the above 3. > >Yoav Shapira > >> >>-----Original Message----- >>From: Shapira, Yoav [mailto:[EMAIL PROTECTED] >>Sent: Thursday, January 08, 2004 10:52 AM >>To: Tomcat Users List >>Subject: RE: Mapping /BAH/ to / >> >> >> >>Howdy, >>Sure, make BAH a simple web application with just one class, a filter >>mapped to url-pattern /* that does a sendRedirect to / + the rest of >>the >path. I >>don't know if that's simpler than a Valve, but it's portable. >> >>Apache's mod_rewrite can also do this, but you probably don't want to >add >>the complexity of an apache-tomcat setup for this reason alone. >> >>Yoav Shapira >>Millennium ChemInformatics >> >> >>>-----Original Message----- >>>From: Green, Jeffrey [mailto:[EMAIL PROTECTED] >>>Sent: Thursday, January 08, 2004 10:50 AM >>>To: '[EMAIL PROTECTED]' >>>Subject: Mapping /BAH/ to / >>> >>>Hi all. Quick question regarding Tomcat. I'd like to create a >mapping >>>such that all requests to >>> >>>http://hostname:8080/FOO/ <http://hostname:8080/FOO/> are forwarded >>to >>>http://hostname:8080/ <http://hostname:8080/> in a transparent manner >>(to >>>the user, at least). >>> >>>Thus, if there is a JSP at http://hostname:8080/FOO/bar/Page.jsp >>><http://hostname:8080/FOO/bar/Page.jsp> , users can access it by >either >>>going to that URL or to this url: http://hostname:8080/bar/Page.jsp >>><http://hostname:8080/bar/Page.jsp> . (Where BAR is the name of the >>>webapp). Does anyone know if / how this can be done? >>> >>>I know one can implement such functionality using Valves, but I seek a >>>simpler solution (if there is one). Thanks! >>> >>>--------------------------------------------------------------------- - >- >>---- >>>--- >>>This message is intended only for the personal and confidential use of >>the >>>designated recipient(s) named above. If you are not the intended >>recipient >>>of >>>this message you are hereby notified that any review, dissemination, >>>distribution or copying of this message is strictly prohibited. This >>>communication is for information purposes only and should not be >>regarded >>>as >>>an offer to sell or as a solicitation of an offer to buy any financial >>>product, an official confirmation of any transaction, or as an >official >>>statement of Lehman Brothers. Email transmission cannot be guaranteed >>to >>>be >>>secure or error-free. Therefore, we do not represent that this >>information >>>is >>>complete or accurate and it should not be relied upon as such. All >>>information is subject to change without notice. >>> >>> >>>--------------------------------------------------------------------- >>>To unsubscribe, e-mail: [EMAIL PROTECTED] >>>For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >>This e-mail, including any attachments, is a confidential business >>communication, and may contain information that is confidential, >>proprietary and/or privileged. This e-mail is intended only for the >>individual(s) >to >>whom it is addressed, and may not be saved, copied, printed, disclosed >or >>used by anyone else. If you are not the(an) intended recipient, please >>immediately delete this e-mail from your computer system and notify the >>sender. Thank you. >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> >>---------------------------------------------------------------------- - >---- >>--- >>This message is intended only for the personal and confidential use of >the >>designated recipient(s) named above. If you are not the intended >recipient >>of >>this message you are hereby notified that any review, dissemination, >>distribution or copying of this message is strictly prohibited. This >>communication is for information purposes only and should not be >regarded >>as >>an offer to sell or as a solicitation of an offer to buy any financial >>product, an official confirmation of any transaction, or as an official >>statement of Lehman Brothers. Email transmission cannot be guaranteed >to >>be >>secure or error-free. Therefore, we do not represent that this >information >>is >>complete or accurate and it should not be relied upon as such. All >>information is subject to change without notice. >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] > > > > >This e-mail, including any attachments, is a confidential business >communication, and may contain information that is confidential, >proprietary and/or privileged. This e-mail is intended only for the >individual(s) to >whom it is addressed, and may not be saved, copied, printed, disclosed or >used by anyone else. If you are not the(an) intended recipient, please >immediately delete this e-mail from your computer system and notify the >sender. Thank you. > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > >----------------------------------------------------------------------- ---- >--- >This message is intended only for the personal and confidential use of the >designated recipient(s) named above. If you are not the intended recipient >of >this message you are hereby notified that any review, dissemination, >distribution or copying of this message is strictly prohibited. This >communication is for information purposes only and should not be regarded >as >an offer to sell or as a solicitation of an offer to buy any financial >product, an official confirmation of any transaction, or as an official >statement of Lehman Brothers. Email transmission cannot be guaranteed to >be >secure or error-free. Therefore, we do not represent that this information >is >complete or accurate and it should not be relied upon as such. All >information is subject to change without notice. > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---------------------------------------------------------------------------- -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---------------------------------------------------------------------------- -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. ------------------------------------------------------------------------------ This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]