How to Fix a JSP Syntax Error

JavaScript is a scripting language that was developed by Netscape, and is widely used in hundreds of web pages and applications all over the world. Just like other programming languages, JavaScript requires the use of very specific syntax or structured text to ensure that commands execute properly when performing a programmed task. A single typo, or omission of a symbol or command can destroy the whole program, and cause other errors in the application. In most cases, to fix a syntax error in JavaScript or Java Server Pages is as simple as correcting typos. Before you can fix the syntax error, you must isolate and locate the line of code which has caused the problem.

Method A:

 

Open SDK console application on your computer. Click “File” and “Open” and open the Web application you want to repair.

Click “File” and “Compile” on the menu bar or the “Compile” button on the tool bar. Wait for the application to compile the code in your application.

Go to the Web page editor application. Create a new Web page in the application. Insert code to link to the JavaScript or JSP application. Save the Web page to a folder on your computer.

Browse to the folder where you saved the script or compiled JSP application. Copy the file to the same folder that contains the Web page you created earlier.

Open the Web page in a major Web browser. Wait for the browser to attempt to load the page and then display an error message. Record the line number the Web browser reports as containing a syntax error.

Open the Web page in other major Web browser applications. Find the line of number which contains the same code as all messages reported by the browser programs. Test the page in Internet Explorer, Firefox and Chrome to ensure the script or application is compatible with major browsing platforms.

Open the SDK console application. Open the source file for the script or application. Scroll to the line number reported in the browser error message. Retype command text or variables to repair the syntax error. Recompile the application or script and test again in all four major browsers.

 

Method B:

 

You can run Smartpcfixer to fix it automatically.

Smartpcfixer is a top-ranking error-resolution registry cleaner which will fix the computer errors and optimize the system settings. You can scan, clean, optimize, and keep your PC much healthier with it!

 

You can download Smartpcfixer here.

http://www.smartpcfixer.com/

Just run Smartpcfixer, click ‘quick scan’

After the scan is completed, click ‘repair all’ button.