tod murphey

Greenhorn
+ Follow
since Jan 13, 2001
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 tod murphey

Well, hello again!
I was running J2EE, and wanted to make some minor modifications to the main servlet in my eap. First I "Undeployeed" the eap, made my changes to the servlet, then recompiled. I didn't change anything in the web component of the eap (still pointing to the same servlet, whose name was unchanged as well).
However, after I "Update" and "Save" the eap (it even acknowledges the changed servlet), then "Deploy", it's not picking up the changed servlet (it's using the previous version).
I checked all possible directories where the servlet.class is stored (2 places- the folder where I compiled it and the web root directory after deployment (in this case, C:\home\murphyt\J2EE\public_html\BonusRoot\WEB-INF\classes) to make sure the most recent class is being picked up, but it's still picking up the old version.
Do you have to do something else to "tweak" J2EE to pick up the new version? I'm at a loss here...
Has anyone gotten this error while saving changes to their application?
<AppName>.eap is corrupt or cannot be read.
Now I can't go and reopen my application.... this tool appears to be a little... unstable... has some bugs in it... (which is understandable, since it's relatively new)...
Greetings...
I downloaded the J2EE studio, and wrote a simple distributed application (similar to the example that Sun provides with the download).
I compiled the 1 servlet (extended HTTPServlet), the 3 bean files (extended EJBObject, SessionBean, and EJBHome, respectfully) w/o a hitch.
I included the classes to create the Enterprise bean w/o any prob's, and included the servlet as the web component.
I double checked the tags, fields from html that tie into the servlet, as well as the embedded code of the servlet, that it ties in with the Enterprise bean methods and variables.
Lastly, for all components of this app, I used the proper aliases, etc (going through the wizard tool of each).
However, I keep getting this error
Warning: [ AnnualBonusWar ] has blank context root defined within application [ AnnualBonusApp ]
I checked the Web Context of the .eap application and verified that the WAR file has a context root. What could be wrong here?
hello all,
this may seem like a redundant question, but I was looking at sun's online quizzes, in particular the "Adv Programming for the Java 2 Platform", and since I had some experience in java, and studying for this exam, that this would be a good prep. However, it talks about EJB's, RMI, JNDI, etc... this stuff isn't on the SCJP test, I assume?
thnx!
hi daman, thnx for the response...
I will download that, I assume the j2EE development studio is run through DOS, just like jdk?
so you are saying that just knowing java is "old hat", and that ejb/j2ee is where java development is going?
If the vendor provides the container, while the java team provides the objects, what vendors are major in this mkt? Are the containers relatively simple to understand and work with (like JSP)? Rather, being that the idea is to separate presentation and implementation, does the java developer even need to worry about the containers, being fully confident that the containers will be able to utilize their EJB's?? (whew, that was a load).
tem
hello all,
Please hear me out on this...
I have studying java/writing code/using JDK 1.2 in preparation for the test, as well as interviewing for java positions in the area. I thought having some java experience (and then getting this cert) would certainly put me in the driver's seat in finding a great java dev job. However, some recruiters are telling me that now that java is not enough, employers now want to see experience w/ Sun's J2EE (Enterprise Edition) development platform, and experience w/ EJB.
Could some experienced people fill me in on the truth here? Is this the case, or are these recruiters being just a little picky? Also, I've read up on javabeans- basically they're a certain type of a java class, but the methods, var's need to implemented a certain way, in order for the bean to be used in, say, a JSP. What separates an EJB from a regular bean?
Thnx for your help, guys!
tm
hello all,
At first this might not seem like a java cert question, but it is related. I have studying java/writing code/using JDK 1.2 in preparation for the test, as well as interviewing for java positions in the area. I thought having some java experience (and then getting this cert) would certainly put me in the driver's seat in finding a great java dev job. However, some recruiters are telling me that now that java is not enough, employers now want to see experience w/ Sun's J2EE (Enterprise Edition) development platform, and experience w/ EJB.
Could some experienced people fill me in on the truth here? Is this the case, or are these recruiters being just a little picky? Also, I've read up on javabeans- basically they're a certain type of a java class, but the methods, var's need to implemented a certain way, in order for the bean to be used in, say, a JSP. What separates an EJB from a regular bean?
Thnx for your help, guys!
tm
well, I created a test class and ran it...
class Shift {
public static void main(String[] args) {
Shift sh = new Shift();
}
Shift () {
int i = -1;
int j = i >>> 31;
int k = j & 51;
System.out.println(k);
i = -1;
j = i >> 31;
k = j & 51;
System.out.println(k);
}
}
... and printed out.
1
51
So, I assume the second shifting exercise did take -1 and with the shift, kept it at -1 (1111 1111 1111 1111).
If you use the AND operation with -1 and any other number, you get that same number:
1111 1111 1111 1111 -1
0000 0000 0011 0011 51
___________________
0000 0000 0011 0011 51
Am I right, or am I right?
thanks for the response...
but what if the question asked to...
1. int i = -1;
2. int j = i >> 31;
3. int k = j & 51;

