- This topic has 9 replies, 2 voices, and was last updated 18 years, 6 months ago by
Riyad Kalla.
-
AuthorPosts
-
rroyMemberIn MyEclipse 5.1.0 GA, I ran the JSP validator on some files and got an error at the </form> tag line saying that there is no <form> tag when in fact there is. I believe it has something to do with the fact that the form in inside of a table. I have 2 JSP files that use a form inside of a table and they both show the same validation error.
Here’s a snippet of the JSP file that shows the problem.
<pre>
<table id=”attInput” border=0 cellpadding=3 width=100%>
<tr valign=top>
<form name=upload target=result method=post enctype=’multipart/form-data’ action=’../servlet/FileAttachmentServlet’>
<td width=100%><input name=Import value=”” type=file style=”width:360″></td>
<td><input type=submit onclick=’return(validate(document.all.Import, “A file name”));’ value=”Accept” style=”width:90;”></td>
</form>
</tr>
</table>
</pre>
The error appears on the </form> tag saying “No start tag (<form>)”.January 15, 2007 at 1:43 pm #264595
Riyad KallaMemberI cannot reproduce an error, but I can reproduce a warning (because your form is in an invalid location). Try a new JSP file with the contents:
<%@ page language="java" pageEncoding="ISO-8859-1"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body> <table id="attInput" border=0 cellpadding=3 width=100%> <tr valign=top> <form name=upload target=result method=post enctype='multipart/form-data' action='../servlet/FileAttachmentServlet'> <td width=100%> <input name=Import value="" type=file style="width:360"> </td> <td> <input type=submit onclick='return(validate(document.all.Import, "A file name"));' value="Accept" style="width:90;"> </td> </form> </tr> </table> </body> </html>
Did that work?
January 15, 2007 at 1:54 pm #264601
rroyMemberNo, it did not work for me. I still get the error, no start tag. Here’s my installation details.
*** Date:
Monday, January 15, 2007 2:52:55 PM EST** System properties:
OS=Windows2003
OS version=5.2
Java version=1.4.2_13*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 5.1.0 GA
Build id: 20061111-5.1.0-GA*** Eclipse details:
Eclipse SDKVersion: 3.2.1
Build id: M20060921-0945Eclipse Graphical Editing Framework
Version: 3.2.1.v20060921
Build id: 20060921-1617Eclipse Platform
Version: 3.2.1.r321_v20060921-b_XVA-INSQSyMtx
Build id: M20060921-0945Eclipse RCP
Version: 3.2.1.r321_v20060801-2ekW2BxmcpPUOoq
Build id: M20060921-0945Eclipse Java Development Tools
Version: 3.2.1.r321_v20060905-R4CM1Znkvre9wC-
Build id: M20060921-0945Eclipse Plug-in Development Environment
Version: 3.2.1.r321_v20060823-6vYLLdQ3Nk8DrFG
Build id: M20060921-0945Eclipse Project SDK
Version: 3.2.1.r321_v20060801-tQ1w49KnTArT0FZ
Build id: M20060921-0945Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
4400_54
-vm
C:\WINDOWS\system32\javaw.exeJanuary 15, 2007 at 2:09 pm #264620
Riyad KallaMemberHmm that’s odd.
Can you try and download our All-In-One installer for 5.1, install it, then run it, creating a new workspace and then try my sample file again?
January 16, 2007 at 7:00 am #264649
rroyMemberThe same thing happens using the All-In-One installer for 5.1. I created a new Enterprise Application Project with a Web Project Module and then ran validation on the jsp directory which contained a file with your code in it. It gave the same No start tag (<form>) error on the form end tag.
January 16, 2007 at 7:53 am #264653
Riyad KallaMemberDid you make sure to create a new workspace? Something fishy is going on here because I cannot reproduce this on any of our test setups (Windows or Linux) using clean installs. So there is some small difference going on here and I’m trying to narrow down what it is.
January 16, 2007 at 8:06 am #264655
rroyMemberI did create a new workspace and used the root directory of the project for it. My previous workspace was under the eclipse directory.
January 16, 2007 at 8:12 am #264656
Riyad KallaMemberOh, try the default File > New > Project > Web Project, with the default settings (where you have a WebRoot directory) and don’t change anything. Then see if that works. We had a bug where the validator and autocomplete wouldn’t work when the project root was also the webroot and I wonder if that is what is going on.
January 16, 2007 at 10:01 am #264671
rroyMemberUsing the All-In-One setup, I created a new Web Project using all the defaults, then I created a jsp folder under WebRoot and added the file with your code. JSP validation still gave the error about no start tag.
January 17, 2007 at 6:04 pm #264725
Riyad KallaMemberrroy,
I checked the HTML spec and the validator is right… that is not a valid location. I changed it to this and the error cleared up:<%@ page language="java" pageEncoding="ISO-8859-1"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body> <form name=upload target=result method=post enctype='multipart/form-data' action='../servlet/FileAttachmentServlet'> <table id="attInput" border=0 cellpadding=3 width=100%> <tr valign=top> <td width=100%> <input name=Import value="" type=file style="width:360"> </td> <td> <input type=submit onclick='return(validate(document.all.Import, "A file name"));' value="Accept" style="width:90;"> </td> </tr> </table> </form> </body> </html>
Does thta work for you in your case, or do you need the form tag in that invalid location? Most browsers will allow it, so if you need it, my suggestion would be to mark the file as “Excluded” from validation (right click -> MyEclipse -> Exclude from Validation)
-
AuthorPosts