当前页面: 开发资料首页 → Netbeans 专题 → Integrating Dreamweaver MX with NetBeans IDE
摘要: This tutorial demonstrates how you can configure Macromedia Dreamweaver MX as a visual layout editor for a web application created in NetBeans IDE.
NetBeans IDE 5.0 includes a new editor palette that lets you easily add JSP ServerBeans, HTML forms and other ready-made code snippets to your web application. To open it, choose Tools > Palette from the menu.
You can additionally integrate NetBeans IDE 4.x with Macromedia Dreamweaver MX for further visual HTML and JSP editing. Dreamweaver can be set up to edit JSP files in your NetBeans project directory, and it can automatically keep those files synched with your build files. You will be able to initiate previewing your JSP pages from the NetBeans IDE as well as from Dreamweaver using the built-in Tomcat server.
If you don't have a web application but still want to go through the tutorial, choose File > New Project > Samples > Web > Tomcat JSP Example from the NetBeans menu and use this sample project.
In the following, I will refer to the NetBeans project directory as $NB_PROJ_HOME and I will refer to the web project used as my_project.
If you already are familiar with Dreamweaver, you can follow the fast track to configure the NetBeans integration. Otherwise, follow the detailed steps described in the next paragraphs.
$NB_PROJ_HOME\web\
.
$NB_PROJ_HOME\build\web\
.
$NB_PROJ_HOME\build\web\
.
http://localhost:8084/my_project/
)First, we tell Dreamweaver where NetBeans stores the JSP files we want to edit.
$NB_PROJ_HOME\web\
.
For instance, the local site path may look like this:
C:\Documents and Setting\your_user_name\My
Documents\my_project\web\"
Next, we tell Dreamweaver where NetBeans stores the build files. Dreamweaver should use the same folder to save JSP build files to in order for your project to stay consistent.
$NB_PROJ_HOME\build\web\
.
If you don't see $NB_PROJ_HOME\build\web\
in the file browser,
you need to build your project in NetBeans to make the folder appear.
For instance, the remote site path may look like this:
C:\Documents and Setting\your_user_name\My
Documents\my_project\build\web\
The last step is to tell Dreamweaver how to preview your JSP files in case you want to use Dreamweaver's built-in preview function.
$NB_PROJ_HOME\build\web\
).http://localhost:8084/my_project/
If you checked the box "Refresh remote file list automatically" and "Automatically upload file to server on save", Dreamweaver will synch your project files each time they change.
Now you're set up to edit your project's source code in NetBeans IDE while you can do further HTML and JSP layouting using Dreamweaver as a visual editor. You can preview and test your JSP pages in the web browser not only by running your project in NetBeans, but also by clicking the preview button in Dreamweaver.