0

I have encountered an error as such in logout.jsp

 org.apache.jasper.JasperException: Unable to compile class for JSP: 
  An error occurred at line: 2 in the jsp file: /logout.jsp
 session cannot be resolved
  1: <%@ page language="java"  session="false" %>
  2: <%session.invalidate();%>
  3: <%
  4: final String queryString = request.getQueryString();
  5: final String url = "http://www."testxxxxx".com/login.php?login_process=1&cas=1";

Why it shows that session cannot be resolved

2 Answers 2

1

Perhaps because line 1 says session=false

1

From the docs

session="true | false"

The default value is true.

This is to specify whether the client must join an HTTP session in order to use the JSP page. If the value is true, the session object refers to the current or new session. If the value is false, you cannot use the session object or a element with scope=session in the JSP file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.