MyEclipse code rewrite
Eclipse or MyEclipse to change the default new file encoding
eclipse: the
window-preferences-General-ContentType to the right of the window, replaced by gbk can, utf-8 is required.
myEclipse follows:
window-preferences-myEclipse-files and editors-jsp inside encoding, change here for ISO10646/UTF-8.
eclipse and java file encoding settings
Look at the eclipse set it, if you downloaded the eclipse, do nothing, they begin to create a project, coding, everything is no problem, but you may move to linux your project has developed the following reason is that you begin to weary of winxp, and fell in love with ubuntu. This time the problem came. Open your winxp following the eclipse, click on Window -> Preferences, expand General -> WorkSpace, see the left side of the Text file encoding does not, the default setting is simplified Chinese encoding (gbk, gb2312 so), but linux do the following It is UTF-8.
Now we have to understand their differences, and waiting for what will now encode all your files WorkSpace are set to UTF-8 bar, you will have at all times display correctly, java files, not garbled.
Item Code
But you may say, the project has other encoding, you do not want to change, and just want to hug from now UTF-8, which is possible, when you create a new project, you want to use, and WorkSpace different encoding, please right-click the your project, select Properties, click Resource, see the Text file encoding of the bar, click Other, select UTF-8, you have a great need for such an encoding format, is not it? JSP code
So that all? No, you're dealing with is the most likely to jsp files, you do not want all the jsp files are UTF-8 do? Then Kanba it. Or click on Window -> Preferences, this time is to start Web and XML -> JSP Files, see the Encoding of the bar, quickly select UTF-8 bar. If you can, your HTML, CSS, etc. set of these documents are inflicted UTF-8 bar, you will have the full UTF-8 solution.
Finally look at your results after the bar set. Create a JSP file, in the second step select any one jsp template. Then take a look at the generated bar jsp files are all UTF-8, and now you can rest assured, and that your files are UTF-8 in the.
Related Posts of MyEclipse code rewrite
-
JavaScript inheritance
About JavaScript inherited a small example ... <! DOCTYPE HTML PUBLIC "- / / W3C / / DTD HTML 4.01 / / EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" conte ...
-
EJB ant script to deploy template works
<? xml version = "1.0" encoding = "UTF-8"?> <! - Name Project name basedir build.xml file directory -> <project name="HelloWorld" basedir="."> <! - Property variables -> <! - The sour ...
-
jboss ejb3 Message Driven Bean
Super Medium ejb hate. . . . . . . . . . . . . . . . . . . ================================================ To configure a Message Driven Bean in a different application server parameters are not the same. Currently only passed the test jboss. Messag ...
-
spring myfaces hibernate richfaces
1.web.xml 2, spring 3, faces-config.xml
-
Spring + Hibernate to use Glassfish Database Connection Pool
applicationContext.xml file content <? xml version = "1.0" encoding = "UTF-8"?> <beans xmlns = " http://www.springframework.org/schema/beans " xmlns: xsi = " http://www.w3.org/2001/XMLSchema-instance " ...
-
Process migration from tomcat to websphere changes
Process migration from tomcat to websphere changes Because customers use the web application server software used by different what tomcat5, tomcat6, websphere5.1, websphere6.1, weblogic8, and so on, and the software used inconsistent standards, ibm& ...
-
JAVA EE JSP_JNDI
dsfdsa http://lindows.javaeye.com/admin/blogs/213348 Tomcat 6 with the connection pool data source configuration http://www.blogjava.net/ec2008/archive/2008/07/19/216063.html project: test Driver path: D: \ workspace \ test \ WebRoot \ WEB-INF \ lib ...
-
myeclipse plugin
myeclipse plugin
-
Servlet brief introduction
Servlet brief introduction: Servlet is a small application server Are used to complete the B / S architecture, the client requests the response to treatment Platform independence, performance, able to run thread Servlet API for Servlet provides the s ...
-
Spring2.0 + hibernate3.1 + log4j + mysql demo
applicationContext.xml Non-attachment jar package, necessary friends can send an email to todd.liangt @ gmail.com













Leave a Reply