Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cannot resolve symbol : method getServletContext ()

843841Apr 6 2005 — edited Apr 7 2005
Hi,

I am using the getServletContext() to get the data from a servlet resultset. But when i compile i get the following error...

***************************
cannot resolve symbol
symbol : method getServletContext ()
location: class com.code.CourseFinderAction
RequestDispatcher rd = getServletContext().getRequestDispatcher("/cfinder/JSP/PrintResults.jsp");
^
1 error

***************************

My section of code which does this is as follows...

GetResultBean grb = new GetResultBean(findresults);
RequestDispatcher rd = getServletContext().getRequestDispatcher("/cfinder/JSP/PrintResults.jsp");
request.setAttribute("PassRes",grb);
rd.forward(request, response);


can anyone help me to resolve this issue.. am i not importing something which i have to???

Thanx guys.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 5 2005
Added on Apr 6 2005
7 comments
1,546 views