Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Mike Cronin

Greenhorn
+ Follow
since Apr 17, 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 Mike Cronin

Hi there,

I realize this is kind of late, but I'm trying to do the same thing and found the following...

http://download.oracle.com/javaee/5/api/javax/mail/util/ByteArrayDataSource.html

Presently, I have to go a different route, but thought this could help someone else.

Regards,

Mike

11 years ago
Okay, maybe I missed the point of the validation test, but I ran tzupdater in update mode which appeared to succeed without errors. After the update finished, I attempted the validation test again; this time it completed without any error messages. Furthermore, a new \jre\bin\zi folder was successfully created and the old/original zi folder successfully renamed to zi.tzdata2003a. Bottom-line, I believe that I am okay.

Mike
15 years ago
Hi Carol,

Thanks for your response. I have read the documentation for the tzupdater and tzupdater_README.html states the following...

"The TZupdater tool supports JDK/JRE version 1.4.0 and later releases (1.4.0, 1.4.1,1.4.2, 5.0, and 6), all updates of those releases, and on all supported platforms. The java.vendor property value must be "Sun Microsystems Inc"." So unless I'm missing something, I believe that I need to update our JVM as we are utilizing 1.4.2_03.

I'm still wondering what's up.

Mike
15 years ago
Hi there,

When I run a verification test, it appears to me that everything is failing...

C:\j2sdk1.4.2_03\tzupdater2007a>java -jar tzupdater.jar -t
/data/tzdata2007a.test:12: test failed: America/Adak
/data/tzdata2007a.test:13: test failed: America/Adak
/data/tzdata2007a.test:16: test failed: America/Adak
/data/tzdata2007a.test:17: test failed: America/Adak
/data/tzdata2007a.test:20: test failed: America/Adak
/data/tzdata2007a.test:21: test failed: America/Adak
/data/tzdata2007a.test:24: test failed: America/Adak
/data/tzdata2007a.test:25: test failed: America/Adak
/data/tzdata2007a.test:28: test failed: America/Adak
/data/tzdata2007a.test:29: test failed: America/Adak
/data/tzdata2007a.test:33: test failed: America/Atka
/data/tzdata2007a.test:34: test failed: America/Atka
/data/tzdata2007a.test:37: test failed: America/Atka
/data/tzdata2007a.test:38: test failed: America/Atka
/data/tzdata2007a.test:41: test failed: America/Atka
/data/tzdata2007a.test:42: test failed: America/Atka
/data/tzdata2007a.test:45: test failed: America/Atka
/data/tzdata2007a.test:46: test failed: America/Atka
/data/tzdata2007a.test:49: test failed: America/Atka
/data/tzdata2007a.test:50: test failed: America/Atka
/data/tzdata2007a.test:62: test failed: US/Aleutian
/data/tzdata2007a.test:63: test failed: US/Aleutian
/data/tzdata2007a.test:66: test failed: US/Aleutian
/data/tzdata2007a.test:67: test failed: US/Aleutian
/data/tzdata2007a.test:70: test failed: US/Aleutian
/data/tzdata2007a.test:71: test failed: US/Aleutian
/data/tzdata2007a.test:74: test failed: US/Aleutian
/data/tzdata2007a.test:75: test failed: US/Aleutian
/data/tzdata2007a.test:78: test failed: US/Aleutian
/data/tzdata2007a.test:79: test failed: US/Aleutian
/data/tzdata2007a.test:85: test failed: AST
/data/tzdata2007a.test:86: test failed: AST
/data/tzdata2007a.test:89: test failed: AST
/data/tzdata2007a.test:90: test failed: AST
/data/tzdata2007a.test:93: test failed: AST
/data/tzdata2007a.test:94: test failed: AST
/data/tzdata2007a.test:97: test failed: AST
/data/tzdata2007a.test:98: test failed: AST
/data/tzdata2007a.test:101: test failed: AST
/data/tzdata2007a.test:102: test failed: AST
/data/tzdata2007a.test:106: test failed: America/Anchorage
/data/tzdata2007a.test:107: test failed: America/Anchorage
/data/tzdata2007a.test:110: test failed: America/Anchorage
/data/tzdata2007a.test:111: test failed: America/Anchorage
/data/tzdata2007a.test:114: test failed: America/Anchorage
/data/tzdata2007a.test:115: test failed: America/Anchorage
/data/tzdata2007a.test:118: test failed: America/Anchorage
/data/tzdata2007a.test:119: test failed: America/Anchorage
/data/tzdata2007a.test:122: test failed: America/Anchorage
/data/tzdata2007a.test:123: test failed: America/Anchorage
/data/tzdata2007a.test:127: test failed: America/Juneau
/data/tzdata2007a.test:128: test failed: America/Juneau
/data/tzdata2007a.test:131: test failed: America/Juneau
/data/tzdata2007a.test:132: test failed: America/Juneau
/data/tzdata2007a.test:135: test failed: America/Juneau
/data/tzdata2007a.test:136: test failed: America/Juneau
/data/tzdata2007a.test:139: test failed: America/Juneau
/data/tzdata2007a.test:140: test failed: America/Juneau
/data/tzdata2007a.test:143: test failed: America/Juneau
/data/tzdata2007a.test:144: test failed: America/Juneau
/data/tzdata2007a.test:148: test failed: America/Nome
/data/tzdata2007a.test:149: test failed: America/Nome
/data/tzdata2007a.test:152: test failed: America/Nome
/data/tzdata2007a.test:153: test failed: America/Nome
/data/tzdata2007a.test:156: test failed: America/Nome
/data/tzdata2007a.test:157: test failed: America/Nome
/data/tzdata2007a.test:160: test failed: America/Nome
/data/tzdata2007a.test:161: test failed: America/Nome
/data/tzdata2007a.test:164: test failed: America/Nome
/data/tzdata2007a.test:165: test failed: America/Nome
/data/tzdata2007a.test:169: test failed: America/Yakutat
/data/tzdata2007a.test:170: test failed: America/Yakutat
/data/tzdata2007a.test:173: test failed: America/Yakutat
/data/tzdata2007a.test:174: test failed: America/Yakutat
/data/tzdata2007a.test:177: test failed: America/Yakutat
/data/tzdata2007a.test:178: test failed: America/Yakutat
/data/tzdata2007a.test:181: test failed: America/Yakutat
/data/tzdata2007a.test:182: test failed: America/Yakutat
/data/tzdata2007a.test:185: test failed: America/Yakutat
/data/tzdata2007a.test:186: test failed: America/Yakutat
/data/tzdata2007a.test:192: test failed: SystemV/YST9YDT
/data/tzdata2007a.test:196: test failed: SystemV/YST9YDT
/data/tzdata2007a.test:200: test failed: SystemV/YST9YDT
/data/tzdata2007a.test:204: test failed: SystemV/YST9YDT
/data/tzdata2007a.test:208: test failed: SystemV/YST9YDT
/data/tzdata2007a.test:214: test failed: US/Alaska
/data/tzdata2007a.test:215: test failed: US/Alaska
/data/tzdata2007a.test:218: test failed: US/Alaska
/data/tzdata2007a.test:219: test failed: US/Alaska
/data/tzdata2007a.test:222: test failed: US/Alaska
/data/tzdata2007a.test:223: test failed: US/Alaska
/data/tzdata2007a.test:226: test failed: US/Alaska
/data/tzdata2007a.test:227: test failed: US/Alaska
/data/tzdata2007a.test:230: test failed: US/Alaska
/data/tzdata2007a.test:231: test failed: US/Alaska
/data/tzdata2007a.test:235: test failed: America/Dawson
/data/tzdata2007a.test:236: test failed: America/Dawson
/data/tzdata2007a.test:239: test failed: America/Dawson
/data/tzdata2007a.test:240: test failed: America/Dawson
/data/tzdata2007a.test:243: test failed: America/Dawson
/data/tzdata2007a.test:244: test failed: America/Dawson
/data/tzdata2007a.test:247: test failed: America/Dawson
/data/tzdata2007a.test:248: test failed: America/Dawson
/data/tzdata2007a.test:251: test failed: America/Dawson
/data/tzdata2007a.test:252: test failed: America/Dawson
/data/tzdata2007a.test:277: test failed: America/Los_Angeles
/data/tzdata2007a.test:278: test failed: America/Los_Angeles
/data/tzdata2007a.test:281: test failed: America/Los_Angeles
/data/tzdata2007a.test:282: test failed: America/Los_Angeles
/data/tzdata2007a.test:285: test failed: America/Los_Angeles
/data/tzdata2007a.test:286: test failed: America/Los_Angeles
/data/tzdata2007a.test:289: test failed: America/Los_Angeles
/data/tzdata2007a.test:290: test failed: America/Los_Angeles
/data/tzdata2007a.test:293: test failed: America/Los_Angeles
/data/tzdata2007a.test:294: test failed: America/Los_Angeles
<etc...>

