Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
链接不适用于jsp和jquery(如何在jsp页面的锚定标记中链接websiteurl)_Jsp - Fatal编程技术网

链接不适用于jsp和jquery(如何在jsp页面的锚定标记中链接websiteurl)

链接不适用于jsp和jquery(如何在jsp页面的锚定标记中链接websiteurl),jsp,Jsp,在我的本地主机中,它正在工作。但是在我的网站www.step2java.com中,Java核心链接不起作用。 在部署后的my public_html中,他们像Step2java一样放置项目根文件夹。请告诉我如何解决这个问题。我只使用jsp和jquery web.xml index.jsp menu.jsp 问题似乎在于如何链接到menu.jsp文件。输入jsp目录后,此文件的路径不正确。下面是我看到的错误消息: org.apache.jasper.JasperException:/javaHom

在我的本地主机中,它正在工作。但是在我的网站www.step2java.com中,Java核心链接不起作用。 在部署后的my public_html中,他们像Step2java一样放置项目根文件夹。请告诉我如何解决这个问题。我只使用jsp和jquery

web.xml index.jsp menu.jsp
问题似乎在于如何链接到menu.jsp文件。输入jsp目录后,此文件的路径不正确。下面是我看到的错误消息:

org.apache.jasper.JasperException:/javaHome.jsp行:2,列:1未找到文件[/jsp/menu.jsp]


我猜您正在使用的jsp:include标记应该指向menu.jsp而不是/jsp/menu.jsp。

告诉我们发生了什么以及您尝试了什么。您显然没有阅读SO FAQ或任何其他帮助部分。如果你还有其他阅读方面的疑问,请参阅编辑历史。我在我的网站step2java.com中添加了我的链接r不工作首先,我们没有互联网之旅。描述,使用语言!第二,请使用jsp文件夹结构中的humanticgrammar.menu.jsp,比如webapp jsp--menu。jsp@SoumyaRanjan您是否看到与我看到的相同的错误消息?这是一个内部服务器错误。您是否正在记录或查看服务器端错误是什么?
 <web-app>
  <display-name>Archetype Created Web Application</display-name>

  <welcome-file-list>
  <welcome-file>/index.jsp</welcome-file>
  </welcome-file-list>
</web-app>
<%@include file="/jsp/menu.jsp" %>
<%@include file="/navigation-left/nav_home.jsp" %>
<%@include file="/containerPage/container_Home.jsp" %>
<div class="navigation-right"> </div>
<link href="<%=request.getContextPath() %>/css/style.css"
            rel="stylesheet" type="text/css" />
 <script  src="<%=request.getContextPath() %>/js/js_library/jquery-1.10.2.js"></script>
 <script  src="<%=request.getContextPath() %>/js/js_library/jquery-1.3.2.min.js"></script>
  <script  src="<%=request.getContextPath() %>/js/navigation.js"></script>

<body>
<div id="header"><div class="container">
<div id="header-logo"> <a title="step2java.com" href="#"><div ><img  style="border: 0 none;height: auto;max-width: 34%;vertical-align: middle;"alt="" src="<%=request.getContextPath() %>/images/logo.jpg" ></div> </a></div>
<h1 style="margin-top: 43px;">Step2Java</h1>
</div></div>
<div id="menu"><div class="container">
<ul><li class="menu-allround"> <a href="<%=request.getContextPath()%>">Home</a></li><li class="menu-allround"> <a href="<%=request.getContextPath()%>/jsp/javaHome.jsp">Java Core</a></li><li class="menu-allround"> <a href="#">Spring</a></li><li class="menu-topround"> <a href="#">Hibernate</a><div class="dropdown" id="hibernate-menu"><div class="tut-title">Hibernate Tutorials</div><div class="dropdown-item"> <div>1. <a href="#">Hibernate Core</a></div></div></div></li><li class="menu-topround"> <a href="#">Others</a><div class="dropdown" id="misc-menu"><div class="dropdown-item"><ol><li><a href="#">Java MongoDB</a></li><li><a href="#">jUnit</a></li><li><a href="#">jQuery</a></li></ol></div></div></li></ul>

</div></div>

</body>