HTTP Status 500 – Internal Server Error


Type Exception Report

Message Unable to compile class for JSP:

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

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

An error occurred at line: [47] in the jsp file: [/shqip/templates/teknologji/add-comments-tmpl.jsp]
Duplicate local variable sb
44: 					%>
45: 				</div>
46: 				 
47: 				<%StringBuffer sb=new StringBuffer();  
48: 				for(int i=1;i<=5;i++){  
49: 					sb.append((char)(int)(Math.random()*79+23+7));  
50: 				}  


An error occurred at line: [51] in the jsp file: [/shqip/templates/teknologji/add-comments-tmpl.jsp]
Duplicate local variable cap
48: 				for(int i=1;i<=5;i++){  
49: 					sb.append((char)(int)(Math.random()*79+23+7));  
50: 				}  
51: 				String cap=new String(sb);  
52: 				%> 
53: 			
54: 				<div id="articleCommentsArea">				


Stacktrace:
	org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
	org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:213)
	org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:522)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:392)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:362)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:346)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:603)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Note The full stack trace of the root cause is available in the server logs.


Apache Tomcat/9.0.19