aspose file tools*
The moose likes Servlets and the fly likes isNew() method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "isNew() method " Watch "isNew() method " New topic
Author

isNew() method

Shanthi Murugeson
Greenhorn

Joined: Dec 30, 2005
Posts: 10
Hi,
I have a servlet program in which i am checking whether the session created is new or not. But the isNew() method always returns false even if i redeploy my application.
I am using BEA weblogic 8.1 server
Can anyone please tell me the reason.
Thanks in advance.

I have attached my code with this..



[EDIT - code tags added]
[ February 06, 2006: Message edited by: David O'Meara ]
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

You may find that the comtainer if creating the session before your code gets run, but you can still manage this. Just modify your code to see if the session has been initialised yet and add your code there instead:



Note that attaching a connection to a session is a bad idea, as a database connection is a heavy object, and it is better to limit the number created. They are also utilised fairly sparingly, so getting them from a ConnectionPool is much more efficient.

Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: isNew() method
 
Similar Threads
Browser calls servlet twice (iE)
OutOfMemory error
Sending rows of data from Servlet to jsp
ORA-01000: maximum open cursors exceeded
Multiple clients