Solved

JSP Parser

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
split string containing \r\n in Java 46 43
Way to decrease size of apk file 9 65
use lov values 2 49
pagenation logic how it is working in my code 1 27
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…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

813 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

19 Experts available now in Live!

Get 1:1 Help Now