Kevin Alterman

Greenhorn
+ Follow
since May 21, 2005
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 Kevin Alterman

I don't see why you need to synchronize at all. The new object is being created locally within the scope of the function (on the stack) so how does another thread even have access to it?
14 years ago
struts-config is for struts, I'm not sure how you're associating it with Log4J which is a logging framework. Do you have log4j.properties in your classpath?
14 years ago
I migrated from Tomcat 3.2 to 4.1 and now I get this message whenever a struts action is being invoked. I looked at the Tomcat log and this is the stack trace:

javax.servlet.ServletException: Wrapper cannot find servlet class org.apache.struts.action.ActionServlet or a class it depends on
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:891)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
...
----- Root Cause -----
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1443)

Now, I've tried copying struts.jar into \tomcat\common\lib to no avail. The system classpath already points to struts.jar but I know Tomcat ignores that. If I modify setclasspath.bat to include %CLASSPATH% Tomcat does not start. So my question is this.. how can I define my own classpath for use with Tomcat?
14 years ago
I upgraded my Tomcat from 4.1 which was working great to 5.0.28. Now I am unable to access any JSPs. I get the following error:

HTTP Status 403
Access to the specified resource () has been forbidden.

I can't get into the Tomcat manager or Administration because even that gives me a 403.

I tried adding the following line to \conf\catalina\localhost\mycontext.xml under the context tag:

<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127.0.0.1"/>

but it did not help. I've tried looking at the policy file catalina.policy but did not find anything of interest. Any ideas how to solve this problem. Thanks
14 years ago
JSP
Thanks I changed it
14 years ago
When you say "environment" variable what exactly do you mean? Are you talking about Operating System Environment variables? Those are not accessible since your Java App is running the context of the JVM.

You can pass an OS environment variable to a java program is through a command line argument to the program
14 years ago
JSP
Would someone suggest a free JSP and Struts plugin for Eclipse? The only thing I've found so far are NitroX which charges for Struts support and MyEclipse which is lower priced but not free. I work for a cheap a$$ company so it has to be FREE.
Thanks
If this is the quality of the questions being asked please let me know which company it is because I will make note to never interview there.
14 years ago
Say you've researched that your skills and experience are worth 85k on the market and for whatever reason your current employer is paying you only 70k, would you lie about your current salary knowing that nobody is going to give a 15k raise?

How can one break the cycle of forever being out of sync with your market worth because you made the mistake of staying in a much lower paying job for a few years. Opinions?
14 years ago
I don't think anything over 85k is realistic for SoCal area unless you have over 10 yrs experience. I have about 6 yrs myself and I was told 70k (low) to 85k (high). I think there is a surplus of people looking for mid level J2EE (5-7 yrs experience) jobs right now so you may not get over 80k
14 years ago
I looked up the Salary survey for a Sr. Java Developer on salary.com and it says the base salary is $102K. However, a recruiter told me to expect $75-80K which seems way off the survey data. I would like to know who is right.

I have 6 yrs Software Development experience in Java/C++. Worked on many different areas including JSPs, Struts, Servlets, EJBs etc. but I've been with the same company for the past 6 years so I'm just researching what my skills are worth in the market right now

Cheers,
Kevin
14 years ago
The answer should be choice b, 1.

First off since "name" is not explicitly initialized to null I will assume these are class level variables that are implicitly initialized ;-)

Now, a new object is created when newName is assigned "Nick" but it is immediately dereferenced since newName is assigned to another string object "Jason". The "Nick" object is eligible for GC since it is in a dereferenced state. name is assigned to new String object with value "Frieda" but the reference is transferred to newestName so it will not be dereferenced when name is assigned null.. so "Frieda" is not eligible for GC since it can still be used using the newestName reference ;-)

Kevin

Originally posted by HS Singh:
How many objects are eligible for garbage collection once execution has reached the line labeled Line A?

String name;
String newName = "Nick";
newName = "Jason";
name = "Frieda";

String newestName = name;

name = null;
//Line A

a) 0
b) 1
c) 2
d) 3
e) 4

Can someone take a look at this. Thanks

14 years ago