Solved

Limited text output

Posted on 2006-11-13
3
172 Views
Last Modified: 2012-05-05
How would I limit the amount of html characters printed to a page, so that it only displays say 50?

So if the html generates a 100 characters in a paragraph, how would I limit that to 50 and add a link "more.." to the string?

many thanks.
0
Comment
Question by:Eternal_Student
  • 2
3 Comments
 
LVL 10

Expert Comment

by:mbvvsatish
ID: 17928920
you can use str.substring(0,50); with out.println (servlet/jsp) or with document.write() [javascript]
 
0
 
LVL 10

Accepted Solution

by:
mbvvsatish earned 250 total points
ID: 17928930
0
 
LVL 18

Author Comment

by:Eternal_Student
ID: 17955522
What about using JSTL?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
We have come a long way with backup and data protection — from backing up to floppies, external drives, CDs, Blu-ray, flash drives, SSD drives, and now to the cloud.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now