Hi All!

I'm trying to call a method defined in a jsp that is in my webcontent web application.

I placed

<%@include file="method.jsp"%>

in the jsp from where I want to call the method.

I get an exception saying:

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 247 in the jsp file: /replaceBlob.jsp
The method replace(String, char, String, String) is undefined for the type replaceBlob_jsp
5 Years
Discussion Span
Last Post by stultuske

why would you even want to have complete methods in a jsp file?
to have a single line of java code in your jsp, even though it's not very good practice, now that I could still understand, but an entire method?


a recursive method in order to build a replace statement for mysql. How can you do recursion in a jsp file and at the same time get parameters from request.getparameter()? I get errors


you should avoid having java code in your jsp at all.
I think you may want to switch into using servlets and jsp, instead of just jsp.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.