When i run my app to open the particular jsp page, it showed the following exception:

org.apache.jasper.JasperException: /xx.jsp (19,16) equal symbol expected.

The 19th line in the jsp file is the following:

<s:a Admin Page>href="http://localhost:8080/MyStruts2/bloggingns/ShowBlogAdminPage"</s:a>

On removing the line, it worked fine. What is the mistake in this line?

有帮助吗?

解决方案

It's completely backwards, and it should be obvious it looks like no other JSP tag you've ever used.

<s:a href="http://localhost:8080/MyStruts2/bloggingns/ShowBlogAdminPage">
  Admin Page
</s:a>

Unrelated, but if this is an internal link, e.g., within the same site, it makes zero sense to use (a) the full URL, it's an action, and (b) the <s:a> tag at all. Prefer:

<a href="<s:url action='ShowBlogAdminPage' />">Admin Page</a>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top