Hi everyone, i am facing a problem of how to sent a string from my HttpServlet back to my mobile client.
when my mobile client call my Servlet's url, my online servlet can receive it's request. And then my servlet should return a string back to this mobile client.
Can anyone point me a way to do it?
For myself, I am come out the following codes, but i am not sure is it works.
Thanks For Any Helps~:veryprou:
when my mobile client call my Servlet's url, my online servlet can receive it's request. And then my servlet should return a string back to this mobile client.
Can anyone point me a way to do it?
For myself, I am come out the following codes, but i am not sure is it works.
Code:
protected void doGet( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("My String ")
}
Thanks For Any Helps~:veryprou: