Nikki Freeman

Greenhorn
+ Follow
since Nov 03, 2005
Merit badge: grant badges
For More
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 Nikki Freeman

Thanks David. As always, you are correct on all of those points.

The last problem I am having is, I have an object that needs a properties file setup as a System property. For example,
System.setProperty("CLIENT_CONFIGURATION","C:\\OSSclient.properties");
This works fine, but obviously isn't portable. I have this properties file in the WebContent directory but I get a file not found error when the object referecnces the property. I tried something like this:
System.setProperty("CLIENT_CONFIGURATION","OSSclient.properties");
but that didn't work. Any ideas?

Also, I am running this off of a WebSphere server, but I don't think that should matter too much.
16 years ago
Thanks David,

Looks like the properties are being loaded. I need to set the properties in the file as system properties. Here's what I have done so far:

16 years ago
I thought that would have worked. The problem is I need the properties inside the properties file set as a system property. This code doesn't work - NullPointException :



Thanks for the response
16 years ago
actually looking around on the forums, I found this:

http://jaitechwriteups.blogspot.com/2007/01/how-to-read-properties-file-in-web.html

I haven't tried it yet, but I don't see why this would not work?
16 years ago
I have an action class\servlet that references a .properties file. I am running the app on a websphere server off of my local pc.

The only way I can get the server to see the properties file is to give it a full path ie:
System.setProperty("OSS_CLIENT_CONFIGURATION","C:\\Documents and Settings\\IBM\\rationalsdp6.0\\APworkspace\\APElapsedTime\\WebContent\\WEB-INF\\source\\com\\corp\\elapsedtimeosds\\resources\\OSSclient.properties");

I tried this but got a could not find error:
System.setProperty("OSS_CLIENT_CONFIGURATION","..\\WebContent\\WEB-INF\\source\\com\\corp\\elapsedtimeosds\\resources\\OSSclient.properties");

Obviously I can't use a local path to the properties file when I deploy the app. Any suggestions on how to setup a properties file so that a servlet can read it off of the server?
16 years ago
I have more of a math problem than I java problem.

I need to calculate the elapsed time bettween two Calendars. Most of the posts that I have found show how to find the elapsed time in milliseconds and then do simple math on the determined difference.

I need to figure out how to get the elapsed days, hours, and minutes for a given difference. ie:

start time: 1/30/08 2:30 PM - end time:01/30/08 07:34 AM
0 days 6 hours 56 minutes.

here is where I'm at:


Any thoughts on where I am going wrong?
16 years ago
I just passed the SCJP 1.4 with a 52%. That's 32 out of 61! Talk about lucky! Whew!

Several things contributed to my less than impressive score.

1. I was extremely nervous going in. Undoubtedly, this didn't help. When I did a quick run through of the questions, I saw some questions that looked very difficult and became even more concerned.

2. After I finished, I went back and changed the answers to at least 10 questions. I'm pretty sure that I corrected incorrect answers though.

3. I got several questions on inner classes on the test. Unfortunately, I didn't study inner classes very much!!! Fortunately, I got to the test site early. Since I was early, I got out my K&B book in the car and reviewed the section on inner classes in the parking lot. I think this was the difference between passing and failing.

4. I got the impression that the test was easy. Everyone on this form seems to make 80-90%. I thought that the test was going to be a breeze. It wasn't! It was way harder than I thought! I therefore did not study very much. (I did purchase and read the K&B book and I would definitely recommend reading it).

Anyway, I hope that helps someone.

[ November 11, 2006: Message edited by: Nikki Freeman ]
[ November 11, 2006: Message edited by: Nikki Freeman ]
17 years ago
Ok, after reading that, I'm even more confused.

For instance:


As the other user suggested, us the toBinaryString method results in:



My other question is; is it worth my time to try to figure this out? Are there very many questions on this for the exam?
I am studying for the 1.4 test.

Unfortunately, bit shifting is part of the exam. I have never used bit shifting before. In all of the examples that I have seen (including the K&B book), it is assumed that you know what the bit pattern is for a given integer. .

My question: how are you supposed to know what the bit pattern is for an integer? Is there a formula for this? thnx, Nikki
I am working on an app for resume wizard.

I would like to display a List and allow a user to select one of the elements from the List to edit. Any ideas on how to do this? See code below:

<html:form action="\editExperience.do">
<logic:iterate id="element" name="ExperienceForm"
property="ExperienceVO" type="COM.SWACORP.mitweb.ValueObject.experieceVO" offset="false"> <LI>
<html:submit indexed="true">Edit</html:submit>
<B>Previous Employment: </B><bean:write name="element"
property="employment" />,
<B>Years: </B><bean:write name="element" property="yearsEmp" />,
<B>Responsiblity: </B><bean:write name="element"
property="responsiblity" />
</logic:iterate>
</html:form>
18 years ago