Solved

JSP Parser

Posted on 2001-06-28
4
1,113 Views
Last Modified: 2013-11-18
Hello

I need some way of parsing a JSP file and checking for programming features that don't comply with company standards .. eg SQL Updates in the JSP file etc. This needs to fit into a larger Java program that does the same sort of thing on other files (Currently uses JavaCC grammar for the Java Files). Does anyone know of an easy way of doing this .. eg any JSP Grammar for JavaCC or ANTLR?

Thanks
0
Comment
Question by:lawrie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 2

Expert Comment

by:bagi112599
ID: 6235805
One way:
When you compile JSP, it creates an .java source file as a corresponding servlet source. It has exact same functionality as your JSP. So, instead of veifying your JSP you could verify generated .java file using your tool, e.i JavaCC grammar.

cheers,bagi
0
 
LVL 1

Author Comment

by:lawrie
ID: 6235953
I thought of this as an option, but there was two problems. Firstly any messages that I generate when errors are found become quite confusing, since they don't relate back to what the developer submitted, and secondly, I would have to compile them, since it has to be checked before it is run on a server.

Thanks anyway
0
 
LVL 2

Accepted Solution

by:
bagi112599 earned 200 total points
ID: 6238275
0
 
LVL 1

Author Comment

by:lawrie
ID: 6664402
Not quite what I wanted, but the best try I got.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
String array comparison 4 58
going to wrong jsp page 2 70
passing enum to a method 4 52
Eclipse neon2 "Java build path" correctness 7 44
Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question