user994165
user994165

Reputation: 9502

JSP parse error

This the first time I've tried using JSP and I'm getting a parse error at the link in the last line. I already have a ";".

<%@page contentType="application/atom+xml; charset=utf-8" %><%
String
baseURL = request.getScheme() + "://" + request.getServerName() +
request.getServerPort()+ ":" + request.getContextPath();
Integer id=0;
String link="";
%>

<feed xsi:schemaLocation="http://www.w3.org/2005/Atom ../XMLschemas/atom/atom.xsd"
    xmlns="http://www.w3.org/2005/Atom" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <title type="text">1</title>
    <id><%=baseURL%></id>
    <updated>2012-04-23T15:49:17Z</updated>
    <link rel="self"
        href="https://example.com" />
    <entry>
        <id><%link = baseURL + "/" + Integer.toString(++id); %><%=link%></id>

in Weblogic:

feed.jsp:69:16: Syntax error, insert ";" to complete Statement
                <id><%link = "good_subjectdoc_relativeurl.xml"%></id>

The rest of the feed:

    <title type="text">good_subjectdoc_absoluteurl_samebase_singledocname.xml
        </title>
        <updated>2012-04-23T15:49:17Z</updated>
        <author>
            <name>TEST</name>
        </author>
        <contributor>
            <name>TEST</name>
        </contributor>
        <link rel="alternate" type="application/xml" title="Subject Document"
            href="<%=link%>" />
            <category term="TEST" />
                <content>
                                    Content             
                              </content>
    </entry>

Upvotes: 1

Views: 2605

Answers (1)

BalusC
BalusC

Reputation: 1108632

feed.jsp:69:16: Syntax error, insert ";" to complete Statement

As the error says, you need to insert ; to complete statement on the following line:

<id><%link = "good_subjectdoc_relativeurl.xml"%></id>

Thus, so:

<id><%link = "good_subjectdoc_relativeurl.xml";%></id>

Upvotes: 1

Related Questions