Foros de discusión
Request Entity Too Large
Jobin Mathew, modificado hace 9 años.
Request Entity Too Large
Junior Member Mensajes: 77 Fecha de incorporación: 4/07/14 Mensajes recientes
Hi,
am getting error in my jsf portlet when am trying to upload documents.
error as follows,
Request Entity Too Large
The requested resource
/MyPortal/group/control_panel/manage
does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.
am using default jsf form which is POST.
my xhtml form is as follows.
<h:form id="formadd" enctype="multipart/form-data" type="post">
</h:form>
please help
Thanks
Jobin Mathew
am getting error in my jsf portlet when am trying to upload documents.
error as follows,
Request Entity Too Large
The requested resource
/MyPortal/group/control_panel/manage
does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.
am using default jsf form which is POST.
my xhtml form is as follows.
<h:form id="formadd" enctype="multipart/form-data" type="post">
</h:form>
please help
Thanks
Jobin Mathew
Jan Geißler, modificado hace 9 años.
RE: Request Entity Too Large
Liferay Master Mensajes: 735 Fecha de incorporación: 5/07/11 Mensajes recientes
Do you Use Tomcat? Does it exceed 2mb?
reference:
http://tomcat.apache.org/tomcat-7.0-doc/config/ajp.html
and search for:
maxPostSize
on the site.
reference:
http://tomcat.apache.org/tomcat-7.0-doc/config/ajp.html
and search for:
maxPostSize
on the site.
Jobin Mathew, modificado hace 9 años.
RE: Request Entity Too Large
Junior Member Mensajes: 77 Fecha de incorporación: 4/07/14 Mensajes recientesJan Geißler:
Do you Use Tomcat? Does it exceed 2mb?
reference:
http://tomcat.apache.org/tomcat-7.0-doc/config/ajp.html
and search for:
maxPostSize
on the site.
Thanks Jan for the reply.
i use Tomcat and tried uploading with a file of size just 250 kb.
i used the following code to add documents to my Blog entry.
FileEntry Dlfile = DLAppServiceUtil.addFileEntry(
themeDisplay.getScopeGroupId(), folderId,
FilenameUtils.getName(uploadedFile.getFileName()), uploadedFile.getContentType(),
uploadedFile.getFileName(), "", "", uploadedFile.getInputstream(),
uploadedFile.getSize(), serviceContextFile);
is there any limitation of files in the DLAppServiceUtil?
If so, can we change it?
Thanks in advance
Jobin
Jan Geißler, modificado hace 9 años.
RE: Request Entity Too Large
Liferay Master Mensajes: 735 Fecha de incorporación: 5/07/11 Mensajes recientes
There is and you can Change it.
But it is definitely larger than 250kb.
You'll find the Property in the Control Panel in the Server Admin Section.
But it is definitely larger than 250kb.
You'll find the Property in the Control Panel in the Server Admin Section.
Jobin Mathew, modificado hace 9 años.
RE: Request Entity Too Large
Junior Member Mensajes: 77 Fecha de incorporación: 4/07/14 Mensajes recientes
but we have option to change upload size of Documents and Media , and it have effect only for DlFileEntry right?
because i changed the limit and tried, but of no use.
because i changed the limit and tried, but of no use.
Jan Geißler, modificado hace 9 años.
RE: Request Entity Too Large
Liferay Master Mensajes: 735 Fecha de incorporación: 5/07/11 Mensajes recientes
I do think there is another problem. 250kb of size really really shouldn't be a problem.
Jobin Mathew, modificado hace 9 años.
RE: Request Entity Too Large
Junior Member Mensajes: 77 Fecha de incorporación: 4/07/14 Mensajes recientes
but is it because of the difference in
DLAppServiceUtil.addFileEntry
and
DLFileEntryLocalServiceUtil.addFileEntry ?
DLAppServiceUtil.addFileEntry
and
DLFileEntryLocalServiceUtil.addFileEntry ?
Kyle Joseph Stiemann, modificado hace 9 años.
RE: Request Entity Too Large
Liferay Master Mensajes: 760 Fecha de incorporación: 14/01/13 Mensajes recientes
Hi Jobin,
If you are still stuck, you may want to look at the ICEfaces Documents Portlet. It has example code for how to upload files to Liferay Documents and Media.
- Kyle
If you are still stuck, you may want to look at the ICEfaces Documents Portlet. It has example code for how to upload files to Liferay Documents and Media.
- Kyle
Jobin Mathew, modificado hace 9 años.
RE: Request Entity Too Large
Junior Member Mensajes: 77 Fecha de incorporación: 4/07/14 Mensajes recientes
Thanks,
but as i said above am using
as you suggested. if i am using
it have some difference ? am confused with DLFileEntryServiceUtil,DLFileEntryLocalServiceUtil.
it have something with the error?
i set dl.file.max.size=307200000.
but as i said above am using
FileEntry Dlfile = DLAppServiceUtil.addFileEntry(
themeDisplay.getScopeGroupId(), folderId,
FilenameUtils.getName(uploadedFile.getFileName()), uploadedFile.getContentType(),
uploadedFile.getFileName(), "", "", uploadedFile.getInputstream(),
uploadedFile.getSize(), serviceContextFile);
as you suggested. if i am using
DLFileEntryServiceUtil.addFileEntry(dlFolder.getGroupId(), dlFolder.getRepositoryId(),
dlFolder.getFolderId(), name, uploadedFile.getContentType(), title, description,
changeLog, fileEntryTypeId, fieldsMap, file, inputStream, file.length(),
serviceContext);
it have some difference ? am confused with DLFileEntryServiceUtil,DLFileEntryLocalServiceUtil.
it have something with the error?
i set dl.file.max.size=307200000.
Kyle Joseph Stiemann, modificado hace 9 años.
RE: Request Entity Too Large
Liferay Master Mensajes: 760 Fecha de incorporación: 14/01/13 Mensajes recientes
Sorry Jobin, our demo is out of date. You should actually use DLAppServiceUtil as DLFileEntryServiceUtil is meant for internal use. That being said, I was able to add Documents and Media integration to our Primefaces5 portlet with the following code and it seemed to work with files much larger than 250kb:
try {
ServiceContext serviceContext = new ServiceContext();
serviceContext.setAddGroupPermissions(true);
DLAppServiceUtil.addFileEntry(
LiferayFacesContext.getInstance().getThemeDisplay().getScopeGroupId(),
0L,
uploadedFileWrapper.getName(),
uploadedFileWrapper.getContentType(),
uploadedFileWrapper.getName(),
"",
"",
uploadedFileWrapper.getInputStream(),
uploadedFileWrapper.getSize(),
serviceContext);
}
catch (Exception e) {
// TODO
}
If you want to you can build the primefaces5-portlet from source with my patch and see if it works and see if you are doing anything differently.
- Kyle
try {
ServiceContext serviceContext = new ServiceContext();
serviceContext.setAddGroupPermissions(true);
DLAppServiceUtil.addFileEntry(
LiferayFacesContext.getInstance().getThemeDisplay().getScopeGroupId(),
0L,
uploadedFileWrapper.getName(),
uploadedFileWrapper.getContentType(),
uploadedFileWrapper.getName(),
"",
"",
uploadedFileWrapper.getInputStream(),
uploadedFileWrapper.getSize(),
serviceContext);
}
catch (Exception e) {
// TODO
}
If you want to you can build the primefaces5-portlet from source with my patch and see if it works and see if you are doing anything differently.
- Kyle
Archivos adjuntos:
Jobin Mathew, modificado hace 9 años.
RE: Request Entity Too Large
Junior Member Mensajes: 77 Fecha de incorporación: 4/07/14 Mensajes recientes
Thanks Kyle,
Let me try this.
Let me try this.
Manish Yadav, modificado hace 9 años.
RE: Request Entity Too Large
Expert Mensajes: 493 Fecha de incorporación: 26/05/12 Mensajes recientes
Try to increase upload limit of file size from control pannel
Kyle Joseph Stiemann, modificado hace 9 años.