uh wouldn't it be just this, without the quotes o the name of variable. ?
Code:
<%@page import="myutil.*" %>
<%String input = request.getParameter("s1");%>
<%String occur = request.getParameter("s2");%>
<%int output=B.repeatCount(input,occur);%>
<%=input%>
I mean, you can't have a request parameter read from the URL, after a JSP has been compiled into a Java class, influence the generation of the Java class, so that the parameter entered becomes a literal string constant in the generated java class.
perhaps it might be possible to have something that would write out a jsp page inside your application folder, and then if the user invoked that generated jsp page, it would have the literal string value, i guess.