You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/09/18 17:23:08 UTC
DO NOT REPLY [Bug 12778] New: -
NoSuchMethod Excp on putValue() and setAttribute methods of HttpSession
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12778>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12778
NoSuchMethod Excp on putValue() and setAttribute methods of HttpSession
Summary: NoSuchMethod Excp on putValue() and setAttribute methods
of HttpSession
Product: Tomcat 4
Version: 4.1.9
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Servlet & JSP API
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: ddemil@netscape.net
Hello there
I am running the following servlet code on Tomcat 4.1.10 :
public void doGet(HttpServletRequest request,
HttpServletResponse response)
HttpSession sess = request.getSession();
sess.setAttribute("Test", new Object());
the last line generate NoSuchMethod exception. I get the same error at run time
if I used the deprecated putValue instead.
If I do this :
java.lang.reflect.Method met[] = sess.getClass().getMethods();
for (int j = 0 ; j < met.length ; j++) {
out.println("Method " + j + " of HttpSession is " + met[j].getName()
+ "<BR>");
}
This is what I get :
...
Method 10 of HttpSession is putValue
...
Method 14 of HttpSession is setAttribute
I first thought that this could be related to Tomcat not supporting the correct
version of the Servlet API but Tomcat 4.1.10 supports Servlet 2.3 in which
those methods are supported but with the above reflection is not so clear
anymore.
Many Thanks in advance for your help and advices.
Best Regards - Cecil Dijoux.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>