File Uploading with two command button
Hi all,
After a long I return back.
I am having a JSP page with some mandatory fields and one attach document field.
I am using JSF framework so for file upload i used the tag <t:inputfileupload>, for compulsion fields I used the attribute required = true.
My problem is,
If i attach the file and click attach button before filling mandatory fields the action method is not called. Only after filling the mandatory fields the action method is called. What may be the reason for this?
Is there any example for file uploading with in form and it has two separate command buttons?
DHURAI wrote:
Hi all,
After a long I return back.
I am having a JSP page with some mandatory fields and one attach document field.
I am using JSF framework so for file upload i used the tag <t:inputfileupload>, for compulsion fields I used the attribute required = true.
My problem is,
If i attach the file and click attach button before filling mandatory fields the action method is not called. Only after filling the mandatory fields the action method is called. What may be the reason for this?My guess: you get validation errors, but you don't have a <h:messages/> in your JSF page so you don't see the error yourself. If you check your log files it will most likely be mentioned there.
Similar Messages
-
Report with two Command is empty if one of the two commands returns no data
Hi all,
I have a report with two Commands not linked together.
If ONLY one of the two Commands returns no data, the full report is empty (although the other Command returns data).
I'm using Crystal Report 2008 and the CRJ 12.2.205
Have an idea?Hi Ted,
how can I solve the problem, please? It is important.
If I can help yourself, the problem is appeared in many reports since I updated the library (the old library version 11.8.4.1094 works fine with all). I'm waiting for your answer, please.
Thank you very much. -
File upload with 'asp vb' backend
Hello,
I am trying to get file uploading with flex (flash buider) working. There are plenty of examples with a php backend, but i need the script for a 'asp vb' backend.
I' ve tried lots of different approaches but can't get it right. Someone out there with a solution?
Thanx!!Believe it or not I have to do this also.
I have legacy ASP code that uses ASPUpload that I'd like to get working with my Flash CS5 and FlashBuilder Burrito front-ends.
it's just multipart encoded.
So, if you first test it with ASPUpload and a simple form, trying just FILE1 first, and it works with ASP backend then tackle the FlashBuilder side with some debugging.
ASPUpload is still an extremely embedded component on tens of thousands if not more sites, and it was just updated, but I think the previous version just before this update, the one that's out there in code on so many sites, that is what Flash needs to work with.
ASPUpload is doing its part, as it follows all the multipart encoded RFC rules and has worked for years.
I'd love to join you in finding out what's going on here.
This is a long-standing issue.
I've done PHP also. But again, enhancing an interface with FlashBuilder4 or Burrito, to integrate with working legacy code makes it hard when something is not working on the Flash side (it appears anyway) as ASPUpload form posts are extremely easy. -
Multiple File Upload With Metadata Using REST
hi all
I want to upload multiple files with metadata to document library using REST API. I am using this msdn article
http://msdn.microsoft.com/en-us/library/office/dn769086(v=office.15).aspx for uploading file. I am able to upload single file to document library but it is not working for multiple file. when I select multiple file it is uploading last selected file. can
anyone help with this. I am using office 365 environment.
Thanks in advanceHi,
According to your post, my understanding is that you wanted to use the REST to upload multiple files.
Per my knowledge, the REST API is not supported for uploading multiple files via a single call.
You can write your own loop to upload multiple files via an individual call.
http://sharepoint.stackexchange.com/questions/108525/multiple-file-upload-with-metadata-using-rest/108532#108532
More reference:
http://sharepointfieldnotes.blogspot.com/2014/04/uploading-documents-and-setting.html
http://www.shillier.com/archive/2013/03/26/uploading-files-in-sharepoint-2013-using-csom-and-rest.aspx
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support -
Can anyone recommend a free file uploader with progress bar?
Can anyone recommend a free file uploader with progress bar?
I have searched google but with no luck.
Ideally it would be a DW extension but that might be wishing
for too much.
I would like a large file limit for video and multiple file
extensions allowed.
Thanks in advanceHeya,
Check out this due Waleed he has some nice tuts and here's
a
link
to file upload with progress bar tutorial he has. Granted it
looks like it's just an animated gif letting users know their file
is uploading; if you want realtime upload information displayed for
the user you're gonna have to look at something like Flash with the
power of actionscript to achieve that result.
Hope that helps! -
I am trying to upload a file to a mysql database (using a jsp tomcat 4.1 container) for each new member of my website (typically a cv which is a .rtf word file). I have used the example on the oreilly page and have managed to get the image of the file I have uploaded. Now I am trying to save this into my database for each member so that they can enter all of their details on the one page i.e. name age etc and also a browse for file button which will store the path of their file on their computer. When they click the submit button, all of their details are then stored into the database by the resultant page which outputs wehter they have been successful or not.
The upload bean code (from the oreilly site):
package com.idhcitip;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.ServletInputStream;
import java.util.Dictionary;
import java.util.Hashtable;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
public class FileUploadBean {
private String savePath, filepath, filename, contentType;
private Dictionary fields;
public String getFilename() {
return filename;
public String getFilepath() {
return filepath;
public void setSavePath(String savePath) {
this.savePath = savePath;
public String getContentType() {
return contentType;
public String getFieldValue(String fieldName) {
if (fields == null || fieldName == null)
return null;
return (String) fields.get(fieldName);
private void setFilename(String s) {
if (s==null)
return;
int pos = s.indexOf("filename=\"");
if (pos != -1) {
filepath = s.substring(pos+10, s.length()-1);
// Windows browsers include the full path on the client
// But Linux/Unix and Mac browsers only send the filename
// test if this is from a Windows browser
pos = filepath.lastIndexOf("\\");
if (pos != -1)
filename = filepath.substring(pos + 1);
else
filename = filepath;
private void setContentType(String s) {
if (s==null)
return;
int pos = s.indexOf(": ");
if (pos != -1)
contentType = s.substring(pos+2, s.length());
public void doUpload(HttpServletRequest request) throws IOException {
ServletInputStream in = request.getInputStream();
byte[] line = new byte[128];
int i = in.readLine(line, 0, 128);
if (i < 3)
return;
int boundaryLength = i - 2;
String boundary = new String(line, 0, boundaryLength); //-2 discards the newline character
fields = new Hashtable();
while (i != -1) {
String newLine = new String(line, 0, i);
if (newLine.startsWith("Content-Disposition: form-data; name=\"")) {
if (newLine.indexOf("filename=\"") != -1) {
setFilename(new String(line, 0, i-2));
if (filename==null)
return;
//this is the file content
i = in.readLine(line, 0, 128);
setContentType(new String(line, 0, i-2));
i = in.readLine(line, 0, 128);
// blank line
i = in.readLine(line, 0, 128);
newLine = new String(line, 0, i);
PrintWriter pw = new PrintWriter(new BufferedWriter(new
FileWriter((savePath==null? "" : savePath) + filename)));
while (i != -1 && !newLine.startsWith(boundary)) {
// the problem is the last line of the file content
// contains the new line character.
// So, we need to check if the current line is
// the last line.
i = in.readLine(line, 0, 128);
if ((i==boundaryLength+2 || i==boundaryLength+4) // + 4 is eof
&& (new String(line, 0, i).startsWith(boundary)))
pw.print(newLine.substring(0, newLine.length()-2));
else
pw.print(newLine);
newLine = new String(line, 0, i);
pw.close();
else {
//this is a field
// get the field name
int pos = newLine.indexOf("name=\"");
String fieldName = newLine.substring(pos+6, newLine.length()-3);
//System.out.println("fieldName:" + fieldName);
// blank line
i = in.readLine(line, 0, 128);
i = in.readLine(line, 0, 128);
newLine = new String(line, 0, i);
StringBuffer fieldValue = new StringBuffer(128);
while (i != -1 && !newLine.startsWith(boundary)) {
// The last line of the field
// contains the new line character.
// So, we need to check if the current line is
// the last line.
i = in.readLine(line, 0, 128);
if ((i==boundaryLength+2 || i==boundaryLength+4) // + 4 is eof
&& (new String(line, 0, i).startsWith(boundary)))
fieldValue.append(newLine.substring(0, newLine.length()-2));
else
fieldValue.append(newLine);
newLine = new String(line, 0, i);
//System.out.println("fieldValue:" + fieldValue.toString());
fields.put(fieldName, fieldValue.toString());
i = in.readLine(line, 0, 128);
} // end while
This works fine and I can access the image name of the file by using the commands in my jsp code(on the resultant page of the new member form):
<%@ page import="java.sql.*, com.idhcitip.*"%>
<jsp:useBean id="TheBean" scope="page" class="com.idhcitip.FileUploadBean" />
<%
TheBean.doUpload(request);
out.println("Filename:" + TheBean.getFilename());
So I am wondering how can I then store this image into a text blob in the database?
I found some code on the java.sun forum, but am not entirely sure how I am meant to use it?
package com.idhcitip;
import java.sql.*;
import java.io.*;
class BlobTest {
public static void main(String args[]) {
try {
//File to be created. Original file is duke.gif.
//DriverManager.registerDriver( new org.gjt.mm.mysql.Driver());
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
String host="localhost";
String user="root";
String pass="";
String db="idhcitip";
String conn;
// create connection string
conn = "jdbc:mysql://" + host + "/" + db + "?user=" + user + "&password=" +
pass;
// pass database parameters to JDBC driver
Connection Conn = DriverManager.getConnection(conn);
// query statement
Statement SQLStatement = Conn.createStatement();
/*PreparedStatement pstmt = conn.prepareStatement("INSERT INTO BlobTest VALUES( ?, ? )" );
pstmt.setString( 1, "photo1");
File imageFile = new File("duke.gif");
InputStream is = new FileInputStream(imageFile);
pstmt.setBinaryStream( 2, is, (int)(imageFile.length()));
pstmt.executeUpdate();
PreparedStatement pstmt = Conn.prepareStatement("SELECT image FROM testblob WHERE Name = ?");
pstmt.setString(1, args[0]);
RandomAccessFile raf = new RandomAccessFile(args[0],"rw");
ResultSet rs = pstmt.executeQuery();
if(rs.next()) {
Blob blob = rs.getBlob(1);
int length = (int)blob.length();
byte [] _blob = blob.getBytes(1, length);
raf.write(_blob);
System.out.println("Completed...");
} catch(Exception e) {
System.out.println(e);
Once I have managed to store the file, I would just like people to be able to view each members profile and then to click on a link that will have their stored c.v.
Thanks for a reply anyoneYou could do this one of two ways..
using a prepaired statment, you could read in a byte array...
String sql="INSERT INTO BlobTest VALUES( ? )";
PreparedStatement ps=con.prepareStatement(sql);
ps.setBytes(1, byte[]); //Your byte array buffer from your FileUploadBean
ps.executeUpdate();or you could just use the input stream..
String sql="INSERT INTO BlobTest VALUES( ? )";
PreparedStatement ps=con.prepareStatement(sql);
ps.setBinaryStream(1, InputStream, length); //You'll have to do some work to get length
ps.executeUpdate(); -
Threading problem during File Upload with Apache faces upload tag
First I am going to tell you "My Understanding of how JSF Apache Upload works, Correct me if i am wrong".
1) Restores View (to show Input box and Browse button to facilitate users to select a file for upload)
2) Translates Request Parameters to Component Values (Creates equivalent components to update them with request values).
3) Validates Input(Checks to see whether the User has input the correct file)
4) Updates Backing Bean or Model to reflect the values.
5) Renders response to user.
I am uploading huge files of sizes 400MB and above with the help of JSF apache extensions tag
<h:form id="uploadForm" enctype="multipart/form-data">
<x:inputFileUpload style="height:20px;" id="upload" value="#{backingbean.fileContents}" storage="file" size="50" />
</h:form>
In the backing bean
private UploadedFile fileContents;
public UploadedFile getFileContents() {
return fileContents;
public void setFileContents(UploadedFile fileContents) {
System.out.println("File being uploaded...");
this.fileContents = fileContents;
Since, the file size is so huge, I am using temp folder to use for the apache tag instead of memory.
In web.xml i am using like this
<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>600m</param-value>
</init-param>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>10m</param-value>
</init-param>
<init-param>
<param-name>uploadRepositoryPath</param-name>
<param-value>/uploadfolder/</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ExtensionsFilter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
The upload process is working perfectly fine.
Now coming to the problem:
Suppose one user is logging into the application & uploading say 400MB of files.
Until these files are linked to the model objects as my understanding of step 2, if second user tries to open the application he gets stuck with the loading page.
The page gets loaded only after the request files are linked to the component values(Step 2 above) and updates the backing bean's values.
I don't see any error in the logs. User is getting stuck. The user is getting stuck only when uploading the files. The other operations like searching are not blocking any other activities performed by the user.
Server used: IBM Application Server V6.0. CPU is normal, memory usage is normal.Dear friend,
i am also trying to upload using the common file upload.
when try to run the file error is coming
can give some suggestion.
can i use if concurrent user file upload at a time -
File upload with the SOAP Axis Framework
Hi,
my scenario is as follows:
ERP --> PI --> System A (3rd party application)
ERP sends data (IDoc) to the PI and is mapped there to a xml structure expected by A.
IDoc --> PI --> target xml structure
On A runs a Web service (Axis Framework) with a method uploadFile that expects one parameter (client of A) and the file for the upload has to come as attachment (call.addAttachment).
I imported already the wsdl and can see the message uploadFile in the IR. The Axis Framework is also available already in the SOAP adapter.
So I have
IDoc --> PI --> target xml structure
but want to call
PI --> uploadFile(client) \[with the target xml structure as attachment\]
How can I map the parameter to uploadFile and get the mapped xml structure as attachment?
Thanks and regards
PatrickHi,
thanks for your answer. The PayloadSwapBean could be a solution for the problem and I will try to use it.
Here is another (simplified) version of my scenario:
I have one source interface with three data fields
SD1
SD2
SD3
This should get mapped to a target interface with two data fields
TD1
TD2
So if a source message arrives at PI a Message Mapping is called and the message gets mapped to the target structure.
The result of this mapping should get the attachment of a Web service call.
In a sample client for this Web service it looks like:
Service service = new Service();
Call call = (Call) service.createCall();
call.setOperationName(new QName(... "uploadFile"));
call.addAttachmentPart(...);
The target interface of the Web service is the message uploadFile in an imported wsdl file. This interface has one data field
WSD1
and is independent of the other data fields.
For filling WSD1 another mapping is necessary (or maybe not?).
Regards
Patrick -
Javascript multiple file upload with progressbar does not work in firefox, please help
I want to upload files using this javascript snipped as well as processing non file fields on the same form. This works beautiful in IE11, Chrome and Opera, but not in firefox (version 34).
I fired the non file handler with the action attribute on the <form> like this:
<form id="upload_form" enctype="multipart/form-data" method="POST" action="nonFile.php">
and the javascript with:
<input name="submit" type="submit" style="background: green" value="Submit" onclick="return uploadFiles()"/>
When I change type="button" the file uploads work in FF but the I have no control over the non file fileds.
Can someone gives me an indication of what is wrong?
oXHR.upload.addEventListener("progress", function(e){
var percent=(e.loaded/e.total) * 100;
_(idProg).value = Math.round(percent);
_(idstat).innerHTML = filename.name + " "+Math.round(percent)+"% --- Please Wait";
}, false);
// Upload finish, show the size of the file in Bytes, KBytes or MBytes
oXHR.onreadystatechange = function(){
if (oXHR.readyState == 4 && oXHR.status == 200){
var iBytesTransfered = bytesToSize(filesize);
_(idstat).innerHTML = filename.name + " Size: " + iBytesTransfered + " "+100+"%";
_(idProg).value = 100;
// Upload failed
oXHR.addEventListener("error", function(e){
_(idstat).innerHTML = "Upload Failed";
}, false);
// Upload aborted
oXHR.addEventListener("abort", function(e){
_(idstat).innerHTML = "Upload Aborted";
}, false)<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0, 0,0" width="600" height="360">
<param name=movie value="example.swf">
<param name="allowScriptAccess" value="always" />
<param name="quality" value="high">
<param name="allowScript" value="opaque">
<param name="wmode" value="opaque">
<embed src="example.swf" quality="high" allowScriptAccess="always" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=Shockwave Flash" type="application/x-shockwave-flash" width="600" height="360"></embed></object> -
Problem with flat file upload with ASCII file
Hi All,
I am trying to load data into an ODS object via PSA using a text file (tab delimited). I have the following settings in my InfoPackage
External Data tab: ASCII File
Seperator for thousands:
Character for decimal point:
Currency Conversion:
Number of Header rows to be ignored: 1
Processing tab: Only PSA and Update into data targets subsequently
When I do a preview the data is not showing up in the right format....the tab seperation does not work and data is garbled with extra hexadecimal characters too.
The same file contents in .csv format is loading the data in the right format and preview is fine too.
I need help trying to convert this csv file to .txt format.
Any clues are highly appreciated
Thank youHi,
If in the infopackage you click on a File Type ASCII-file (CR delimiter) radiobutton and then F1, youll see the help:
With an ASCII file as a data source, the data has to be available as a string in the format of the transfer structure. There are no data separators, empty characters are not ignored.
This means that:
- you shouldnt use any delimiters among the record fields
- all fields should have the length the system expects (length of the appropriate infoobject in transfer structure)
- each record should be separated from the next by carriage return CR.
Since I think the program that converts file from Excel format into CR-delimited would be very useful, I created such program in VBA.
So, open your Excel file (if you have csv-file you can open it using Excel).
The program assumes that the first row of the file contain field names. Data itself begin from the 2nd row. Insert as the 1st and 2nd rows the new, blank rows.
Into A1 cell insert number of the last row with data, into B1 number of the last column. Certainly, it may be determined in the program, but I have not done it if someone wants it, s/he can try it.
Into fields of the 2nd row insert expected length of the field.
Make sure that Visual Bacis toolbar is seen. (If not tick in menu path: View/Toolbars/Visual Basic).
In this toolbar click on a Design Node icon.
Drag from the toolbar and drop into worksheet a Command button element.
Double click on the button. In the open window for Private Sub CommandButton1_Click() subroutine insert the following code:
Dim ws1 As Worksheet
Dim J As Long, I As Long, L As Long
Dim FileName As String, Out As String, formatOut As String
Dim LenCell As Long
Set ws1 = ThisWorkbook.Worksheets("SHEET1")
FileName = ThisWorkbook.Path & "\" & Left(ThisWorkbook.Name, Len(ThisWorkbook.Name) - 3) & "txt"
Open FileName For Output As #1
For J = 4 To ws1.Cells(1, 1)
Out = ""
For I = 1 To ws1.Cells(1, 2)
formatOut = (ws1.Cells(J, I))
L = Len(formatOut)
LenCell = Val(ws1.Cells(2, I))
If L > LenCell Then
formatOut = Left(formatOut, LenCell)
Else
Do While L < LenCell
formatOut = formatOut & " "
L = L + 1
Loop
End If
Out = Out & formatOut
Next
Print #1, Out
Next
Close #1
Set ws1 = Nothing
MsgBox "File transformation finished!", vbOKOnly
Now return to Excel sheet, click again Design Node icon switching into run mode.
When you press on this button now, the ASCII program will be created. It will have the same name as an input file (and in the same directory), but with TXT extention.
Remarks:
- The program works with the current worksheet named as SHEET1.
- Fields that are shorter than those expected by the system are padded by spaces from the right. It should not be the problem, since in transfer structure you can check symbols only flag.
- Longer fields are truncated to the length expected.
Best regards,
Eugene
Message was edited by: Eugene Khusainov -
Report with the command button
Hi folks,
i had got a set of selection screen in my report to populate the data to a Transparent Table, before saving the record we need to display the exact record to the user for conformation.
how we archive this one with the normal report.
Reg,
HariharanHi Hariharan,
Check the logic below.
Create a PF status with a push button in the tool bar(SAVE).
Just WRITE the below statement and double click on 123 it will ask for GUI status creation.
SET PF-STATUS '123'.
Press yes. Now In Application tool bar option press + sign it will show u like items 1-7 items 8-14... Give ur text in any one. It will create a push button.
Now display ur report out put. When the user press save now it will ask for saving to data base or not? If the user press yes then it will update else it will not. Just copy paste this code in a sample programu will understand.
SET PF-STATUS '123'.
DATA: l_answer TYPE c.
WRITE 'text'.
AT USER-COMMAND.
CHECK sy-ucomm EQ 'SAVE_TO'. "This is the name given in PF status.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = ' '
DIAGNOSE_OBJECT = ' '
text_question = 'Want to save the data to data base?'
TEXT_BUTTON_1 = 'Ja'(001)
ICON_BUTTON_1 = ' '
TEXT_BUTTON_2 = 'Nein'(002)
ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = 'X'
USERDEFINED_F1_HELP = ' '
START_COLUMN = 25
START_ROW = 6
POPUP_TYPE =
IMPORTING
ANSWER = l_answer
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF l_answer EQ 1.
Update the databse.
ELSE.
Dont update'
ENDIF.
Thanks,
Vinod.
Edited by: Vinod Kumar Vemuru on Mar 21, 2008 5:19 PM
Edited by: Vinod Kumar Vemuru on Mar 21, 2008 5:22 PM -
File upload with non-ascii name
I'm designing a system that includes file-uploads. My problem is that any non-ascii chars in the filename are encoded strangely when saved. ä is encoded to å etc.
I use Tomcat with the -Dfile.encoding="UTF-8" in the Catalina file. I get the same result despite method; my own implementation, apache commons or Javazoom's uploadBean. All the JSP charset parameters are set.
Any ideas?Hi amitads,
I'm sure u've used Java enough. Also, u must have learned about the \ (backslash) escape character ?
So, if u want to include a string like a single quote, u can write \' and for a double quote u can write \".
Try this ... I'm sure it will help.
Keep me posted.
Cheers !!
Sherbir. -
File upload with DAD not working
Hi all,
I have an application which uses the file upload function, similar to the sample http://otn.oracle.com/products/database/htmldb/howtos/howto_file_upload.html
During the development I was not using a DAD and it was working perfectly. Now I have changed the application to use a DAD and now the file upload fails with a HTTP 404 - File not found error
[DAD_din]
connect_string = deccasm01os.na.decoma.com:1521:DIN
;password =
;username =
;default_page =
document_table = wwv_flow_file_objects$
document_path = docs
document_proc = wwv_flow_file_mgr.process_download
;upload_as_long_raw =
;upload_as_blob =
;name_prefix =
;always_describe =
;after_proc =
;before_proc =
reuse = Yes
;connmax =
;pathalias =
;pathaliasproc =
enablesso = No
;sncookiename =
stateful = STATELESS_RESET
;custom_auth =
response_array_size = 128
;exclusion_list =
;cgi_env_list =
bind_bucket_widths = 32,128,1450,2048,4000
bind_bucket_lengths = 4,20,100,400
;error_style =
;nls_lang =
BTW, it is on HTMLDB v1.6 on 9iDB (9.2.0.4)
thxRob,
The File Browse item type does not require upload table WWV_FLOW_FILE_OBJECTS$. The POST for the File Browse item type is intercepted by modplsql and is inserted into the Document Table as defined by the Database Access Descriptor.
You could ultimately create your own DAD with your own Document Table. The Document Table would have to contain the minimum definition as described at:
http://download-west.oracle.com/docs/cd/B14099_03/web.1012/b14010/concept.htm#i1005880
This way, users of the application using the Basic Database Authenticated DAD would be uploading directly into your table and not the HTML DB one. A word of caution, though, is that you would never want to use this DAD with HTML DB development itself...you would need to use the DAD that specifies upload into WWV_FLOW_FILE_OBJECTS$ for HTML DB development.
I hope this helps.
Joel -
Error "PPE is working" on File Upload with Oracle Portlet running 10.1.2
I am attempting to perform file upload using an Oracle Portlet running under the 10.1.2 Portal.
All the examples I have seen indicate you must identify the encoding type as "multipart/form-data" in your JSP. When I do this and attempt to submit the page I get a blank screen with the words "PPE is working.".
Looking at the "http-web-access.log" on my OC4J Standalone server I can see that the Standalone server never actually receives the request. For some reason it appears the Portal is not forwarding the request to OC4J like it is suppose to.
Can someone tell me what might be wrong? Does anyone have experience implementing file upload using Oracle Portlets and the 10.1.2 Portal?
Thanks,I have encountered the same problem 4 years before. Finally i figured out, Oracle Portal is not supporting "multipart/form-data".
Work around is write a servlet program to upload the file into DB.
This blog may help you.. http://bsubramaniam.blogspot.com/search/label/Java%20File%20Upload
--Balaji S -
Emulating HTTP POST for file upload with J2ME
I have search through a lot of site and couldn't find the actual code. I try to emulate below html with J2ME.
<form method="POST" enctype="multipart/form-data" action="Insert.asp">
<td>File :</td><td>
<input type="file" name="file" size="40"></td></tr>
<td> </td><td>
<input type="submit" value="Submit"></td></tr>
</form>
here is my code :
HttpConnection c = null;
InputStream is = null;
OutputStream os = null;
byte[] filecontent = file byte content ...
try {
c = (HttpConnection)Connector.open("http://xx.com/insert.asp");
c.setRequestMethod(HttpConnection.POST);
c.setRequestProperty("Content-Length", String.valueOf(cmg.length + 15));
c.setRequestProperty("Content-type","multipart/form-data");
os = c.openOutputStream();
os.write("file=c:\\abc.png".getBytes());
os.write(filecontent);
os.flush();
I can emulate form with text field and it work, but when it come to file upload, above code not working, I don't know what to put for the outputstream, filename ? content ? or both ? since the html only has one field that is the "file" field. The file is actually store in rms with filename abc.png, and I just put in the c:\ for the server as a dump path.File upload is more complicated then that... you need multi-part MIME formatting.... But I have just the code...
http://forum.java.sun.com/thread.jspa?forumID=256&threadID=451245
Maybe you are looking for
-
What size MacBook Pro is best for graphic designers?
I am entering an Emerging Media/graphic design program that requires a MacBook Pro to do my work on. Am I ok to get the 15" or do I need the 17"?
-
HP Pavilion Slimline s5-1414 Accidentally changed frame rate.
Hi I'm new to this computer got it earlier in the year but never reaally tried it till now. My problem is that I changed the framerate from 60 to 120 fps and now i have no video. How do i fix this? I tried 2 different monitors one which is a pretty o
-
Regarding my payment information made extra
i buy a song from itunes store ,the song cost is 15 rs the thing is it deducted 60+15 total 75
-
Steve Jobs and his magical powers!
I have found two things I can't do in iWeb but Steve Jobs can... 1) When I drag a photo album onto the page iWeb asks if i want to place all the photos in that album. If you click 'no' it doesnt do anything, if you click 'yes' it sprays your site wit
-
You can download individual tracks and delete music with itunes match on
You can delete music with itunes match on: settings - general - use - music - all music in the right corner above you can click on edit and choose delete. You can also download individual tracks: click on the "cloud download" icon in an album. It dis