• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jsp Parser API for the sake of Internationalization  RSS feed

 
Ramya Chowdary
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • 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 ]
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • 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: 42972
73
  • Mark post as helpful
  • send pies
  • 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 <cut> tag.
[ July 19, 2008: Message edited by: Ulf Dittmer ]
 
Ramya Chowdary
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!