Leonid Shchervinsky

Ranch Hand
+ Follow
since Sep 07, 2006
Merit badge: grant badges
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 Leonid Shchervinsky

unless one is about to get SCBCD anyway, then it is a steal...

Where would one get objectives for the new version of this exam?

Thanks
Leonid
Thanks Bauke:
This is exactly what I was looking for!
Leonid
Where is the bartender when you need one? :-)
Or a better yet, a book author...
That is exactly why I copied the classes folder, to try to figure out what that paragraph from the HFSJ means...
something silly like:
http://localhost:8084/HFSJ/classes/chapter01/Ch1Servlet.class
or
http://localhost:8084/HFSJ/classes/chapter01/Ch1Servlet

without doing any dd mapping

Here is a quote:

"And what about security? Do you really want the client to know exactly how things are structured on your server? Do you want the to, say attempt to navigate directly to the servlet without going through the right pages or forms? Because if the end-user can see the real path, she can type it into her browser and try to access it directly."

So what I have attempted to do is to copy classes folder from WEB-INF into the root of the app and tried to access class directly using its 'real path'. If I add .class extension, the browser tries to download the servlet file. Without the extension, it gives me 404...

May be that this paragraph is just a hypothetical argument, and not possible in reality anyway.

Thanks
Leonid
In HFSJ on page 47 it says that it might be possible to navigate directly to the servlet .class file and execute it. It is true? If so, how would one set this up? I know that this is not the way to go for many reasons...

Thanks
Leonid
See if you are getting wrong answers in the same category on the mock exams, and do some more review in that category.

Keep on taking same mock exams over again until you get all of them over 90%. Chances are that the questions that you miss on the mock exam will be on the real exam.
HFSJ - "Expressions become the argument to an out.print() - pg. 289
===================================================================

in the paragraph below it says "... prints to the implicit response PrintWriter out."

Is this a typo? I think it should say "JspWriter" instead of "PrintWriter".

Thanks
Leonid
[ November 29, 2008: Message edited by: Leonid Shchervinsky ]
Hi guys:

I cannot figure out where the ATTR_TEMPLATE is coming from in the code on page 547 within the doTag() method:

out.print("<select");
out.print(String.format(ATTR_TEMPLATE, "name", this.name));
out.print(String.format(ATTR_TEMPLATE, "size", this.size));
out.println(">");

Thanks
Leonid
Why the SCSNI certification?

Where does it fall in the skim of Sun certifications?

The NetBeans expert? Should not we as developers be IDE experts? How does this certification help me market myself in the field?

Thanks
Leonid
Thanks, Ankit for trying to help me out.

Am I totally off base here?

Are there any bartenders on this forum?

Thanks
Leonid
or for a quick test, you can just print the map:

class MapTest {

public static void main(String[] args) {
Map<Integer, String> map = new TreeMap<Integer, String>();
map.put(1, "Apple");
map.put(2, "Mango");
map.put(3, "Banana");
map.put(4, "Peach");

//Set<Map.Entry<Integer, String>> entry = map.entrySet();
//
//for (Map.Entry pairs : entry) {
// System.out.println("Key:" + pairs.getKey() + "Value:" + pairs.getValue());
//
//}

System.out.println(map);

}
}
By the time an object finishes being initialized and its reference is returned by the new key word, all blank final variables must be given a value.

Constructor code is the last chance you have to give your blank final instance variable a value.

Originally posted by Ankit Garg:
Leonid why don't you try to understand. There are two subMap methods in TreeMap and two subSet in TreeSet class.

TreeMap subMap(Object start, boolean inclusive, Object end, boolean inclusive)
SortedMap subMap(Object start, Object end)

TreeSet subSet(Object start, boolean inclusive, Object end, boolean inclusive)
SortedSet subSet(Object start, Object end)

In your code just change these lines

SortedMap<String, String> submap;
submap = map.subMap("a", "h");

to

TreeMap<String, String> subMap;
subMap = map.subMap("a", true, "h", true);



Thanks, Ankit:

I am trying :-)

I have just changed the two lines as you recommended:

TreeMap<String, String> submap;
submap = map.subMap("a", true, "h", true); // error

Getting: "incompatible types: found NavigatableMap, required: TreeMap"

Can you please run this code and see what is up?

Thanks
Leonid