Functions :
Java Code:
String halaman = request.getParameter("halaman");
	public String getPage(String param){
		if(halaman.equals(param)) 
		{ 
			return "class='current'";		
		}
	}
Call It :
Java Code:
<li <%= getPage("administrasi"); %> ><a href="index.jsp">Administrasi</a></li>
Returns Error :
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 3 in the jsp file: /operator/menu.jsp
Illegal modifier for the variable getPage; only final is permitted
1: <%
2: String halaman = request.getParameter("halaman");
3: public String getPage(String param){
4: if(halaman.equals(param))
5: {
6: return "class='current'";
An error occurred at line: 16 in the jsp file: /operator/menu.jsp
The method getPage(String) is undefined for the type menu_jsp
13: <h2>Welcome To Admin Site</h2>
14: <div id="topmenu">
15: <ul>
16: <li <%= getPage("administrasi"); %> ><a href="index.jsp">Administrasi</a></li>
17: <li <%= getPage("transaksi"); %> ><a href="#">Transaksi</a></li>
18: <li <%= getPage("dealer"); %> ><a href="dealer.jsp">Dealer</a></li>
19: <li <%= getPage("gateway"); %> ><a href="#">Gateway</a></li>