Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Finding string literals

 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have several velocity templates developed by many developers in last few
months. We have used application.properties to get all the messages, labels, text etc, however there might be few sting literals still existing in those
templates.

I was wondering if there was any way of having an automated test to find
string literals in velocity templates (Consider it as JSP if velocity confuses). Is there any?

Any inputs/pointers would be greatly appreciated.

TIA,
- Manish
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are those HTML pages valid XML? If yes, could you just run the files through a SAX handler that chokes if characters() gets called with a non-whitespace string. You could also try to use HtmlUnit, JTidy, or something like that to parse the HTML into a DOM tree and do assertions against that.
 
reply
    Bookmark Topic Watch Topic
  • New Topic