Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Zhiyong Sun

Greenhorn
+ Follow
since Nov 24, 2002
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 Zhiyong Sun

The path MUST begin with a "/" and is interpreted as relative to the current context root. This is defined in the Servlet API.
However, I tested this funciton without "/" and it still works fine. Also, in the example code from that Minning Published SCWCD Study Kit, it also did not use "/".
Can anybody clarify this?
Add a block like this in the conf\server.xml file corespondingly.
<Context path="/chapter01" docBase="chapter01"
debug="0" reloadable="true" privileged="true"/>
In the Mock Test from JWeb+, there is a question like this:
Which of the following statements are correct? and the answer given is "Implementing SingleThreadModel ensures your servlet is thread safe, while I think the other answer "Servlets that not implement SingleThreadModel are not thread safe." is correct.
I wonder whether I am right.
Also in another Mock Test from Javaranch like this
"If you have a class that is accessed by a Servlet implementing the
SingleThreadedModel, no additional controls for synchronization are needed
to protect resources and are considered threadsafe."
The answer is false, which I think is correct. Implementing SingleThreadModle does not 100 percent ensures a servlet thread safe as we know.
Can anybody confirm my doubt for the first qusetion?
I tested both of them with Tomcat4.12 and both of them works fine.