This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am using eclipse to build jsp pages that run on weblogic 9. The problem I am having is that code that works in all my other pages seems to be failing for my login.jsp page.
If I use in my <body>:
it complains that POST is an invalid character constant. It then also whines about the LoginContext loginContext line saying there is a javax.servlet.ServletException as well. If I change the double equal sign (==) in the <c:if test line to a single equal sign (=) sign, the errors go away, but of course that is wrong. I tried cutting and pasting the lines into a file, removing login.jsp and then putting back in the lines, but that did not help. I stripped down the file so that all it had in the body was this ><c:if stuff as well, and that did not help. I am baffled as this stuff works fine in my other jsp pages. I have even commented out all the java code in the ><c:if line and removed all imports that are at the top for it as well with no luck. I am hoping this is just something stupid on my part, and your help would be greatly appreciated.
Here is the full page code as it stands now:
Joined: Apr 18, 2005
I see thet extra great than sign (>) on the first line, but I do not see that in eclipse. I don't think it is in my login.jsp. It must have gotten in during pasting the code there I suspect.
Joined: Apr 18, 2005
It gets weirder. If I put
anywhere in the <form> block the error goes away. Yes, I had to add at the top
Firstly, I'd string recommend strongly against mixing JSTL/EL and scriptlets on a JSP page, use scriptlets or use JSTL, not both. They were never meant to co-exist. Though I'm not thinking that's part of the issue.
Just for giggles, have you tried to see what happens if you use eq in place of == ?
P.S. You can edit your post to remove the extraneous character.