I have a jsp-page
<%@page import="org.springframework.web.servlet.ModelAndView"%>
<%@page import="mvc3.helpers.Utils"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="false" %>
<html>
<head>
<title>View Topic</title>
</head>
<body>
<fieldset>
<legend>${topic.getName()}</legend>
<div class="display-label-field"><b>Content:</b>${topic.getText()}</div>
<div class="display-label-field"><b>Comments count:</b>${topic.getCommentsCount()}</div>
<div class="display-label-field"><b>Last time updated:</b>${topic.getTimeLastUpdated()}</div>
</fieldset>
<p>
<%=Utils.actionLink("Comment Topic", "Topic", "AddComment", Integer.toString( topic.getId() ) ) %>
<%=Utils.actionLink("Back to Topic List", "", "home", null)%>
</p>
The problem is, that ${topic.getName()} works fine, but <%=Utils.actionLink(“Comment Topic”, “Topic”, “AddComment”, Integer.toString( topic.getId() ) ) %> causes the topic cannot be resolved error. How can I deal with this issue?
If you have set attribute topic in request then do