Forums Register Login

Royally stumped with jstl <c:if test of request.method

+Pie Number of slices to send: Send
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:



+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
It gets weirder. If I put

anywhere in the <form> block the error goes away. Yes, I had to add at the top


What is going on?
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
eclipse did not show errors, but I ended up having to provide an empty stylesheet for the transform command:
+Pie Number of slices to send: Send
I used eq instead of == after commenting out transform/xml stuff and I get the same error.
He does not suffer fools gladly. But this tiny ad does:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2761 times.
Similar Threads
Communicate with the server without a browser.
Need help on understanding ww:token
Can you read this?
Drop Down Menu Problem
Can't get RequestDispatcher forward() method or response.sendRedirect() to work
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 02:25:45.