You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by John McClain <jm...@yahoo.com> on 2001/03/16 02:49:00 UTC
findDataSource not found
When I compile LogonAction.java - a bastardized
version of the example apps LogonAction.java - I get
the following. Any Ideas out there???...
LogonAction.java:50: Method findDataSource() not found
in class org.apache.struts.action.ActionServl
et.
ds = servlet.findDataSource();
^
LogonAction.java:88: No method matching getSession()
found in interface javax.servlet.http.HttpServl
etRequest.
HttpSession session = request.getSession();
^
LogonAction.java:89: Method
setAttribute(java.lang.String, logon.User) not found
in interface javax.
servlet.http.HttpSession.
session.setAttribute(Constants.USER_KEY, user);
^
LogonAction.java:101: Method
removeAttribute(java.lang.String) not found in
interface javax.servlet.
http.HttpServletRequest.
request.removeAttribute(mapping.getAttribute());
^
LogonAction.java:103: Method
removeAttribute(java.lang.String) not found in
interface javax.servlet.
http.HttpSession.
session.removeAttribute(mapping.getAttribute());
^
5 errors
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
Re: findDataSource not found
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Thu, 15 Mar 2001, John McClain wrote:
> When I compile LogonAction.java - a bastardized
> version of the example apps LogonAction.java - I get
> the following. Any Ideas out there???...
>
> LogonAction.java:50: Method findDataSource() not found
> in class org.apache.struts.action.ActionServl
> et.
> ds = servlet.findDataSource();
> ^
What version of struts.jar are you compiling against. This method was
added a while back, but if you're using an older struts.jar in your
compiles you would get this error.
> LogonAction.java:88: No method matching getSession()
> found in interface javax.servlet.http.HttpServl
> etRequest.
> HttpSession session = request.getSession();
> ^
This and the following ones mean you definitely have a wrong servlet.jar
or jsdk.jar file in your classpath. Use the one from your servlet
container (which must support the Servlet 2.2 spec).
> LogonAction.java:89: Method
> setAttribute(java.lang.String, logon.User) not found
> in interface javax.
> servlet.http.HttpSession.
> session.setAttribute(Constants.USER_KEY, user);
> ^
> LogonAction.java:101: Method
> removeAttribute(java.lang.String) not found in
> interface javax.servlet.
> http.HttpServletRequest.
>
> request.removeAttribute(mapping.getAttribute());
> ^
> LogonAction.java:103: Method
> removeAttribute(java.lang.String) not found in
> interface javax.servlet.
> http.HttpSession.
>
> session.removeAttribute(mapping.getAttribute());
> ^
> 5 errors
>
Craig