compiler message that a variable called session was already defined. is quite genuine as there is an inbuilt variable session for jsp .
HttpSession session = request.getSession();
is defined for
servlets In jsp page you write
<%@ page session="true"%> directly
Now try and that error should not come
dont confuse with(class class)
If your attribute userid which you are saving in session is a int object then
int i=Integer.parseInt((
String)session.getAttribute("UserId"));
this is what it meant
hope its clear now
all the best
------------------