When I´m trying to run a program I get this message:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [93] in the generated java file: [C:\xampp\tomcat-9.0.65-windows-x64\apache-tomcat-9.0.65\work\Catalina\localhost\OneCloud\org\apache\jsp\newjoiners\Acs_jsp.java] Syntax error, insert "}" to complete ClassBody
An error occurred at line: [243] in the generated java file: [C:\xampp\tomcat-9.0.65-windows-x64\apache-tomcat-9.0.65\work\Catalina\localhost\OneCloud\org\apache\jsp\newjoiners\Acs_jsp.java] Syntax error, insert "}" to complete Block
An error occurred at line: [243] in the generated java file: [C:\xampp\tomcat-9.0.65-windows-x64\apache-tomcat-9.0.65\work\Catalina\localhost\OneCloud\org\apache\jsp\newjoiners\Acs_jsp.java] Syntax error, insert "}" to complete Block
An error occurred at line: [243] in the generated java file: [C:\xampp\tomcat-9.0.65-windows-x64\apache-tomcat-9.0.65\work\Catalina\localhost\OneCloud\org\apache\jsp\newjoiners\Acs_jsp.java] Syntax error, insert "}" to complete Block
An error occurred at line: [261] in the generated java file: [C:\xampp\tomcat-9.0.65-windows-x64\apache-tomcat-9.0.65\work\Catalina\localhost\OneCloud\org\apache\jsp\newjoiners\Acs_jsp.java] Syntax error on token "}", delete this token
Stacktrace: Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:213) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:509) org.apache.jasper.compiler.Compiler.compile(Compiler.java:397) org.apache.jasper.compiler.Compiler.compile(Compiler.java:367) org.apache.jasper.compiler.Compiler.compile(Compiler.java:351) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:605) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:327) javax.servlet.http.HttpServlet.service(HttpServlet.java:764) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:428)
I already switched tomcat from 8 to 9 nothing help and also under servlet/WEB-INF there is no folder with servlet. Did somebody has an idea what I could do?
package org.apache.jsp.newjoiners;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import com.onecloud.atos.*;
import java.util.*;
import com.onecloud.atos.servlet.ServletUtils;
import com.onecloud.atos.Auth;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
public final class Acs_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
private static java.util.List<String> _jspx_dependants;
public java.util.List<String> getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
response.setContentType("text/html; charset=UTF-8");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write(" \n");
out.write("\n");
out.write("\n");
out.write("<!DOCTYPE html>\n");
out.write("<html>\n");
out.write("<head>\n");
out.write("\t <meta charset=\"utf-8\">\n");
out.write("\t <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n");
out.write(" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n");
out.write("\t\n");
out.write("\t <link rel=\"stylesheet\" href=\"//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css\">\n");
out.write("\n");
out.write(" <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->\n");
out.write(" <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\n");
out.write(" <!--[if lt IE 9]>\n");
out.write(" <script src=\"https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js\"></script>\n");
out.write(" <script src=\"https://oss.maxcdn.com/respond/1.4.2/respond.min.js\"></script>\n");
out.write(" <![endif]-->\n");
out.write("</head>\n");
out.write("<body>\n");
out.write("\t<div class=\"container\">\n");
out.write(" \n");
out.write(" \n");
out.write("\n");
out.write(" \t<!-- TODO Session support --> \n");
out.write("\n");
out.write(" ");
Auth auth = new Auth(request, response);
auth.processResponse();
if (!auth.isAuthenticated()) {
out.println("<div class=\"alert alert-danger\" role=\"alert\">Not authenticated</div>");
}
List<String> errors = auth.getErrors();
if (!errors.isEmpty()) {
out.println("<p>" + StringUtils.join(errors, ", ") + "</p>");
if (auth.isDebugActive()) {
String errorReason = auth.getLastErrorReason();
if (errorReason != null && !errorReason.isEmpty()) {
out.println("<p>" + auth.getLastErrorReason() + "</p>");
}
}
out.println("<a href=\"LoginPage.jsp\" class=\"btn btn-primary\">Login</a>");
} else {
Map<String, List<String>> attributes = auth.getAttributes();
String nameId = auth.getNameId();
String nameIdFormat = auth.getNameIdFormat();
String sessionIndex = auth.getSessionIndex();
String nameidNameQualifier = auth.getNameIdNameQualifier();
String nameidSPNameQualifier = auth.getNameIdSPNameQualifier();
session.setAttribute("attributes", attributes);
session.setAttribute("nameId", nameId);
session.setAttribute("nameIdFormat", nameIdFormat);
session.setAttribute("sessionIndex", sessionIndex);
session.setAttribute("nameidNameQualifier", nameidNameQualifier);
session.setAttribute("nameidSPNameQualifier", nameidSPNameQualifier);
String relayState = "https://onecloud-onboarding-poc.myatos.net/OneCloud/sso/LoginPage";
if (relayState != null && !relayState.isEmpty() && !relayState.equals(ServletUtils.getSelfRoutedURLNoQuery(request)) &&
!relayState.contains("/LoginPage.jsp")) { // We don't want to be redirected to login.jsp neither
response.sendRedirect("https://wacstg.das.myatos.net/portal/Redirect?SAMLRequest=request&RelayState=relayState");
} else {
if (attributes.isEmpty()) {
out.write("\n");
out.write("\t\t\t\t\t<div class=\"alert alert-danger\" role=\"alert\">You don't have any attributes</div>\n");
out.write(" ");
}
else {
out.write("\n");
out.write("\t \t\n");
out.write(" ");
Collection<String> keys = attributes.keySet();
for(String name :keys){
out.println("<tr><td>" + name + "</td><td>");
List<String> values = attributes.get(name);
for(String value :values) {
out.println("<li>" + value + "</li>");
}
out.println("</td></tr>");
}
out.write("\n");
out.write("\t\t\t\t\t\n");
out.write("\t\t\t\n");
out.write(" \n");
out.write("\t\t\t}\n");
out.write("\t\t}\n");
out.write("\t\t\n");
out.write("\t</div>\n");
out.write("</body>\n");
out.write("</html>\n");
out.write("\n");
out.write("\n");
}
}
}
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
else throw new ServletException(t);
}
} finally {
_jspxFactory.releasePageContext(_jspx_page_context);
}
}
}