Hy;

My basic question was (from another request to this list):

"How can i setup my sitemap to forward the
 session context while aggregating a part ???"

After several hours of investigating the problem i got
an idea, how my problem could possibly be solved. I
would be happy, if someone could confirm, that the following
is not a completely stupid idea, or in case of it IS stupid
give me a hint to a more satisfying approach ... ;-)

1.) I would write an action, that extracts the tomcat
    session cookie from the request headers and place
    it into a new parameter e.g. named "cookie".

2.) I would use this parameter as additional request
    parameter for my aggregation request:

    <map:part element="profile"
     src="http://myserver:9000/backend/sessionProps.jsp?sid={cookie}"/>

My servlet "sessionProps.jsp" would then use the value of sid to
perform the requested tasks. This is not a nice solution, but
it might work.

Maybe it is also possible to forward the cookie via an
action ? I haven't seen example code doing such thing.
Could i achieve that with cocoon-2.0.3 ??

Should i post this message in the cocoon-dev list too ?

best regards, hussayn

SAXESS - Hussayn Dabbous wrote:
Hy again;

Meanwhile i could put a litle light on my problem.
The sitemap config as shown below seams to
produce an error 500, because cocoon creates a new
http-session. I could verify by now, that my "backend"
webapp is called, but it fails, because it is running in a
non authenticated mode, by which i conclude, session context
is not preserved when using the "http:" part source in my sitemap.

So the remainnig more precise question is:
How can i setup my sitemap to preserve
session context while aggregating parts ???

thank you in advance for any hint...

regards, hussayn


Hussayn Dabbous wrote:

Hy;

I want to retrieve a <map:part> across application boundaries.
I set up my tomcat server with SSO, so that i can share the
same session context over different webapps. Then i created
one "cocoon" webapp for presentation purposes and one "backend"
webapp for the business logic. Both webapps are under
authentification control of tomcat. i am logged in and both
webapps share the same sesion context. Now i want the cocoon
webapp to retrieve data from the "backend" webapp:

I tried to setup the cocoon sitemap as follows:

<map:match pattern="canvas">
  <map:aggregate element="page">
    <map:part element="profile"
          src="http://myserver:9000/backend/sessionProps.jsp"/>
    <map:part element = "canvas"
          src="cocoon:/canvas"/>
  </map:aggregate>
  <map:transform src="xsl/page.xsl"/>
  <map:serialize/>
</map:match>

my questions:

1.) With the first map:part i try to retrieve a source on the backend
    webapp, that runs in the same container, as the cocoon webapp.
    This setup results in a response code 500, although the requested
    page can be retrieved from a browser using the exact same URL.
    I did some experiments with context:// and http:// and so on,
    but i could not find a setup, that would show me the expected
    result of the jsp-page above (the jsp-page delivers xml-content).

2.) If the retrieval of the map:part would work, would the retrival
    use the same session context in which cocoon operates for this
    request, or would it open a new session context just for the
    part retrival ?

Did anyone encounter similar problems ?
I'd be glad to hear from your solution ...

regards, Hussayn


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