JSP代码<html><title>MY FIRST JSP</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body>
<jsp:useBean id="asd"  scope="erquest" class="hel.helloworld"/> 
<%@ page language="java"%><% ads.getString();%>
 
</body>
</html>

解决方案 »

  1.   

    out.print(asd.getString(););
     变成:
    out.print(asd.getString());
      

  2.   

    jsp修改如下:<%@ page language="java"%>
    <html>
    <head>
    <title>MY FIRST JSP</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head><body>
    <jsp:useBean id="asd"  scope="request" class="hel.helloworld"/>
    <%=ads.getString()%> 
    </body>
    </html>
      

  3.   

    <% ads.getString();%>什么意思?应该是<%=....%>中间可以放string
      

  4.   

    java代码改成是:
    package helloworld;import java.io.*;
    public class helloworld
    {
    public String getString()
    {
        return "helloword";
    }
    }JSP代码改成<html><title>MY FIRST JSP</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head><body>
    <jsp:useBean id="asd"  scope="erquest" class="hel.helloworld"/> 
    <%@ page language="java"%><%=ads.getString()%>
     
    </body>
    </html>