Reputation: 11
I am completely new to jsp, and I have been stuck on this for quite a while.
I am developing a jsp page, a.jsp, in which I need to do some checking on a parameter x obtained from request.getHeader(). The method for checking is already written on b.jsp in <%...%> tags and I would like to somehow call that method on a.jsp.
I'm not sure what I can do here since I am not suppose to change b.jsp, just redevelop a.jsp. Is there any way I can call a method from b.jsp in a.jsp?
Upvotes: 0
Views: 2543
Reputation: 1548
Include the b.jsp into the a.jsp and you can access all your methods.
<%@ include file="a.jsp"%>
Upvotes: 1