We use Jetty to deliver some js, css and html files, together with a jersey-powered REST API. I have a user running windows 7 32bit, German locale, that is encountering a very strange problem.
One of the js files is very large, about 14 000 LOC. When that file lands in the browser, somewhere along the way, it's been mangled. Specifically, 3981 lines of code has been moved from the middle of the file (at character no 370841, which is at line 9158), to the top of the file. This of course renders the file completely useless.
I have been unable to replicate this in other windows 7 32bit German installs, and I am running out of ideas as to what could be the cause of this.
I'm imagining that perhaps this is some limitation in file sizes that I am somehow hitting, but I'm not knowledgeable enough in Windows configurations to say where I should dig for more info.
Any ideas?
It turns out the problem was a firewall (ZoneAlarm) on the failing windows machines. I guess there is a limit to the size of HTTP packets it can handle or something.. Disabling ZoneAlarm solved the problem.
I'm gonna file a bug report with them.
Related
We have a JNLP file that on some computers gets stuck in a download loop.
When the download it started the user is presented with an "Open" or "save" option and no matter which they choose it seems to start a new download and present them with the same 2 options.
It seems to only happen on Windows 10, though not always.
Java version is 8 update 161
The same thing appears to happen in Edge, Firefox, and Chrome.
Supposedly it was resolved one time by going into java configurations, and deleting temporary internet files, however I have not been able to replicate this issue.
Has anyone experienced this sort of thing? I tried searching around a bit online but nothing seems to match. This is the first time I've made an account to ask a question, please let me know if you think there is any other relevant data I should provide.
I figured this out. It seems users had associated the .jnlp file to "Open with" a browser, as a result any time they tried to open a .jnlp file they had downloaded the browser treated the file like a new download. We simply needed to re-associate the "open with" to point at the javaws.exe.
The piece that helped clarify this was realizing that the files were in the downloads folder, so they were downloading. They must have just chosen a poor association at some point.
So, at my job, I've got a ticket to fix a bug that I'm not really sure is fixable. So, here's the deal:
Our application is a java Swing app that configures the under-the-hood engine that runs. All of our machines at the office are Macs, but to ensure cross-platform functionality we frequently do things in Windows VMs.
So, the guy who reported this, is working in his Windows VM using VirtualBox. He copies some text from our application in the Windows VM to our application in Mac. Our application saves its state in XML configuration files. When he then saves the changes, the text in the XML config file has a "?" character where the FEFF control character was.
Now, I've been going over our code. The paste operation drops the code into a JTable with a custom CellEditor, but the cell editor has nothing special regarding copy/paste operations. Literally no code whatsoever on that issue.
When the application then goes to write everything to the XML configuration file when it saves, it uses the org.w3c.dom.* libraries (the standard Java XML libraries) to do it. Again, can't see anything special here.
My gut says that this might not be solvable, that it might just be an issue from copying between VMs, something is getting weirdly corrupted. Anyone else ever encounter something similar or have an idea on this?
I really don't have any code samples to paste here, but anything anyone could ask for I'll try to provide.
I have some very large files (XML / CSV) which client (IE8 and above) needs to download and process. Before I invest too much time on to it, I wanted to ask if it would be feasible to use gzip compression to do this? From this link it looks like it would not work out of box for IE without installing an exe/or changing internet settings (which doesnt work for me because this will go to 1000s of users).
Second question is if IE doesnt support it what other browsers support it unconditionally- I am specifically interested in Firefox, Chrome, Safari and Opera.
Thanks
Looks like it worked for me on IE8 as well.
I am trying to upload a lot of files from a browser to a webserver that I have total control of. I've tried to use SWFUpload, but the problem is that my browser hangs when I am uploading a file. The files are supposed to be of any length (up to 2GB due to other restrictions, of course).
While the upload is in progress the browser hangs and the GUI is not updated. When the file is finally uploaded the GUI responds again. In firefox the entire browser stalls and in Chrome just the tab.
I thought it might have something to do with flash trying to inject the entire file in to the memory first, but that does not seem to be the case (although different test cases yielded different results, but I'm not sure that it's because of that reason).
An applet is also an option, although flash is preferred. The reason I don't want to use a form is because you can select multiple in flash (also possible with Java, I assume) which is a nice feature that I'm going for.
Any ideas? Thought?
(math|tob)ias
If you're using linux, this is a known problem. For Windows users this doesn't happen. Otherwise, you'll have to stick to ajax (the best way is with the jQuery forms plugin).
http://www.plupload.com/, this one looks interesting, but I haven't looked into it. You may want to give it a try.
Try an AJAX one:
http://sourceforge.net/projects/uber-uploader/
Lighter on the resources and more platform-independent.
client-side I like this jquery plugin:
http://valums.com/ajax-upload/
if you need examples of server-side handling:
http://php.net/manual/en/features.file-upload.php
I've use this for my projects... http://jupload.sourceforge.net/ I found I had better results though when I used it in FTP mode. I had issues with http uploads. It does support multiple files which is nice. You can upload the files into an "incoming directory" and then process them later when the transfer is finished.
Check SWFUpload swfupload.org
and there is a descussion about this point:
http://swfupload.org/forum/generaldiscussion/173
I need assistance finding a delivery method that best fulfills the following requirements:
We wish to deliver a single file to my clients.
Clients should be able to launch this file from the operating system shell - much like running an '.exe' on Windows.
After being launched, the program/script should be able to display a window with HTML content. this may be done using a stand alone program, a runtime or by running within a browser.
We need the ability to embed a resource within the delivered file, such as an mp3 file, which i can later extract programmatically.
Optimally, the solution should run on Windows, Mac and Linux machines. Less than perfect cross-platform interoperability is acceptable, but we want as broad a penetration as possible.
Clients should not need to pre-install anything (unless it is done transparently), pre-configure anything, or approve any thing for this to happen.
For example:
We could use a regular executable file, written in C++ to do this, but it will not be cross-platform.
We could use a sliverlight XAP file, an adobe Flex file or a Java JAR, but internet explorer warns users when local content is launched. In addition these approaches mean that we have less than perfect penetration, even though it is acceptable in these cases.
We could use a python (or equivalent) script, but the installed-base (penetration) of the python interpreter is not good enough.
Using a standard HTML is not enough because of the difficulty of embedding resources in it. Embedding Silverlight XAML or uuencoded content in HTML causes IE to display a warning.
Using something along the lines of a jpeg as a delivery method is not rich enough since we need to display HTML.
..but internet explorer warns users when local content is launched..
I don't get it, what's the problem with IE saying "Hey this app is trying to run your files!"
I don't mean you don't have a good reason for this, it is just, I don't get it.
IE will only warn the user if the app has not been downloaded and try to access local resources, for instance if running from an applet or a JNLP like this one:(click on the first orange button you see )
But if the users download the jar and run it from the computer ( double click on it ) the app is local and can run without problems.
The jar file is a zip file after all, so you can attach your mp3 file with it. Double click is supported in the desired platform, and the HTML content could be either a local file ( un-packed along with the mp3 file ) or an internet web page.
Java is preinstalled on those OS already.
"internet explorer warns users when local content is launched"
There's a reason for this. How can they distinguish your excellent, well-behaved, polite application from a virus?
Since the line between your app and a virus is very, very blurry, go with any of Silverlight XAP file, an adobe Flex file or a Java JAR.
The IE business is a good thing, not a bad thing.
You could try using the 'Jetty' application server.
This supposes there is a working java environment on the target machine.
Jetty is java servlet container but it is possible to configure
everything (web server, html templates, applications, etc.) in a
single executable jar, which launches the web server and opens a default page.
Exactly how the jar file is launched will vary from platform to platform
but otherwise the user interface will be identicle, and, as its a java application
you can do pretty much anything one it has started.
Sounds like MIME HTML does exactly what you want - unfortunately, it is not supported by many browsers other than IE.
I'd investigate Adobe AIR. It can display both HTML and Flex content in a desktop application without using a web browser. However this will require installation of the AIR runtime, also I'm not sure if the Linux version is out of the beta stage.
http://www.adobe.com/products/air/
You can also use a binary for each platform.
As per your description the app is very simple, and porting from one platf to another sounds like just matter of re-compile and offer binary based on the dist.
Is this an option?