3
I have a screen that has the function of sending a file to the server via servlet
but since this file might be big, I needed to put a panel or a div with a gif of load.
I’m wearing richfaces, I’ve tried using popupPanel
, div
and give sendRedirect
to another page while running Servlet but nothing worked.
Could someone help me?
HTML
<body>
<div id="templete">
<ui:include src="templete.xhtml" />
</div>
<form method="post" enctype="multipart/form-data" action="/produto-web/FileUploadServlet">
<div id="divUpload">
Selecione um arquivo : <input type="file" style="width: 435px;" id="file" name="file" size="45" />
<input type="submit" class="Button" value="Enviar Arquivo" />
<p style="color: red;" >${messageError}</p>
<p style="color: Green;" >${messageSucess}</p>
</div>
</form>
Tip: Use the rich:Fileupload and a bean Managed to receive the files. This componenete already displays a status bar on upload.
– Anthony Accioly
@Anthonyaccioly .
– João
I understand, I don’t want to pollute your question if your decision is already made. That being said, 99% of the time the problem with this component is a lack of libraries or some filter that is interfering with the application (Glassfish is especially problematic -https://issues.jboss.org/browse/RF-11988). You can also use the fileUpload of the Primefaces (the Richfaces and the Primefaces are not mutually exclusive)
– Anthony Accioly
@Anthonyaccioly also thought about it, only that on this issue is already my boss who does not want the use of
Primefaces
– João