Home > Article > Development Tools > Points to note when developing websites using Dreamweaver and MyEclipse
The content of this article is about the points that need to be paid attention to when using Dreamweaver and MyEclipse to develop websites. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
I recently used these two tools to build a website, and encountered many problems on the way. I will summarize them now for your reference!
1. First unify the encoding. Dreamweaver and MyEclipse sometimes have different default encodings. You need to unify them first, otherwise the transition will be chaotic.
The way Dreamweaver changes the default encoding: Ctrl N (File-> New) -> Preferences -> New Document -> Default encoding -> Just select the default encoding format you want.
MyEclipse Change the encoding method of the project: right-click the project name->Properties->Resource->Text file encoding, select the encoding method of the project.
MyEclipse changes the default encoding of various files: Window->Preferences->General->Content Types-> For example, if you select the JSP on the right, Default encoding will appear at the bottom of the window. Modify the default encoding of the file on the right. Encoding method is enough.
2. Create a new site in Dreamweaver and complete the layout of the main static parts of the website!
3. Create a new project in MyEclipse, then open the html file you need to import, select "Save As" in the appropriate directory in your project, and it is best not to change its suffix when naming it. After saving, you will have this file under your project, then right-click to rename it. At this time, you can change the suffix ".jsp" to jsp.
4. If there are style sheet files and pictures , just copy the style sheet file to the corresponding directory. For example, you can create a new directory css to store your style sheet file, and a new images directory to store your pictures. Of course, the path may be different at this time. It is best not to modify the path in the code yourself, but to use Dreamweaver to open your jsp file and modify it.
5. Then you can complete your project in MyEclipse. You can open the jsp file in your project in Dreamweaver at the same time, then modify it, and save it after modification. In MyEclipse, it will If you are prompted that the file has been modified and whether to load it, just select Yes. If there is no reminder, just right-click your project and select Refresh.
Attention to a few issues
1. It is best not to delete the original html file.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
2. It is best to copy the
<% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %>
ffc28ac0de32d0d9b350ce62c6f18458"> that is usually found in jsp files, otherwise there will be Path problems sometimes occur.
2. If there is a garbled code problem, assuming the encoding method you use is UTF-8, just add
<%@ page contentType="text/html;charset=UTF-8" %>
at the top of the jsp file. If it is an encapsulated tag file, Just add
<%@ tag charset=UTF-8" %>
and also change the original ones in the html file
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Be sure to change the default encoding of Eclipse to UTF-8, otherwise there will be problems when saving.
If garbled characters still appear, delete the garbled characters, rewrite them, or save the part you want to copy and paste with Notepad, and select the "UTF-8" encoding method when saving.
3. Sometimes the style sheet will not work after being copied, even if the path is correct, then you can type the file in Dreamveaver and
delete the original style sheet link, such as < ;link href="css/style.css" rel="stylesheet" type="text/css"/>, delete it, and then rewrite the
4. Sometimes the style sheet does not work because of encoding problems. Maybe Chinese characters appear in your style sheet, such as Chinese comments. Sometimes this will also be affected. You can delete the comments or add @ in the style sheet. charset "utf-8", or use Notepad to save it;
5. Other hyperlinks, image links, etc. may not work. Just relink them in Dreamweaver.
The above is the detailed content of Points to note when developing websites using Dreamweaver and MyEclipse. For more information, please follow other related articles on the PHP Chinese website!