初学问题

schooltime 2004-11-22 03:18:12
我的tomcat配置都按说明做了。
http://localhost:8080/这个能打开了,
jsp-examples里面有很多也能打开了,可是有些打不开呢
比如http://localhost:8080/jsp-examples/jsptoserv/hello.jsp
这个hello.jsp就是打不开,
type Exception report

message

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

exception

java.lang.NullPointerException
org.apache.jsp.jsptoserv.hello_jsp._jspService(hello_jsp.java:43)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.

这个是什么错误呀?配置没写好吗?
还有与IIS整合,怎么也不成功呢,高手指点
...全文
81 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
bsh614 2004-11-22
  • 打赏
  • 举报
回复
开始少了
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*," %>
lijunjiejava 2004-11-22
  • 打赏
  • 举报
回复
(request.getAttribute("servletName").toString());

有参数传入才行
tom2005 2004-11-22
  • 打赏
  • 举报
回复
这个jsptoserv目录下还有一个jsptoservlet.jsp
在jsptoservlet.jsp设了个servletName属性传给hello.jsp
是运行jsptoservlet.jsp这个得

直接运行hello.jsp会抱错
schooltime 2004-11-22
  • 打赏
  • 举报
回复
这个就是hello.jsp
schooltime 2004-11-22
  • 打赏
  • 举报
回复
<html>
<body bgcolor="white">
<h1>
I have been invoked by
<% out.print (request.getAttribute("servletName").toString()); %>
Servlet.
</h1>

</html>
lijunjiejava 2004-11-22
  • 打赏
  • 举报
回复
应该是接受的参数为空。
你没有作判断有进行操作就会出这样的异常。
可能这不是第一个页面,要从他的前一个页面取得参数才能正确执行
jFresH_MaN 2004-11-22
  • 打赏
  • 举报
回复
把你的代码给我看看
iis整和我没用过,所以帮不了你啊

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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