Solved

Limited text output

Posted on 2006-11-13
3
174 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JSP Popup page 2 116
java beans and EJBs 5 192
sortaSum challenge java 17 171
listing all functions in JavaScript 19 203
An article on effective troubleshooting
This problem is more common than not and I will show you some things to check to solve this problem.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

810 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