Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown


Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a problem with the servlet context. I get a message
<E> <ServletContext-General> Warning: One of the getParameter family of methods called after reading from the ServletInputStream(), can't mix
these two!
I am getting the servletcontext in this code
public static void encodeForwardURL(String aURL, HttpSession session, HttpServlet servlet, HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {

ServletContext aContext = servlet.getServletContext();
System.out.println("aurl in encodeforward is: " + aURL);
RequestDispatcher aDispatch = aContext.getRequestDispatcher(res.encodeURL(aURL));

if (aDispatch == null) {
System.out.println("Request dispatcher could not be gotten...");
aDispatch.forward(req, res);
Please can anyone throw me any light on this or let me know of any other way to do this.
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please refer to the sample code in this thread. Here the forwarded resource could be anything html/jsp/servlet.
maha anna
[This message has been edited by maha anna (edited March 30, 2001).]
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic