您的位置:程序门 -> java -> j2ee / ejb / jms



紧急求助


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


紧急求助
发表于:2007-09-26 15:09:10 楼主
package   edu;
import   java.io.*;
import   javax.servlet.*;
import   javax.servlet.jsp.pagecontext;
import   javax.servlet.http.*;
public   class   infobean
{  

protected   httpservletrequest   request;


public   final   void   initialize(pagecontext   pagecontext)
throws   servletexception
{
request   =   (httpservletrequest)pagecontext.getrequest();
}  

public   string   getinfo()

{
stringbuffer   strbf   =   new   stringbuffer();
              strbf.append( "pathinfo: ");
              strbf.append(request.getrequesturi());
              return   strbf.tostring();


}

}


<%@   page   contenttype= "text/html;   charset=gbk "   errorpage= " "   %>
<%request.setcharacterencoding( "gbk ");%>
<%@   page   language= "java "   import= "edu.infobean "   %>
<html>
<head>
<meta   http-equiv= "content-type "   content= "text/html;   charset=gbk ">
<title> 页面信息 </title>
</head>
<body>
<%
infobean   b1   =   new   infobean();
b1.initialize(pagecontext);
string   info   =   b1.getinfo();
out.println(info);
%>
</body ">
</html>

怎么我在我的eclipse+myeclipse中的浏览器中输入   http://localhost:8080/mytest/1.jsp 说 无法显示网页  呢?
发表于:2007-09-26 16:14:091楼 得分:0
工程正常启动了吗
发表于:2007-09-26 16:17:282楼 得分:0
http://localhost:8080
看看这个能不能显示网页
大多是服务器未启动成功
发表于:2007-09-27 10:53:123楼 得分:0
怎么我在我的eclipse+myeclipse中的浏览器中输入   http://localhost:8080/mytest/1.jsp 说 无法显示网页  呢?

==================
 无法显示网页 的错误还没有到具体的程序

而是你的配置错了.




快速检索

热门点击