<Display-Name> defaultroot </display-Name>
<Servlet>
<Servlet-Name> debugjsp </servlet-Name>
<Description> added to compile JSPs with debug info </description>
<Servlet-class> org. Apache. Jasper. servlet. jspservlet </servlet-class>
<Init-param>
<Param-Name> classdebuginfo </param-Name>
<Param-value> true </param-value>
</Init-param>
<Load-on-startup> 3 </load-on-startup>
</Servlet>
<Servlet-mapping>
<Servlet-Name> debugjsp </servlet-Name>
<URL-pattern> *. jsp </url-pattern>
</Servlet-mapping>
Copy to the WEB-INF/Web. XML in your application;
3. Copy style. xml and button. xml under the WEB-INF to the WEB-INF directory in your application;
4. Copy the dom4j. jar and jspsmartupload. Jar packages under ewebeditor/WEB-INF/lib to your application's WEB-INF/LIB;
Note: net. jar is the class file under the original/WEB-INF/classes ewebeditor, I package it and put it under the application lib to avoid confusion with other classes;
5. before you call the editor Code Add:
<IFRAME id = "ewebeditor1" name = "content_html" src = ".../ewebeditor. jsp? Id = content & Style = standard "frameborder =" 0 "scrolling =" no "width =" 650 "Height =" 350 "> </iframe>
<Input type = "hidden" name = "content"/>
Before <Script language = "JavaScript">
Function subchk ()//
{
Document. form1.content. value = Window. content_html.gethtml ();
}
</SCRIPT>
This function is triggered when a form is submitted.
Copy the value in ewebeditor to your form and call it in your form:
<Form name = "form1" onsubmit = "subchk ()">
6. Restart the server.
Ii. settings:
Interface modification: generally only modify/WEB-INF directory under the style. XML and button. XML is enough, button. XML is the configuration file of the editing interface. If a menu is not displayed completely, you can modify the size in it.
========================================================== ================
Upload image path settings:
// By default, the default upload directory is XX/upload/, and XX is your root directory.
// Set the path for saving the uploaded file, note that the path must start with "root" and start with "==== 3", ================
// Modify the corresponding location of the WEB-INF/style. xml file <suploaddir>/upload/</suploaddir>
// Modify the ewebeditor. jsp file.
// Modify the corresponding content of the upload. jsp file.
For example:
Upload. jsp
String suploadfilepath = "/upload /";
In Style. xml
<Suploaddir>/upload/</suploaddir>
In ewebeditor. jsp
String suploadfilepath = "../upload/"; // sets the image display address in the ewebeditor after the file is uploaded.
That's all.
Modify Upload File size limits in WEB-INF/style. xml
<Sfilesize> 2000 </sfilesize> // other file size
<Sflashsize> 500 </sflashsize> // FLASH file size
<Sremotesize> 1000 </sremotesize> // size of the published content
<Simagesize> 1000 </simagesize> // Image File Size
<Smediasize> 1000 </smediasize> // multimedia file size
Note: 1. If files cannot be uploaded during deployment or debugging, you can modify the file in ewebeditor. jsp.
String suploadfilepath = "../upload/"; value or modify the characters in the file. After refreshing the file, change it back to the normal value to resume the upload;
2. If UTF-8 encoding is used, add Content-Type = "text/html; charset = UTF-8" to the header of the called JSP page ", do not use filter to implement uniform "UTF-8" or encoding except gb2312 for ewebeditor;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.