Michael,
Thanks for your guidance. The numbers shown below corresponds to your number.
1. JSP expressions should NOT end with a semicolon!
I tried without the semicolon but still get the same compilation error.
2. Try removing the spaces from the URL:
You are right, removing spaces in the URL works. I was able to see the value
TEST in the logout.jsp
3. If your application uses sessions, you should use the response.encodeURL() method with your links. Otherwise, clients who do not support cookies will not be able to use your site.
I am using Request scope (not session). I will keep in mind your point in case I chose to use sessions.
4. You should use EL and JSTL instead of scriptlets...scriptlets are bad practice.
I tried the code shown by you under this and I get the message shown below. I think that is because when I installed Oracle JDeveloper tool I did not select JSTL.
The tag library
http://java.sun.com/jsp/jstl/core is referenced but not installed.
The prefix C is never used.
I'll look into it.
5. Lastly, I tried the code in the code block removing spaces as suggested by you. The problem of "The webpage cannot be found" still persist. This confirms your thinking that the Javascript in that URL causing the problem of not displaying logout.jsp page.
The question is how to make the code in #5 and/or # 1 above to work. I am using code #1 to pass the pageName value to logoutBean where I can check its value and disconnect the database (JDBC) connection depending on user response to the prompt - 'Are you sure you want to logout without approving'.