Re: FAQ - How do I hide "cocoon" in the URL

2001-12-13 Thread Simone Gianni

At 14.05 12/12/2001 +0100, you wrote:
4) go to dm.dev.com to activate the web application and have the war file
deploy. This should bring up the Cocoon welcome page in the ROOT of the
site!
Using
this technique I have a sepparate directory and Cocoon configuration for
every site I run.  A major advantage to my oppinion.

This has been of great help (I was stuck in the same problem :)) ... but,
as you said, the whole site will be served by cocoon. Now, what about
images, downloads, zip files etc ?? ... everything that does not need to
be parsed should be served directly by apache (also because cocoon adds a
overhead). But making the whole site a webapp this does not happen. My
actual solution is to have something like "images.mysite.com"
as a virtual host mapped on the same directory, accepting .gif only, but
it's just a bad artifact, since i always have to give complete urls for
images. 

Any solution for this ? Isn't it possible to have the web app receive
only some extensions? or have apache catch *.gif before the web app, or
something similar ?

Thanks

Simone







Re: FAQ - How do I hide "cocoon" in the URL

2001-12-12 Thread Bert Van Kets

Now I want to be able to enter the
URL
"http://www.place.com/index.html"
and get back the same result as
"http://www.place.com:8080/cocoon/mount/MyWebSite/index.html".
I used mod_webapp with great result.  It does exactly what you need
makes cocoon active on the root of the site.  Just know that
EVERYTHING will need to pass through Cocoon this way because you make a
web application of your WHOLE site, not just a portion of it.
I use Apache 1.3, Tomcat 4 and Cocoon v2 on Win 2K.
Here's what I did to get cocoon as a root web app for the site dm.dev.com
(local site on my machine):
1) copy cocoon.war to dm.war (this created a "dm" web
application)
2) add the web_app module to Apache using the documentation
3) add the following lines to the dm.dev.com virtual host
   
WebAppConnection conn   
warp  localhost:8008
   
WebAppDeploy dm   conn  /
This connects the web application dm to the root of the virtual
host.  You may note that "dm" in the WebAppDeploy line is
the name of the webapp, and thus the war file, and has nothing to do with
the directory it's in.
4) go to dm.dev.com to activate the web application and have the war file
deploy. This should bring up the Cocoon welcome page in the ROOT of the
site!
5) edit the sitemap.xmap in the dm directory and change the default file
setting to
   
    
   
   
    
    
    
   
6) if I surf to dm.dev.com the URL in the address bar changes to
dm.dev.com/index.htm and the index.xml file is translated using the
styles/default.xsl file and voila instant HTML!  This automatically
works for subdirectories too since I'm using the double asterix.  So
a request to "/prod/index.htm" will create a call to
"/prod/index.xml" and translate it with the /styles/default.xsl
file.
7) you can strip the sitemap of all the sample and doc pipelines and
mappings.
Using this technique I have a sepparate directory and Cocoon
configuration for every site I run.  A major advantage to my
oppinion.
If you add "WebAppInfo /webapp-info" at the bottom of
the Apache.conf file you can surf to
http://localhost/webapp-info/
(don't forget the trailing slash) and see if the web-app has started.  If you don't see a directory in the web-app Apache has not connected to Tomcat.  You need to restart apache and make sure Tomcat start BEFORE Apache.  If you install both as a service you need to install Apache using the -W parameter.  Check the parameters using "apache -h" at the command prompt.
BTW you can stop and start windows services using the command "net stop service" where you replace service with the name of the installed service.  Tomcat is called "Apache Tomcat" and Apache is simply called "Apache".  "Net stop "Apache tomcat"" will stop Tomcat.
If you have any other questions or would like a copy of my config files, just mail me directly.
Bert


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>



AW: FAQ - How do I hide "cocoon" in the URL

2001-12-12 Thread Reinhard Potz

 > -Ursprungliche Nachricht-
 > Von: Phil Blake [mailto:[EMAIL PROTECTED]]
 > Gesendet: Mittwoch, 12. Dezember 2001 07:34
 > An: [EMAIL PROTECTED]
 > Betreff: Re: FAQ - How do I hide "cocoon" in the URL
 >
 >
 > > What they're referring to in the FAQ is that, by default, all URL's
 > > contain "cocoon" in them, since usually cocoon resides in a "cocoon"
 > > sub-dir under, say, Tomcat.  They provide directions how to take
 > > "cocoon" out of the URL.
 >
 > I've used the method in the FAQ and it works fine but it does not "hide"
 > cocoon. It just saves you typing it the first time and performs a
 > redirect to get "cocoon" back into the URL.
 >
 > Have I missed something here?
 >
 > Both the following (from the example) perform redirects and therefore
 > don't hide "cocoon" - you just don't need to type it the first time.
 >
 > RewriteRule ^/Foo /cocoon/Foo/ [R]
 > RewriteRule ^/Foo(.*) /cocoon/Foo$1 [R]
 >
 > Please correct me if I'm wrong... I so want to be wrong :)
 >
 > Thanks again,
 >
 > Phil
 >

Another possibility is the Apache webserver module "mod_proxy". Have a look
at http://www.apacheref.com/ref/mod_proxy/ProxyPassReverse.html and
http://www.apacheref.com/ref/mod_proxy/ProxyPass.html

Reinhard


 >
 > -
 > Please check that your question has not already been answered in the
 > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
 >
 > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
 > For additional commands, e-mail: <[EMAIL PROTECTED]>
 >


-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: FAQ - How do I hide "cocoon" in the URL

2001-12-11 Thread Phil Blake

> What they're referring to in the FAQ is that, by default, all URL's 
> contain "cocoon" in them, since usually cocoon resides in a "cocoon" 
> sub-dir under, say, Tomcat.  They provide directions how to take 
> "cocoon" out of the URL.

I've used the method in the FAQ and it works fine but it does not "hide" 
cocoon. It just saves you typing it the first time and performs a 
redirect to get "cocoon" back into the URL.

Have I missed something here?

Both the following (from the example) perform redirects and therefore 
don't hide "cocoon" - you just don't need to type it the first time.

RewriteRule ^/Foo /cocoon/Foo/ [R]
RewriteRule ^/Foo(.*) /cocoon/Foo$1 [R]

Please correct me if I'm wrong... I so want to be wrong :)

Thanks again,

Phil


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: FAQ - How do I hide "cocoon" in the URL

2001-12-11 Thread Phil Blake

Hi,

Thanks for your reply.

I'll try to clarify what I mean.

When the user enters "http://www.place.com/"; into the browser the page 
that is returned is "http://www.place.com:8080/cocoon/mount/MyWebSite/";.

This is very easy to achieve with a redirect but then the user will have 
the URL "http://www.place.com:8080/cocoon/mount/MyWebSite/"; in their 
browser - this is NOT what I want. Also they will be using the tomcat 
http rather than apache - this is also not what I want.

So... :)

