Leonard Fischer

Ranch Hand
+ Follow
since Apr 17, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Leonard Fischer

Hello Everyone. Can anyone give me an example which results in a non-null value for the request attribute: javax.servlet.forward.path_info?

I've been able to get values for the other four request attributes: javax.servlet.forward.request_uri, javax.servlet.forward.context_path, javax.servlet.forward.servlet_path, and javax.servlet.forward.query_string. I forward to a page with the following code:

In the destination page, I display the request attributes as follows:

So this is fine, but no matter how I change the mappings in web.xml, and no matter what parameters I pass (in the browser address bar, or in the <jsp:forward>) I always end up with a null value for javax.servlet.forward.path_info.

I'd appreciate any help in getting a non-null value for javax.servlet.forward.path_info. Many thanks!
Sorry, I haven't had time to try this yet.

But the Head First Servlets and JSP book, page 466, says it pretty emphatically, that <c:url> does URL rewriting, but not URL encoding... then <c:params> to the rescue for URL encoding.

I'm really curious about why they say this (in the book), and why anyone would WANT to do URL rewriting but NOT URL encoding.

Thanks, Sebastian; that makes sense, and it answers my question somewhat.

Unfortunately, it seems that <c:out> has no var attribute. I'm new to JSTL, but for now, I can't see how to use <c:out>'s escapeXml abilities to put the result into a VAR.

Also, I'm not sure <c:out>'s escapeXml is the same as "encoding".

It would be interesting to get a String like "http://a.b.com?one two three" encoded using a JSTL tag, and into a variable using the var attribute.

Actually, though, I can't figure out how to do this. Seems like <c:url> does it, but by then, it's "too late"; we've already accessed a URL. It would be nice to do the encoding for the sole purpose of getting the encoded thing into a variable.
Sebastian, thank you very much for your response to the second question.

I'm still really curious about my first question:

Why would anyone want to do URL rewriting, and at the same time, NOT want to do URL encoding?
Hello Everyone,

I'm back, almost 6 weeks after passing SCJP 1.6. The job search has been a miserable experience. But I am enjoying my studies for SCWCD, which I hope to take in a few months.

And now, my first SCWCD question:

From what I read, when we use <c:param> in the body of a <c:url>, this performs URL encoding (e.g. changing a space to a plus sign). Apparently, if we don't use <c:param>, <c:url> will do URL rewriting (adding session info to the URL), but will NOT do URL encoding.

Assuming the above is true, I'm curious... why would anyone want to do URL rewriting, and at the same time, NOT want to do URL encoding? Why would anyone use <c:url> without one or more <c:param>'s?

Also, is there some reason the syntax was decided upon this way; I would think it would be more natural to have an attribute, like encodeURL="true", for <c:url>. It seems strange to me that the default, for <c:url> is: URL rewriting yes, URL encoding no.

Hi Asmita,

