How do I include a Java class in a JSP page. Say I have a searchresults.jsp page in which Search.class has a set of results. I just want to see Search.class in searchResults.jsp instead of doing java Search @ command prompt.
posted 11 years ago
Use the useBean tag in your JSP (For oading Java classes). First, write a method in your Java program (Search.java?) to return the results (can be any array / object / any valid Java data type) instead of doing it in the main().
Next, in the JSP program, give the useBean tag as such. The useBean tag is like this.