This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JSP and the fly likes error while submitting an http web request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "error while submitting an http web request" Watch "error while submitting an http web request" New topic

error while submitting an http web request

Anil Karamchandan
Ranch Hand

Joined: Sep 12, 2009
Posts: 47
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

Joined: Oct 14, 2008
Posts: 1337
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

Joined: Jan 10, 2002
Posts: 63226

JSPs like this make me want to cry.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Have you checked out Aspose?
subject: error while submitting an http web request
It's not a secret anymore!