I might suggest studying more than one book. K&B is excellent, as we all know. Still, a different perspective (through another book) can be helpful. I benefitted a lot from the Mughal / Rasmussen book, which came out in a new edition less than a year ago. (Important: do NOT buy the older edition of Mughal / Rasmussen... make sure it's the very recent edition, for Java 1.6.)

I think it really helps to write a lot of little code snippets. We've probably all heard this advice many times, but I think it's true.

Best of luck!
12 years ago
On June 18, 2009, I passed the SCJP 1.6 exam with a score of 88.9%. I would love to find a good organization in Southern California (yes, pretty much ANYWHERE in Southern California) which is well-managed, with good people and a solid business, where I can work in Java (development, support, or QA... I've done them all). I am very flexible when it comes to salary, and I would be enthusiastic about the work. I really do enjoy working with Java. I'll paste my resume below, since apparently *.doc files aren't allowed as attachments. Thank you very much.

Seth Cohen

Seeking software work (development / support / QA) in Southern California. Strong in Java, experienced in SQL and C++. Excellent work ethic, excellent written communication. Presently studying Java technologies.

June 2009: Sun Certified Programmer for Java 1.6. Score: 88.9%.

March 2009 – May 2009: U. S. Department of Commerce
Census Enumerator
Using a handheld PC, updated a mapping database with information about residence locations.

May 2006 – present: mid-life time off
A deeply meaningful, once-in-a-lifetime luxury of a long period away from work. I always planned to return to software work, and I completed UC Irvine Extension classes in C#, ASP.NET, Data Communications, and Business Analysis.

August 2001 – May 2006: FileNet Corporation
Principal Engineer
Worked in third-level support. Took ownership of customer problems with FileNet P8, a workflow and content-management J2EE app, and worked these problems with Development and Customer Service. Wrote QA test scripts and programs, and developed a servlet / JSP model-view-controller application for P8. Worked with SQL Server 2000, T-SQL, Oracle, PL/SQL, OLAP databases, JSPs and servlets, WebLogic and WebSphere.

March 2001: Sun Certified Programmer for Java 1.2.

March 2000 – June 2001: Migration Software Systems Limited
Senior Consulting Engineer
Developed web sites for Migration clients. Worked with HTML, CSS, Java, JavaScript, VBScript, classic ASP, SQL Server 2000, T-SQL, Oracle, and PL/SQL.

May 1991 – March 2000: Unitech Research, Inc.
Member of Technical Staff (software developer)
Helped develop a FORTRAN math library, and several COBOL compilers, for the HP-UX, Solaris, AIX, and Windows platforms. These were written in assembler, C, and C++.
From July 1996 to September 1999, I worked in Visual C++ / Microsoft Foundation Classes. I wrote a Japanese text editor (a development environment for Hitachi COBOL), and a program that allowed users to graphically design workflow diagrams.
I enjoyed communicating with our Japanese clients. I made six business trips to Japan, and studied Japanese speaking and writing.

March 1980 – April 1991: MAI / Basic Four Corp.
Senior Engineer
MAI / Basic Four was a good-sized software company, with thousands of employees. A major company product was the Business BASIC language, which is still in use. I was one of the principal designers and developers of this Business BASIC language itself. The software I wrote was a blend between an interpreter and a compiler. It was written in C and several assembly languages, and ran on UNIX and Windows.

September 1977 – March 1980: University of California at Irvine
Master of Science in Information and Computer Science.
Taught computer science classes. Teaching Assistant in Fall, Winter and Spring, and Instructor during the summers.

September 1973 – June 1977: Harvard College
Bachelor of Arts cum laude in Applied Mathematics.

12 years ago
Deepak, many thanks!
12 years ago
Hello Everyone,

Thanks to all of you for looking at the ins and outs of Java with me. I passed SCJP yestersday with 88.9%.

By the way, I can't swear to it, but I really think that one of the questions had an extra right bracket } at the end of a class definition. "Compilation fails" was NOT one of the options! This was a pretty small class. I'm not complaining about the question and I think I got that one right, but it really may be that the exam question was not "vetted" as it should have been.

I know this is a difficult question, and maybe an inappropriate one for this SCJP forum. Can anyone recommend a decent web site, when it comes to looking for Java jobs in Southern California? Of course, these are difficult times, and I realize that SCJP is basically a steppingstone to more advanced study, as opposed to a guarantee that someone is a good developer. Still, if anyone knows of any worthwhile web sites, I'd really appreciate that.

Best wishes to all for a nice weekend!

12 years ago
Hello Everyone. Given two methods, m1(int[] ia) { ... } and m2(int... ia) { ... }, does anyone know if there is something that we can pass to m1, that we can NOT pass to m2?

I guess it's easy to answer that question in reverse: we can pass 2 (or 2, 3) to m2, and we can't pass either of those to m1. Of course, we can pass an int[] to both m1 and m2. But how about going in the other direction... can we pass anything to m1 that we cannot pass to m2?

Hello everyone. In the following code,

I'm surprised that each of the following two statements compiles:

Of course, each of these 2 statements will cause a ClassCastException at runtime.

I realize that the compiler has to go with the reference type. All that matters is that new Animal() is of type Animal. And you should be able to cast an Animal reference to an Animal subclass. You're telling the compiler to trust you.

Still, in this case, it seems that "new Animal()" would have to be of type Animal. I can't think of any unusual case (e.g. new Animal() { <anonymous class> } ) that would return a Cat.

So it seems to me that the compiler is following the general rule of allowing us to cast an Animal to a Cat, even though in this case, I think it would be impossible for the statement to run successfully. So maybe this is a special case that the compiler should catch?


I am very grateful for all these responses!

Thanks especially to Samrat.

I do have one follow-up question. I was astonished when Samrat mentioned that clicking the PREVIOUS button can cause the exam client to get stuck. (!!!)

I assume that this refers to (clicking the previous button, only when the previous item would be a drag-and-drop question)? I hope this doesn't mean: "never click the previous button".

Sorry to dwell on the worst-case, but has anyone had actual experience with the exam client being "stuck"? Have the Prometric workers been helpful?
Hello Everyone,

I plan to take the SCJP exam in late June. I'd be interested in any information about the dreaded drag-and-drop questions I've heard about, where your work gets wiped out if you go back and review the question. Does anyone have any "tips" about how to review a question, without losing your work on that question? I may simply decide to never review a drag-and-drop question, but any info anyone has would be appreciated!