johnnysorensen1
Programmer
Can I some way execute a servlet request, and receive a text string?
I have made a servlet that respond with contentType("text/plain" and a short text string.
I want to execute this servlet by some javascript command. Or it could be a HTML tag.
I do a similar thing with a servlet that return contentType("image/png" and stream the content of the image to the output device. This is working fine with:
JavaScript:
myImage = new Image()
myImage.src = "imageServlet?someArg=’xx’"
HTML tag:
<IMG SRC"imageServlet?someArg=’xx’"/>
Is there any solution to this?
Johnny Sørensen
I have made a servlet that respond with contentType("text/plain" and a short text string.
I want to execute this servlet by some javascript command. Or it could be a HTML tag.
I do a similar thing with a servlet that return contentType("image/png" and stream the content of the image to the output device. This is working fine with:
JavaScript:
myImage = new Image()
myImage.src = "imageServlet?someArg=’xx’"
HTML tag:
<IMG SRC"imageServlet?someArg=’xx’"/>
Is there any solution to this?
Johnny Sørensen