How to give space in jsp
- how to give space in jsp
- space in jsp page
- space jsp
You can insert white-spaces using: Character Entity References Edit: Seems to be a bug in the way spaces are handled by the EL parser.!
JSTL fn:trim() Function
In JSTL the fn:trim() function is used to remove the leading and trailing whitespaces in the given input or specified string.
The fn:trim() function also helps in properly cleaning up and standardizing the formatting of strings within the JSP.
In this article, we will see the detailed syntax and the parameters of this function.
We will also see the practical implementation in terms of examples.
Coderanch.com › java › insert-SPACE-JSP-expression.
Syntax of fn:trim() function
Where,
- ${fn:trim()}: JSTL expression used to remove the blank spaces from both ends of a given string.
- string: main input string value from which the whitespaces will be removed.
Example of fn:trim() Function
In this, we will see the use of fn:trim() in the JSP code example:
Output
Original String: GeeksGeeksLength before trim: 15
Trimmed String: GeeksforGeeks
Length after trim: 13
Output Screen of the JSTL fn:trim() Function:
Explanation of the above Program:
- inputString variable is initialized using the value " GeeksforGeeks ".
This inputString contains the whitespaces at bot