Re: Problems connecting
Hi, Why don't you try http://62.56.xxx.xxx:8080 with the j2me emulator ? If it works that way we may conclude that you have a j2me issue. If not it may be a tomcat conf problem. You should also access the url through your favorite browser (firefox) ... Tell us the results ! regards, Nicolas [EMAIL PROTECTED] wrote: Hi experts, let me explain the situation first & let me tell you that Im really newbie with application server. What I done is a Java application (J2ME) that works over cellphone, with the java toolkit I got an emulator & my application works properly, I send a request the servlet over Tomcat reply properly... Of course in testing Im working with localhost:8080/blabla/bla The point is when I change localhost with a real ip 62.56.xxx.xxx I cannot connect to the server, but the nice things is if in my cellphone I enter the address http://62.56.xxx.xxx:8080 I got the tipical welcome page of Tomcat. So is not the firewall is not the router.. I guess is something that I have to set up, but trust me I don't know where... Could you help me pls Cheers Roberto - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Missing Request Parameters
Yes I sent them 2 posts ago. However, here they are again : In our server.xml: ## In our workers.properties: workers.apache_log=/usr/local/apache/logs workers.tomcat_home=/usr/local/tomcat workers.java_home=/usr/local/java ps=/ worker.list=ajp13 worker.ajp13.type=ajp13 worker.ajp13.host=XXX.XXX.XXX.XXX worker.ajp13.port= worker.ajp13.lbfactor=50 worker.ajp13.cachesize=350 worker.ajp13.cache_timeout=600 worker.ajp13.socket_keepalive=0 worker.ajp13.socket_timeout=600 In our httpd.conf: JkMount /serv/* ajp13 Do you see something wrong ? Nicolas Pid a écrit : have we seen your connector config, and your apache forwarding setup (JK i assume)? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Missing Request Parameters
As I said it happens even on GET requests and very small urls on our side. Since it is a get request, we do see the parameter in the apache log, but we can't get it with the getParameter() method. The parameter is lost somewhere between the connector and tomcat I think. Nicolas Yashwanth CP a écrit : Hi, We are facing a similar issue ( missing parameters intermittently ). Our setup has relatively huge post requests , ( < 4KB) , and about 100-200 parallel connections on a tomcat that has 512MB memory.Some of the parameters just become null randomly. Our guess is ,it is related to size of post requests and number of accept connections. Any clues, anyone? --y - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Missing Request Parameters
Hi ! Here is the configuration we have: In our server.xml: ## In our workers.properties: #parametrage de mod_jk workers.apache_log=/usr/local/apache/logs workers.tomcat_home=/usr/local/tomcat workers.java_home=/usr/local/java ps=/ worker.list=ajp13 worker.ajp13.type=ajp13 worker.ajp13.host=81.91.65.146 worker.ajp13.port=7547 worker.ajp13.lbfactor=50 worker.ajp13.cachesize=350 worker.ajp13.cache_timeout=600 worker.ajp13.socket_keepalive=0 worker.ajp13.socket_timeout=600 In our httpd.conf: JkMount /serv/* ajp13 I don't know which version of mod_jk we're using ... I'm looking into it. Nicolas lmelendez a écrit : in mod_jk.conf for apache, we have the following lines: # define the channel JkSet channel.socket:localhost:8009.port 8009 JkSet channel.socket:localhost:8009.host 127.0.0.1 # define the worker JkSet ajp13:localhost:8009.channel channel.socket:localhost:8009 JkUriSet group ajp13:localhost:8009 I'll do some research on how to change the connector and test it to see if there is a change. Leo. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Missing Request Parameters
I thought it might come from the connector ... Did you already try to change it ? Which version are you using ? Nicolas lmelendez a écrit : Nicolas Schwartz wrote: It occurs on GET requests, maybe on POST ones but we don't know. The value of the parameter is not long, neither is the value. It appears to occur "randomly" Exact same thing in our case. We have seen it in GET requests, not entirely sure about POSTs. We use some URLs that are quite long (more than 255 characters), but we have seen the problem with URLs with four or five parameters only. I'll check to see if we have long bits of data in the parameters. Do you think that is related? We are a bit confused because we started seeing the problem only about a month ago. We checked all changes we did to the product and none of them seem to be causing the issue. Thanks for the help! Leo. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Missing Request Parameters
Hi, We are facing the same problem. Sometimes the parameters don't get to tomcat. We've seen this by monitoring our plateform through a servlet simply returning the value of a parameter. We are also using apache+tomcat apache-2.0.54 jakarta-tomcat-5.5.9 It occurs on GET requests, maybe on POST ones but we don't know. The value of the parameter is not long, neither is the value. It appears to occur "randomly" Hope this will help to find a solution to the problem ... -- Nicolas Schwartz Pid a écrit : (i can't see a previous thread for this, new mail setup, so apologies if I'm restating.) Are you using GET or POST? And how many parameters are you submitting? And are there any particularly long bits of data in the parameters? lmelendez wrote: Hi Rache, Well, we are seeing the problem. Our web application seems to *drop* parameters for some requests and we still don't know what it is. We have enabled Valves and Filters and it looks like the parameters never make it to tomcat. The problem is intermitent and we cannot reproduce it at will. The same request might work sometimes and show the problem in others and we were really surprised that nobody else was having similar issues. We are currently using Apache 2.0.55 and Tomcat 5.0.28. I am wondering if you have more information about this. Thanks! Leo. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: A way to know if file download has ended
> This is one of those issues that just can't be solved > with simple HTTP and HTML. There isn't a response > sent to the server to tell it every single download > was successful (or at least not sent back to the web > application ... TCP makes sure the last bytes get to > the other side successfully or an error occurs, but > the applications on the server side can't tell this or > at least I don't know how). Then to make the > situation more difficult there is no defined event for > tying into the HTTP process for when a certain > download has occurred successfully. So, one has to > use a download manager of some kind to more easily > manage things like this. This could be a signed java > applet or shockwave file or a COM object (not cross > platform so I wouldn't recommend that, but you might > think it's ok if you force IE and windows). One could > more easily tell if an upload had finished because you > at least have a defined form element you can access > through DOM, get the name, and then monitor the upload > progress. > > Wade > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > Hi, I agree with Wade about not knowing in Tomcat whether download succeeded or not. I tried many code and discussed about it in the forum and came to the conclusion it is not possible. (subject was "Last Byte Detection", conclusion was: HTTP is not the good level to detect that.) Good luck, Nicolas - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Last Byte Detection
Darryl Miles wrote: > Nicolas Schwartz wrote: >> I'm trying to get the information of sending the last byte of a file >> through Tomcat. >> I've done many tests, I've looked in the archives and nothing came up. >> So I'm thinking that maybe I'm not posting where I should, if it is >> so, please tell me so and tell me where I could find the info. >> >> I know this mailing list is about configuration but here is what I do >> and the configuration: >> I'm doing a loop with a FileInputStream and writing each byte to the >> OutputStream I got from my HttpServletResponse. >> >> No Exception or whatever is thrown when I kill the connection once the >> url has been requested. >> >> I use apache and tomcat. They're connected with the ajp13 connector. >> I've looked in the connector configuration (workers.properties) >> options but found nothing. >> >> Any help, hint , ... would be greatly appreciated :) > > > I read this to mean you want to emit a file in a HTTP response and the > APIs are you using are not Tomcat specific. > > Check out the InputStream interface at > http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html > > > byte[] b = new byte[4096]; > for(;;) { > int l; > if((l = fileInputStream.read(b, 0, b.length)) == -1) { > break;// No more data from file > } > response.getOutputStream().write(b, 0, l); > } > response.getOutputStream().flush(); // So we see exception in our > Servlet code > > > > The "kill the connection" bit is a bit confusing, you mean you are > testing the premature killing of a client connection of a partically > downloaded file. > > It depends how the connection is killed on when you will see the > exception, for example if a network socket level reset is performed then > some form of IOException should be thrown during the > getOutputStream.print("") or during a flush() or close(). > > If your servlet does not explicitly do the flush() or close() on the > data it wrote but terminates the HttpServlet.doGet() method then you > leave it upto the container to complete the flushing. Then you may not > see any exception as the container may just deal with it and eat it up. > > If you are not killing the connection off at the network level then it > may take Tomcat sometime to automatically kill it off through normal > network level dead socket detection (max retry / keepalive failure). > > > HTH > > Darryl > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > Hi, thank's for your answer first. I want to detect if a terminal gets all of the file he wanted to download through the HTTP connection. I agree with you that i don't use a specific tomcat api for that but I think that would help to get a global view of the problem. I thought that the fact that no exception is thrown maybe comes from the way tomcat is configured. To explain this completely, here is a part the main java on the other side: HttpURLConnection c=(HttpURLConnection)u.openConnection(); InputStream is=c.getInputStream(); FileOutputStream fos=new FileOutputStream(new File("/home/XXX/lbd.3gp")); for(int i=is.read();i!=-1;i=is.read()){ fos.write(i); fos.flush(); c.disconnect();//same problem if no disconnect before exit System.exit(0); } So I get only the first byte. -- On the server side, I tried what you told but still no exception is thrown. I was flushing after every bytes written to the outputStream but that seams to make no difference. In the apache logs, I see more than the byte received (16376) :( -- So I thought maybe there is some sort of cache between apache and tomcat and this came from tomcat configuration ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Last Byte Detection
Hi everybody, I'm trying to get the information of sending the last byte of a file through Tomcat. I've done many tests, I've looked in the archives and nothing came up. So I'm thinking that maybe I'm not posting where I should, if it is so, please tell me so and tell me where I could find the info. I know this mailing list is about configuration but here is what I do and the configuration: I'm doing a loop with a FileInputStream and writing each byte to the OutputStream I got from my HttpServletResponse. No Exception or whatever is thrown when I kill the connection once the url has been requested. I use apache and tomcat. They're connected with the ajp13 connector. I've looked in the connector configuration (workers.properties) options but found nothing. Any help, hint , ... would be greatly appreciated :) Thank's in advance, Nicolas Schwartz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]