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.
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.