Java,我到底在学什么?我第一个页面就有错,改了两天!TMD

studydotnet 2006-12-20 10:29:52
按很多网上写的,设置了所有东西,猫页也出来 了
webapps\test
在webapps下建立test,同时web-inf也建了,在同级弄了个test.jsp

怎么弄,也没法显示出来,报错如下:


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

例外

org.apache.jasper.JasperException: /hello.jsp(3,3) 無効な指示子です
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:90)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:506)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



--------------------------------
弄到ROOT下,报错:

メッセージ /test.jsp

説明 The requested resource (/test.jsp) is not available.




...全文
689 25 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
25 条回复
切换为时间正序
请发表友善的回复…
发表回复
wwwlike 2006-12-21
  • 打赏
  • 举报
回复
唉,学习能力问题
--------------------------
同感
god999 2006-12-21
  • 打赏
  • 举报
回复
你用的是日语系统吗?怎么会有日语报错?
00bug 2006-12-21
  • 打赏
  • 举报
回复
LZ,如果真的要学一门语言,最好还是去买本书吧,在网上适合解决一些个别问题,要系统的学习还是买本书的好,这样才会有比较好的基础。
x03570227 2006-12-20
  • 打赏
  • 举报
回复
唉,学习能力问题
huangxwcsdn 2006-12-20
  • 打赏
  • 举报
回复
访问路径错了吧,提示没找到文件呀,是http://localhost:8080/test.jsp吗,建议看看tomcat的log提示看看部署成功了吗,最好使用tomcat的部署工具
studydotnet 2006-12-20
  • 打赏
  • 举报
回复
<%@ page language="java" contentType="text/html; charset=Shift_JIS"
pageEncoding="Shift_JIS"%>
<%@page Import="java.util.*" %>>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<title>Insert title here</title>
</head>
<body>
<%out.println("aa"); %>
</body>
</html>
zhkl0228 2006-12-20
  • 打赏
  • 举报
回复
代码帖出来
studydotnet 2006-12-20
  • 打赏
  • 举报
回复
郁闷啊.有人吗?
凉凉二点凉 2006-12-20
  • 打赏
  • 举报
回复
你肯定少了一个web.xml!
fxl545826 2006-12-20
  • 打赏
  • 举报
回复
最简单的方法就是用Eclipse配置多好啊 但是这样的程序出问题要是不能解决很危险啊 做jsp的话异常多的是,我当初做的时候真的很多,最后不过都好了,遇到异常自己解决是财富啊
arust 2006-12-20
  • 打赏
  • 举报
回复
正确的东西不会在网上
liaohaiying 2006-12-20
  • 打赏
  • 举报
回复
JAVA环境还有问题啊
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<meta http-equiv="Content-Type" content="text/html; charset=windows-31j">
这些是什么啊,你用日语吗,不是和你说了,这个文件就写一句代码<% out.print("aa"); %>试试
studydotnet 2006-12-20
  • 打赏
  • 举报
回复
import应该小写


小写依旧
studydotnet 2006-12-20
  • 打赏
  • 举报
回复
你这个代码多个结尾多了个">"

---
去掉后问题依旧
yunxiang 2006-12-20
  • 打赏
  • 举报
回复
<%@Page Import="java.util.*"%>


import应该小写
yunxiang 2006-12-20
  • 打赏
  • 举报
回复
<%@ page language="java" contentType="text/html; charset=Shift_JIS"
pageEncoding="Shift_JIS"%>
<%@page Import="java.util.*" %>>
^^^
你这个代码多个结尾多了个">"
studydotnet 2006-12-20
  • 打赏
  • 举报
回复
UPUUPUPUP
yunxiang 2006-12-20
  • 打赏
  • 举报
回复
真厉害。。。
你是怎么做到的?教教我。学习ing
studydotnet 2006-12-20
  • 打赏
  • 举报
回复
他把所有代码都显示出来了,请问怎么办?
studydotnet 2006-12-20
  • 打赏
  • 举报
回复
请问访问页面时,http://localhost:8080/test/test.jsp
得到如下结果,请问怎么回事?
--------------------------
<%@ page language="java" contentType="text/html; charset=windows-31j"
pageEncoding="windows-31j"%>
<%@Page Import="java.util.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-31j">
<title>Insert title here</title>
</head>
<body>
<center>welcome</center>
<br>
<%!int angles[]={0,30,45,75,90};%>
<TABLE BORDER="4" ALIGN="center">
<th>ang</th>
<th>Sine of angle</th>
<%for(int i=0;i<5;i++){%>
<TR>
<td><%=angles[i]%></td>

<td><%=Math.sin(Math.toRadians(angles[i]))%>
</TR>
<%}//end for loop%>
</table>
<%
out.println("aaa");
%>
</body>
</html>
加载更多回复(3)

81,122

社区成员

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

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