Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error while submitting an http web request

 
Anil Karamchandan
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to send a web request via http, below is my code and the error, I am not sure why there is an error on the outputstreamwriter. it seems i am doign the correct thing.

Can any one please help



 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't the error message pretty clear? The code throws an IOException, and the method neither catches it, nor declares that it throws it. That's a no-no.

By the way, keeping Java code in JSPs is really bad design. 10 years ago that might have been acceptable, but not today. That's what servlets and backing beans are for.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64972
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSPs like this make me want to cry.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic