Re: TomCat 7 + Socket & Java Version

2011-05-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 5/17/2011 10:03 AM, André Warnier wrote: > Yes, now it is starting to make sense. > The "devices" (which are not browsers), are actually TCP clients, but > after establishing a connection with the server (your application), they > become "pa

Re: TomCat 7 + Socket & Java Version

2011-05-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Micka, On 5/17/2011 5:44 AM, Micka wrote: > I used write(char []) because I didn't found a function to send a byte > array ^^ . Right: PrintWriter isn't appropriate for sending a byte array. Instead, use an OutputStream (response.getOutputStream) in

Re: TomCat 7 + Socket & Java Version

2011-05-17 Thread David kerber
On 5/17/2011 10:12 AM, Micka wrote: Well because I thought that hosting a java server application by Tomcat is just perfect ! You can control a lot of thing, and you can create jsp page for administration purpose. Do you have better than Tomcat for hosting a java server application ? I thin

Re: TomCat 7 + Socket & Java Version

2011-05-17 Thread André Warnier
Micka wrote: Well because I thought that hosting a java server application by Tomcat is just perfect ! You can control a lot of thing, and you can create jsp page for administration purpose. Do you have better than Tomcat for hosting a java server application ? No, no, you are right, and it

Re: TomCat 7 + Socket & Java Version

2011-05-17 Thread Micka
Well because I thought that hosting a java server application by Tomcat is just perfect ! You can control a lot of thing, and you can create jsp page for administration purpose. Do you have better than Tomcat for hosting a java server application ? On Tue, May 17, 2011 at 4:03 PM, André Warn

Re: TomCat 7 + Socket & Java Version

2011-05-17 Thread André Warnier
Micka wrote: Thx for the advise, My mail will be better for the next time. To explain better my application, it is a TCP server. And it received connection requests from clients. In my configuration I'm automatically waiting and accepting a connection with : java.net.ServerSocket.accept() Af

Re: TomCat 7 + Socket & Java Version

2011-05-17 Thread Micka
Thx for the advise, My mail will be better for the next time. To explain better my application, it is a TCP server. And it received connection requests from clients. In my configuration I'm automatically waiting and accepting a connection with : java.net.ServerSocket.accept() After that I give

Re: TomCat 7 + Socket & Java Version

2011-05-17 Thread André Warnier
Micka, I'm glad that someone could help you after you provide better/clearer information. Just for future reference : Micka wrote: Ok, Machine A : OS : Windows Seven JVM : jre6 Tomcat : v7.0.8 Machine B : OS : Ubuntu 10.04 Using CATALINA_BASE: /usr/local/tomcat7 Using CATALINA_HOME: /u

Re: TomCat 7 + Socket & Java Version

2011-05-17 Thread Micka
Thx for the help, It was indeed a problem of encoding setting I added : bwriter = new PrintWriter( new BufferedWriter(new OutputStreamWriter(soc.getOutputStream(), "Windows-1252")) ); breader = new BufferedReader( new InputStreamReader( soc.getInputStream(), "

Re: TomCat 7 + Socket & Java Version

2011-05-17 Thread Konstantin Kolinko
2011/5/17 Micka : > void java.io.PrintWriter.write(char[] buf) Do you know about the difference between byte and char, between OutputStream and Writer? That is Java IO basics. The common pitfall is that different OSes usually have different default character encoding setting (e.g. "Windows-1252"

Re: TomCat 7 + Socket & Java Version

2011-05-17 Thread Micka
Ok, Machine A : OS : Windows Seven JVM : jre6 Tomcat : v7.0.8 Machine B : OS : Ubuntu 10.04 Using CATALINA_BASE: /usr/local/tomcat7 Using CATALINA_HOME: /usr/local/tomcat7 Using CATALINA_TMPDIR: /usr/local/tomcat7/temp Using JRE_HOME:/usr/lib/jvm/java-6-sun Using CLASSPATH: /usr/loca

Re: TomCat 7 + Socket & Java Version

2011-05-17 Thread André Warnier
Micka, about the only things that I think I understand in your explanations are : - that you have two tomcats, one under Windows and one under Linux - that you have one application, as a war file, that you are trying in these two tomcats - that something seems to be different Apart from that, t

Re: TomCat 7 + Socket & Java Version

2011-05-17 Thread Micka
Hi, I'm not saying that it's a fault of TomCat, I'm just saying that I've a problem on a different machine. The problem, that I observe is on the echo. ( the echo is a little bit different The communication works well on my PC ( Tomcat7 under windows 7 ) But when I put the application ( .war ) on

Re: TomCat 7 + Socket & Java Version

2011-05-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Micka, On 5/16/2011 12:18 PM, Micka wrote: > I've an application that is running under Tomcat7. > And I 've created a serversocket, in my PC, the application is running > without problem. > But when I place the application in my linux machine, I obser

TomCat 7 + Socket & Java Version

2011-05-16 Thread Micka
Hi, I've an application that is running under Tomcat7. And I 've created a serversocket, in my PC, the application is running without problem. But when I place the application in my linux machine, I observed a problem in the socket communication. To check if the client received correctly the data