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

Recommended Answers

All 4 Replies

And the request.getParameter() stops working

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.