MyEclipse develops Java Web programs

An   Introduction to MyEclipse
MyEclipse is a powerful enterprise set development environment formed on the basis of eclipse plus its own plug-in development. It is mainly used for the development of Java, Java EE and mobile applications. MyElipse has very powerful functions and extensive support, especially for various open source products.
 
The difference between MyEclipse and Eclipse
MyEclipse: Chargeable, integrates a lot of chargeable plug-ins. For example: SSH, installation, etc.
Eclipse: Free and open source, does not include any plugins for additional functionality.
 
Three MyEclipse configuration JRE
windows->Preference->Java->Installed JREs


 
 
Four  MyEclipse integrated Tomcat server
windows->Preference->Myeclipse->Server->Tomcat


 
 
5. Start the Tomcat server in MyEclipse and test


 


 
 
6 Write the first web program
1. Create a project
File->New->Web Project


 
 
2. Write index.jsp
<%@  page  language = "java"  import = "java.util.*"  pageEncoding = "ISO-8859-1" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+ "://" +request.getServerName()+ ":" +request.getServerPort()+path+ "/" ;
%>
 
<! DOCTYPE  HTML  PUBLIC  "-//W3C//DTD HTML 4.01 Transitional//EN">
< html >
   < head >
     < base  href = " <%= basePath %> " >
     < title > My JSP 'index.jsp' starting page </ title >
         < meta  http-equiv = "pragma"  content = "no-cache" >
         < meta  http-equiv = "cache-control"  content = "no-cache" >
         < meta  http-equiv = "expires"  content = "0" >    
         < meta  http-equiv = "keywords"  content = "keyword1,keyword2,keyword3" >
         < meta  http-equiv = "description"  content = "This is my page" >
         <!--
        <link  rel =" stylesheet " type="text/ css "  href ="styles.css">
        -->
   </ head >
 
   < body >
    Hello,This is my JSP page.  < br >
   </ body >
</ html >
 
3、发布项目


 
4、运行Tomcat并测试


 
 
七 MyEclipse Web的目录结构


 
 
八 遇到的问题
1、在配置Tomcat时,弹出错误: An error has occurred. See error log for more details. com/genuitec/eclipse/core/vU。
解决方法:因为 曾经安装过 MyEclipse8.5,再安装MyEclipse10时,发现D:\Genuitec\Common\plugins目前下的插件并没有被替换,于是把MyEclipse8.5卸掉,并将D:\Genuitec\Common目录删除,再重新安装MyEclipse10,没问题。全新安装MyEclipse10也没有问题。

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326779984&siteId=291194637