facebook

jsp compile errors for no reason

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #203812 Reply

    Paul Stanton
    Member

    i have just installed eclipse M6 and my eclipse 030700RC2

    in the following jsp code snippet, i get the error

    expected %>”

    on line two. why?

    <code>…
    #1 <input type=”hidden” name=”buttonAction” value=”” />
    #2 <html:hidden property=”companyNo” value=”<%= request.getParameter(“companyNo”) %>” />
    #3 <table border=”0″>
    …</code>

    i do have the taglibrary initialised properly and the error does not appear under any other environment.

    #203833 Reply

    b0rg
    Member

    suppose there is a reason, the double quotes. try this:

    value='<%= request.getParameter(“companyNo”) %>’

    #203835 Reply

    Riyad Kalla
    Member

    wanto, you need to escape your inner double quotes around “companyNo”, i.e.

    #2 <html:hidden property=”companyNo” value=”<%= request.getParameter(\”companyNo\”) %>” />

    #203848 Reply

    No Operation
    Member

    Aye!

    This is one of the unlucky constructs in JSP, since if you use an expression inside a normal tag, you must not quote strings:

    
    <img src="<%= request.getParameter("image") %>" />
    

    awesome – thank you SUN 😉

    NOP

    #203857 Reply

    Riyad Kalla
    Member

    ugg… well thankfully we have MyEclipse to keep us straight instead of waiting for the compiler to die 😉

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: jsp compile errors for no reason

You must be logged in to post in the forum log in