catalog support for url rewriting

2002-11-11 Thread Jakob Praher
hi everybody,

the oasis xml catalog format, that is in the
xml-commons package, supports url rewriting.

now I have configured the cocoon.xconf file and added
the local-catalog parameter which points to a oasis
catalog descriptor (which btw works with the resolver
tool that comes with org.apache.xml.resolver package
).

I know that you use the same package in your
entity-resolver component.

the question I have is: 
Do you have currently support for URL rewriting, for
instance within a xslt stylesheet, and if not, what
components should get tweaked in order to do it... 

thanks 

-- Jakob

__

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de

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

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




AW: url rewriting

2002-10-23 Thread Christoph Stocker
hi,

sorry to write directly to you.

can you send my by attachement your compiled EncodeURLTransformer.class


greetings chris

-Ursprüngliche Nachricht-
Von: Christopher Painter-Wakefield [mailto:paint007;mc.duke.edu] 
Gesendet: Dienstag, 22. Oktober 2002 19:34
An: [EMAIL PROTECTED]
Betreff: Re: url rewriting 



Chris,

I don't know much about actions, so I can't help you too much with that.
However, I can offer some hints on the EncodeURLTransformer.  Basically,
it has a bug.  The first time you hit a page, it fails to rewrite the
URLs. This works for some frameworks, in which the first page is a login
page, with the form action manually rewritten in XSP, and then all
subsequent pages are rewritten.  Someone else posted on the mailing list
a while back
(http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=103241658409677w=2)
,
but it doesn't appear to have been picked up by the Cocoon developers;
it's been on my to-do list for a little while to add this to bugzilla,
so I'll try to take the time to do that today.

In the meantime, to fix the bug, we changed the source code for
EncodeURLTransformer, compiled it, and put it in our cocoon.jar in place
of the old one.  I think you can also just put it in WEB-INF/classes, if
you are using Tomcat, but we didn't try that.  Anyway, you can use the
fix suggested in the link above, or you can try ours.  Ours is maybe a
bit simpler, but you tend to get URLs rewritten on the first page
regardless of whether the browser needs it, which doesn't hurt anything
but might bother some people.  Our fix is:

replace:
  if ( request.isRequestedSessionIdFromURL()) {
with:
  if ( request.isRequestedSessionIdFromURL() ||
this.session.isNew()) {

in the setup() method.

-Christopher



hi all!

i use win200, cocoon2.0.2, weblogic6.0sp2

i tried url-rewriting in my action---

Map sitemapParams = new HashMap();
Request req = ObjectModelHelper.getRequest(objectModel);
Session session = req.getSession();

if (session.isNew()) {
 // data i want to read out in my xsp-site  session.setAttribute(data,
myObject);  sitemapParams.put(nextpage, home); }

as it is given in the documentation


my sitemap looks as following --

map:match pattern=startOR
 map:act type=ORAction
   map:generate src=orneu/{nextpage}.xsp type=serverpages/
   !--map:generate src=orneu/registrierung1.xsp
type=serverpages/--
   map:transform src=orneu/xml2html.xsl type=xslt/
   map:transform type=encodeURL/
 /map:act
 map:serialize type=html/
/map:match



also i configured my weblogic, not to use cookies -- see
may attached weblogic.xml


but every time, i go a second time in my action, it seems that the
action creates every time a new session and my session-data is lost

i studied the EncodeURLTransformer, but it doesn't helped me (i don't
know how to in my action use this)


has someone a code-example who to write a cocoon-action with
url-rewriting. what do i wrong? please help!

greetings, chris






-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




Re: AW: url rewriting

2002-10-23 Thread Christopher Painter-Wakefield


Chris,

