This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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 ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Problems getting a JSP to act as proxy  RSS feed

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

I'm using a proxy to allow an Ajax web application to send SOAP requests to an external server. At the moment I'm using a simple JSP scriptlet to forward the requests but I'm experiencing an odd problem � if I run the web server within the Eclipse IDE ( using a Tomcat runtime) it functions, I can send the request and a response from the external webserver is eventually received back to Ajax web app. However although it works I do receive the following output to the console:



Now if I run application in a standalone Tomcat server (not in eclipse ), then I'm hit with the following error:

java.io.IOException: Server returned HTTP response code: 500 for URL: http://webhost:8085/axis2/services/UserService

Yet the web service works fine in the first instance ( in Eclipse ).

I'm honestly stumped, any insight into what I may be doing wrong here would be greatly appreciated.

This is the proxy code I'm using:


[ April 04, 2008: Message edited by: Alan Sunley ]
 
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

java.io.IOException: Server returned HTTP response code: 500 for URL: http://webhost:8085/axis2/services/UserService



Tells us nothing more then "Something went wrong".
Look in the TOMCAT_INSTALL/logs directory and find the file with the full stack trace.

Also, JSP is the best technology for building proxy servers.
JSP compilers sometimes add their own text to the output which, depending on what's being sent back, can create headaches for you. See our FAQ entry on IllegalStateException for more details.

Using servlets would be a much better way to go for this.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!