I guess now I know why so few people are working on 2.2
a) it is pretty crazy to answer a question like the one asked by
pointing them to a thread with dozens of posts on several parallel threads.
b) I actually tried reading most of the posts and to be honest I
understood very little of it. Trying to "grasp the basic idea" by
reading it just left me more conused. I suspect I am not alone.
Can someone please describe how this is all supposed to work? (Hopefully
with as few words as possible)
Also, it seems silly to me to ask why a web app would need a session -
or maybe I misread your answer? Frankly, I don't think it would be
possible for the portal block to function without a session. Heck, don't
continuations require one too?
Ralph
Grzegorz Kossakowski wrote:
Rice Yeh pisze:
I hope I can do this if I can really understand the present design of
servlet-service.
Yeah, documentation is lacking... That's on the top of my priority
list, I'll take care after passing all exams at University. The exams'
session ends at 26th of June.
First off, I do not understand why a newly created request is needed.
Why not just pass the original one?
Because every servlet call must be new request, containing new (local)
URL that you can match in the matcher. I think we wanted to start from
scratch (not passing anything) to keep everything simple and
separated. It's obvious that we have to forward some of original
request's attributes. Here I use general meaning of "attribute" word,
so request's attribute is a parameter, header, etc. The tricky part is
to demarcate boundaries because we relly strive to keep servlet as
separated as possible.
When looking for the current BlockCallHttpServletRequest
implementation, it even creates a new HttpSession when method
getSession() is called. What is the basic idea in designing
servlet-serivce in this way?
Why do you need a session in called servlet? Is it really
indispensable? I guess you should grasp basic idea by reading above
explanation.
If you want really detailed view take a look at this thread:
http://thread.gmane.org/gmane.text.xml.cocoon.devel/73088
I know, it's terribly long discussion but there is a lot of knowledge
and you can always skip some branches.
If you have more questions don't hestitate to ask.