Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet - PrintWriter error  RSS feed

 
Christopher Frankland
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am sure there is a simple solution, but I have spent ages trying to find it without success.

I have a servlet that is returning html using a PrintWriter object. Here is a sample of the problem code:



When it runs, however, I get the following error:

URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "=%"

Any advice much appreciated


Thanks!
[ November 21, 2007: Message edited by: Bear Bibeault ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you expecting

to be interpreted as JSP somewhere along the line?
 
Christopher Frankland
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ben,

Yes, that is exactly what I need. I need to see something along the lines of:




I am creating the string in my servlet, however, I keep getting the same error.

Thanks.

[ UD: added a few linebreaks to keep formatting intact ]
[ November 21, 2007: Message edited by: Ulf Dittmer ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're doing it from a servlet, there is no need for the JSP markup.


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!