Page tree
Skip to end of metadata
Go to start of metadata
Description

 This page provides the solution for syntax errors in JSP files when running the analysis.

Observed in CAST AIP

 

Release
Yes/No
8.3.x (tick)
8.2.x(tick)
8.1.x(tick)
8.0.x(tick) 
7.3.x(tick) 
Observed on RDBMS
RDBMS
Yes/No
Oracle Server(tick) 
Microsoft SQL Server(tick) 
CSS3(tick)
CSS2(tick) 
Step by Step Scenario

Below is the step-by-step scenario leading to the problem:

  1. Discover the source and deliver the application.
  2. Accept the delivery and run the analysis.
  3. Check the analysis log to see whether there are syntax errors in the log.
Impact of the Problem

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:

  1. We need to find the exact syntax which is leading to the warning. to do that.
    1. Double click on the warning in the log, you will get the window as shown above.
    2. Pick up file name, source line, source column.
    3. Syntax error should be around this line in the file, remove the few occurrences of the syntax.
    4. 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.
  2. Once we know the syntax which is leading to syntax warning. We can use text replacement to replace this syntax in the analysis.
    1. See following page on how to create text replacements CMS - J2EE Technology options
    2. 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.
  3. 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

Impact of the solution on the analysis or the dashboard is: Files with this syntax will be analyzed.

Notes/comments

Ticket # 5014

! Documentation referred above are of 8.0 but the process is same in 7.3

Related Pages

 

  • No labels