Solved

JSP Parser

Posted on 2001-06-28
4
1,093 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Navigation is an important part of web design from a usability perspective. But it is often a pain when it comes to a developer’s perspective. By navigation, it often means menuing. This is less theory and more practical of how to get a specific gro…
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…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now