放的路径是Tomcat\webapps,访问路径是http://localhost:8080/my.jsp
现在的错误是500,内部服务器错误

解决方案 »

  1.   

    大家帮我看看呀,我的JDK1.5和TOMCAT5.5都配置好了,服务器正常,但是下面的程序不能运行,哪里错了。
    <% @ page contentType="text/html;charset=gb2312" %>
    <html>
    <head>
    <title>dayingbiaoge</title>
    </head>
    <body>
    <table border="2" width="50%">
      <% for(int i=0;i<5;i++) {%>
       <tr>
           <% for(int j=0;j<5;j++){%>
           <td><%=i+j%></td>
          <%}%>
         </tr>
      <%}%>
    </table>
    </body>
    </html>type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: 1 in the jsp file: /Demo.jsp
    Generated servlet error:
    Syntax error on token "contentType", VariableDeclaratorId expected after this tokenAn error occurred at line: 1 in the jsp file: /Demo.jsp
    Generated servlet error:
    Syntax error, insert ";" to complete LocalVariableDeclarationStatement
      

  2.   

    报这个错误说明jsp的放的路径和访问路径都没有问题。是将jsp转换为servlet类,然后编译这个类的时候出错的。
    告诉你一个铁定可以解决问题的办法,你先将jsp弄得最简单,比如就输出一个123,然后慢慢找是哪个地方出错了,有经验的人都是这样做错误的。
      

  3.   

    这个jsp 你要这样访问应该放到webapps下面的ROOT文件夹下面还有你的jsp的第一行 应该这样写<%@page contentType="text/html;charset=gb2312" %>不要有空格 <% @ page
      

  4.   

    放webapp\Root\文件夹下~~
    而且是要访问路径要相同,统一哦!
      

  5.   

    放在webapp\root文件夹下 或者是自己在webapp下建一个文件夹(比如说ABC),在地址栏输入:localhost:8080/ABC/***.jsp
      

  6.   

    interpb(曾曾胡,深怕情多累美人!) (  已经说完了,
      

  7.   

    <%@page contentType="text/html;charset=gb2312" %>不要有空格 <% @ page
    看错误提示,主要原因是这个
      

  8.   

    放的路径是Tomcat\webapps,访问路径是http://localhost:8080/my.jsp
    现在的错误是500,内部服务器错误.
    你把你的这个my.jsp页面放到webapps/ROOT/my.jsp,肯定ok拉.
    或者webapps/你的应用文件夹/my.jsp