Reputation: 2763
When I try to call the method after importing the class, like below, I get method is undefined error.
<%@page import="td.TourHelper"%>
<%=getTourName()%>
But, when I directly call the method, it works.
<%=td.TourHelper.getTourName()%>
Any clues?
Upvotes: 0
Views: 3939
Reputation: 80166
Change
<%=getTourName()%>
to
<%=TourHelper.getTourName()%>
The first option will work if your container supports static imports provided you change the page directive as below
<%@page import="static td.TourHelper"%>
Upvotes: 2