| Author |
finding attributes in a jsp
|
ch hemasundar
Greenhorn
Joined: Jul 01, 2008
Posts: 6
|
|
Hi all.. can any body help me .. how to find the tags in a jsp using any testing f/w? thanks and regards Hemasundar
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26152
|
|
Hemasundar, If using JUnit, you could read in the JSP and search for a regular expression: <\\w+ If you have XHTML compliant JSPs, you could use PMD and write rules to go against the JSP.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
ch hemasundar
Greenhorn
Joined: Jul 01, 2008
Posts: 6
|
|
Hi Jeanne, I want to test a java_server_page whether it is having a page attribute or not. In the process, i think one solution is java server page parsing. But how to load a java_server_page in a class and parse it? Could you please provide me an example if possible? Thanks in advance hemasundar
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26152
|
|
Hemasundar, My answer was about static analysis of a JSP. I don't know how to do dynamic analysis without actually running it. If you can write it, how about creating a test servlet that forwards to the JSP?
|
 |
 |
|
|
subject: finding attributes in a jsp
|
|
|