• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems getting a JSP to act as proxy

 
Alan Richardson
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 ]
 
Ben Souther
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!