Tim Moores

Saloon Keeper
+ Follow
since Sep 21, 2011
UK / DE
Cows and Likes
Cows
Total received
117
In last 30 days
0
Total given
11
Likes
Total received
921
Received in last 30 days
17
Total given
371
Given in last 30 days
14
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tim Moores

If you have further questions on the subject of deadlock handling, let's talk about that in the thread you started recently: https://coderanch.com/t/699090/java/Deadlock-Detection-Production-Environment
What is the Maven angle on this? Maven would just create the war file, which you would then deploy. It isn't involved at runtime.

What we need to know is what URL you're trying to access, and how the resource behind it is mapped.
2 days ago
The kind of company you're asking about is called a Global Distribution System, or GDS. There are a few big players like Sabre, Travelport and Amadeus, as well as some smaller ones.
2 days ago
No editing - you compile the .java file which results in a .class file. The IDE does that for you, but it's possible it doesn't put the class files where they need to be. But after compilation they should be somewhere in the project folder, provided there were no errors.
3 days ago
A source file does no good in WEB-INF/classes - that's were the class file needs to be.
3 days ago

WEB-INF / classes / WebCart / WebCartServlet.java


Two problems:

1) The package name is "webcart", not "WebCart".

2) That's where WebCartServlet.class should be, not WebCartServlet.java.
3 days ago
I think you can replace all that by

return ImageIO.read(new ByteArrayInputStream(bytes));
4 days ago

Philippe Ponceblanc wrote:no, in the package webcart


Well, "src" is clearly a source directory, is it not?

Regardless, the class file needs to be inside WEB-INF/classes/webcart; is that where it is? Or is it in a jar file that contains all your classes? If so, that would go into WEB-INF/lib
4 days ago
Start by defining what the output should be. PDF and XLS are very different file formats, which lead to very different ways you can use them. Do you want something to print? Then PDF would seem to the medium of choice. Do you want something to edit? That would rule out PDF.
4 days ago

do you perhaps know why it is saying transfer-encoding chunked?


Because that's the transfer-encoding it's using - it's got to use something.

I think it is affecting the client side when I try to consume it using AJAX call, it goes in an error status.


What's the evidence that it's related to the transfer-encoding? What's the error message? What is what code doing when that occurs?
4 days ago
Normally you'd just use the ImageIO.read method which handles all the file formats it is capable of handling, without you having to do anything especially.

If memory serves, ImageIO can handle JPG, PNG, GIF and BMP out of the box, and can be made to handle TIFF with a bit of extra effort.
4 days ago
I'm not sure I understand what exactly you're asking.

If the task is to modify Excel files programmatically then Apache POI is almost certainly the best tool available.

If the task is to create PDF files, then PDFBox or iText would be good choices. Note that iText versions 5 and newer most likely will require you to obtain a license, whereas iText 2 does not.
4 days ago

java.lang.ClassNotFoundException: webcart.WebCartServlet


In which directory is the WebCartServlet.class file?
4 days ago
What do you mean, "however"? Is there a problem with the response using that transfer-encoding?
4 days ago
Indeed, I think a library such as Unity would be way overkill for your purposes. In Android you could subclass an android.view.View and use a Canvas to do custom drawing (which includes putting text on the canvas if need be).

A simple example: https://stackoverflow.com/questions/16605428/custom-view-canvas-ondraw-doesnt-draw-anything/16606144#16606144
5 days ago