Step 1 - get mopd_webapp running... No Problems. Now I can go to 
"http://www.place.com/cocoon"; and I get the same result as I would have 
with "http://www.place.com:8080/cocoon";.

So far so good. But I don't just want to get to cocoon, I want to get to 
a sub-site mounted in the 'mount' directory.

Now I want to be able to enter the URL "http://www.place.com/index.html"; 
and get back the same result as 
"http://www.place.com:8080/cocoon/mount/MyWebSite/index.html";.

ie. within apache I need to rewrite ALL url's for a virtual host so that 
'/cocoon/mount/MyWebSite' is inserted at the beginning of all requests - 
BUT I don't want to user to see this so I can't use a redirect.

This is where I get stuck. :)

Thanks again,

Phil

On Wednesday, December 12, 2001, at 03:07 PM, David Rosenstrauch wrote:

> What they're referring to in the FAQ is that, by default, all URL's 
> contain "cocoon" in them, since usually cocoon resides in a "cocoon" 
> sub-dir under, say, Tomcat.  They provide directions how to take 
> "cocoon" out of the URL.
>
> I'm not sure what you're asking though.  What part of the URL are you 
> trying to hide?  You probably already know that the URL request 
> parameters (e.g., index.html?parm1=a&parm2=b) can be hidden by using 
> method=POST, so I assume you're not asking about this.
>
> If you can provide more details about what you're trying to hide, 
> perhaps I can help.
>
>
> DR
>
>
> At 02:59 PM 12/12/01 +1100, you wrote:
>> I wish to "hide" part of the URL from the user.
>>
>> I noticed on the cocoon web site there is a FAQ with the title:  How 
>> do i hide "cocoon" in the URL's once i integrate using mod_jk as shown 
>> above?
>>
>> FYI: The example in the cocoon FAQ doesn't so much "hide" anything in 
>> the URL, rather presents the full URL immediately to the user - the 
>> complete opposite of the desired result.
>>
>> I'll have a play with rewrite and aliases to see if there is a way to 
>> "hide" part of the URL (never used them before :) ) If someone has an 
>> answer to this, perhaps updating the FAQ would be good.
>>
>> Thanks in advance,
>>
>> Phil
>>
>>
>> -
>> Please check that your question has not already been answered in the
>> FAQ before posting. 
>>
>> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>> For additional commands, e-mail: <[EMAIL PROTECTED]>
>
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: FAQ - How do I hide "cocoon" in the URL

2001-12-11 Thread David Rosenstrauch

What they're referring to in the FAQ is that, by default, all URL's contain "cocoon" 
in them, since usually cocoon resides in a "cocoon" sub-dir under, say, Tomcat.  They 
provide directions how to take "cocoon" out of the URL.

I'm not sure what you're asking though.  What part of the URL are you trying to hide?  
You probably already know that the URL request parameters (e.g., 
index.html?parm1=a&parm2=b) can be hidden by using method=POST, so I assume you're not 
asking about this.

If you can provide more details about what you're trying to hide, perhaps I can help.


DR


At 02:59 PM 12/12/01 +1100, you wrote:
>I wish to "hide" part of the URL from the user.
>
>I noticed on the cocoon web site there is a FAQ with the title:  How do i hide 
>"cocoon" in the URL's once i integrate using mod_jk as shown above?
>
>FYI: The example in the cocoon FAQ doesn't so much "hide" anything in the URL, rather 
>presents the full URL immediately to the user - the complete opposite of the desired 
>result.
>
>I'll have a play with rewrite and aliases to see if there is a way to "hide" part of 
>the URL (never used them before :) ) If someone has an answer to this, perhaps 
>updating the FAQ would be good.
>
>Thanks in advance,
>
>Phil
>
>
>-
>Please check that your question has not already been answered in the
>FAQ before posting. 
>
>To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>For additional commands, e-mail: <[EMAIL PROTECTED]>


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




FAQ - How do I hide "cocoon" in the URL

2001-12-11 Thread Phil Blake

I wish to "hide" part of the URL from the user.

I noticed on the cocoon web site there is a FAQ with the title:  How do 
i hide "cocoon" in the URL's once i integrate using mod_jk as shown 
above?

FYI: The example in the cocoon FAQ doesn't so much "hide" anything in 
the URL, rather presents the full URL immediately to the user - the 
complete opposite of the desired result.

I'll have a play with rewrite and aliases to see if there is a way to 
"hide" part of the URL (never used them before :) ) If someone has an 
answer to this, perhaps updating the FAQ would be good.

Thanks in advance,

Phil


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>