Kirill Shepitko

Greenhorn
+ Follow
since Oct 18, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kirill Shepitko

Hello!

Does someone know, how to be able to use static class members in Velocity?
Googled a little, also read intro-article about Velocity in March issue of Javaranch Journal - but didn't find a solution.
It is quite easy to get access to object, but how to get access to class?

P.S. I'm using Struts+Velocity
19 years ago
Have changed my name to real.
And thanks for help anyway!
Hello!

My situation: on a site written in Java there're articles containing HTML. On the page A only the announcement of article is given (maximum 500 symbols). Ir size of article ir bigger than 500 symbols, it is cut down to 500 symbols, and after that goes link "...more" to page B, where visitor can read the whole page.

The problem is that articles contain HTML. For example, if cut text looks like "<table><tr><td><b> Hello, click <a href="...">here", it will spoil the whole page
I'm now searching for a tool, which could "optimize" HTML code - kicking off unclosed tags. I looked up jTidy (Java implementation of W3C HTMLTidy), but it seems too complicated - and at last, I just didn't find the feature I need in jTidy javadocs!

Maybe, you could give me an advice?

P.S. I'm thinking about alternative decision - to simply clean up ALL tags from text, using regular expression. But this will be a solution, which I hope I won't be forced to use :/