cancel
Showing results for 
Search instead for 
Did you mean: 

error in upload file

devendervb
Contributor
0 Kudos

Hi all,

I am getting an error while uploading the file.

Please look at the below code.

Action class code is as :

FormFile myFile = myForm.getMyFile();
		log.debug("Z_UploadFileAction doPerform begin 3");
		String contentType = myFile.getContentType();
		log.debug("Z_UploadFileAction doPerform begin 4");
*		String fileName = myFile.getFileName();*
		log.debug("Z_UploadFileAction doPerform begin 5")

The error is at filename = myfile.getFileName();

and the jsp contains

javascript as :

function submit_upload() {
	var filename = document.getElementById('myFile').value;
 form_input().location.href="<isa:webappsURL name="b2b/uploadfile.do"/>";
//form_input().location.href=rewriteURL("b2b/uploadfile.do");

var filename pick the exact path of fiel.

log file says :

[(J2EE7146800)ID1143844150DB11722523579401193262End|?]Z_UploadFileAction doPerform begin 3 
Nov 12, 2009 6:35:37 AM,685 SAPEngine_Application_Thread[impl:3]_27 Error bbcom.meiranova.eshop.isacore.action.order.Z_UploadFileAction [(J2EE7146800)ID1143844150DB11722523579401193262End|system.servletDifficulties] Error in action

Please help me to resolve this problem.

Regards,

Devender V

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try to debug your action class and let us know exactly in which line of your Action class you are getting error.

As you have written that your Java script is not throwing any error but from your action class it is coming then you should post your action class code then it will be easy to figure it out.

eCommerce Developer

devendervb
Contributor
0 Kudos

Hi ,

The action calss code is :

Z_UploadForm myForm = (Z_UploadForm) form;
		log.debug("Z_UploadFileAction doPerform begin 1");
		UserSessionData userSessionData = UserSessionData.getUserSessionData(request.getSession());
		log.debug("Z_UploadFileAction doPerform begin 2");
		// Process the FormFile
		FormFile myFile = myForm.getMyFile();
		log.debug("Z_UploadFileAction doPerform begin 3");
		String contentType = myFile.getContentType();
		log.debug("Z_UploadFileAction doPerform begin 4");
		String fileName = myFile.getFileName();
		log.debug("Z_UploadFileAction doPerform begin 5");
		int fileSize = myFile.getFileSize();
		log.debug("Z_UploadFileAction doPerform begin 6");
//		byte[] fileData    = myFile.getFileData();

and the error is at String fileName = myFile.getFileName();

Former Member
0 Kudos

Hi Devender,

I too have the same requirement.

Have you solved your problem of attaching a file to an order? If so please, help me with valuable inputs.

Your inputs is much appreciated.

Thanks in advance.

Regards,

Jithin

Answers (0)