首页上一页 1  下一页尾页 1 条记录 1/1页
        application的例子调不出来 请进来看看
                 	
                        发表在JavaWeb图书答疑
                        2006-08-15                                                
                    		
                                                                            	
                        
                        
                    
                    
                    	是否精华
                    	是
                    	否
                    
                    
                    
                            版块置顶:
                            是
                            否
                        
                    
                                           <%@page contentType="text/html;charset=gb2312" language="java" %>
<html>
<head>
<title>Application对象</title>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312"/>
</head>
<body>
<%
int a=0;
if(application.getAttribute("count"==null)){
application.setAttribute("count",new Integer(a));
}else{
int aa=Integer.parseInt(application.getAttribute("count").toString()+1);
application.setAttribute("count",new Integer(aa));
}
out.println("您是第"+application.getAttribute("count")+"访问者!");
%>
</body>
</html>
显示错误:"jsp1.jsp": getAttribute(java.lang.String) in javax.servlet.ServletContext cannot be applied to (boolean)
        
                
        	
        
        
    <html>
<head>
<title>Application对象</title>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312"/>
</head>
<body>
<%
int a=0;
if(application.getAttribute("count"==null)){
application.setAttribute("count",new Integer(a));
}else{
int aa=Integer.parseInt(application.getAttribute("count").toString()+1);
application.setAttribute("count",new Integer(aa));
}
out.println("您是第"+application.getAttribute("count")+"访问者!");
%>
</body>
</html>
显示错误:"jsp1.jsp": getAttribute(java.lang.String) in javax.servlet.ServletContext cannot be applied to (boolean)

 
	
                                                 VIP会员
VIP会员 购物车
购物车

 私信
                         私信 
                     发表新帖
发表新帖 立即签到
立即签到 
        		  
        		 
         		 关注
关注
                  回复
 回复 支持(
                	支持( 反对(
                    反对(
 
                







 
                     
                     
					 
						 
						 
						 
						