wood burning stoves 2.0*
The moose likes JSP and the fly likes Royally stumped with jstl <c:if test of request.method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Royally stumped with jstl <c:if test of request.method" Watch "Royally stumped with jstl <c:if test of request.method" New topic
Author

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

Mr.David Shapiro
Ranch Hand

Joined: Apr 18, 2005
Posts: 51
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:



Mr.David Shapiro
Ranch Hand

Joined: Apr 18, 2005
Posts: 51
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.
Mr.David Shapiro
Ranch Hand

Joined: Apr 18, 2005
Posts: 51
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?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60765
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mr.David Shapiro
Ranch Hand

Joined: Apr 18, 2005
Posts: 51
eclipse did not show errors, but I ended up having to provide an empty stylesheet for the transform command:
Mr.David Shapiro
Ranch Hand

Joined: Apr 18, 2005
Posts: 51
I used eq instead of == after commenting out transform/xml stuff and I get the same error.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Royally stumped with jstl <c:if test of request.method
 
Similar Threads
Can you read this?
Need help on understanding ww:token
Communicate with the server without a browser.
Can't get RequestDispatcher forward() method or response.sendRedirect() to work
Drop Down Menu Problem