This page provides the solution for syntax errors in JSP files when running the analysis.
Release | Yes/No |
---|---|
8.3.x | |
8.2.x | |
8.1.x | |
8.0.x | |
7.3.x |
RDBMS | Yes/No |
---|---|
Oracle Server | |
Microsoft SQL Server | |
CSS3 | |
CSS2 |
Below is the step-by-step scenario leading to the problem:
- Discover the source and deliver the application.
- Accept the delivery and run the analysis.
- Check the analysis log to see whether there are syntax errors in the log.
The impact of the problem on the analysis or the dashboard is: Files having these syntax errors will be skipped and would not be analyzed.
To fix the problem, proceed as follows:
- We need to find the exact syntax which is leading to the warning. to do that.
- Double click on the warning in the log, you will get the window as shown above.
- Pick up file name, source line, source column.
- Syntax error should be around this line in the file, remove the few occurrences of the syntax.
- We can try to analyze the file alone without this syntax (remove the lines from the source) and confirm that this is the line creating the syntax issue.
- Once we know the syntax which is leading to syntax warning. We can use text replacement to replace this syntax in the analysis.
- See following page on how to create text replacements CMS - J2EE Technology options.
- If you have multiple cases then we need to create a generic regular expression which covers all the cases CMS - Regular Expressions on how to create regular expressions.
- If the above did not help then exclude the file which reports the syntax error from the analysis.
Text Replacement
Line which was the cause of the syntax error
<s:select id="dtclinkind" name="dtclinkind" list="#{'N':'No','Y':'Yes'}" />
Using a text replacement of the form:
- Regex: <s:select.*?>
- Type: Perl
- replacing text: <s:textfield id="replaceid" name="replaceid" maxlength="4" cssClass="ui-inputText" />
Impact of the solution on the analysis or the dashboard is: Files with this syntax will be analyzed.
Ticket # 5014
! Documentation referred above are of 8.0 but the process is same in 7.3