Gangadhar Reddy

Greenhorn
+ Follow
since Aug 13, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Gangadhar Reddy

No one has replied to my question ;-) However I had found out the solution.

getPortletSession().setAttribute("SOME_CONSTANT", Object, PortletSession.APPLICATION_SCOPE);

getPortletSession().getAttribute("SOME_CONSTANT",PortletSession.APPLICATION_SCOPE);
16 years ago
Hi All,

I know that Portlet-A will be having different PortletSession then that of Portlet-B, even though both are in same portal page. Here I need a session for a client to store some thing from Portlet-A's PortletSession and the same can be retrieved by Portlet-B's PortletSession. I can't keep/share in ApplicationScope as it is available to entire application/ALL users. I want the data to be available only for that logged in user. So do we have some thing like HttpSession which is unique for each logged in user and can be shared by all portlets with in that unique session.
16 years ago
As I am new to Portlet concepts, I am looking for a book which describes about IBM Websphere Portlet application development using RAD. I'm expecting the book to be in simple terminology.

Thank you in-advance
16 years ago
Hi All,
I'm new to Hibernate. However I have good knowledge only on Session beans(EJB 2.0)

Should one has to know entity beans or EJB to work on hibernate?

Could you suggest me a book on 'hibernate', which has to be as good as Head First?

Thank you in advance
Hello Ulf,
Even I had faced same situation with IE. Here is the complete description.

If you disable cookies in your IE, and tried to access application FROM LOCALHOST, such as, http://localhost:8080/xxxx then you will get results which are same as that of enabling cookies.

The reason is very simple, IE will consider users request to diable cookies ONLY if the request comes from, out side of the current system or N/W i.e, OUT OF LOCALHOST. So, any request that comes to IE from localhost will not have any impact whether cookies are enables or diabled. IE will consider users request to diable cookies only if the request comes from NON LOCALHOST

Where as mozilla is not as such. If you disable cookies at mozilla, then it wont allow even Localhost to store the cookies. That is how mozilla behaves.
16 years ago
Well Said :-) Indeed I was looking for this anwer for quite some time
16 years ago
Enable cookies in firefox as follows:
Tools>Options>Privacy>Accept cookies from sites.

FYI, IE will not consider whether cookies are enabled or not, when you are accessing code on sessions from LOCALHOST.

So, jessionid will not come into URL, when you are accessing sessions from localhost.

Christophe Verre, any comments?
16 years ago
Beieve me, "Head First" books are the BEST books that I ever read on java. Three years back, I bought Head First java which was a first edition. When I was going through that book, I forget that I'm reading some technical book.

To be very open with you, I hate reading books. I could not able to concentrate on reading books for more then half an hour. But when I was going through that book, without my knowledge I could able to spend more then 3 hours. Just imagine how good the Head first books would be. As I was very much comfort with this book, I stopped to go for my college where my teacher used to take classes on core java.

Many times I felt like to thank Kathy Sierra & Bert Bates in person, for writing such a good book and of course I thanked them many times by kissing on forehead of Kathy sierra snap and saying cheers to Bert Bates whose snaps are available in the book

After gone through Head first Java, I bought Head First Servlets and JSP, Head First EJB, Head First Design patters and Head First AJAX at one shot.

Regards
Gangadhar Reddy
PS: That's the reason my friends used to call me as 'Crazy'.

Yes I'm crazy of Head first series

poster
like her
16 years ago
Bosun Bello,

So you mean to say that, for the second request to the server, session id will be appended to URL AND the session will be enclosed in cookies too. When the container receives this request, it will check whether the end user accepts cookies or not. But how could the container know that the end user is accepting cookies? Because when the container uses request.getSession() it's going to get session id either from URL or from inside cookie. There by it can not say where it is coming from?

My another question is...

Do we have separate pages/coding for same application which accepts cookies and which not accepts cookies?

If there is a requirment where one MUST has to overwrite URL even the end user accepts cookies, can we accomplish this? If so, could you please tell me?
16 years ago
JSP
Container sees that you called request.getSession()on the FIRST request and realizes that it needs to start a new session with this client, the container sends the response with both a "Set-Cookie" header for the session ID, and the session ID appended to the URLs (assuming you used response.encodeURL())

let us consider that this client accepts cookies.

Now my doubt is whether the SECOND request from this client contains cookies as part of its request or jsessionid will also be appended to the URL or both?

I have one more question with me?

Some banking websites such as www.icicibank.com, MUST encode URL, despite end-user accepts cookies or not. How one can encode URL even when end user supports cookies as container may not want to set cookies because of security constraints?
16 years ago
JSP
Yes Christophe Verre, you are right. HttpServletResponse does not have getSession() method.
Under the 2nd heading "Sending a session cookie in the RESPONSE;" we have following code

HttpSession session = request.getSession();

But I think it has to be as follows:

HttpSession session = response.getSession();

If the ABOVE statement is right, then the error has not been mentioned in http://www.oreilly.com/catalog/headservletsjsp/errata/headservletsjsp.confirmed

Christophe Verre, can you please help me out in this? Thank you in advance