mte01
asked on
Function Re-use in JSTL
Hey experts,
Is there a way to make a user-defined function in JSTL in order to do something such as percentage computation or in order not to repeat a block of JSTL code; or is the only way to do that is to write this function in the java bean or object class, and then call it from JSTL?? any help on the best method to do this??
Is there a way to make a user-defined function in JSTL in order to do something such as percentage computation or in order not to repeat a block of JSTL code; or is the only way to do that is to write this function in the java bean or object class, and then call it from JSTL?? any help on the best method to do this??
I think that the best way would be to create a custom tag (similar to JSTL) by your own.
ASKER
>>suprapto45
Is there an easier way, or how difficult is creating tags of my own?
Is there an easier way, or how difficult is creating tags of my own?
ASKER
>>suprapto45
Note please that I am only modifying few pages in a project that is not mine, so I can't manipulate much the project's libraries
Note please that I am only modifying few pages in a project that is not mine, so I can't manipulate much the project's libraries
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
How do I know which JSP version this project is on & which JSTL version I am using?
(I am confused a bit also about the differences between JSTL 1.0,1.1 & 1.2)
(I am confused a bit also about the differences between JSTL 1.0,1.1 & 1.2)
For jsp version ,check this
http://www.jguru.com/faq/view.jsp?EID=35085
http://www.jguru.com/faq/view.jsp?EID=35085
Sorry,
I just went back. Well I think that you should have enough information by now ;)
David
I just went back. Well I think that you should have enough information by now ;)
David
>& which JSTL version I am using?
Which directive are you using ?
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%> // this is for JSTL 1.0
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> this is for JSTL 1.1
Which directive are you using ?
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%> // this is for JSTL 1.0
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> this is for JSTL 1.1
ASKER
It turns out that I am using JSTL 1.0 with JSP 2.0; I guess the info that you gave is fine; many thanks for your help guys!