Errors in Stuts2 appfuse app in Eclipse

杀马特。学长 韩版系。学妹 提交于 2021-02-19 07:24:17

问题


I have build a Stuts2 multimodule app using Appfuse archetype from Eclipse Juno.

It works fine when ran through MVN Jetty:run.

But When I try to validate the project in Eclipse , it is giving me so many errors I am going to copy the errors here can someone please help me resolve them?

Getting Error :

Syntax error on token ""><s:param><s:text name="", ; expected    in  src/main/webapp/scripts/login.js

Syntax error on token "<", invalid MultiplicativeExpression  line 34  in src/main/webapp/scripts/login.js

Can someone please help with these errors?


回答1:


It's ok, because it's not a javascript code it has <script type="text/javascript"> tag where the code is. The file is a JSP file. JSP files usually have extension .jsp but there's no restriction to use extension for file name. JSP files or fragments being included to the main JSP file doesn't need to be validated, but if you want the tags to be recognized by IDE you should use JSP taglib directive at the top of the file

<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

and may be others. It doesn't change the application itself but allows you to validate fragments like a normal JSP.



来源:https://stackoverflow.com/questions/25664091/errors-in-stuts2-appfuse-app-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!