Fred Close

Ranch Hand
+ Follow
since Mar 13, 2001
Fred likes ...
Mac
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 Fred Close

the JRE should be enough
19 years ago
make something persistent simply means store data (most of the time) in a database
19 years ago
Hi,
I would like to know if it's possible to display a 'friendly message' for the following scenario:
we have a weblogic server using ssl (128 bits) ... it works fine with new browsers but some old browsers (not 128) get an error message.
Is it possible to configure the page that is displaid to that type of client ?
thx
FREd
20 years ago
Hi,
I was having trouble with a struts page using a javabean Tartanpion containing the following property and getter and setter

the jsp page was throwing an exception :
javax.servlet.jsp.JspException: No getter method for property pRoperty of bean tartanpion
with the following getter and setter it works ok


I thought that the rule to write a getter and a setter method was :
get + name of the property (with the first letter of the property in capital)
set + name of the property (with the first letter of the property in capital)
so what's the rule to write getter/setter ?
btw : the code generation of IDEA and JBuilder does not give the same result :
for the property tOto
IDEA : gettOto()
JBuilder : getTOto()
who is right ?
20 years ago
Hi,
I've placed the common jar files directly in the ear but some jar files needs also to be in the ware file because an applet needs to download them ... so I'm forced to duplicate those jar files in my ear.
21 years ago

JavaTM Web Start -- a technology for simplifying deployment of Java applications-- gives you the power to launch full-featured applications with a single click from your Web browser. You can now download and launch applications, such as a complete spreadsheet program or an Internet chat client, without going through complicated installation procedures.


http://java.sun.com/products/javawebstart/
21 years ago
thanks for your answer Chris,
the only problem I have with your solution is that some of the common jars have to be in the war file, because the client of our application is an applet and needs to download some jar file and so those jar files have to be in the war.
So what I did is, as you said, have the common jars directly in the ear and for the common which also have to be downloaded by the client they are also present in the war file. It's working ok but I wanted to know if it's possible to do the packaging without duplicating jar files between the ear and the war.
21 years ago
Hi,
I've got an ear file with several ejb.jar files and one war file ... I would like to specify in the class path of the ejbs jar files some jar files contained in the war file is it possible ?
I know how to specify the class-path in manifest file but how can I specify a jar file inside a war in that class path ?
FREd
21 years ago
What's the difference between getting a connection directly from a Connection Pool

and getting a connection from a Datasource

at the end the result will be the same : a connection from the connection pool will be returned ... so what's the difference between the two techniques ?
21 years ago
FileInputStream indeed extends InputStream
When you are trying to cast an object to a superclass, you do not need to explicitly write the cast, the cast is implicit.
i.e. upcasting is implicit and downcasting has to be implicit.
21 years ago
isn't the waitFor method what you are looking for ?
Process p = Runtime.getRuntime().exec("command1");
p.waitFor(); //p2 will not run until p1 is finished
Process p2 = Runtime.getRuntime().exec("command2");
p2.waitFor();
...
21 years ago
I think it's because the compiler expect that there could be an other else
so this would be ok
public int compareTo(Object obj){
Appointment app = (Appointment)obj;
if (slot > app.slot)
return slot - app.slot;
else if (slot < app.slot)
return slot - app.slot;
else // i.e. (slot == app.slot)
return slot - this.slot;

}
21 years ago
Hi guys,
I come back a bit ashamed to you ...
Doing simple test I saw that there's no problem with the HashMap.containsValue(object) method ... and that the only thing necessary is that your object implements the equals method ...
the problem I had in my code was that I was testing the containsValue but I should have tested the containsKey method !!!
and the containsKey method with my 'famous' PersonBean object only worked with
the equals method
and the hashCode() method implemented

so thanks again for your help ... hope you will not get mad at me
21 years ago
indeed when I do simple examples ... it's working there's probably something wrong in my code
I'll keep you informed when I've found the bug
21 years ago
Thanks for your answers ...
I think Ron found the problem ...
I subclass the bean :
I first receive a vector of bean (for example a Vector of PersonBean ...) which I then transform to an array of object with the Vector.toArray() method
and then I pass this array of Object to my Model
addBeanList(Ojbect[] beans)
{
for(int i=0;i<beans.length;i++)
{
addBean(beans[i]);
}
}

addBean(Object bean)
{
(...)
//add the object to an hashmap
hMap.put(anInteger, bean);
}
21 years ago