Could you please help me, I don't know how everybody is dealing with those
errors, I made lot of search in the internet, but there is no reponse , here
is my new error 500 :
500 Internal Server Error
Java Server Page Translation Error
Error during compilation :
C:\JavaWebServer2.0\tmpdir\default\pagecompile\jsp\_ch05\_checkLogin.java:151:
Can't make static reference to method void putValue(java.lang.String,
java.lang.Object) in interface javax.servlet.http.HttpSession.
HttpSession.putValue("user", (Object)user);
^
1 error
And the jsp code is like this :
<%@ page language="java"
import="com.wrox.projsp.ch05.*, java.util.*"
errorPage="error.jsp" %>
<jsp:useBean id="loginBean" scope="page" class="com.wrox.projsp.ch05.Login">
<jsp:setProperty name="loginBean" property="*"/>
</jsp:useBean>
<jsp:useBean id="monitor" scope="application" class="java.util.HashMap"/>
<%
String display = "showLogin.html";
User user = loginBean.authenticate();
System.out.println("The user is : " + user);
if (user != null) {
user.setIpAddr(request.getRemoteHost());
// Got user. Now do they already have a session?
if (monitor.containsKey(user)) {
HttpSession oldSession = (HttpSession)monitor.get(user);
// If we want to complete an old order, uncomment these lines,
recoverOrder
}
//session.setAttribute("user", (Object)user); not working too
HttpSession.putValue("user", (Object)user);
monitor.put(user, session);
System.out.println("Assigned new session for: " + user);
session.setMaxInactiveInterval(900);
action=1" : "browse.jsp";
display = "browse.jsp";
}
%>
Thanks
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets