Interview Tips Interview Tips, Interview Questions and Answers

6Sep/100

Will You Lower Your Salary Expectations

If you do find yourself in the latter category, consider the following factors before deciding to lower your salary requirement -- and by how much.

1. Urgency: "If there's less pressure to find something immediately, then [job seekers] may be able to stick closer to their ideal salary expectation – it just may take longer to find something," says Greg Masiewich of IQ Partners, a Canadian recruiting firm. "If someone needs [a job] immediately, then often lowering salary expectations will help them do that."

2. Competition: "An industry where there is a ton of competition and candidates are plentiful may result in people needing to lower salary expectations," Masiewich says. "If they're in a specialized industry where their skills are still in high demand, then they may not have to ... it comes back to supply and demand."

3. Benefits: Consider what extras -- such as an excellent 401(k) plan, flexible scheduling or a family-friendly corporate culture -- are worth to you. Benefits can make up for a smaller salary.


4. Your bottom line: Although you may be willing to take a pay cut in order to get a new job, it's important to figure out your bottom line -- what you need to make in order to pay your bills and live comfortably -- before accepting a lower salary. If you accept too little money, you may find yourself unable to make ends meet or resenting your  low pay, and you'll wind up looking for a new job all over again.

5. Negotiation:  "If someone does have to accept a lower level position or take a pay cut, I think they should try and negotiate an offer that contains some sort of pay for performance provision," advises Linda Duffy, president of Leadership Habitude, a career strategy consultancy based in Irvine, Calif. "If they can show the prospective employer their added value and help the employer achieve some specific goals, then they would receive a bonus or bump in base pay on a date certain. Not all companies are willing to make that deal, but it doesn't hurt to ask."

23Dec/090

How can I enable session tracking for JSP pages if the browser has disabled cookies – jsp interview questions

We know that session tracking uses cookies by default to associate a session identifier with a unique user. If the browser does not support cookies, or if cookies are disabled, you can still enable session tracking using URL rewriting. URL rewriting essentially includes the session ID within the link itself as a name/value pair. However, for this to be effective, you need to append the session ID for each and every link that is part of your servlet response. Adding the session ID to a link is greatly simplified by means of of a couple of methods: response.encodeURL() associates a session ID with a given URL, and if you are using redirection, response.encodeRedirectURL() can be used by giving the redirected URL as input. Both encodeURL() and encodeRedirectedURL() first determine whether cookies are supported by the browser; if so, the input URL is returned unchanged since the session ID will be persisted as a cookie.
Consider the following example, in which two JSP files, say hello1.jsp and hello2.jsp, interact with each other. Basically, we create a new session within hello1.jsp and place an object within this session. The user can then traverse to hello2.jsp by clicking on the link present within the page. Within hello2.jsp, we simply extract the object that was earlier placed in the session and display its contents. Notice that we invoke the encodeURL() within hello1.jsp on the link used to invoke hello2.jsp; if cookies are disabled, the session ID is automatically appended to the URL, allowing hello2.jsp to still retrieve the session object. Try this example first with cookies enabled. Then disable cookie support, restart the brower, and try again. Each time you should see the maintenance of the session across pages. Do note that to get this example to work with cookies disabled at the browser, your JSP engine has to support URL rewriting.

hello1.jsp
<%@ page session=\"true\" %>
<%
Integer num = new Integer(100);
session.putValue("num",num);
String url =response.encodeURL("hello2.jsp");
%>
<a href=\'<%=url%>\'>hello2.jsp</a>

hello2.jsp
<%@ page session="true" %>
<%
Integer i= (Integer )session.getValue("num");
out.println("Num value in session is " + i.intValue());
%>