• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Jsp Parser API for the sake of Internationalization

 
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We've a site (WAP site)developed with lots of java code in between and lots of custom tags and jstl tags.

Now, We had a task of internationalization of those pages.We had to separate out the strings (as it is WAP, no'of string per page is less) in to any property file. As the pages are more than thousand ,manually doing them becoming very hectic.

I tried to do some R&D by parsing with the help of Regular Expression , but it turned out to be very hard .

Then, I started to search for JSP Parser API ,But couldnot find any.

Guys,Please Help (if I am asking in wrong forum please move it)
[ July 18, 2008: Message edited by: Pratap koritala ]
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Servlet/JSP API does not make available any API for this; it's a text processing problem. I'll move the question to a more appropriate forum.
 
Ulf Dittmer
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Without having put much thought into this, I'd say that you need to get hold of all text that is not inside of < ... > tags. How were you trying to do that?

Using regexps would be tricky, because angle brackets can be nested in JSPs. You may need to parse the file character by character, count the opening and closing angle brackets, and determine which parts are text being displayed, and which parts are markup (either HTML or JSP).

Of course, text to be displayed could also be inside of angle brackets, e.g. when using the <c:out> tag.
[ July 19, 2008: Message edited by: Ulf Dittmer ]
 
Ramya Chowdary
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply
 
I knew that guy would be trouble! Thanks tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic