File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Error Message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Error Message" Watch "Error Message" New topic

Error Message

Chris Goh

Joined: Aug 23, 2001
Posts: 23
org.apache.jasper.JasperException: Unable to compile class for JSPC:\Tomcat\jakarta-tomcat-3.2.3\work\localhost_8080\ Method getRequestSessionId() not found in interface javax.servlet.http.HttpServletRequest.
String sessionid = request.getRequestSessionId();

can anyone tell me what the error means?
James Hobson
Ranch Hand

Joined: Aug 28, 2001
Posts: 140
I could be wrong, I think it means you spelt the method name wrong:
instead of getRequestSessionId()
Manjunath Reddy
Ranch Hand

Joined: Jul 26, 2001
Posts: 60
Why not use String sessionId = session.getId(); ?
Chris Goh

Joined: Aug 23, 2001
Posts: 23
what is the difference between the two suggested syntax?
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Well, I can't find getRequestedSessionId(), so I think there's only one way... getId()
subject: Error Message