tags:

views:

379

answers:

2

First here:

<html xmlns="http://www.w3.org/1999/xhtml"&gt;

I get the warning: "Undefined attribute name (xmlns)." What's the best way to solve this in Eclipse?

I also get an error here "Missing quotes for attribute value (it refers to center)

<table align=center>

<%  if(action!=null && "sendemail".equals(action)){
         if(!"".equals(error)){%><tr><td colspan=2 align=center>
            <span class="redtext"><%=error%></span></td></tr> <%
         }
    }
%>

two questions: how do I fix this and where do I set DOCTYPE?

Thanks

+1  A: 

Which Eclipse editor type are you using to view the file? Judging by those error messages, you're using the XML editor, which won't get you far, since that sort of JSP isn't an XML file.

If you're using the Java EE version of Eclipse, then open the JSP with the JSP editor. If you're using the standard Java version, then go and download the Java EE version :)

skaffman
+1  A: 

You can't use the xmlns attribute unless your file's DOCTYPE indicates that it's XHTML and not plain HTML.

nitind