sure, here you are.  I don't know if there are any version dependencies
(I'd guess not), but we compiled this against the C2.0.3 jar, so if you are
on 2.0.3 it should work fine.  The path is
org/apache/cocoon/transformation/EncodeURLTransformer.class.

I've also added a bug report on bugzilla, so hopefully this will get fixed
in 2.1.

-Christopher

(See attached file: EncodeURLTransformer.class)



hi,

sorry to write directly to you.

can you send my by attachement your compiled EncodeURLTransformer.class


greetings chris

-Ursprüngliche Nachricht-
Von: Christopher Painter-Wakefield [mailto:paint007;mc.duke.edu]
Gesendet: Dienstag, 22. Oktober 2002 19:34
An: [EMAIL PROTECTED]
Betreff: Re: url rewriting



Chris,

I don't know much about actions, so I can't help you too much with that.
However, I can offer some hints on the EncodeURLTransformer.  Basically,
it has a bug.  The first time you hit a page, it fails to rewrite the
URLs. This works for some frameworks, in which the first page is a login
page, with the form action manually rewritten in XSP, and then all
subsequent pages are rewritten.  Someone else posted on the mailing list
a while back
(http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=103241658409677w=2)
,
but it doesn't appear to have been picked up by the Cocoon developers;
it's been on my to-do list for a little while to add this to bugzilla,
so I'll try to take the time to do that today.

In the meantime, to fix the bug, we changed the source code for
EncodeURLTransformer, compiled it, and put it in our cocoon.jar in place
of the old one.  I think you can also just put it in WEB-INF/classes, if
you are using Tomcat, but we didn't try that.  Anyway, you can use the
fix suggested in the link above, or you can try ours.  Ours is maybe a
bit simpler, but you tend to get URLs rewritten on the first page
regardless of whether the browser needs it, which doesn't hurt anything
but might bother some people.  Our fix is:

replace:
  if ( request.isRequestedSessionIdFromURL()) {
with:
  if ( request.isRequestedSessionIdFromURL() ||
this.session.isNew()) {

in the setup() method.

-Christopher





EncodeURLTransformer.class
Description: Binary data
-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


url rewriting

2002-10-22 Thread Christoph Stocker
hi all!

i use win200, cocoon2.0.2, weblogic6.0sp2

i tried url-rewriting in my action---

Map sitemapParams = new HashMap();
Request req = ObjectModelHelper.getRequest(objectModel);
Session session = req.getSession();

if (session.isNew()) {
// data i want to read out in my xsp-site
session.setAttribute(data, myObject);
sitemapParams.put(nextpage, home);
}

as it is given in the documentation


my sitemap looks as following --

map:match pattern=startOR
 map:act type=ORAction
   map:generate src=orneu/{nextpage}.xsp type=serverpages/
   !--map:generate src=orneu/registrierung1.xsp
type=serverpages/--
   map:transform src=orneu/xml2html.xsl type=xslt/
   map:transform type=encodeURL/
 /map:act
 map:serialize type=html/
/map:match



also i configured my weblogic, not to use cookies -- see
may attached weblogic.xml


but every time, i go a second time in my action, it seems that 
the action creates every time a new session and my session-data is lost

i studied the EncodeURLTransformer, but it doesn't helped me (i don't
know how to 
in my action use this)


has someone a code-example who to write a cocoon-action with
url-rewriting.
what do i wrong? please help!

greetings, chris

?xml version=1.0 encoding=UTF-8?
weblogic-web-app
	session-descriptor
		session-param
			param-nameCookiesEnabled/param-name
			param-valueFalse/param-value
		/session-param
		session-param
			param-nameURLRewritingEnabled/param-name
			param-valueTrue/param-value
		/session-param
		session-param
			param-nameSessionTrackingEnabled/param-name
			param-valueTrue/param-value
		/session-param
	/session-descriptor
/weblogic-web-app


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

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


Re: url rewriting

2002-10-22 Thread Christopher Painter-Wakefield

Chris,

I don't know much about actions, so I can't help you too much with that.
However, I can offer some hints on the EncodeURLTransformer.  Basically, it
has a bug.  The first time you hit a page, it fails to rewrite the URLs.
This works for some frameworks, in which the first page is a login page,
with the form action manually rewritten in XSP, and then all subsequent
pages are rewritten.  Someone else posted on the mailing list a while back
(http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=103241658409677w=2),
but it doesn't appear to have been picked up by the Cocoon developers; it's
been on my to-do list for a little while to add this to bugzilla, so I'll
try to take the time to do that today.

In the meantime, to fix the bug, we changed the source code for
EncodeURLTransformer, compiled it, and put it in our cocoon.jar in place of
the old one.  I think you can also just put it in WEB-INF/classes, if you
are using Tomcat, but we didn't try that.  Anyway, you can use the fix
suggested in the link above, or you can try ours.  Ours is maybe a bit
simpler, but you tend to get URLs rewritten on the first page regardless of
whether the browser needs it, which doesn't hurt anything but might bother
some people.  Our fix is:

replace:
  if ( request.isRequestedSessionIdFromURL()) {
with:
  if ( request.isRequestedSessionIdFromURL() || this.session.isNew()) {

in the setup() method.

-Christopher



hi all!

i use win200, cocoon2.0.2, weblogic6.0sp2

i tried url-rewriting in my action---

Map sitemapParams = new HashMap();
Request req = ObjectModelHelper.getRequest(objectModel);
Session session = req.getSession();

if (session.isNew()) {
 // data i want to read out in my xsp-site
 session.setAttribute(data, myObject);
 sitemapParams.put(nextpage, home);
}

as it is given in the documentation


my sitemap looks as following --

map:match pattern=startOR
 map:act type=ORAction
   map:generate src=orneu/{nextpage}.xsp type=serverpages/
   !--map:generate src=orneu/registrierung1.xsp
type=serverpages/--
   map:transform src=orneu/xml2html.xsl type=xslt/
   map:transform type=encodeURL/
 /map:act
 map:serialize type=html/
/map:match



also i configured my weblogic, not to use cookies -- see
may attached weblogic.xml


but every time, i go a second time in my action, it seems that
the action creates every time a new session and my session-data is lost

i studied the EncodeURLTransformer, but it doesn't helped me (i don't
know how to
in my action use this)


has someone a code-example who to write a cocoon-action with
url-rewriting.
what do i wrong? please help!

greetings, chris






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

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




AW: URL Rewriting

2002-10-21 Thread Christoph Stocker
hi!
 
you mean the EncodeURLTransformer? YES - i am a beginner in cocoon. in my
opinion, thats
the java-file to the class that supports cocoon and i have to use in my
action.
 
but my question is how to use in the action? maybe there is a action code
example
 
 
gretings, chris

-Ursprüngliche Nachricht-
Von: Alex Romayev [mailto:aromay;sapient.com] 
Gesendet: Montag, 21. Oktober 2002 13:27
An: [EMAIL PROTECTED]
Betreff: RE: URL Rewriting


Have you looked at EncodeURLTransformer?
 
-Alex
-Original Message- 
From: Christoph Stocker [mailto:chris.stocker;gmx.at] 
Sent: Mon 10/21/2002 12:13 PM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: URL Rewriting



hi all!

i use cocoon2.0.2, winxp and weblogic6.0sp2


i use cookies for session handling, but i dont want to do use cookies.

i want to use url-rewriting in my cocoon-action. has anyone code
examples how to do inside the action or links to pages who to use
url-rewriting in cocoon-actions.

now i use the session to put information between action and my website.
can i use it also with url-rewriting?


another question to weblogic:
how do i turn on or off in my weblogic to use cookies for session
handling or not. because in
http://xml.apache.org/cocoon/developing/webapps/session.html it says,
Just refer to the
documentation of your servlet engine on how to turn on cookies for
session handling., but i can't find how in my weblogic.



greetings, chris


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

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




attachment: winmail.dat-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


RE: URL Rewriting

2002-10-21 Thread Alex Romayev
Have you looked at EncodeURLTransformer?
 
-Alex
-Original Message- 
From: Christoph Stocker [mailto:chris.stocker;gmx.at] 
Sent: Mon 10/21/2002 12:13 PM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: URL Rewriting



hi all!

i use cocoon2.0.2, winxp and weblogic6.0sp2


i use cookies for session handling, but i dont want to do use cookies.

i want to use url-rewriting in my cocoon-action. has anyone code
examples how to do inside the action or links to pages who to use
url-rewriting in cocoon-actions.

now i use the session to put information between action and my website.
can i use it also with url-rewriting?


another question to weblogic:
how do i turn on or off in my weblogic to use cookies for session
handling or not. because in
http://xml.apache.org/cocoon/developing/webapps/session.html
http://xml.apache.org/cocoon/developing/webapps/session.html  it says,
Just refer to the
documentation of your servlet engine on how to turn on cookies for
session handling., but i can't find how in my weblogic.



greetings, chris


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

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




application/ms-tnef-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


URL rewriting solution in FAQ does not do the trick

2002-06-18 Thread Robert Bourdeau

This is more of an Apache question than a Cocoon question, but
hopefully someone will know what I'm doing wrong here.

Setup: SPARC Solaris 2.7, Apache 1.3.24 w/mod_webapp (Warp), and Tomcat 4.0.1

Goal:  Eliminate cocoon from the URL
Constraints:  Want all my custom content (XML, stylesheets, etc.) to be removed
from the Cocoon tree so I can upgrade Cocoon separately. Must use Apache to
receive request. URL mapping has to be done per virtual host.

I looked at the FAQ, and followed the instructions. I rebuilt Apache with mod_rewrite
enabled, then added the followed code to my httpd.conf:

VirtualHostmyhost.mydomain:80
ServerNamemyhost.mydomain
DocumentRoot   /myhost.mydomain/htmls

IfModule mod_rewrite.c
RewriteEngine on
RewriteLog /var/adm/www/rewrite.log
RewriteLogLevel 9
RewriteRule ^/xml /cocoon/xml/ [R]
RewriteRule ^/xml(.*) /cocoon/xml$1 [R]
/IfModule

WebAppConnection   conn  warpmyhost.mydomain:8008
WebAppDeploy   cocoonconn/cocoon
/VirtualHost

I also modified the Cocoon sitemap.xmap to forward the processing to a sitemap
outside of the Cocoon tree.

This URL works:

http://myhost.mydomain/cocoon/xml/foo
* Apache correctly passes the /cocoon/xml/foo address to 
Tomcat which then passes it to Cocoon. Output is correct

This URL 
 http://myhost.mydomain/xml/foo
is redirected to http://myhost.mydomain/cocoon/xml/foo
and the user sees it in the browser. Not what I wanted.
I tried the single line [PT] variation shown in the FAQ, and 
as indicated there, this does not work at all.

Thoughts?

Regards,
--- Bob Bourdeau

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

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




Re: URL rewriting solution in FAQ does not do the trick

2002-06-18 Thread Lajos Moczar

Why not do this in $CATALINA_HOME/conf/server.xml:

Context path= docBase=cocoon
  debug=0 reloadable=true/

Regards,

Lajos


Robert Bourdeau wrote:

 This is more of an Apache question than a Cocoon question, but
 hopefully someone will know what I'm doing wrong here.
 
 Setup: SPARC Solaris 2.7, Apache 1.3.24 w/mod_webapp (Warp), and Tomcat 4.0.1
 
 Goal:  Eliminate cocoon from the URL
 Constraints:  Want all my custom content (XML, stylesheets, etc.) to be removed
 from the Cocoon tree so I can upgrade Cocoon separately. Must use Apache to
 receive request. URL mapping has to be done per virtual host.
 
 I looked at the FAQ, and followed the instructions. I rebuilt Apache with mod_rewrite
 enabled, then added the followed code to my httpd.conf:
 
 VirtualHost  myhost.mydomain:80
 ServerName  myhost.mydomain
 DocumentRoot   /myhost.mydomain/htmls
 
 IfModule mod_rewrite.c
 RewriteEngine on
 RewriteLog /var/adm/www/rewrite.log
 RewriteLogLevel 9
 RewriteRule ^/xml /cocoon/xml/ [R]
 RewriteRule ^/xml(.*) /cocoon/xml$1 [R]
 /IfModule
 
 WebAppConnection   conn  warpmyhost.mydomain:8008
 WebAppDeploy   cocoonconn/cocoon
 /VirtualHost
 
 I also modified the Cocoon sitemap.xmap to forward the processing to a sitemap
 outside of the Cocoon tree.
 
 This URL works:
 
 http://myhost.mydomain/cocoon/xml/foo
   * Apache correctly passes the /cocoon/xml/foo address to 
 Tomcat which then passes it to Cocoon. Output is correct
 
 This URL 
  http://myhost.mydomain/xml/foo
 is redirected to http://myhost.mydomain/cocoon/xml/foo
 and the user sees it in the browser. Not what I wanted.
 I tried the single line [PT] variation shown in the FAQ, and 
 as indicated there, this does not work at all.
 
 Thoughts?
 
 Regards,
 --- Bob Bourdeau
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 
 


-- 

Cocoon training, consulting  support
galatea.com



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

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




RE: URL rewriting solution in FAQ does not do the trick

2002-06-18 Thread Luca Morandini

Lajos,

OTOH, the adding of this context will make the Tomcat doc and Tomcat home
page unreacheable.

There are ways around it (like the adding of /root and /tomcat-docs
contexts),
but replacing the default Tomcat behaviour doesn't seem to me such a good
idea; though, it may be just fine for a production environment.

In my opinion the use of mod_rewrite, ugly as it may be, is still the path
of least resistance (it doesn't alter the behaviour of anything).

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


 -Original Message-
 From: Lajos Moczar [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 18, 2002 5:57 PM
 To: [EMAIL PROTECTED]
 Subject: Re: URL rewriting solution in FAQ does not do the trick


 Why not do this in $CATALINA_HOME/conf/server.xml:

 Context path= docBase=cocoon
   debug=0 reloadable=true/

 Regards,

 Lajos


 Robert Bourdeau wrote:

  This is more of an Apache question than a Cocoon question, but
  hopefully someone will know what I'm doing wrong here.
 
  Setup: SPARC Solaris 2.7, Apache 1.3.24 w/mod_webapp (Warp),
 and Tomcat 4.0.1
 
  Goal:  Eliminate cocoon from the URL
  Constraints:  Want all my custom content (XML, stylesheets,
 etc.) to be removed
  from the Cocoon tree so I can upgrade Cocoon separately. Must
 use Apache to
  receive request. URL mapping has to be done per virtual host.
 
  I looked at the FAQ, and followed the instructions. I rebuilt
 Apache with mod_rewrite
  enabled, then added the followed code to my httpd.conf:
 
  VirtualHostmyhost.mydomain:80
  ServerNamemyhost.mydomain
  DocumentRoot   /myhost.mydomain/htmls
 
  IfModule mod_rewrite.c
  RewriteEngine on
  RewriteLog /var/adm/www/rewrite.log
  RewriteLogLevel 9
  RewriteRule ^/xml /cocoon/xml/ [R]
  RewriteRule ^/xml(.*) /cocoon/xml$1 [R]
  /IfModule
 
  WebAppConnection   conn  warpmyhost.mydomain:8008
  WebAppDeploy   cocoonconn/cocoon
  /VirtualHost
 
  I also modified the Cocoon sitemap.xmap to forward the
 processing to a sitemap
  outside of the Cocoon tree.
 
  This URL works:
 
  http://myhost.mydomain/cocoon/xml/foo
  * Apache correctly passes the /cocoon/xml/foo address to
  Tomcat which then passes it to Cocoon. Output is correct
 
  This URL
   http://myhost.mydomain/xml/foo
  is redirected to http://myhost.mydomain/cocoon/xml/foo
  and the user sees it in the browser. Not what I wanted.
  I tried the single line [PT] variation shown in the FAQ, and
  as indicated there, this does not work at all.
 
  Thoughts?
 
  Regards,
  --- Bob Bourdeau
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]
 
 


 --

 Cocoon training, consulting  support
 galatea.com



 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




Re: URL rewriting solution in FAQ does not do the trick

2002-06-18 Thread Lajos Moczar

True, you are building stuff right out of the box and don't want to make 
configuration changes that might be overwritten when you reinstall or 
upgrade components. However, for production purposes, the Tomcat home 
and docs pages are oftentimes superfluous (just like Cocoon examples, 
Apache docs, etc.). At least I find them sperfluous, as do many of my 
clients. Hence, I typically strip off all included webapps, and make 
cocoon the ROOT context.

Regards,

Lajos


Luca Morandini wrote:

 Lajos,
 
 OTOH, the adding of this context will make the Tomcat doc and Tomcat home
 page unreacheable.
 
 There are ways around it (like the adding of /root and /tomcat-docs
 contexts),
 but replacing the default Tomcat behaviour doesn't seem to me such a good
 idea; though, it may be just fine for a production environment.
 
 In my opinion the use of mod_rewrite, ugly as it may be, is still the path
 of least resistance (it doesn't alter the behaviour of anything).
 
 Best regards,
 
 -
Luca Morandini
GIS Consultant
   [EMAIL PROTECTED]
 http://utenti.tripod.it/lmorandini/index.html
 -
 
 
 
-Original Message-
From: Lajos Moczar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 5:57 PM
To: [EMAIL PROTECTED]
Subject: Re: URL rewriting solution in FAQ does not do the trick


Why not do this in $CATALINA_HOME/conf/server.xml:

Context path= docBase=cocoon
  debug=0 reloadable=true/

Regards,

Lajos


Robert Bourdeau wrote:


This is more of an Apache question than a Cocoon question, but
hopefully someone will know what I'm doing wrong here.

Setup: SPARC Solaris 2.7, Apache 1.3.24 w/mod_webapp (Warp),

and Tomcat 4.0.1

Goal:  Eliminate cocoon from the URL
Constraints:  Want all my custom content (XML, stylesheets,

etc.) to be removed

from the Cocoon tree so I can upgrade Cocoon separately. Must

use Apache to

receive request. URL mapping has to be done per virtual host.

I looked at the FAQ, and followed the instructions. I rebuilt

Apache with mod_rewrite

enabled, then added the followed code to my httpd.conf:

VirtualHost myhost.mydomain:80
ServerName myhost.mydomain
DocumentRoot   /myhost.mydomain/htmls

IfModule mod_rewrite.c
RewriteEngine on
RewriteLog /var/adm/www/rewrite.log
RewriteLogLevel 9
RewriteRule ^/xml /cocoon/xml/ [R]
RewriteRule ^/xml(.*) /cocoon/xml$1 [R]
/IfModule

WebAppConnection   conn  warpmyhost.mydomain:8008
WebAppDeploy   cocoonconn/cocoon
/VirtualHost

I also modified the Cocoon sitemap.xmap to forward the

processing to a sitemap

outside of the Cocoon tree.

This URL works:

http://myhost.mydomain/cocoon/xml/foo
 * Apache correctly passes the /cocoon/xml/foo address to
Tomcat which then passes it to Cocoon. Output is correct

This URL
 http://myhost.mydomain/xml/foo
is redirected to http://myhost.mydomain/cocoon/xml/foo
and the user sees it in the browser. Not what I wanted.
I tried the single line [PT] variation shown in the FAQ, and
as indicated there, this does not work at all.

Thoughts?

Regards,
--- Bob Bourdeau

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

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



--

Cocoon training, consulting  support
galatea.com



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


-- 
galatea.com
Cocoon training, consulting  support



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

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




RE: URL rewriting solution in FAQ does not do the trick

2002-06-18 Thread Vadim Gritsenko

 From: Luca Morandini [mailto:[EMAIL PROTECTED]]
 
 Lajos,
 
 OTOH, the adding of this context will make the Tomcat doc and Tomcat
home
 page unreacheable.

$TOMCAT_HOME/bin/shutdown
cd $TOMCAT_HOME/webapps
mv ROOT tomcat
mv cocoon ROOT
$TOMCAT_HOME/bin/startup

:)


 There are ways around it (like the adding of /root and /tomcat-docs
 contexts),
 but replacing the default Tomcat behaviour doesn't seem to me such a
good
 idea; though, it may be just fine for a production environment.

This context (ROOT) is == to the Apache's famous This host has Apache
HTTP server installed, and does not have own web site developed yet.
Please do not write Apache about this happy guy who managed to install
Apache HTTP server and must be removed as soon as solution goes to QA,
or even way before this.

:)


 In my opinion the use of mod_rewrite, ugly as it may be, is still the
path

+1. It is ugly.


 of least resistance (it doesn't alter the behaviour of anything).

-1. Why keep ugly and less performing solution while others exist?

Vadim


 Best regards,
 
 -
Luca Morandini
GIS Consultant
   [EMAIL PROTECTED]
 http://utenti.tripod.it/lmorandini/index.html
 -
 
 
  -Original Message-
  From: Lajos Moczar [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, June 18, 2002 5:57 PM
  To: [EMAIL PROTECTED]
  Subject: Re: URL rewriting solution in FAQ does not do the trick
 
 
  Why not do this in $CATALINA_HOME/conf/server.xml:
 
  Context path= docBase=cocoon
debug=0 reloadable=true/
 
  Regards,
 
  Lajos
 
 
  Robert Bourdeau wrote:
 
   This is more of an Apache question than a Cocoon question, but
   hopefully someone will know what I'm doing wrong here.
  
   Setup: SPARC Solaris 2.7, Apache 1.3.24 w/mod_webapp (Warp),
  and Tomcat 4.0.1
  
   Goal:  Eliminate cocoon from the URL
   Constraints:  Want all my custom content (XML, stylesheets,
  etc.) to be removed
   from the Cocoon tree so I can upgrade Cocoon separately. Must
  use Apache to
   receive request. URL mapping has to be done per virtual host.
  
   I looked at the FAQ, and followed the instructions. I rebuilt
  Apache with mod_rewrite
   enabled, then added the followed code to my httpd.conf:
  
   VirtualHost  myhost.mydomain:80
   ServerName  myhost.mydomain
   DocumentRoot   /myhost.mydomain/htmls
  
   IfModule mod_rewrite.c
   RewriteEngine on
   RewriteLog /var/adm/www/rewrite.log
   RewriteLogLevel 9
   RewriteRule ^/xml /cocoon/xml/ [R]
   RewriteRule ^/xml(.*) /cocoon/xml$1 [R]
   /IfModule
  
   WebAppConnection   conn  warpmyhost.mydomain:8008
   WebAppDeploy   cocoonconn/cocoon
   /VirtualHost
  
   I also modified the Cocoon sitemap.xmap to forward the
  processing to a sitemap
   outside of the Cocoon tree.
  
   This URL works:
  
   http://myhost.mydomain/cocoon/xml/foo
 * Apache correctly passes the /cocoon/xml/foo address to
   Tomcat which then passes it to Cocoon. Output is correct
  
   This URL
http://myhost.mydomain/xml/foo
   is redirected to http://myhost.mydomain/cocoon/xml/foo
   and the user sees it in the browser. Not what I wanted.
   I tried the single line [PT] variation shown in the FAQ, and
   as indicated there, this does not work at all.
  
   Thoughts?
  
   Regards,
   --- Bob Bourdeau
 
  --
 
  Cocoon training, consulting  support
  galatea.com


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

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




FW: URL rewriting solution in FAQ does not do the trick

2002-06-18 Thread Luca Morandini

 
  -1. Why keep ugly and less performing solution while others exist?
  
 
 because I don't like altering the behaviour of Tomcat, messing 
 around with its own servlets: I may not be the only one using 
 Tomcat on that machine :(
 
 Best regards,
 
 
 - 
Luca Morandini 
GIS Consultant 
   [EMAIL PROTECTED] 
 http://utenti.tripod.it/lmorandini/index.html 
 -



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

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




Re: URL rewriting solution in FAQ does not do the trick

2002-06-18 Thread Skip Carter

 This is more of an Apache question than a Cocoon question, but
 hopefully someone will know what I'm doing wrong here.
 
 Setup: SPARC Solaris 2.7, Apache 1.3.24 w/mod_webapp (Warp), and Tomcat 4.0.1
 
 Goal:  Eliminate cocoon from the URL
 Constraints:  Want all my custom content (XML, stylesheets, etc.) to be removed
 from the Cocoon tree so I can upgrade Cocoon separately. Must use Apache to
 receive request. URL mapping has to be done per virtual host.
 
 I looked at the FAQ, and followed the instructions. I rebuilt Apache with mod_rewrite
 enabled, then added the followed code to my httpd.conf:
 
 VirtualHost  myhost.mydomain:80
 ServerName  myhost.mydomain
 DocumentRoot   /myhost.mydomain/htmls
 
 IfModule mod_rewrite.c
 RewriteEngine on
 RewriteLog /var/adm/www/rewrite.log
 RewriteLogLevel 9
 RewriteRule ^/xml /cocoon/xml/ [R]
 RewriteRule ^/xml(.*) /cocoon/xml$1 [R]
 /IfModule
 
 WebAppConnection   conn  warpmyhost.mydomain:8008
 WebAppDeploy   cocoonconn/cocoon
 /VirtualHost
 
 I also modified the Cocoon sitemap.xmap to forward the processing to a sitemap
 outside of the Cocoon tree.
 
 This URL works:
 
 http://myhost.mydomain/cocoon/xml/foo
   * Apache correctly passes the /cocoon/xml/foo address to 
 Tomcat which then passes it to Cocoon. Output is correct
 
 This URL 
  http://myhost.mydomain/xml/foo
 is redirected to http://myhost.mydomain/cocoon/xml/foo
 and the user sees it in the browser. Not what I wanted.
 I tried the single line [PT] variation shown in the FAQ, and 
 as indicated there, this does not work at all.

This is what I use (apache 1.3.24, Tomcat 4.0.4):

VirtualHost www.mydomain
  DocumentRoot /home/sites/www.mydomain

  RewriteEngine On
  RewriteRule ^/(.*)\.jsp$ /jsp/$1.jsp [R]
  RewriteRule ^/(.*)\.xml$ /xml/$1.xml [R]
IfModule mod_webapp.c
   WebAppConnection netConnection warp www.mydomain:8008
   WebAppDeploy Servlets netConnection /Servlet
   WebAppDeploy cocoon   netConnection /xml
   WebAppDeploy jsp  netConnection /jsp
/IfModule
/VirtualHost

  (I have similar entries, with different WebAppConnections, for the other 
virtual hosts).

   This way  http://www.mydomain/test.xml
   gets redirected to http://www.mydomain/xml/test.xml  which gets passed on 
to cocoon
   (Servlets and jsp references get passed on directly to Tomcat).


   Make sure that the tomcat server.xml entry has a connector for each virutal 
host in the Tomcat-Apache
   Service section, e.g.:

Connector className=org.apache.catalina.connector.warp.WarpConnector
 port=8008 address=10.9.8.7 minProcessors=5 maxProcessors=75
 enableLookups=true  appBase=www.mydomain_apps
 acceptCount=10 debug=0/



-- 
 Dr. Everett (Skip) Carter  Phone: 831-641-0645 FAX:  831-641-0647
 Taygeta Scientific Inc.INTERNET: [EMAIL PROTECTED]
 1340 Munras Ave., Suite 314WWW: http://www.taygeta.com
 Monterey, CA. 93940












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

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




RE: URL rewriting solution in FAQ does not do the trick

2002-06-18 Thread Vadim Gritsenko

 From: Luca Morandini [mailto:[EMAIL PROTECTED]]
 
 
   -1. Why keep ugly and less performing solution while others exist?
  
 
  because I don't like altering the behaviour of Tomcat, messing
  around with its own servlets: I may not be the only one using
  Tomcat on that machine :(

Then, I suppose, that's not a production box but rather some kind of dev
environment, where it is not necessary to have Apache at all (up to
integration testing).

But when you go into production, it's better to remove these docs (do
you want your customers to see Yep, Tomcat *is* working on this
machine!!! when they go to the root of your server? Yes, you can hide
it by giving some CPU time to URL rewriting module :)


Vadim


  Best regards,
 
 
  -
 Luca Morandini
 GIS Consultant
[EMAIL PROTECTED]
  http://utenti.tripod.it/lmorandini/index.html
  -



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

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




FW: URL rewriting solution in FAQ does not do the trick

2002-06-18 Thread Luca Morandini

Vadim,

just for the sake of a nice discussion about best practices in 
software development...

1) First thing I do starting a development is to set up a 
development environment equal to the production one: I don't want 
nasty suprises down the line

2) I don't like messing up the baae packages I use (Apache/IIS, 
Tomcat, Cocoon, Oracle/DB2, ...) I may not be the one maintaining them 
(I'm a consultant, not an employee) 

Anyway, maybe it's time I rewrite the FAQ on this one, inserting 
Lajos' method as well.

Best regards,

- 
   Luca Morandini 
   GIS Consultant 
  [EMAIL PROTECTED] 
http://utenti.tripod.it/lmorandini/index.html 
-


 -Original Message-
 From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 18, 2002 8:17 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: URL rewriting solution in FAQ does not do the trick
 
 
  From: Luca Morandini [mailto:[EMAIL PROTECTED]]
  
  
-1. Why keep ugly and less performing solution while others exist?
   
  
   because I don't like altering the behaviour of Tomcat, messing
   around with its own servlets: I may not be the only one using
   Tomcat on that machine :(
 
 Then, I suppose, that's not a production box but rather some kind of dev
 environment, where it is not necessary to have Apache at all (up to
 integration testing).
 
 But when you go into production, it's better to remove these docs (do
 you want your customers to see Yep, Tomcat *is* working on this
 machine!!! when they go to the root of your server? Yes, you can hide
 it by giving some CPU time to URL rewriting module :)
 
 
 Vadim
 
 
   Best regards,
  
  
   -
  Luca Morandini
  GIS Consultant
 [EMAIL PROTECTED]
   http://utenti.tripod.it/lmorandini/index.html
   -
 
 


 



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

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




How to do URL rewriting

2002-06-10 Thread Volker Schneider

Dear colleagues,

I tried to find out, how to do URL rewriting with Cocoon 2 when cookies are
switched off. I looked in several mails: Vadim said that you have to do URL
rewriting yourself, but in Request.java I can find a method

boolean isRequestedSessionIdFromURL();

So it seems that cocoon supports URL rewriting in an unknown way. When I
have to do it myself, what is best practise to do that? How can I save my
session so that it survives between the requests, because I store some data
within the session. Did anyone of you do something like that?

Thank you, best regards
- Volker -


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

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




RE: How to do URL rewriting

2002-06-10 Thread Vadim Gritsenko

 From: Volker Schneider [mailto:[EMAIL PROTECTED]]
 
 Dear colleagues,
 
 I tried to find out, how to do URL rewriting with Cocoon 2 when
cookies are
 switched off. I looked in several mails: Vadim said that you have to
do URL

Yup.


 rewriting yourself, but in Request.java I can find a method
 
 boolean isRequestedSessionIdFromURL();

and isRequestedSessionIdFromCookie.

It just indicates where session ID was taken from.


 So it seems that cocoon supports URL rewriting in an unknown way. When
I

As any other servlet.


 have to do it myself, what is best practise to do that? How can I save
my
 session so that it survives between the requests, because I store some
data
 within the session. Did anyone of you do something like that?

1. Encode URLs in XSP:
xsp-session:encode-url href=sessionpageFollow
me!/xsp-session:encode-url

2. Use EncodeURLTransformer (this one sounds better then XSP approach)


Vadim


 Thank you, best regards
 - Volker -


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

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




Session URL-Rewriting with Cocoon

2002-06-04 Thread Volker Schneider

Dear colleagues,

does anybody know how I can use URL-Rewriting with Cocoon 2.0.2 and
WebSphere 4.0.2? All works fine, but if I switch off cookies in my browser,
Cocoon will lose the session after the response.

Who can help?

Best regards
- Volker -


-
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]