Peter Straw

Ranch Hand
+ Follow
since Jan 08, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Peter Straw

Hi,

I'm trying to use Java to read a series of attachments from an eml file that has been written to disk. If I open the eml with an email client then the attachments are displayed correctly, but when I try to turn them into Multipart objects in Java and then print these to a console some of the charaters are incorrectly shown as '?' (the majority of the characters are rendered correctly).

The eml file is shown as 'utf-8 unicode' when opened in an email client. Can anybody suggest how I could use java character encoding to display the '?' correctly please (or suggest an alternative)?

Many thanks..
10 years ago
I need to send some data from my java app to another machine on the network using TCP/IP and stunnel.

I've written the TCP socket code and am happy that this works, but I've no idea how to implement the stunnel part.

Does anyone know how this is done, or any links where I could get some info.

Many thanks.
15 years ago
I need to find a way to send at least 5000 statements/second to a remote database. Would it be possible to do this by writing a java app and use jdbc? If so, how could this be implemented please?

Basically it is a performance test for our database proxy. The remote database is sql server, and the actual queries sent could be the same ("select 1"?) but I'm not sure how to ramp up the speed.

Many thanks.
15 years ago
Please can you tell me the easiest way to convert a binary data from a file into ascii. I understand how to read the file using InputStream but am having difficulty converting the bytes to ascii.
Many thanks.
16 years ago
Hi Ulf,

It's ssh, possibly telnet and http, but doing it by ssh would be best.
16 years ago
Please can you tell me the best way to read a log file on a remote linux machine. I really just need to check that the file is empty.
Many thanks.
16 years ago
Please can you tell me if it is possible to have tomcat serve up pages (just html pages) that are in a different directory from the tomcat install directory. Would this be a virtual or alias type directory? Also which tomcat config file do you specify the path to these source files?
Many thanks.
16 years ago
I want to use a simple form to submit values from one page and display them in the following page using the jsp usebean functionality. I have got this working ok using a bean called CheckItem.java which has 4 properties(name, person, status, comments) with getter and setters for each. I can get one CheckItem to be submitted from a jsp page form and have its details displayed on the following jsp. What I need though is to have multiple rows of CheckItems as empty input fields on one page and then the following page displays all of these items, as in an ArrayList or something similar.

Please can you tell me how it is possible to do this, many thanks.
16 years ago
JSP
I want to automate tests concerning user interaction on the UI: testing the various paths the user might take and expected outcomes (general flow from one window to the next), error-checking on forms and input boxes, messages displayed back to the user etc.

My role is to carry out the actual testing (and configure WinRunner/QTP or equivalent) and I want to avoid the tedium of repeated manual tests for each new release.
[ May 19, 2006: Message edited by: Peter Straw ]
16 years ago
I'm looking for a test tool that will help to take the bordom out of manually testing UI functionality (user interaction with the front end).I understand that WinRunner would be appropriate but it is expensive - does anyone know if there is some open source software that has similar functionality to WinRunner?
Thanks.
16 years ago
Once I've managed to populate a database with data from an xml file using dbunit and run a test, how is it then possible to use dbunit to modify the data so that I can run another test? I don't want to use jdbc and it would be good if I could change the data without reading in another xml file.
Thanks.
17 years ago
Please can you tell me what is the best way to determine if the value held in a string can become a number or a boolean value or if it's really just a string. For example if there's
String strA = "Hello";
String strB = "false;
String strC = "1";
How can I tell if strB 'is' boolean and strC 'is' an int.

Many thanks.
17 years ago
Does anyone know how it is possible to encrypt a password using SHA in Java please? Is there a free package I can get hold of or maybe there's something in the JSDK that I've overlooked?
Many thanks.
18 years ago
I need to convert and store a sequence of 60 boolean values into a byte.
Can anyone point me in the right direction as to the best way of doing this please?
Many thanks...
18 years ago
Does anybody know how to set a timeout on a commons dbcp connection please?
Sometimes when the jdbc driver tries to get a connection from the pool, the webapp just hangs and a threaddump indicates that the connetcion object is locked.
Many thanks.