Would all 1's be filled in from the left, thus keeping it at -1?

Hello again,
I encountered a problem, where the exception hierarchy is as follows:
X extends Exception
Y1 extends X
Y2 extends Y1
Given this class...
class Parent {
void aMethod() throws X {
throw new X();
}
}
and a child...
Child extends Parent {
void aMethod () //insert possible choices
{
}
}
Is it true that a child overriding a parent's method can obviously throw either:
no exceptions
that same exception (X)
a child of that exception (Y1)
any "indirect" children of the exception (Y2)
Let me know if I'm on target here...
tem
Greetings ranchhands...
I encountered a question, and I can't seem to get the rules straight:
You're supposed to evaluate what the final value of k would be:
1. int i = -1;
2. int j = i >>> 31;
3. int k = j & 51;
Now, isn't -1 (as an int) is shown as:
1111 1111 1111 1111
If that's the case, isn't a right shift supposed to bring in 0's (ie not preserve the sign), thus making the result 1?
0000 0000 0000 0001
The value of j after 3. would be 1:
0000 0000 0000 0001
&0000 0000 0011 0011
0000 0000 0000 0001
Conversely, if it was i >> 31, then 1's would fill in from the left, keeping it at -1?
1111 1111 1111 1111
I need to get these rules down, since they will obviously be on the test...thnx!
tem
Hi Peter,
so, from you've said, and the answers provided for this question, you can have some flexibility in deciding whether calling method OR the method expected to generate the exception should be enclosed in either try-catch block or in a throws statement? If ioCall is in a try-catch (and all ready to handle the exception), why even do anything to amethod at all? To me, if one function is expected to generate the exception, it would make sense to have that function handle its own errors, and leave it at that.
The test question I got was from Marcus Green's exams....
Good morning,
I was pondering over a test exam, and there's a question on exceptions that I wanted to clear up:
Given the following code
import java.io.*;
public class Th{
public static void main(String argv[]){
Th t = new Th();
t.amethod();
}
public void amethod(){
try{
ioCall();
}catch(IOException ioe){}
}
}
What code would be most likely for the body of the ioCall method
1) public void ioCall ()throws IOException{
DataInputStream din = new DataInputStream(System.in);
din.readChar();
}
2) public void ioCall ()throw IOException{
DataInputStream din = new DataInputStream(System.in);
din.readChar();
}
3) public void ioCall (){
DataInputStream din = new DataInputStream(System.in);
din.readChar();
}
4) public void ioCall throws IOException(){
DataInputStream din = new DataInputStream(System.in);
din.readChar();
Now, I understood one could handle exceptions in one of two ways:
-put the function that might create the exception in a "try" block, then put some catch statements to handle the exception
- in declaring the function, have it "throw" the exception that might occur, to indicate to the calling function that an exception has arisen
Since there's already a "try/catch" in place, I figured #3 would be fine. But the answer is #1- doesn't this seem "redundant"- to have not only a try/catch phrase to handle the exception, but also a "throws"? Am I interpreting this correctly?
tem
Hi there,
At my company, we're doing an interesting little conversion project, of converting c code into object-oriented java code. From that experience, it has helped to look primarily at the following in what defines a class:
its state (instance variables)
its behavior (methods)
what class it inherits from (if it's not directly a child of Object)
what interface it implements
That's my experience anyways.
Cheers,
Tod

Hello everybody,
I'm getting prepped to take the programmer exam, and I realize that the new versions are now in place (more difficult, need 61% to pass, etc).
I just took a Marcus Green exam and got 65% (a lot of borderline questions, will get 'em next time!); his exams are a bit old, but are they fairly indicative of the "new" exams?
Thanks...