首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

myeclipse jsp中设置网页布局 源码 JSP页面错误 could not find main class

2012-10-28 
myeclipse jsp中设置网页布局 源码 JSP页面异常 could not find main classindex.jsp:frameset rows65,

myeclipse jsp中设置网页布局 源码 JSP页面异常 could not find main class
index.jsp:
<frameset rows="65,*" frameborder="no">
  <frame src="top.gif" name="top">
  <frameset cols="200,*">
<frame src="menu.jsp" name="left">
<frame src="welcome.jsp" name="right" >
  </frameset>
</frameset>
menu.jsp:
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html><head><title>欢迎进入小站</title>
<style type="text/css">
a{  color: green;}</style></head>
   <body style="background-image: url('menu_bg.gif')">
<table><tr><td>
          <a href="newsType!list.action" target="right">新闻类型管     理:</a></td></tr>
       <tr><td><a href="news!list.action" target="right">新闻管理:</a></td></tr>
       <tr><td><a href="user!list.action" target="right">用户管理:</a></td></tr></table></body></html>
注释:链接用struts2框架进行请求处理,但并不影响框架本身显示效果。如果采用myeclipse运行环境,index.jsp出现异常情况,表现为如JSP图标显示异常等,可以在配置文件中做如下修改:在window-preferences-输入框中file找到general-file association-点击右边视图.jsp-下面选择一个myeclipse jsp editor(locked by 'jsp' content type)(locked by 'css jsp' content type)为default即可解决问题。
  另附:
        异常处理:Could not find main class (网上其它的说法如改动配置文件ini,纯属照搬垃圾,不能解决问题。)
       有效方法: Window-->Preferences-->Java-->然后修改下面的Compiler和Installed JRES ,让myeclipse使用你用的jdk,而不是它自带的jdk就可以解决这个问题。

热点排行