Hi Michael, > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: 30 June 2002 19:33 > To: Vincent Massol; 'Cactus Users List' > Subject: Re: Cactus and BroadVision 6.0? > > Hi Vincent, > > I've let JAD loose on some of the BV classes, and what I've found is this: > > BVHttpSession.isNew() will return true if the session is valid (this is > stored in an attribute) and the parameter "com.broadvision.session.new" > does > not occur in the request string. BVHttpSession implements the regular > javax.servlet.http.HttpSession interface. BVHttpSession serves as a facade > for the real BV session, which is a BVI_Session (this is actually a > wrapper > around an underlying C++ class...). BVHttpSession has two constructors, > one > of which takes no arguments and just sets the session to be valid, and one > which takes a BVI_Session and uses this to initialize its arguments. > There's > also an init(long) method, which takes a handle to look up a session in a > registry, and which will initialize a new BVI_Session if this handle is > 0L. > So far, so good... > I'm pretty new to servlet engines, so please excuse this question: Who > usually initializes the HttpSession? I'm asking this because my assumption > is that the Cactus ServletRedirector somehow prevents BV from setting up > the > session correctly.
I don't really understand what is your problem. You have a servlet container (Broadvision) which implements the Servlet API, right ? Thus, from the point of view of your servlet code, there should be no difference whether your servlet is run in Tomcat or in Broadvision. To answer your question, it is your servlet code that initially creates the HttpSession. The Servlet API has a HttpServletRequest.getSession(boolean) API. If the boolean is true and a session does not already exist, then a new session will be created by the container and returned by getSession. The container knows a session already exist by getting the session id from a cookie in the HTTP request (or from a URL parameter, that's called URL rewriting). The servlet API says that the cookie is named jsessionid (the value associated with the cookie is unique), so the the container will look for that cookie. If it finds it, it will then look in its hashtable of session for a matching HttpSession object. The ServletRedirector will call getSession(true) by default, thus letting the BV container creates an HttpSession. > The second thing I still don't know is: Who puts the > "com.broadvision.session.new" parameter into the query string? My guess > after JAD has done its job is that it happens deep inside BV and not > within > the servlet engine. Look at the source of the HTML pages returned by BV. Do you see this parameter being passed whenever there is a link ? When you write a JSP, do you use a special API to create links ? BV cannot put that parameter alone. You, as the Servlet/JSP writer is either putting it or not putting it. > Whatever object does this seems to signal that no BV > session has been set up for the current HTTP connection. Unfortunately, > there is no documentation about all this (otherwise, JAD wouldn't have > been > necessary in the first place...). > > I guess that you have become familiar with a great many different servlet > engines and their specifics, so: What would you advice me to do? Where > should I look next? Is there any information I can provide you with so > that > you can tell me why Cactus isn't working with BV and what can be done > about > it? Yes. You have not told us what error you were getting and for what test from sample-servlet. Can you post the stack trace ? (both client side and server side). Thanks -Vincent > > Thanks a lot in advance, > > Michael -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
