Solved

JSP Parser

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
countAbc challenge 9 50
Systems talking to each other 5 110
ArrayIndexOutOfBoundException 9 39
Problem to page 4 29
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

743 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

14 Experts available now in Live!

Get 1:1 Help Now