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-users&m=103241658409677&w=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]>

Reply via email to