W
Werner Oertig
Hi,
I've a problem sending data from a servlet to a mobile phone.
On the mobile i'm using a get request to access a servlet (running
within tomcat 4.1). The servlet then sends data back to the mobile.
The problem is, that the data isn't received by the mobile (or at
least I don't see anything on it). If I use a browser to send the
request it works fine.
I then installed a portsniffer to intercept the output from the
servlet. And surprise, surprise suddenly the mobile receives the
message.
Does anybody have an explanation why I can't send the message directly
from the servlet and why it works if there is a portsniffer in
between?
This is the code that I use:
String message = content.getWapResponse();
response.setContentType( "text/vnd.wap.wml" );
response.setContentLength( message.length() );
response.setStatus( HttpServletResponse.SC_OK );
PrintWriter writer = response.getWriter();
writer.print( message );
writer.flush();
writer.close();
Thanks for your help!
I've a problem sending data from a servlet to a mobile phone.
On the mobile i'm using a get request to access a servlet (running
within tomcat 4.1). The servlet then sends data back to the mobile.
The problem is, that the data isn't received by the mobile (or at
least I don't see anything on it). If I use a browser to send the
request it works fine.
I then installed a portsniffer to intercept the output from the
servlet. And surprise, surprise suddenly the mobile receives the
message.
Does anybody have an explanation why I can't send the message directly
from the servlet and why it works if there is a portsniffer in
between?
This is the code that I use:
String message = content.getWapResponse();
response.setContentType( "text/vnd.wap.wml" );
response.setContentLength( message.length() );
response.setStatus( HttpServletResponse.SC_OK );
PrintWriter writer = response.getWriter();
writer.print( message );
writer.flush();
writer.close();
Thanks for your help!