Stefan Renemeister

Greenhorn
+ Follow
since Sep 26, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Stefan Renemeister

I know, but unfortunately that's not possible right now (requires application modification, which is in the current phase of the project not applicable).
I really look for a way to avoid displaying the truststore password in plain text. Anyone?
11 years ago
I've set a truststore and it's password as a system property for my (IBM) JVM. Yes, WebSphere indeed.
Unfortunately, I haven't seen ways of setting my password encrypted. As all system props, their definition (and values!) show when dumping process output, exposing my password in plain text.
I don't like that. I'm sure I'm not the only one.
Can anyone enlighten me how I can set my password encrypted?

Current systemprops:
javax.net.ssl.trustStore=/location/of/truststore.jks
javax.net.ssl.trustStorePassword=password

Thank you in advance!
11 years ago
It's a generic errormessage, it cannot complete the chain.
Most likely you don't have the same CA certificate present as you certificate is signed with.
14 years ago
Allright, as a starting java programmer I enjoyed writing some classes. Some of the are actually usefull, so one way or the other, I would like to integrate them in a webpage.
For instance, I created a java class that shows a blob out of a database on the screen. How can I use exactly that class on a webpage? There are probably 1000's of ways to do this, but what is the most used technology?


Hi Ujjwal,

I think I get it now, it works now, this is what it finally is:



Thanks a lot, you were of great help!
Only question that remains is: am I doing this proper? It seems so inefficient, having one output stream filling the other?

ujjwal soni wrote:Hi Stefan

Try below code



Then, you can refer that image on jsp or html page like :



Hi ujjwal,

allright, but where in my code do I need to add this? in the while I guess? If I do so, netbeans throws me a:
"Error non-static method writeTo(java.io.OutputStream) cannot be referenced from a static context"
What is this about?

And my second question would be: am I doing this in the proper way now? It seems like an awful long way just to show a picture from a database.

ujjwal soni wrote:Hi,

You can do something like this ::



Hi ujjwal soni,
thank you for your reply. Perhaps I don't understand you properly, or I am lacking knowledge here, but it seems that you want me to put a file on disk first?
In my current situation I have an application that delivers an ByteArrayOutputStream, containing the bytes of an image. How can I show that on a web page?
If I need to transform that to a file on disk, that's ok with me, but how?

Once again, thank you for your help.
Hi all,

I'm fairly new to java, and as an exercise created a database (mysql), containing a table "photo_tbl" in which resides a couple pictures as BLOBs.
I created a java class, shown below that manages to read these images out of my database into a ByteArrayOutputStream.

My big question to u: How can I get the ByteArrayOutputStream to display as the original photo? (and not some freaky binary output )

Duuuh, forgot the quotes in the columnname..

Should have been:

instead of:


Ok, well here's the following question:

my result of above code is:


1
com.mysql.jdbc.Blob@84da23
2
com.mysql.jdbc.Blob@d3d6f



I'd like to see the actual pics, instead of the data.. How can I transform this into a picture?
Hi there,

I am performing my first steps in java JDBC, and as an exercise try to show some images from a mysql database.
The thing below runs, but doesn't show my photo's. (it does show the id's however).
It returns the following error:

SQLException: Column Index out of range, 0 < 1.
SQLState: S1009
VendorError: 0



What am I doing wrong? And more important, what is the proper way to show my photo? Any help is greatly appreciated!

Thank you all,

it took me a while to read most of your links, but especially sun's JDBC was really nice.
Hi all,

first let me say hi, as a new member!

I have created a database (mysql), with a table containing 2 columns: id (primary key) en photo (blob). I like to show the photo's by a java application. I like to avoid using hibernate right now, just plain java to show the records.

Can you help me for an exhaustive example?

I have crawled the net, looked through a lot of java books, and searched this forum, but couldn't find a satisfying answer to my question.

Thank you very much in advance.