Solved

JSP Parser

Posted on 2001-06-28
4
1,133 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

630 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