File upload after deployment
hi everbody,
i had deployed the file upload code in unix server and the page is successfully opening after attaching functions and menus. Now the page has only messagefileupload type item for file upload. so please please can anybody tell how to upload the file to a specific directory. my code i have used is in application module is like this but after selecting a file and click submit the file is not being uploaded.
String path= "/u03/prodcomn/temp/"+fileName;
if(testprofile != null){
System.out.println("path.."+path);
FileOutputStream fileOutput = new FileOutputStream(path);
fileOutput.write(blobIn.toByteArray());
fileOutput.close();
}
the above code is perfectly correct and it is working , the silly thing that i didnt notice is in winscp i didnt refresh and see after file upload in the page.
i had wasted whole one day for this.
thanks
prabhakaranp
Similar Messages
-
Txt file missing after deploying war
All,
i've encountered weird problem when i'm deploy new war to the server. i want my class read the txt file. so that i've put the txt file at the same path as class as well at src/javapackage. here is the path..
F:/myapp/voip/src/clientpkg
so that i assumed when i deploy the war file to the server all classess & txt file will be kept at the ...
webapps/voip/WEB-INF/classes/clientpkg/
but when i checked at the clientpkg directory, the txt file is missing. what shud i do now?
here is my code to read the txt file..
private boolean migration25Cpes() throws Exception {
boolean status = false;
try {
System.out.println(System.getProperty("user.dir"));
System.out.println("read the file again/");
InputStream in = this.getClass().getResourceAsStream("list25cpe.txt");
Reader rin = new InputStreamReader(in);
BufferedReader inputFile = new BufferedReader(rin);
String readSource = "";
while ( (readSource = inputFile.readLine()) != null) {
System.out.println(readSource);
System.out.println("the input now : " +inputFile.read());
inputFile.close();
catch (FileNotFoundException e) {
e.printStackTrace();
return status;
}Then you have to find a way to tell JBuilder to include the text file in the jar. I don't know JBuilder, but I'm guessing that right now it is probably building the jar from the compiler output directory, which contains only class files.
There may be a setting to copy non-java files to the compiler output directory, or you may need to put stuff you want to appear in WEB-INF/classes in some other location for it to be picked up by the JBuilder war-creator. -
Runtime exeception after deploying PAR file in portal
Hi ,
I am facing an issue during the deployment of PAR file in our Quality portal. I have download the PAR file from the system-->import to the NWDS--> did the modification (only to the properties files as part of my requirement) -->Export as PAR file. I then undeploy the previous earlier PAR file and then upload the modified PAR file in portal. When i test the application , i received portal runtime error.
I have also tried by downloading the PAR file for the same application from the production portal and tried importing to Quality system without making any modification to the PAR. I still face the same issue.
Due to this issue, i am not able to bring the application back as its not getting deployed properly. Can anyone help me on this.
Regards
RayHi Ray,
Are you sure your file is getting deployed properly. Can you verify if the time stamp of the PAR file is getting updated on each deployment or after you upload it through Portal.
Also, please check the PAR file (size and it's contents by unzipping the PAR file) that you've downloaded from PROD and deploying on QAS to ensure that the file is not corrupted by any means during downloading.
You can also ask your BASIS team to provide the PAR file directly from PROD server and try to upload it on QAS instead of you downloading it from PROD portal.
Also, you can follow the below steps to download the PAR file yourself from PROD portal with Administrator ID:
Browse to the following location : System administration->Support->Portal Runtime->Browse deployment->ROOT/WEB-INF/deployment/temp
1. Find and Identify the PAR file and Copy the name of PAR file.
2. Click on view instead of download link to save the PAR file. Keep the name of PAR file same while saving with .par extension.
3. Deploy this file on QAS Portal.
Please let us know the results.
BR,
Anurag -
Hello,
we are facing problem with Apex Listener 2.0 connecting to Apex 4.1.1. The Apex Listener is deployed on Tomcat. Almost everything works correctly, with one exception - uploading files. After uploading file, blank page with url http://server:8062/apex/wwv_flow.accept is displayed and stuck there. The file, however, uploads successfuly. The same functionality (using the same page) works correctly when used without Apex Listener.
No error messages can be found, neither in Tomcat log nor in Apex Listener log.
I've experimented with several configurations uploaded from Listener admin in SQL Developer or minimal configurations from samples - this is my current config:
Configuration properties for: apex
cache.caching=false
cache.directory=/tmp/apex/cache
cache.duration=days
cache.expiration=7
cache.maxEntries=500
cache.monitorInterval=60
cache.procedureNameList=
cache.type=lru
db.hostname=localhost
db.password=******
db.port=1521
db.sid=xe
debug.debugger=false
debug.printDebugToScreen=true
error.keepErrorMessages=true
error.maxEntries=50
jdbc.DriverType=thin
jdbc.InactivityTimeout=1800
jdbc.InitialLimit=3
jdbc.MaxConnectionReuseCount=1000
jdbc.MaxLimit=10
jdbc.MaxStatementsLimit=10
jdbc.MinLimit=1
jdbc.statementTimeout=900
log.logging=true
log.maxEntries=50
misc.compress=
misc.defaultPage=apex
security.disableDefaultExclusionList=false
security.maxEntries=2000
db.username=APEX_PUBLIC_USER
security.inclusionList=
sqldev.description=
sqldev.name=apex
As I saw in other thread, blank pages are most commonly caused by mismatched static files - however my i/apex_version.txt matches the server version, so I don't suspect that to be the case.
Would you have any ideas on what to check or what could possibly be wrong?
Thank you.Hello,
thank you all for help. It turns out that it was indeed issue with the code itself. It's strange that it doesn't manifest without Apex Listener, but it was incorrect code.
I'm a system administrator (not a programmer) and I assumed that since the only change to the system was added Listener, it must be a problem with incorrect configuration - I was wrong :-)
When I tried replicating the problem on apex.oracle.com, I noticed that After Processing branch redirecting to another page was completely missing from our code. When I removed the branch from apex.oracle.com, it stopped working (logically) too - the solution was therefore to add After Processing branch redirecting to some other page with "include process success message" checked.
I still don't understand how it could have worked without Apex Listener in the first place :-) -
Java Exception after File Upload while retreiving using Filepath
Hello everyone,
I am performing the following steps:-
1) I am uploading a file from my local File system (D:/ a.XML) using FileUpload UI Element in Web Dynpro.
2) In the OnActionMethod of the View, I am trying to get the content of the file using the Filepath (D:/ a.XML).
But I am getting a Java Exception "No Such File or Directory" after deploying the archive and run on to the remote server.
The Exception is not a Web Dynpro Runtime Exception. But I am able to catch it in the try, catch block of the Java code.
Do I need the file to be present in the server as well. What is the Solution? Please advise me about, where is the content of the uploaded XML file stored and how can it be retrieved.
How can I retrieve the content of the file using a valid file path, because my method which will open the uploaded file requires argument as a filepath. Please suggest about this problem. I would be very thankful for your help.
Kind Regards,
Phani.
Edited by: Armin Reichert on Apr 18, 2008 2:43 PMHi Ayyaparaj,
Please have a look at the code that I am using for my application. I am getting the exception method after the load method i.e after this line of code "msgMgr.reportSuccess("\n\nInit0\n\n");". The exception that I am getting is "Invalid Stream Header".
public void onActionMaximalJoin(
com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent)
// @@begin onActionMaximalJoin(ServerEvent)
MessageManager msgMgr = (MessageManager) wdThis.wdGetAPI().getComponent()
.getMessageManager();
InputStream text = null;
int temp = 0;
try
File file = new File(wdContext.currentContextElement().getUploadXML()
.getResourceName().toString());
FileOutputStream op = new FileOutputStream(file);
if (wdContext.currentContextElement().getUploadXML() != null)
text = wdContext.currentContextElement().getUploadXML().read(false);
while ((temp = text.read()) != -1)
op.write(temp);
op.flush();
op.close();
String path = file.getAbsolutePath();
wdComponentAPI.getMessageManager().reportSuccess(path);
Ontology ontology = new Ontology();
msgMgr.reportSuccess("\n\nInit0\n\n");
ontology = Ontology.load(path);
Lexicon mainLexicon = ontology.getMainLexicon();
msgMgr.reportSuccess("\n\nInit1\n\n");
text = null;
temp = 0;
File file1 = new File(wdContext.currentContextElement().getUploadGraph1()
.getResourceName().toString());
FileOutputStream op1 = new FileOutputStream(file1);
if (wdContext.currentContextElement().getUploadGraph1() != null)
text = wdContext.currentContextElement().getUploadGraph1().read(false);
while ((temp = text.read()) != -1)
op1.write(temp);
op1.flush();
op1.close();
String path1 = file1.getAbsolutePath();
wdComponentAPI.getMessageManager().reportSuccess(path1);
CG cg1 = new CG();
msgMgr.reportSuccess("\n\nInit2\n\n");
cg1 = CG.load(path1);
text = null;
temp = 0;
File file2 = new File(wdContext.currentContextElement().getUploadGraph2()
.getResourceName().toString());
FileOutputStream op2 = new FileOutputStream(file2);
if (wdContext.currentContextElement().getUploadGraph2() != null)
text = wdContext.currentContextElement().getUploadGraph2().read(false);
while ((temp = text.read()) != -1)
op2.write(temp);
op2.flush();
op2.close();
String path2 = file1.getAbsolutePath();
wdComponentAPI.getMessageManager().reportSuccess(path2);
CG cg2 = new CG();
msgMgr.reportSuccess("\n\nInit3\n\n");
cg2 = CG.load(path2);
CG maximalJoinResult = (CG) cg1.maximalJoin(cg2);
StringBuffer output = new StringBuffer();
output.append(maximalJoinResult.toString(mainLexicon));
msgMgr.reportSuccess("\n\nInit4\n\n");
System.out.println(output.toString());
msgMgr.reportSuccess("\n\nInit5\n\n");
msgMgr.reportSuccess(output.toString());
msgMgr.reportSuccess("\n\nInit6\n\n");
catch (Exception e)
msgMgr.reportSuccess(e.getMessage());
// @@end
Please advise me if you find any mistake.
Edited by: Armin Reichert on Apr 9, 2008 1:27 PM -
Validation error after File upload
HI,
I am using a file upload functionality in OAF page.
When i browse for the required excel file and click on browse, the data is popluated on the oaf page.
I have 2 lov fields on page - say a & B.
B is a dependent LOV on A.
I have a validate button on my page which gets enabled only after file upload and validates if the data is correct or not.
The issue is like if i am having value in upload file for A as 1 and for B as 1800, but my LOV B has 2 values 1800 & 1800-01 for LOV A = 1, it gives me an error at that LOV "Select a Valid Value". If i open the LOV B window and select 1800 from it the data is correctly validated without any error.
Please help me that how can i rectify this error i.e. it should validate the data corrrectly if i pass the value 1800 to it thru excel sheet.See take an example of Employee name LOV .We know for every employee a unique emp Id is related to it.So if two person are having same name also then also their ID is different.In such cases , while creating LOV we create a FormValue for EmpID .Its not visible on Page but while validating the page formValues are also considered thereby it doesnot cause invalid value error...
In Your case, what you can do is the way you are populating the LOV field you can populate this FormValue to remove the Error.
Please Refer Jdev Guide for more info..
Hope it helps!!!
Thanks
AJ -
After upgrading to 5 (this worked in 4) I can not select a PDF file in the File Upload dialog that appears when I click the Browse button next to an HTML file type input element. The specific HTML element source code has the attribute: ACCEPT="image/*". I can select image files such as jpg, png, tiff, etc. But not PDF. This worked great in Furefox 4 and works in the latest version of Safari.
The HTML code for the form element is:
INPUT TYPE="file" NAME="file_1" ACCEPT="image/*" SIZE=35
The File Upload dialog lists all files with PDF extension as dimmed and not selectable in Firefox 5.
Can you help?Hi Purush
Unfortunately we couldn't solve the problem. Our IT specialist checked it with SAP directly. SAP doesn't support the SAP KW solution anymore. Therefore we checked-in the document in ".doc"-Format. -
How to get the file content after uploading file
Hello everyone!
I have a question. Anyone can provide an example code by jsp that getting the uploaded file content after user uploading a file?
Your help is highly appreciated!!!My experience is you need to do it twice: first read it to a StringBuffer and readline. Then write the file to server. See the code below
MultipartParser parser = new MultipartParser(request, 10000000);
Part part = null;
FilePart filePart = null;
File uploadDir = new File("/Uploads/");
if (!uploadDir.exists()) {
uploadDir.mkdir();
while(true){
part = parser.readNextPart();
if(part == null)
break;
if(part instanceof FilePart){
filePart = (FilePart)part;
filename = filePart.getFilePath();
//You can do one of the following option. Here is read line to a buffer and display to screen
//if (filename != null) {
//Do not store the file to server machine.
//long size = filePart.writeTo(uploadDir);
// System.out.println("The number of bytes written is "+size);
reader = new BufferedReader(new InputStreamReader(filePart.getInputStream()));
String newline=reader.readLine();
if(newline!=null) {
reconcileContent.append("<table border=\"1\"><tr><th>Destination ID</th><th>File ID</th><th>Rept Date</th><th>As of Date</th><th -
After deployment of war/exploded war modified files are not reflected
Dear All,
I have done the application deployment(war/exploded war) successfully in weblogic 10.3.5.0 version But After deployment js/jsp files to get updated through the scheduler in the following path Weblogic/user_projects/domains/domain/servers/my_server/tmp/_WL_user/myapp/7i4bde/war/
The files are getting updated successfully with updated values in above specified path.
But it is not getting reflected, when we are accessing the application.
Kindly help for the same..
Thanks in Advance
Vijay JettiHi Vijay,
When your doing a deployment,
Stop the Managed server,
Rename the folders "tmp" and "cache" to tmp_04012013 and cache_04012013 inside Weblogic/user_projects/domains/domain/servers/my_server/
(This is for clearing the Cache)
After Deployment-->Start the managed server.
On starting the services,new directory tmp and cache will be created and All the changes will be automatically be reflected.
As you have said,
After deployment js/jsp files to get updated through the scheduler in the following path
Weblogic/user_projects/domains/domain/servers/my_server/tmp/_WL_user/myapp/7i4bde/war/Make a point to restart the managed server once the scheduled job is complete(No need to clear the cache).
Assume your scheduler is set at 6.00,then restart the services around 6.30
Hope this helps.
Regards
Fabian -
How to send 0-bit confirmation file after the original file upload finished
Hi All,
We are using Receiver FTP adapter (FTPS, FTP over SSL) to send/upload a Idoc file to external partner FTP server.
Along with the IDOC file to be uploaded, and as soon as the IDOC file upload is finished, we will need to upload a 0-bit "confirmation file", thus indicating that the (main) file upload has finished.
For example, if the IDOC file is named example.idoc
the confirmation file has to be named example.idoc.cnf
We are thinking to use "Run Operating System Command After Message Processing". Can someone give us more information if we can use this? if so what would be the command line??
Thx
N@v!nHi,
ok - to this solution: if you want to use (it would be possible), you must create repository objects for this (flagfile) and also directory objects.
but other solutions:
a, you can create a script in target system and call this script from the adapter (which would create a file)
b, I'm not sure if there is a command for creating a file, but there is defe=inetely one for copying it. So what about storing some ampty file in location /template/ for example and call cp command from the adapter? and you would place this copy to required location
Peter -
Forbiden page after deploying war file
I made a small jsp project in Jdeveloper, which displays a single view. I didn't use any speciel authorization process. After deploying the war file I don't see anything.
I did evething according the tutorial, but I havent any success. Do I need any speciel configuration or settings in Jdev or AS?
Thanx
ZoltanZoltan,
more information is needed about the error and the JDeveloper version you are using.
Frank -
Forbidden page after deploying war file
I made a small jsp project in Jdeveloper, which displays a single view. I didn't use any speciel authorization process. After deploying the war file I don't see anything.
I did evething according the tutorial, but I havent any success. Do I need any speciel configuration or settings in Jdev or AS?
Thanx
ZoltanZoltan,
more information is needed about the error and the JDeveloper version you are using.
Frank -
Changing faces-config.xml after deploying ear file
Hi,
What would be the steps to follow if we want to change contenets of web application configuration files (for example, faces-config.xml) after app.ear file has been deployed?
The app.ear file contains the faces-config.xml, and we are using Oracle AS 10.1.3.
Thanks,
Jeansee my answer at
Change web app config file of deployed app -
"dtutil", how to tell which configuration file for packages using after deployment?
Hello All,
Trying to achieve this feature,
Using DOS command to automatic my deployment process--glad I found dtutil. However, it doesnt give you any chance to identify which configuration file to be used by SSIS packages after deployment.
Deployment Method: file deployment
Configuration sued: XML file and SQL Table. IN XML file, it tells which DB connection for packages to look up the configuration table.
Who can share some thoughts on this?
DerekIt is NOT about sequence.
It is about how to point which configuration file to be used by deployed packages as during the "dtutil.exe"
deployment, you dont have chance to identify which physical location confg files to be used.
Derek
That you do only at the time of execution of packages. By default it uses configuration settings created at design time within the package. If you want to override it, you can use \Configfile switch of dtexec for that. You can also set explicit values for
properties using /SET switch
http://technet.microsoft.com/en-us/library/ms162810(v=sql.105).aspx
See this to understand how configs are applied in runtime
http://technet.microsoft.com/en-us/library/ms141682(v=sql.105).aspx
and this to understand behaviour difference in ssis 2008
http://technet.microsoft.com/en-us/library/bb500430(v=sql.105).aspx
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Missing ejb relation description file after deploying ejb module
when i deploye a ejb module to oc4j_extended_1013_dp4 successfully, it's can't find the file ejb-jar.xml that descript ejb relations and navigators.
why?
how can i defense it ?however, i repeat my question
i use two file descript ejb module in MEAT-INF directory, one name ejb-jar.xml , another name orion-ejb-jar.xml
my ejb jar-package contrained them.
after deploying , i only find orion-ejb-jar.xml in application-deployments/myapp/myejb
Maybe you are looking for
-
This feature that helps to block ad and social network tracking appeared on the last update, it had a green drop down where I could then get a screen showing the number of tracking that are blocked, not blocked and could block the ones that weren't.
-
Dynamic Routing Protocol Support in Cisco ASA Multiple Context Mode
Dear Experts, Wold like to know whether dynamic Routing Protocol Support in Cisco ASA Firewall Multiple Context Mode. If yes then please provide OS version and Hardware Model of Cisco ASA Firewall. Appreciate the quick response. T
-
I have a chart of stacked 2D Column, it includes 4 colors, but the legend only displays the color of the first bar. This is: If the first bar has 1 color, the legend shows 1 color even though the chart has 4 colors in other bars. I am expecting 4 col
-
Can I replace a 6 cell battery with a 9 cell? lenovo n 100
My battery has gone dead and I don't have warranty on it anymore, I want to buy a new one, can I buy a 9 cell? I have now 6 Cell. thank's, Oren
-
Sales Order Text from Material Master
Hi All, I have a request to configure sales orders so that they will display the text maintained in the sales text tab in material master. I believe I have to use tcode VOTXN, and do something with the access sequence there, but I am a bit confused.