在MyEclipse for mac 中增加、修改JSP模板
2013-01-30 15:00
309 查看
修改模板:
找到com.genuitec.eclipse.wizards_9.0.0.me201108091322.jar,至少格式是前缀是一样,每个版本不一样,我的是myeclipse10.
然后用war软件打开。
新建一个Struts2_jsp.vtl
Struts2_jsp.vtl
-------------------------------------
Jsp代码
![](http://panyongzheng.iteye.com/images/icon_star.png)
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String titleString = "My Struts2 JSP Template";
String footerString= "My Struts2 JSP Template";
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<title><%=titleString%></title>
</head>
<body>
<center><h1><%=titleString%></h1></center>
<hr>
<%=new Date()%><br>
Actionerror:<s:actionerror/><br>
Actionmessage:<s:actionmessage/><br>
<hr>
<div style="height:100%;border:1px solid #6699FF">
<s:form action="myAction" method="post">
<s:textfield name="user" label="UserName" value="default value" size="50"></s:textfield>
<s:submit value="Submit"></s:submit>
</s:form>
</div>
<hr>
<center><%=footerString%></center>
</body>
</html>
然后把这个文件放到jar里面的com.genuitec.eclipse.wizards_9.0.0.me201108091322.jar\templates\jsp
然后回到com.genuitec.eclipse.wizards_9.0.0.me201108091322.jar最外面的,看见templates.xml
解压出来,然后在<!-- JSP templates -->的后面增加如下代码:
Xml代码
![](http://panyongzheng.iteye.com/images/icon_star.png)
<template
context="com.genuitec.eclipse.wizards.jsp"
script="templates/jsp/Struts2_jsp.vtl"
name="Standard JSP using Struts 2.X with a form"/>
保存之后,在放到war打开的jar一样的地方那个,覆盖里面的文件。
然后启动myeclipse,点new/jsp 然后就能选择刚才的模板了。
找到com.genuitec.eclipse.wizards_9.0.0.me201108091322.jar,至少格式是前缀是一样,每个版本不一样,我的是myeclipse10.
然后用war软件打开。
新建一个Struts2_jsp.vtl
Struts2_jsp.vtl
-------------------------------------
Jsp代码
![](http://panyongzheng.iteye.com/images/icon_star.png)
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String titleString = "My Struts2 JSP Template";
String footerString= "My Struts2 JSP Template";
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<title><%=titleString%></title>
</head>
<body>
<center><h1><%=titleString%></h1></center>
<hr>
<%=new Date()%><br>
Actionerror:<s:actionerror/><br>
Actionmessage:<s:actionmessage/><br>
<hr>
<div style="height:100%;border:1px solid #6699FF">
<s:form action="myAction" method="post">
<s:textfield name="user" label="UserName" value="default value" size="50"></s:textfield>
<s:submit value="Submit"></s:submit>
</s:form>
</div>
<hr>
<center><%=footerString%></center>
</body>
</html>
然后把这个文件放到jar里面的com.genuitec.eclipse.wizards_9.0.0.me201108091322.jar\templates\jsp
然后回到com.genuitec.eclipse.wizards_9.0.0.me201108091322.jar最外面的,看见templates.xml
解压出来,然后在<!-- JSP templates -->的后面增加如下代码:
Xml代码
![](http://panyongzheng.iteye.com/images/icon_star.png)
<template
context="com.genuitec.eclipse.wizards.jsp"
script="templates/jsp/Struts2_jsp.vtl"
name="Standard JSP using Struts 2.X with a form"/>
保存之后,在放到war打开的jar一样的地方那个,覆盖里面的文件。
然后启动myeclipse,点new/jsp 然后就能选择刚才的模板了。
相关文章推荐
- [顶] 在MyEclipse中增加、修改JSP模板
- MyEclipse 中修改和增加JSP和Struts2的模板
- 修改myeclipse的jsp模板
- MyEclipse10中修改servlet & jsp的模板代码
- Myeclipse中修改servlet JSP等模板的方法
- 在myeclipse8.5中修改jsp模板
- 修改 MyEclipse 中的 jsp 和 servlet 模板
- MyEclipse修改JSP页面模板
- myeclipse 修改 jsp 的模板
- 在MyEclipse中增加JSP模板
- MyEclipse修改jsp模板的字符集
- 修改MyEclipse开发工具中的页面模板(JSP和HTML)
- 在Myeclipse6.5中修改JSP模板
- myeclipse新建jsp默认模板修改
- myeclipse 修改 jsp 的模板
- 修改MyEclipse默认的Servlet和jsp代码模板
- MyEclipse修改JSP模板
- MyEclipse中修改Servlet和Jsp模板
- Myeclipse6.5中修改servlet JSP等模板的方法
- MyEclipse中修改jsp和servlet模板代码的方法