Again JSF upload file problem.
I am using My Faces to upload files. There is a way to limit the size of uploaded files.
<filter>
<filter-name>ExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>7m</param-value>
</init-param>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
</filter>When I try to upload bigger than 7 MB file, I receive the following log.
2007-05-23 13:58:20,796 [http-8080-Processor24] INFO org.apache.myfaces.component.html.util.MultipartRequestWrapper - user tried to upload a file that exceeded file-size limitations.
org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because it's size exceeds allowed range
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:317)
at org.apache.myfaces.component.html.util.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:70)
at org.apache.myfaces.component.html.util.MultipartRequestWrapper.getParameter(MultipartRequestWrapper.java:151)
at org.apache.myfaces.context.servlet.RequestParameterMap.getAttribute(RequestParameterMap.java:39)
at org.apache.myfaces.context.servlet.AbstractAttributeMap.get(AbstractAttributeMap.java:87)
at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getTreeStructureToRestore(HtmlResponseStateManager.java:181)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreTreeStructure(JspStateManagerImpl.java:142)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:181)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:255)
at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:113)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
By now, OK. Here comes the problem: The behavior of application is correct after this, which I can see from the rest of my log, BUT my browser continue to say that the request is being processed and that the page continues to load, which is not true, and I can not find where is the reason.
Do you have any idea?
Check this code if it is useful
REPORT ZSRK_046 .
DATA : FIR_FILE(512) VALUE '
iltlvp01.t.st.corp\DE_Development\EP 6\Port\dept\Program Office\TEST.json'.
TYPES: BEGIN OF TP_DATA_TAB,
TEXT(512),
END OF TP_DATA_TAB.
DATA : DATA_TAB TYPE STANDARD TABLE OF TP_DATA_TAB,
WA_DATA_TAB LIKE LINE OF DATA_TAB .
DATA : WA(512).
OPEN DATASET FIR_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC EQ 0.
DO.
READ DATASET FIR_FILE INTO WA.
IF SY-SUBRC NE 0.
EXIT.
ENDIF.
WA_DATA_TAB-TEXT = WA.
APPEND WA_DATA_TAB TO DATA_TAB.
CLEAR : WA_DATA_TAB, WA.
ENDDO.
ENDIF.
LOOP AT DATA_TAB INTO WA_DATA_TAB.
WRITE : / WA_DATA_TAB-TEXT.
ENDLOOP.
Similar Messages
-
Uploading file problem in JSF using myfaces-extensions.jar.
Dear All,
I'm new to JSF and trying to upload files using myfaces-extensions-1.0.9.jar and commons-fileupload-1.2.1.jar.
I have upload.jsp and result.jsp and a bean named MyBean.java. after press the submit button it should navigate to result.jsp and shows some info.
My problem is that it successfully run but when submit its not working and remain same page.
upload.jsp:
{<%@page contentType="text/html" pageEncoding="windows-1252"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<f:view>
<h:form id="MyForm" enctype="multipart/form-data" >
<h:messages globalOnly="true" styleClass="message"/>
<h:panelGrid columns="3" border="0" cellspacing="5">
<h:outputLabel for="myFileId" value="File: "/>
<x:inputFileUpload id="myFileId"
value="#{myBean.myFile}"
storage="file"
required="true"/>
<h:message for="myFileId"/>
<h:outputLabel for="myParamId" value="Param: "/>
<h:selectOneMenu id="myParamId"
value="#{myBean.myParam}"
required="true">
<f:selectItem itemLabel="" itemValue=""/>
<f:selectItem itemLabel="MD5" itemValue="MD5"/>
<f:selectItem itemLabel="SHA-1" itemValue="SHA-1"/>
<f:selectItem itemLabel="SHA-256" itemValue="SHA-256"/>
<f:selectItem itemLabel="SHA-384" itemValue="SHA-384"/>
<f:selectItem itemLabel="SHA-512" itemValue="SHA-512"/>
</h:selectOneMenu>
<h:message for="myParamId"/>
<h:outputText value=" "/>
<h:commandButton id = "test" value="Submit"
action="#{myBean.processMyFile}"/>
<h:outputText value=" "/>
</h:panelGrid>
</h:form>
</f:view>
faces-config.xml
<?xml version='1.0' encoding='UTF-8'?>
<!-- =========== FULL CONFIGURATION FILE ================================== -->
<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
<managed-bean>
<managed-bean-name>myBean</managed-bean-name>
<managed-bean-class>
com.devsphere.articles.jsfupload.MyBean
</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/upload.jsp</from-view-id>
<navigation-case>
<from-outcome>OK</from-outcome>
<to-view-id>/result.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
Can anybody there for help me whats the problem. I'm using netbeans 6.1 with bundled tomcat 6.0 and no error is shown.Hey All,
I've got my solve. Now Its working. -
Visual Web JSF Portlet Upload file Problem in Websynergy
Hello,
I am using Websynergy milestone 3 release. I have tried to build AS A PORTLET the sample code, "Uploading Files in NetBeans Visual Web JSF Applications" (http://www.netbeans.org/kb/60/web/intro.html) using netbeans 6.5. The solution deploys successfully but unfortunately, the file Upload control does not work in the websynergy portlet environment. No file seems to be uploaded. The same code works very well in non-portlet environment. Is there a work-around for the Portlet environment?
Looking forward to some help!
PiusHello,
I am using Websynergy milestone 3 release. I have tried to build AS A PORTLET the sample code, "Uploading Files in NetBeans Visual Web JSF Applications" (http://www.netbeans.org/kb/60/web/intro.html) using netbeans 6.5. The solution deploys successfully but unfortunately, the file Upload control does not work in the websynergy portlet environment. No file seems to be uploaded. The same code works very well in non-portlet environment. Is there a work-around for the Portlet environment?
Looking forward to some help!
Pius -
Hi I stucked on a problem...... I want to upload file from html page....On this page I want only a upload button so that when I click on this button file will upload from my client m/c to server m/c.... I have code n all but browse button on html page....now I want to remove this browse button n want to give the file path somewhere in the code itself........so that on html page there will only the uplod button and by click on this button file will upload from client to server.......server path already there in code.....Please do the needful Abhishek I m putting the code here:- FileUpload.java /* upload-FileUpload.java NOTE: This file is a generated file. Do not modify it by hand! */ package upload; //custom imports for FileUpload //add your custom import statements here import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import com.oreilly.servlet.MultipartRequest; import java.util.*; public class FileUpload extends javax.servlet.http.HttpServlet { protected boolean create() throws java.lang.Exception { return true; } public FileUpload() { // Constructor. } private void unhandledEvent( String listenerName, String methodName, java.lang.Object event ) { } /** * destroy Method */ public void destroy() { super.destroy(); // TODO: implement } /** * doGet Method */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("abhishek"); response.setContentType( "text/html" ); PrintWriter out = response.getWriter(); out.println("<HTML>"); out.println("<HEAD><TITLE>FileUpload</TITLE></HEAD>"); out.println("<BODY>"); out.println("<H1>FileUpload</H1>"); out.println("Hello World!"); out.println(" Default Implementation From PowerJ "); out.println("</BODY></HTML>"); // TODO: implement } /** * doPost Method */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); try{ response.setContentType("text/html"); out.println("<HTML>"); out.println("<head><Title>Decoded Uploaded File</title><head>"); out.println("<body>"); out.println("<H1>UploadFile</h1>"); // path must be absolute to upload dir // This is the decoder class that extracts the parameters and transfer file // request argument = Http input stream // c:\\temp\\upload = directory to save file // 15*1024*1024 = 15mb max size file MultipartRequest multi = new MultipartRequest(request, "c:\\temp\\upload",15*1024*1024); // Lists form parameters out.println("Params:"); Enumeration params = multi.getParameterNames(); out.println("<pre>"); while (params.hasMoreElements()) { String name = (String)params.nextElement(); String value = multi.getParameter(name); out.println(name + " = " + value); } out.println("</pre>"); // Show details of uploaded file out.println("Files:"); Enumeration files = multi.getFileNames(); out.println("<pre>"); while (files.hasMoreElements()) { String name = (String)files.nextElement(); String filename = multi.getFilesystemName(name); String type = multi.getContentType(name); File f = multi.getFile(name); out.println("name: " + name); out.println("filename: " + filename); out.println("type: " + type); if (f != null) { out.println("f.toString(): " + f.toString()); out.println("f.getName(): " + f.getName()); out.println("f.exists(): " + f.exists()); out.println("f.length(): " + f.length()); out.println(); } out.println("</pre>"); } }catch (Exception e){ out.println("<pre>"); e.printStackTrace(out); out.println("</pre>"); } out.println("</body></html>"); } /** * init Method */ public void init(ServletConfig config) throws ServletException { super.init(config); // TODO: implement } /**************************************** * data members ****************************************/ // add your data members here } -------------------------------------------------------------------------------------------------- UploadFile.html <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>File Upload using EAS</title> </head> <body> <form method="POST" enctype="multipart/form-data" action="upload/FileUpload"> <b>File Upload using EAS </b> Select file to send: <input type="file" name="name" size="30"> Your Name: <input type="input" name="yourname" size="20"> <input type="submit" value="Send File" name="submit"> </form> </body> </html> ---------------------------------------------------------------------------------------------- You can download the oreilly files from :- (same code is also here) http://www.sybase.com/detail?id=1011664
I m putting the code again with code tags:-
code is here
FileUpload.java
package upload;
//custom imports for FileUpload
//add your custom import statements here
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import com.oreilly.servlet.MultipartRequest;
import java.util.*;
public class FileUpload extends javax.servlet.http.HttpServlet
protected boolean create() throws java.lang.Exception
return true;
public FileUpload()
{ // Constructor.
private void unhandledEvent( String listenerName, String methodName, java.lang.Object event )
* destroy Method
public void destroy()
super.destroy();
// TODO: implement
* doGet Method
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
System.out.println("abhishek");
response.setContentType( "text/html" );
PrintWriter out = response.getWriter();
out.println("<HTML>");
out.println("<HEAD><TITLE>FileUpload</TITLE></HEAD>");
out.println("<BODY>");
out.println("<H1>FileUpload</H1>");
out.println("Hello World!");
out.println("
Default Implementation From PowerJ
out.println("</BODY></HTML>");
// TODO: implement
* doPost Method
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
PrintWriter out = response.getWriter();
try{
response.setContentType("text/html");
out.println("<HTML>");
out.println("<head><Title>Decoded Uploaded File</title><head>");
out.println("<body>");
out.println("<H1>UploadFile</h1>");
// path must be absolute to upload dir
// This is the decoder class that extracts the parameters and transfer file
// request argument = Http input stream
// c:\\temp\\upload = directory to save file
// 15*1024*1024 = 15mb max size file
MultipartRequest multi = new MultipartRequest(request, "c:\\temp\\upload",15*1024*1024);
// Lists form parameters
out.println("Params:");
Enumeration params = multi.getParameterNames();
out.println("<pre>");
while (params.hasMoreElements()) {
String name = (String)params.nextElement();
String value = multi.getParameter(name);
out.println(name + " = " + value);
out.println("</pre>");
// Show details of uploaded file
out.println("Files:");
Enumeration files = multi.getFileNames();
out.println("<pre>");
while (files.hasMoreElements()) {
String name = (String)files.nextElement();
String filename = multi.getFilesystemName(name);
String type = multi.getContentType(name);
File f = multi.getFile(name);
out.println("name: " + name);
out.println("filename: " + filename);
out.println("type: " + type);
if (f != null) {
out.println("f.toString(): " + f.toString());
out.println("f.getName(): " + f.getName());
out.println("f.exists(): " + f.exists());
out.println("f.length(): " + f.length());
out.println();
out.println("</pre>");
}catch (Exception e){
out.println("<pre>");
e.printStackTrace(out);
out.println("</pre>");
out.println("</body></html>");
* init Method
public void init(ServletConfig config) throws ServletException
super.init(config);
// TODO: implement
* data members
// add your data members here
}UploadFile.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>File Upload using EAS</title>
</head>
<body>
<form method="POST" enctype="multipart/form-data" action="upload/FileUpload">
<b>File Upload using EAS </b>
Select file to send: <input type="file" name="name" size="30">
Your Name: <input type="input" name="yourname" size="20">
<input type="submit" value="Send File" name="submit">
</form>
</body>
</html>[ -
Hello,
I have a problem with multiple upload file tool.
Because my server need, in order to upload files in its folders, to be logged only with ftp user (that is unique).
Now, I need that when I upload a file its name will be stored on db table "file_name". But in order to put data in database i have tobe logged also with user that is allowed to access on mysql db.
So I understand that I should nedd to types of authentication at the same time...
I think it depends on my type of hosting that is windows, and there is not the possibility to change CHMOD, so the error when I try to upload a file is that the folder has not write permissions...
Any suggestions?
Thanks a lot
ascaro231
ItalyHi ascaro231,
wow, that is one bag of problems on the remote side :-(
to be logged only with ftp user
although PHP itself provides native FTP functions
(e.g. for uploading files and also changing folder & file permissions), ADDT´s file upload features don´t support this protocol
and there is not the possibility to change CHMOD
CHMOD *will* have to be supported by your host, because this is how ADDT changes folder & file permissions.
Well, to me it seems that your host doesn´t provide some very basic and truly common-standard PHP settings -- and honestly, disabling the regular PHP file upload features is ridiculous.
Any suggestions?
go for a better host -- this is just inacceptable.
Are you hosting with "Aruba" BTW ? They have both Windows and Linux hostings, and AFAIK it´s possible to switch the hosting type.
Cheers,
Günter Schenk
Adobe Community Expert, Dreamweaver -
I have a jsp form which is used to upload file...following is the code..
<form name='fileUploadFrm' METHOD="POST" ENCTYPE="multipart/form-data" action='/myServlet?prma=1&prmb=2' onSubmit="return validateForm(this);">
<H2>Upload File <H2>
<table class="tabledatadisplay" border='0' cellpadding='0' cellspacing='3'>
<tr><td>File Name/ID:</td><td> <input name='fileName' type='text'></td></tr>
<tr><td>File Description:</td><td><input name='fileDesc' type='text'></td></tr>
<tr><td>File:</td><td> <input name='fileContent' type='file'></td></tr>
<tr><td colspan='2'> </td></tr>
<tr><td> </td><td><input name='attach' type='submit' value=' Upload File ' onClick="return confirm('Are you sure you want to upload the file.');"></td></tr>
</table>
</form>
intially i used two hidden fields prma and prmb..it didn't work so I changed the action string to include both the hidden fields...
Now I get null values when I use the following code in myServlet
request.getParameter("fileName");
request.getParameter("fileDesc");
I do get the file, i mean from the file input element
I am using multiparser etc..in myServlet, I could able to read the contents and save it to database, but I couldn't able ot retrieve the text field and hidden field values in myServlet
strange...can't figure out wy it is so????
someone pls help me with this...Hi I am also working on the same problem and my next task is to display the contents to the browser and give him an option to either only open the document or save it to hard disk. I am doing it through setting the response.setContentType(content-disposition, attachment, filename") but it does not display the contents, it shows the dialog box but not the contents. please help me if u can...i m sending u some helping code..
PreparedStatement preparedStatement2 =
conn.prepareStatement("SELECT content,filename FROM tab_file );
ResultSet resultSet = preparedStatement2.executeQuery();
while(resultSet.next())
Blob blob = resultSet.getBlob(1);
byte [] b = blob.getBytes(1, length );
response.setHeader("Content-Disposition","attachment; filename=untitled.java");
ServletOutputStream servletOut = response.getOutputStream();
servletOut.write(buf);
servletOut.close();
thnx -
Uploading files problem.
I have got a confusion in uploading files from user machine.
we use <input type='file' name='fileName'/> tag for that.
now at server side how we get the file:
request.getParameter('fileName'); ?
if yes then:
but getParameter function returns a string, and a file data (eg image file) can't represented as a string.
if no then:
what function of request object we should use for that purpose.
Now my second query is I have to get the size of the image, how will I be doing that.
Please help me in this context.
Thanks in advance for any help.Hello,
Uploading file is a special request of HTTP.
You have to handle the request a different way.
Check on the JSP / Servlet forum for more information.
Regards,
Sebastien Degardin -
Hi,
I have created a page to allow people to upload a file, OR
just insert the url of the file. I am getting errors when I choose
the option not upload the file.
The first page has two input fields, one is text and the
other is file - they both go to the same page. And I use
enctype="multipart/form-data" in the form header.
The second page checks to see if the form variable containing
the file name exists - if it does, it loads the file. If not, then
it just uses the url supplied in the text field.
I can upload a file ok, but when I don't want to upload a
file, and just enter the url, it comes back with an error. Is what
I am trying to do possible, or do I need two different forms with
two different destination pages??quote:
Originally posted by:
cakesy
Hi,
I have created a page to allow people to upload a file, OR
just insert the url of the file. I am getting errors when I choose
the option not upload the file.
The first page has two input fields, one is text and the
other is file - they both go to the same page. And I use
enctype="multipart/form-data" in the form header.
The second page checks to see if the form variable containing
the file name exists - if it does, it loads the file. If not, then
it just uses the url supplied in the text field.
I can upload a file ok, but when I don't want to upload a
file, and just enter the url, it comes back with an error. Is what
I am trying to do possible, or do I need two different forms with
two different destination pages??
Assuming you are doing as you have actually indicated, you
pretty much figured out the problem already, but I'm not certain
you realize it.
With the exception of checkboxes (
and some weird radio button configs) all form fields
exist whether they are blank or not.
What you should be doing on your action page is checking to
see
if the fields are blank,
not whether they exist. Make sure you use the TRIM function
when you do this as well so it's not possible for people to submit
the field with just a space in it.
<CFIF TRIM(fileformfield) NEQ "">
do action for file upload
</CFIF>
<CFIF TRIM(urlformfield) NEQ "">
do action for url addition
</CFIF>
You could use a CFELSE in there, but I prefer to test for
either possibility since (
theoretically) the form fields could be submitted with
blanks in each of them. Also, (theoretically) they could submit the
form with both fields completed, so then you may also want to
incorporate some cross-testing so that if both are filled out, you
either choose one as the default, or you send an error back to the
user to choose one or the other. -
Hi everyone,
I'm running a late-2012 27 inch iMac - 3.4GHz Intel Core i7, 32GB 1600 MHz DDR3 with the 3TB fusion drive, OS 10.8.4. At present there is 1.92TB of available storage.
I have received this message "Your Mac OSX startup disk has no more space available for application memory" just before a full on crash multiple times in the past couple of days whilst using WeTransfer to send over some large files (500MB+). The applications I have had open at the time have been: Activity Monitor, App Store, Firefox, and Finder. Over the course of uploading the files, the active system memory has gone from 1.04GB and steadily increased until it more or less maxes out around 29GB, at which point the Page Outs rocket up to around 40GB/s and the swap memory fills up pretty quickly until the computer basically can't take any more and blacks out.
This is a pretty new thing, haven't really had an issues before. My main software used: Sibelius 7 & Logic Pro X. I've also recently started working with Final Cut Pro X, which seems to have been struggling at points. I've tried closing everything, restarting the computer and not opening anything (specifically NOT FCPX) before attempting an upload. I've even gone so far as to remove FCPX from my system, and yet the problem is still recurring. Both "kernal_task" and "WindowServer" have been running high on CPU when these problems have occurred.
Does anyone know what might be the issue and how it could possibly be resolved?
Really appreciate any help, I'm in the middle of a fairly sizeable project and the deadlines are just around the corner.
Thanks,
TomThere is excessive swapping of data between physical memory and virtual memory. That can happen for two reasons:
You have a long-running process with a memory leak (i.e., a bug), or
You don't have enough memory installed for your usage pattern.
Tracking down a memory leak can be difficult, and it may come down to a process of elimination.
When you notice the swap activity, open the Activity Monitor application and select All Processes from the menu in the toolbar, if not already selected. Click the heading of the Real Mem column in the process table twice to sort the table with the highest value at the top. If you don't see that column, select
View ▹ Columns ▹ Real Memory
from the menu bar.
If one process (excluding "kernel_task") is using much more memory than all the others, that could be an indication of a leak. A better indication would be a process that continually grabs more and more real memory over time without ever releasing it. Here is an example of how it's done.
The process named "Safari Web Content" renders web pages for Safari and other applications. It uses a lot of memory and may leak if certain Safari extensions or third-party web plugins are installed. Consider it a prime suspect.
If you don't have an obvious memory leak, your options are to install more memory (if possible) or to run fewer programs simultaneously.
The next suggestion is only for users familiar with the shell. For a more precise, but potentially misleading, test, run the following command:
sudo leaks -nocontext -nostacks process | grep total
where process is the name of a process you suspect of leaking memory. Almost every process will leak some memory; the question is how much, and especially how much the leak increases with time. I can’t be more specific. See the leaks(1) man page and the Apple developer documentation for details. -
BT Cloud - Uploading Files - Problem
I just wish to upload and share files using BT Cloud but cannot figure out how it works - which is surprising as I've been in the IT industry for more years than I care to remember - so I don't know how non IT professionals think of it all. I have watched the video on Youtube - it shows an add files button to click and add files. I am not seeing such a button on the screen in front of me - only an "Add to BT Cloud Sync". Can you please advise. If BT Cloud is purely designed for back-up purposes it is not what I am looking for,
Ken2310 wrote:
Yes I understand all that Ribblelancs. Thanks for the reply though, see me other response.
The sharing by email appears to work, using Outlook as a client. I receive similar mails from web mail users overseas which provide links to a website (not BT), showing family photos, videos etc.
However, I would not use BT Cloud to link to masses of files: it's a matter of personal choice.
There may be a security problem if you try to send links to exe files.
Note that the link as sent is https, which the recipient could add to browser favourites.
Re BT Cloud Help / Instructions.
It may be that the links to Help are outdated when accessed from within the application. If you go to Help from within the BT Help pages, the results refer to the latest version of BT Cloud. -
I use webutil_file_transfer.Client_To_AS_With_Progress(
c:\temp\mytxt.txt,
'\\192.234.43.233\d$\myFolder'
,'Upload to Application Server in progress'
,'Please wait'
,false
,null);
but I can't upload the file it always returns boolean falseSince you are uploading to the server, the Forms user account must have privileges to write files on the server. This is the most common cause of a failed upload. Double-check with your system admins and make sure the Forms user account has sufficient privs.
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly. -
hi......
i am using struts.....
i want to upload a file from client to server......but i am using enctype="multipart/form-data" in my jsp........it prompt out a err message
javax.servlet.ServletException: Servlet execution threw an exception
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:275)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.entertainment.system.EntertainmentFilter.doFilter(EntertainmentFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
please help.....thank youat com.entertainment.system.EntertainmentFilter.doFilter(EntertainmentFilter.java:70)That is your own filter I'm assuming and line 70 of that filter is causing your exception. So check out that line to see what the offending code is.
I'm guessing that line does something with a parameter you retrieved, which is most likely null. A multipart form requires an API that can parse a multipart request, you cannot get file uploads (or other multipart fields) using the HttpServletRequest. I suggest you try out Apache commons FileUpload.
http://jakarta.apache.org/commons/fileupload/ -
Problems uploading files to various web browsers
I'm having huge problems with uploading files to various browsers on my MacBook Pro (running Mac Lion OS X 10.7.5)
My default web browser is Google Chrome but I have tried Firefox, Safari and Mail, too, and they're all presenting the same problem.
The problem is that whenever I try to attach a document to an email in Gmail or upload a photo/file to any website - it just doesn't play ball. The web browser then becomes totally unresponsive (not loading new tabs etc.) and I have to Force Quit and start the application running again. When I tried this in Mail, the application actually crashed.
I've figured out a way to get round the problem in Gmail - creating documents in Google Drive or simply dragging documents into the email - but I'm starting an online course soon and I really need to be able to upload documents, files, images etc.
So far I have tried:
Updating the software on my Mac
Updating Google Chrome
Uninstalling and reinstalling Google Chrome
Signing in and out of Google Chrome
Deleting all browser history on Google Chrome
I've also figured out that it's not my firewall as I had an unrelated problem with that and it was taken down for around 24 hours to be fixed - I tried again to upload files in this 24 hour window and encountered the same problems.
I'm also having problems with my Windows for Mac - whenever I try to Save or Save As in Word - the programme becomes completely unresponsive, parts of the toolbars at the top white out and I have to Force Quit - hence, why I started using Google Drive to create documents. When I try and Save or Save As in Excel or Powerpoint, these programmes crash too.
I don't know if these problems are related, but I thought it best to bring it up just in case.
Can anyone help me?!In answer to my own question, in case anyone has the same issue, the problem turned out to be that my hard drive is failing.
If anyone has the same problem, back up all your data to an external device immediately (trying to run a computer on a failing hard drive is like trying to run on a broken leg, so I'm told) and take your mac to get a new hard drive - should cost around £100. -
When uploading to FTP Host it gives me this error "Error uploading file index.html. Click Resume to try again. If this problem persists, try again later. [550 /index.html: Not a regular file]" What does this mean and how can I fix it? I need to be able to upload my website and it is not allowing me to do so.
Hi
Are you still facing the same error ? Also, have you tried to export the file as html , does it shows same error ? You can upload the exported html to your server using any FTP client as an alternative.
Thanks,
Sanjit -
[JSF 2] File upload. Is this feature handled already?
Hello,
I need to allow a user to upload many files through the same form.
This is what I would have done with Struts with this HTML code:
<input type="file" name="file1" size="62" value="" />
<input type="file" name="file2" size="62" value="" />
<input type="file" name="file3" size="62" value="" />and the use of the org.apache.struts.upload.+FormFile+.
However, I see no direct access to this feature through the JSF 2.0.
no special <h:> tag.
Reading old JSF code on the web, Tomahawk or Icefaces were used for this task.
But today, Tomahawk doesn't support JSF 2, and Icefaces has an 2.0 Alpha 2 version that offers many features except File Upload that is still not working (for their update of the month of January: no updates since?).
More than that, I was trapped few days ago by a strange behavior of JSF 2.0.
Setting a "+multipart/form-data+" enctype to my form made JSF 2.0 loop on form validation, without ever submitting it.
I am sure I didn't dreamed when it happened to me. And removing that enctype made the <h:form> returning to its default "+application/x-www-form-urlencoded+" enctype generation, and everything went fine then.
But I know that attempting to upload files form a web page involve setting a "+multipart/form-data+" enctype on it... I feel doomed.
All these questions make me return to you all, again. I wonder if you have succeed in using file upload with JSF 2.0 already.
What mean do you use for that? Any component already exist that is compliant with JSF 2.0?
Thanks for your help,
Grunt.Are you aware that multi-part forms are not supported by Servlet implementations out of the box? You need to add a filter or manually invoked multi-part processing to support file uploads in any Servlet based solution.You're right. Until JSF 2 takes benefits from Servlet 3.0 who offers a getPart() function, a filter looks mandatory.
Therefore, I tried the most advanced "faces" available for file upload: Primefaces 2.0.2, who provides a filter. However, it's not enough. The whole Primefaces solution for file uploading works chaotically. For me, it handles the multipart request well, but isn't able to join the listener the uploadFile tag defines, at submission time. I won't enter into details because this is not the good forum to discuss of that specific trouble of Primefaces. I did post my problem on Primefaces forum, and learned that this feature isn't working well yet.
Icefaces doesn't offer the file uploading currently. Even its compatilibilty mode to version 1.8 is told (by the release note) not being able to handle file uploading yet.
Richfaces just began its version 4.0.0 and is far from offering file uploading.
If creating a working file upload was something possible yet, I can say for sure that any of these "faces" would had offered a working feature the sooner they could. But rather than that, I am reading ideas about some Mojarra 2 low level bugs that would disallow this feature to be implemented at the moment.
It can't be only a story of a filter to write. That filter would have been written already hundred of times, else. A complete working solution would be shown everywhere.
Currently, to summarize all, whatever a theorical reason is given, or a practical one (RFE missing, no time to write it, not a critical feature, or even unwished feature, depending of everyone thoughts in the previous replies to this post), file uploading is not available for JSF 2.0 by any existing way. No tier API or Faces is able to provide it, as it could be easily proven by the fact... that no samples are currently existing, working.
Myself, but I might be alone believing it, I consider this missing feature like a JSF 2 flaw.
I guess its a mojarra internal bug that disallows developers to provide a solution yet. This is not abnormal: JSF 2.0 has six months only, and can't work perfectly yet.
But the more the correction of that feature will be delayed, and the more the developers will be in trouble, as nothing else is able to work in compatibility with JSF 2.0 (no existing working sample, I need to repeat it). And worst than that, this kind of flaw is one of those that in enterprise, at decision time, can makes JSF 2 discarded for another framework, less smart, but doing everything expected. It would be a shame, then.
So, I think this problem should not be taken disdainfully. It's not a matter of "+You should only put a filter here+", "+It's not our work+", "+Please write our specs+", "+Wait, only wait, it will come for sure one day...+". Its more significant than that. It requires your study. The one of competent people like you are, and having goodwill. Because I understand that this is a problem that has been thrown away since a long time! But it is returning back to us like a boomerang at great speed.
Among the features that JSF 2 offers and the ones that are currently under development, they are many, many of them, that will look secondary if at the end of all, file uploading isn't available.
Regards,
Grunt.
Maybe you are looking for
-
I just bought a new computer. Itunes only offers me the option of erase and sync, as I can only have it sync'd with one computer. I want to move my music to this computer from my ipod. Is this possible, or do I have to go back to my cds and upload
-
Delivery Date Monitor Against Purchase Order Delivery Date.
Hi All Forgive me if I've posted this in the wrong forum area but I'm fairly new to this and have spent some time looking for a correct area but still not sure??? Anyway........ ....I'm wanting to know if there's a standard SAP Report or anything tha
-
Enterprise Designer strange problem
Hello, Im very new to this forum and to JCAPS. May be someone can advise me what can I do with my problem as Im completely stuck. I was making an installation of JCAPS 5.1.3 steb-by-steb by the installation guide. I start repository and domain, and
-
LDAP Connection exception: unable to retreive the specified realm(s).
I am using Embedded OC4J and I have a web form based authentication (j_security _check) and configured my orion-application.xml to use LDAP connection in this way: <?xml version = '1.0' encoding = 'windows-1252'?> <orion-application xmlns:xsi="http:/
-
I'm looking for a reference on deploying Skins with ADF Faces. The published howto on OTN is'nt very helpful because the sample code link is broken (See my previous post). The JDeveloper help files are somewhat helpful but I'm looking for a working e