Google App Engine won't deploy when using <%@ include file="/file.jsp" %>

10 views
Skip to first unread message

user1691063 via StackOverflow

unread,
Mar 9, 2013, 6:15:50 AM3/9/13
to google-appengin...@googlegroups.com

The project compiles and runs perfectly on my local computer. Whenever I try to deploy I get this error:

Unable to update:
com.google.appengine.tools.admin.JspCompilationException: Failed to compile the      generated JSP java files.
at com.google.appengine.tools.admin.Application.compileJavaFiles(Application.java:803)
at com.google.appengine.tools.admin.Application.compileJsps(Application.java:760)
at com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:592)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:370)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:53)
at com.google.appengine.tools.admin.AppCfg$UpdateAction.execute(AppCfg.java:1163)
at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:232)
at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:109)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:105)

I googled a lot and applied every possible solution I found. I made sure Eclipse is using the JDK and not JRE. I even tried puting the tools.jar from the jdk into the lib/shared of AppEngineSDK. Nothing worked, so I decided to try another approach - I used the Guestbook demo as a start point. The Guestbook demo deployed perfectly when unmodified. But then I modified it. I move the code below from guestbook.jsp in separate .jsp file (includement.jsp). And then I use <%@ include file="/includement.jsp" %> in guestbook.jsp. And this is it. It works perfectly on my local computer. But it won't deploy giving me the error shown above.

Here is the code I moved:

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.List" %>
<%@ page import="com.google.appengine.api.users.User" %>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>
<%@ page import="com.google.appengine.api.datastore.DatastoreServiceFactory" %>
<%@ page import="com.google.appengine.api.datastore.DatastoreService" %>
<%@ page import="com.google.appengine.api.datastore.Query" %>
<%@ page import="com.google.appengine.api.datastore.Entity" %>
<%@ page import="com.google.appengine.api.datastore.FetchOptions" %>
<%@ page import="com.google.appengine.api.datastore.Key" %>
<%@ page import="com.google.appengine.api.datastore.KeyFactory" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<%
String guestbookName = request.getParameter("guestbookName");
if (guestbookName == null) {
    guestbookName = "default";
}
pageContext.setAttribute("guestbookName", guestbookName);
UserService userService = UserServiceFactory.getUserService();
User user = userService.getCurrentUser();
if (user != null) {
  pageContext.setAttribute("user", user);
%>

I have been struggling for a week now and I am pretty much desperate. It just doesn't make any sense to me that it works locally and won't get deployed.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/15309621/google-app-engine-wont-deploy-when-using-include-file-file-jsp
Reply all
Reply to author
Forward
0 new messages