Tim Moores

Saloon Keeper
+ Follow
since Sep 21, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tim Moores

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.
8 hours ago
A source file does no good in WEB-INF/classes - that's were the class file needs to be.
11 hours 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.
13 hours ago
I think you can replace all that by

return ImageIO.read(new ByteArrayInputStream(bytes));
1 day 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
1 day 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.
1 day 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?
1 day 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.
1 day 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.
1 day ago

java.lang.ClassNotFoundException: webcart.WebCartServlet

In which directory is the WebCartServlet.class file?
1 day ago
What do you mean, "however"? Is there a problem with the response using that transfer-encoding?
1 day 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
2 days ago
That looks like JSON, so the obvious approach would be to use one of the many available JSON libraries. https://github.com/stleary/JSON-java would be a good choice.

Edit: I added linebreaks to the JSON so that the page is formatted properly, and also took the liberty of removing much of the duplicated data.
2 days ago
Yes, deploying on your own phone is done via the adb tool that comes with the Android SDK. Somewhere in the Settings of your device you need to allow apps to be installed from outside of the Play Store, though.
2 days ago
Does that mean the problem is solved? You say "Please reply if sucees" which sounds as if you are expecting people to try something and report back with the solution, but it's not clear what people should try, nor is it likely (IMO) that people will do your work for you. If, OTOH, there was a clear problem description, that would help us help you.

I am delighted to get nice respnse though only after several days.Thanks

Do you imagine that using sarcasm will make it more likely that people will help you?
2 days ago