jsp 错误

Aseveng 2017-11-22 08:29:59
有人知道这是为啥吗 自己写的jsp打不开
...全文
132 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
yc_wsrgan 2017-11-23
  • 打赏
  • 举报
回复
我就服这种,发问题从来发不到点上,还一直说报错报错,报错你倒是把全面的问题和源码发出来啊?整个错误界面给谁看?而且这些都是小问题,百度能解决的问题,以后还是百度吧
Aseveng 2017-11-23
  • 打赏
  • 举报
回复
已经好了 换了个tomcat版本
Sunyiban 2017-11-23
  • 打赏
  • 举报
回复
jsp。。。字符串? out.write? 你想怎么展示~
Aseveng 2017-11-23
  • 打赏
  • 举报
回复
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public final class HelloWorld_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static java.util.List _jspx_dependants;

  public Object getDependants() {
    return _jspx_dependants;
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html; charset=utf-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("\t<head>\r\n");
      out.write("\t\t<title> HelloWorld </title>\r\n");
      out.write("\t</head>\r\n");
      out.write("\t<body>\r\n");
      out.write("\t\t");

			out.println("HelloWorld");
		
      out.write("\r\n");
      out.write("\t</body>\r\n");
      out.write("</html>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
_jsp.java 文件
Aseveng 2017-11-23
  • 打赏
  • 举报
回复
加上了重启tomcat 还是报错
繁华终归落尽 2017-11-23
  • 打赏
  • 举报
回复
引用 5 楼 Aseveng 的回复:
<html> <head> <title> HelloWorld </title> </head> <body> <% out.println("HelloWorld"); %> </body> </html> 第一次写jsp 源码就是个HelloWorld
头上加这个没有?
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
Aseveng 2017-11-23
  • 打赏
  • 举报
回复
<html> <head> <title> HelloWorld </title> </head> <body> <% out.println("HelloWorld"); %> </body> </html> 第一次写jsp 源码就是个HelloWorld
滴滴雨滴great 2017-11-22
  • 打赏
  • 举报
回复
同意楼上的观点
安蒙1278 2017-11-22
  • 打赏
  • 举报
回复
把jsp源码发出来,是你jsp页面中有错误,你看看是不是你jsp页面中使用Java代码出错或者数据库取出来的东西空指针
Aseveng 2017-11-22
  • 打赏
  • 举报
回复
写到所有jsp 都报错

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