Issue
When I write out.println()
, eclipse complains that out cannot be resolved.
I have imported java.io.*
and other servlet packages.
Solution
Just a shot in the dark, I think this is the out
you are looking for:
public class OutServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
out.println("foo");
}
}
Answered By - Tomasz Nurkiewicz
Answer Checked By - Mary Flores (JavaFixing Volunteer)