Hi, I'm using JAI to convert CMYK jpgs to RGB, as java throws exceptions on handling CMYK jpgs. I've got something working, but the result is a very dark image, so I'm clearly going wrong somewhere. Any ideas how this code might be improved?
Long story. - The application is a plugin in a larger web app which is hosted remotely. Setting up db connections to it is complicated. - I want the plugin to be self-contained and portable. I guess I could use one of those embedded databases - Berkeley? That seems a bit over the top in this case though. [ March 19, 2007: Message edited by: joseph corner ]
Hi, I am writing a java server-side application which needs to store info about educational courses, and users in those courses.
When retrieving data, I need to ask: - does this course already have an entry? - if so, which users are listed there?
When storing data, I need to ask: - does this course already have an entry? If so, append user entry. If not, create course entry, append user entry.
It's not convenient to use a database for this. So my question is: should I create an xml file of users for each course, then check for the existence of the course using file.exists()? Or should I put all courses and users in one xml file? Or some other approach - perhaps not using xml?
Hi all, I have a java web app which connects to a MySQL database, using a datasource which i have defined in tomcat's server.xml, DefaultContext tag, as follows:
When I restart the web server with the java app, the connection works without problems. If I then go away and come back an hour later, and try to connect to the db again in my web app, it takes aaaaages to connect to the db. It doesn't time out, it just takes a looong time to connect and display the page with the results. (10 mins?) I am closing all my resultsets, statements and connections in my servlet code. Once the connection is finally made, the web app seems to run OK. Any ideas what might be wrong?
Thanks. [ March 15, 2007: Message edited by: joseph corner ]
Hi Bear, Yes, the distinction is made between GET and POST, so passing the variable on the end of the url doesn't work.
D Rog, I didn't understand your solution. I have found examples of sending POST requests from JAVA and handling the return, but (perhaps I'm confused here) I actually want to direct the user to the page expecting the POST request.
I was thinking in terms of efficiency - that it would be better to just have a single datasource object. I'm not totally clear on how Tomcat's pooling works, so this also seemed likely to ensure that there would just be one pool of connections, as they all come from the same datasource.
I have a web application which uses Tomcat's connection pooling. I am paranoid about opening and closing connections efficiently. Does this approach seem reasonable? I use a singleton class to create a single datasource, then use that for opening connections:
I tried some basic ftp transactions using com.fooware.net. The application just hung when trying to connect - no error message. I'll try it again from a stand alone java app., and will take a look at jakarta commons net too..
Hi, I have ftp running on the remote server, and I could also run a servlet there to read and write the images. What would people's best solution be, in terms of efficiency and speed? My first experiments with ftping from my servlet have been unsuccessful.... Thanks.
Hi, Do I really need to mount the remote file system? Is this a basic security feature of java, that it can't write to a folder on a remote web server?
My case is complicated by the fact that my web app is a plugin in a larger application, and I don't have direct access to the web server which runs it. So I'd prefer not to have to set up mounted file systems.
Hi all, I have a servlet/jsp forum application which supports image upload. For storage space reasons, I would like to write the uploaded images to a different server than the one hosting my web app. Obviously I will also need to read the image data from there.
I am having difficulties sorting out my file permissions - if I fix this will I be able to read and write to absolute file URLs? Or is it more complicated than that... ?