0
votes

I have created a simple template and has below simple scripting code.I am able to create a page with this template page is but page is not rendering and showing blank page.

Am i missing anything from below script??

<!-- <%@include file="/libs/foundation/global.jsp"%><%
%> -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@page session="false" contentType="text/html; charset=utf-8";language="java";pageEncoding="utf-8" %><%
%>
<html>
    <head>
    <title>This is Title</title>
    </head>
    <body>
        <h1>This is Body</h1>
    </body>
</html>

Exception: 29.05.2015 09:40:56.985 ERROR [0:0:0:0:0:0:0:1 [1432872656382] GET /editor.html/content/ecampusHome.html HTTP/1.1] org.apache.sling.scripting.jsp.taglib.CallTag Error while executing script body.jsp

Please help me.

Thanks, Kishore

1
Have you checked the resourceType of /content/ecampusHome . Is this getting resolve correctlyVivek Dhiman
I have provided sling:resourceType value as "ecampus/components/contetpage" instead of "/apps/ecampus/components/contetpage" in template.Kishore G
it's showing correct value what ever i have given during the template creation.I am using AEM 6.0 right ,i am missing anything??Kishore G
Please post the definition of your page template and your page component. Or even better, use the package manager and pack all of the related data in a content package.d33t

1 Answers

0
votes

Try replacing the semi-colons between attributes in the page directive with spaces, like so:

<%@page session="false" contentType="text/html; charset=utf-8" language="java" pageEncoding="utf-8" %>

BTW: I was able to quickly debug the code sample with the excellent AEM Fiddle, freely available as part of the ACS AEM Tools package:

AEM Fiddle in action