[ Team LiB ] Previous Section Next Section

Q&A

Q1:

I marked my pages as not being safe for threading. Why do some users still see data belonging to other users?

A1:

Usually these situations happen because different servlets and JSPs are sharing objects that aren't thread-safe. Remember that the JSP/servlet engine ensures only that a specific JSP or servlet will be accessed by one thread at a time. You might need to synchronize on any shared objects to make sure that only one user at a time can access the object.

Q2:

I asked the JSP engine to precompile a page. Why didn't it compile the page?

A2:

The precompile option is only a hint to the JSP engine. It is up to the JSP engine whether or not to precompile the page. You need to set the appropriate flag in your servlet engine to do this.


    [ Team LiB ] Previous Section Next Section