I am running an HttpServlet that accepts POSTs from client programs. The POST data is validated against the database, and return values need to be transmitted back to the client to continue operations.
The POST data is being received by the JBoss port 8080 connector just fine, and the servlet is processing the data against the database just fine. The problem is returning the values back to the client in the HTTP stream. Right now, I am only sending back an HTTP-200/OK, without my authentication parameters.
I have tried the following, with no success:
return <variable>; System.out.println (<variable>); System.out.print (<variable>);
public void setReturnValues ( String value ) { vtr = value; } public String getReturnValues() { System.out.print (vtr); System.out.println (vtr); return vtr; }
I figured out the problem, I wasn't doing anything with the values returned. I needed the following:
response.setContentType( "text/html" ); PrintWriter out = response.getWriter(); out.println( <variable> );