Is it necessary to run tzupdater against JDK 1.4.2_03?

I'm obviously missing something here.

Thanks in advance

Mike
15 years ago
Add a static hit counter to your servlet. Create a couple of methods, one that increments the static counter then stores that value to a simple text file, and second method that reads the simple text file (for this example let's call the text file hits.txt).

On your servlet init method, determine whether or not the hits.txt file exists, if it does, initialize your static counter to the last value stored in your hits.txt file.

Once the servlet has been initialized, you simply increment your static counter and update your hits.txt file for each thread that enters your servlet (you should enclose this functionality within a synchronized method).

Throughout your servlet, keep thread synchronization in mind when dealing with your static counter.

Hope this helps.

Mike Cronin
Data On Call
17 years ago
I don't think a skip in the sequence would cause a problem, but you will have a problem if the sequence is duplicated. Does another servlet start at sequence 5 in your web.xml?

Mike Cronin
Data On Call
[ April 24, 2005: Message edited by: Mike Cronin ]
17 years ago
Yep,

import java.net.URLEncoder;

and...

URLEncoder.encode("Your Encrypted String", "UTF-8");

and that's it.


Mike Cronin
[ August 01, 2004: Message edited by: Mike Cronin ]
17 years ago
Hi Lasse,

I used XmlDocument.get_OuterXml() to copy the contents of a DOM object to a string variable.

Thanks so much for your quick response.

Best Regards,

Mike Cronin
Data On Call Programmer

[ July 22, 2004: Message edited by: Mike Cronin ]
[ July 22, 2004: Message edited by: Mike Cronin ]
Hi all,

Let me first appologize if I have posted this question in the wrong forum.

I am working on a project in Visual Studio .NET where I need to convert DOM contents to a string. I have searched by butt off with no success.

Is there anyone out there who can give me a hand with this?

My greatest thanks in advance!

Best Regards,

Mike Cronin
Data On Call Programmer

[ July 21, 2004: Message edited by: Mike Cronin ]
[ July 22, 2004: Message edited by: Mike Cronin ]
Hey Jeanne,
I figured it out.
Thanks so much for your quick reply
Mike Cronin
18 years ago
Hi all,
I have a "log" field in an Oracle table that I need to update with a status followed by a line feed and carriage return.
Can someone advise me how to insert line feeds and carriage returns into a field in Oracle?
Thanks in advance!
Mike Cronin
[ March 31, 2004: Message edited by: Mike Cronin ]
18 years ago
Hey Lasse,
Thanks for the quick response!
I went with the following code which works great!

import org.apache.xml.serialize.*;
...
private void domToString(Document doc) throws Exception{
try {
// Serialize the DOM
OutputFormat format = new OutputFormat(doc);
// Establish a new StringWriter object
StringWriter sw = new StringWriter();
// Establish a XMLSerializer object
XMLSerializer serial = new XMLSerializer(sw, format);
// Set the XMLSerializer as a DOM Serializer
serial.asDOMSerializer();
// Serialize the DOM
serial.serialize(doc.getDocumentElement());
// Store the DOM contents to a string
requestXML = sw.toString();
}
catch (Exception e) {
System.out.println("Error in domToString method " + e.getMessage());
throw new Exception ("Error in domToString method" + e);
}
}

Do you have an opion on using the javax.xml libraries as opposed to org.apache.xml?
Thanks again for the quick response !
Mike Cronin
Data On Call
Hi all,
I would like to write the contents of a DOM to a string instead of to a file. Does any one have an example of doing this?
Thanks in advance.
Mike Cronin
Data On Call
Hey gang,
Thanks for all that input.
As of today, I decided to move the apps under the same domain which of course solved this issue all together.
Thanks again for your assistance!
Mike
18 years ago
Hi there,
I have a servlet in one domain that sets a session variable and displays a link to a servlet in another domain. When the client clicks on the link, I'd like to validate the session variable set in the initiating domain.
Is it possible to retrieve session variables across domains?
Thanks,
Mike
18 years ago