精华内容
下载资源
问答
  • 编写3个JSP页面index.jsp、main.jsphead.jsp,在index.jsp和main.jsp页面中分别使用include指令静态嵌入head.jsp(导航栏)。导航栏head.jsp的运行效果如图所示。 (1) head.jsp <%@ page language="java" ...

    编写3个JSP页面index.jsp、main.jsp和head.jsp,在index.jsp和main.jsp页面中分别使用include指令静态嵌入head.jsp(导航栏)。导航栏head.jsp的运行效果如图所示。

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

    (1)	head.jsp
    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
    	<div>
    		<ul>
    			<li style="float: left;width:50px"><a>首页</a></li>
    			<li style="float: left;width:50px"><a>体育</a></li>
    			<li style="float: left;width:50px"><a>热点</a></li>
    			<li style="float: left;width:50px"><a>股市</a></li>
    			<li style="float: left;width:50px"><a>经济</a></li>
    		</ul>
    	</div>
    </body>
    </html>
    
    (2)	index.jsp
    
    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
    	<%@include file="head.jsp" %><br>
    	<p align="left">网页首页面</p>
    </body>
    </html>
    
    
    (3)	main.jsp
    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
    	<%@include file="head.jsp" %><br>
    	<p align="left">网页主页面</p>
    </body>
    </html>
    
    
    展开全文
  • 公共头head.jsp

    千次阅读 2018-07-11 10:00:46
    head.jsp: &lt;%@ page language="java" pageEncoding="UTF-8"%&gt; &lt;meta name="renderer" content="webkit"&gt; &lt;meta http-equiv="X-UA...
    head.jsp:
    
    <%@ page language="java" pageEncoding="UTF-8"%>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    
    <link href="${ctx}/css/base.css" rel="stylesheet" type="text/css" />
    <link href="${ctx}/css/index.css" rel="stylesheet" type="text/css" />
    <link href="${ctx}/css/styles.css" rel="stylesheet" type="text/css" />
    <%-- <link href="${ctx}/css/login/styles.css" rel="stylesheet" type="text/css" />
    <link href="${ctx}/css/resource/jquery-ui-themes.css" type="text/css" rel="stylesheet"/>
    <link href="${ctx}/css/resource/axure_rp_page.css" type="text/css" rel="stylesheet"/> --%>
    
    <script type="text/javascript" src="${ctx}/js/common/jquery-v1.10.2.js"></script> 
    <script type="text/javascript" src="${ctx}/js/common/common.js"></script>
    <script type="text/javascript" src="${ctx}/js/common/vue-resource.js"></script>
    <script type="text/javascript" src="${ctx}/js/common/vue.min.js"></script>
    <script type="text/javascript" src="${ctx}/js/common/index.js"></script>
    <script type="text/javascript" src="${ctx}/js/common/vue-router.js"></script>
    
    <script src="https://cdn.jsdelivr.net/npm/vue-resource@1.5.1"></script>
    在其他页面引入:<%@ include file="/view/header.jsp" %>

    展开全文
  • 我在搭建Tomcat7+1.8jdk+Maven webapp项目...消息 java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/ConditionalTagSupport 描述 服务器遇到一个意外的情况,阻止它完成请求。 Exception javax.servlet.Se

    我在搭建Tomcat7+1.8jdk+Maven webapp项目运行的时候,代码没有出现问题运行不报错,但是页面显示不出效果,并且报错:
    HTTP Status 500 – Internal Server Error
    Type 异常报告

    消息 java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/ConditionalTagSupport

    描述 服务器遇到一个意外的情况,阻止它完成请求。

    Exception

    javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/ConditionalTagSupport
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:348)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    cn.smbms.servlet.bill.BillServlet.query(BillServlet.java:261)
    cn.smbms.servlet.bill.BillServlet.doPost(BillServlet.java:83)
    cn.smbms.servlet.bill.BillServlet.doGet(BillServlet.java:56)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    cn.smbms.filter.SysFilter.doFilter(SysFilter.java:40)
    cn.smbms.filter.CharacterEncoding.doFilter(CharacterEncoding.java:51)

    当我注意查看报错信息的时候发现了一些关键字比如:
    jstl,从这里可以知道一些信息,可能是我们没有导入jstl.jar和standard.jar的包,
    我们可以尝试在maven里导入坐标:

    <dependency>
          <groupId>taglibs</groupId>
          <artifactId>standard</artifactId>
          <version>1.1.2</version>
        </dependency>
        <dependency>
          <groupId>javax.servlet.jsp.jstl</groupId>
          <artifactId>jstl</artifactId>
          <version>1.2</version>
        </dependency>
    

    如果没有效果,我们还可以把这两个架包放到Tomcat7的lib文件里面:
    在这里插入图片描述
    多方面尝试,因为项目里涉及的配置有很多,所以在这里我只是提供了一些解决方案,并不能提供"绝对真理"答案…

    展开全文
  • 完整错误信息HTTP Status 500 - javax.servlet.ServletException: File [/head.jsp] not foundtype Exception reportmessage javax.servlet.ServletException: File [/head.jsp] not founddescription The server ...

    完整错误信息

    HTTP Status 500 - javax.servlet.ServletException: File [/head.jsp] not found

    type Exception report

    message javax.servlet.ServletException: File [/head.jsp] not found

    description The server encountered an internal error that prevented it from fulfilling this request.

    exception

    org.apache.jasper.JasperException: javax.servlet.ServletException: File [/head.jsp] not found
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:584)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:454)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:168)
    org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
    org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1228)
    org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1011)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    com.auth.filter.AuthorizationFilter.doFilterInternal(AuthorizationFilter.java:77)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    com.auth.filter.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:115)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    com..activate.filter.ActivateFilter.doFilterInternal(ActivateFilter.java:52)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    root cause

    javax.servlet.ServletException: File [/head.jsp] not found
    org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:418)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:934)
    org.apache.jsp.interaction.online_jsp._jspService(online_jsp.java:246)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:431)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:168)
    org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
    org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1228)
    org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1011)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    com.auth.filter.AuthorizationFilter.doFilterInternal(AuthorizationFilter.java:77)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    com.auth.filter.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:115)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    com.activate.filter.ActivateFilter.doFilterInternal(ActivateFilter.java:52)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    note The full stack trace of the root cause is available in the Apache Tomcat/8.0.21 logs.

    Apache Tomcat/8.0.21

    错误原因

    JSP页面中使用了jsp:include语句:

    <jsp:include flush="false" page="/head.jsp" ></jsp:include>

    这个head.jsp文件不存在,结果就导致了这个问题!
    注意:如果flush=”true”,则会出现一个很诡异的问题Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING

    ===============================================
    PS:飞机上,一只鹦鹉对空姐说:“给爷来杯水”,猪也学鹦鹉,对空姐说:“给爷来杯水”,空姐大怒,将鹦鹉和猪都扔下了飞机。这时鹦鹉对猪说:“傻B了吧,爷会飞。”

    展开全文
  • /head.jsp" not found,这种异常而且页面可以正常跳转显示数据的话,但是后台就是报这个异常的话,那就说明你在controller中用了两次response到前台来,出现情况是controller方法上既用了@RequestBody注解方式...
  • 英文原版 Head.First.Servlets.and.JSP 高清,本书对于刚入门的人来说是不二选择
  • javax.servlet.ServletException: File [/WEB-INF/common/head.jsp] not found 2、错误原因 &amp;lt;jsp:include page=“head.jsp”&amp;gt;&amp;lt;/jsp:include&amp;gt; 3、解决办法 导入页面...
  • J2EE 2.JSP语法

    千次阅读 2018-10-12 21:00:58
    JSP语法 JSP 指令标记 JSP 动作标记 实验 实验2_2 JSP指令标记 实验2_3 JSP动作标记 SP语法 “&lt;%!”和“%&gt;”之间声明的变量在整个JSP页面内都有效,与“&lt;%!”、“%&gt;” 标记符在...
  • OReilly.Head.First.Servlets.and.JSP.2nd.Edition.Mar.2008.pdf
  • 上面报错提示的是org.apache.jasper.JasperException: /jsp/head.jsp (line: 1, column: 2) Page directive: illegal to have multiple occurrences of contentType with different values (old: text/html;...
  • Head.First.Servlet.JSP中文版 这是part2
  • Head.First.Servlets.and.JSP

    2011-09-13 19:44:28
    Head.First.Servlets.and.JSP
  • Head.First.Servlet.JSP中文版 共两卷,这是part1 下载全两卷才能解压缩
  • Head.First.Servlets.and.JSP,2nd.Edition.zip
  • 实验三 JSP内置对象和JavaBean 编写3个JSP页面login_1.jsp、server.jsp和loginSuccess.jsp。在页面login_1.jsp中的输入用户名和密码,单击“提交”按钮将输入的信息提交给页面server.jsp。在server.jsp页面中进行...
  • jsp引入头部.jsp和尾部.jsp

    千次阅读 2018-06-24 15:10:53
    在顶部&lt;%String path = request.getContextPath();String basePath =request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+...head.jsp"%&gt;中间代
  • 在写登入成功,转到初始页面的时候,意外地发现出现乱码 一开始还以为是页面那里没有弄好utf-8的格式,但回看了发现并不是那么回事。 最后发现原来是传进来的参数loginUser其实并没有username这个属性,应该是uname...
  • one.jsp <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>forw...
  • 消息 在 [14] 行处理 [/tag2.jsp] 时发生异常 描述 服务器遇到一个意外的情况,阻止它完成请求。 Exception org.apache.jasper.JasperException: 在 [14] 行处理 [/tag2.jsp] 时发生异常 11: <% 12: ...
  • 在做一个注册页面时,使用了validate插件,来方便前端校验,本来一切运行正常,畅快无比,可是在某个时刻之后,一直报错,找不到validate方法,等等,依据报错,我认为可能是jquery插件在validate之后进行了再次引入...
  • JSP 自我学习笔记2

    千次阅读 2016-11-26 09:28:07
    JSP 自我学习笔记2 一 .学习目标主要学习jsp中的jsp:include,jsp:forward,jsp:param
  • 我在WEB-INF下的某个页面里使用,竟然可以访问到? 这样也可以访问,用pageContext.request.contextPath/WEBINF/personal/yhhead.jsp就不行。
  • 问题: javax.servlet.ServletException: .../.jsp" not found 来源于代码: @RequestMapping(value="/checkcode") public String checkcode(HttpServletRequest request,HttpServletResponse respons
  • Head.First.Servlets.and.JSP.2nd.Edition.Mar.2008 第二部分
  • Head.First.Servlets.and.JSP.2nd.Edition.Mar.2008 第三部分
  • 我的解决方案:把第一行去掉。因为它重复加载了。
  • Head.First.Servlets.and.JSP.2nd.Edition.Mar.2008 第一部分
  • Head First Servlets·JSP》(中文版)结合SCWCD考试大纲讲述了关于如何编写servlets和JSP代码,如何使用JSP表达式语言,如何部署Web应用,如何开发定制标记,以及会话状态、包装器、过滤器、企业设计模式等方面的...
  • org.apache.jsp.login_jsp._jspService(login_jsp.java:55) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org....

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 216,011
精华内容 86,404
关键字:

head.jsp