error Ljavax/servlet/http/HttpServletRequest

2006-01-11 Thread marju jalloh
 I `m calling a bean  from a jsp page that return HttpServletRequest 
 snippet
  
 HttpServletRequest req= myBean.getMessage();
   out.write(req.getParameter(mess));
   where mess is a variable that was set in the bean
 
 My problem jsp can`t compile I got the following errors
 
javax.servlet.ServletException: 
com.MyBean.getMessage()Ljavax/servlet/http/HttpServletRequest;
java.lang.NoSuchMethodError: 
com.MyBean.getMessage()Ljavax/servlet/http/HttpServletRequest;

can anyone help
Thanks in advance


 



-
Yahoo! Photos – Showcase holiday pictures in hardcover
 Photo Books. You design it and we’ll bind it!

Re: error Ljavax/servlet/http/HttpServletRequest

2006-01-11 Thread guangyu zhang
can you show me the com.MyBean.java ' source code?
how does class MyBean get the HttpServletRequest ?
Have you passed the request to class MyBean?

2006/1/11, marju jalloh [EMAIL PROTECTED]:
  I `m calling a bean  from a jsp page that return HttpServletRequest
  snippet

  HttpServletRequest req= myBean.getMessage();
   out.write(req.getParameter(mess));
   where mess is a variable that was set in the bean

  My problem jsp can`t compile I got the following errors

 javax.servlet.ServletException: 
 com.MyBean.getMessage()Javax/servlet/http/HttpServletRequest;
 java.lang.NoSuchMethodError: 
 com.MyBean.getMessage()Javax/servlet/http/HttpServletRequest;

 can anyone help
 Thanks in advance






 -
 Yahoo! Photos �C Showcase holiday pictures in hardcover
  Photo Books. You design it and we'll bind it!



RE: error Ljavax/servlet/http/HttpServletRequest

2006-01-11 Thread Fredrik Rubensson
Hi, 


 I `m calling a bean  from a jsp page that return HttpServletRequest
snippet
  
 HttpServletRequest req= myBean.getMessage();
   out.write(req.getParameter(mess));
   where mess is a variable that was set in the bean
 
 My problem jsp can`t compile I got the following errors
 
javax.servlet.ServletException: com.MyBean.getMessage()
Ljavax/servlet/http/HttpServletRequest;
java.lang.NoSuchMethodError: com.MyBean.getMessage()
Ljavax/servlet/http/HttpServletRequest;

I feel this question should be answered by reading up on Java - it has
not much to do with tomcat. The exception you get is easy to find on the
web I googled java.lang.NoSuchMethodError and got as first result the
Sun javadoc for the class. It's here:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NoSuchMethodError.html
. It says: Thrown if an application tries to call a specified method of
a class (either static or instance), and that class no longer has a
definition of that method. (Now this explanation may be hard to
understand if you are not somewhat used to OO terminology. If this is
the case I suggest you read up on OO and its use in Java.) Anyway, this
means that there is no method in your class com.MyBean called getMessage
that returns an instance of javax.servlet.http.HttpServletRequest. 

It would be interesting to know why you are passing around the
HttpServletRequest in this way. It is easily accesible from the JSP page
anyway.

Regards,
Fredrik

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]