[Memo] FCKeditor cannot upload files in struts2

Source: Internet
Author: User

Recently, a project was developed using struts2 and FCKeditor was used as the HTML editor.

 

During use, FCKeditor cannot upload files (it has been set according to its demo ). Error message: you do not have the permission to upload files. An error is returned through the source code.Code203.

By debugging its source code (net. FCKeditor. connector. connectorservlet, line 1), the items. Size () is always equal to 0.

 

After one day of debugging (expired in the middle), it was found that the problem was actually struts2:

In web. XML, the struts2 demo sets this way.

<Filter-mapping>
<Filter-Name> struts2 </filter-Name>
<URL-pattern>/*</Url-pattern>
</Filter-mapping>

Note the red part. Here, struts2 filters all requests and changes them to the following content:

<Filter-mapping>
<Filter-Name> struts2 </filter-Name>
<URL-pattern>*. Action</Url-pattern>
</Filter-mapping>

*. Action is your struts2 extension.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.