Forums Register Login

After invoking invalidate() method getAttribute("user") method doesn't return any value or exception

+Pie Number of slices to send: Send


here problem is that After invoking invalidate() method getAttribute("user") method doesn't return any value or exception.and also line number 6,7,8 not print any value.

output: mukund
password
+Pie Number of slices to send: Send
Any scoped variables will no longer be available and any attempt to fetch one will result in null. Why is that surprising?

ALso, "hs1" is a really poor name for a variable.
+Pie Number of slices to send: Send
@ Bear Bibeault : sir, then why the line 6 and 7 is not printing "null" and why the line 8 is not printing "Your Username" as output.
+Pie Number of slices to send: Send
When output unexpectedly stops, it's most likely the result of an exception. Is there any exception stack trace in the logs (first thing you should always check), or is your code catching exceptions?
+Pie Number of slices to send: Send
thanks @Bear Bibeault, when i inserted a catch block corresponding to try block then i have seen that catch block is executing.
it means that an exception is occuring during the invocation of


but why the exception is not showing in netbeans ide logs when we don't insert a catch block but throws ServletException, IOException on processRequest
method like this




in this case the exception is not showing in the netbeans ide logs.
+Pie Number of slices to send: Send
 

Mukund A. Kumar wrote:but why the exception is not showing in netbeans ide logs when we don't insert a catch block


That I cannot tell you, but it's one of the reason I don't run web apps inside an IDE.
+Pie Number of slices to send: Send
 

Bear Bibeault wrote:I don't run web apps inside an IDE.



you mean you develop a webapp inside a IDE but run manually? (Manually in the sense typing the URL after starting tomcat) is it?
+Pie Number of slices to send: Send
That's what I do. I use an IDE as an intelligent editor, but run and test my web apps in a separate Tomcat instance over which I have full control, and that better matches the production environment.
"To do good, you actually have to do something." -- Yvon Chouinard
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 895 times.
Similar Threads
User can log in even after logout (invalidating session)
Login/Logout Problem
Hyeprlinks inside servlet
Jsp code doubt
Session
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 04:53:22.