How to save uploaded file in the context
Hi,
I am trying to save an uploaded file in a folder in reference to the
context. I can not get the path to the destination folder with reference to
the context.
The file gets uploaded fine as I can pull the info about the file, however,
I am not able to save it in a folder under context. Any ideas?
the code is pasted below;
thanks
Rauf
public class MyBean {
private UploadedFile uploadedFile;
int BUFFER_SIZE = 20000;
protected final Log logger = LogFactory.getLog(getClass());
public UploadedFile getUploadedFile() {
return uploadedFile;
public void setUploadedFile(UploadedFile uf) {
this.uploadedFile = uf;
public String processMyFile() {
String uploadedFileName = getUploadedFile().getName();
logger.debug("The uploaded file name is: " + uploadedFileName);
int index = uploadedFileName.lastIndexOf('/');
String justFileName;
if ( index >= 0) {
justFileName = uploadedFileName.substring( index + 1 );
} else {
// Try backslash
index = uploadedFileName.lastIndexOf('\\');
if (index >= 0) {
justFileName = uploadedFileName.substring( index + 1 );
} else {
// No forward or back slashes
justFileName = uploadedFileName;
logger.debug("just file name: " + justFileName);
String uploadedFileType = uploadedFile.getContentType();
FacesContext facesContext = FacesContext.getCurrentInstance();
try {
logger.debug("In the first try loop");
// get the path to the /img directory from the servlet context
ServletContext servletContext = (ServletContext)facesContext.getExternalContext();
String realPath = servletContext.getRealPath("/img");
logger.debug("The real path: " + realPath);
logger.debug("saved file name: " + realPath + justFileName);
InputStream in = new BufferedInputStream(getUploadedFile().getInputStream());
BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(realPath + justFileName));
try {
byte[] data = new byte[BUFFER_SIZE];
int readSize;
while ((readSize = in.read(data, 0, BUFFER_SIZE)) != -1)
logger.debug("writing buffer: " );
outputStream.write(data, 0, readSize);
in.close();
outputStream.close();
catch (FileNotFoundException e) {
e.printStackTrace();
catch (IOException e) {
e.printStackTrace();
logger.debug("return OK");
return "OK";
catch(Exception e){
e.printStackTrace();
return "Not OK";
}
What I am struggling with is how to get the path relative to the context. The file upload works fine, however, the code fails at the fillowing line:
ServletContext servletContext = (ServletContext)facesContext.getExternalContext();producing the following error:
The uploaded file name is: c:\myjava\downloads\b2b-project-0.1-07282004.zip
2006-08-22 00:16:34,344 DEBUG [com.hunza.kcw.jsfupload.MyBean] - just file name: b2b-project-0.1-07282004.zip
2006-08-22 00:16:34,344 DEBUG [com.hunza.kcw.jsfupload.MyBean] - In the first try loop
2006-08-22 00:16:34,344 DEBUG [com.sun.faces.lifecycle.InvokeApplicationPhase] - Exiting InvokeApplicationsPhase
If I specify the absolute path like c:\temp, the file save is successfull. I am looking for a way to save the file in a folder in the context, without having to specify the full path of the folder.
Rauf
Similar Messages
-
How to Save pdf file in the BLOB field in the database
I have to save a pdf file which is on the client machine to save in the database column of type BLOB. How can i do that?
LostWorld wrote:
I have to save a pdf file which is on the client machine to save in the database column of type BLOB. How can i do that?PL/SQL code cannot hack across the network. break into that client machine, and read that PDF file from the client's harddrive.
There is a very fundamental client-server principle at stake here - the purpose of the client. What is the purpose of the client? Amongst others, it is to interface with the client hardware and peripherals and devices. Like reading the client keyboard and sending that to the server. Or reading data from the sever and rendering it on the client's display device. Or to receive CSV data from the server and writing it to a local file.
It's purpose is also to read a local file, like a PDF file, and submit that file's contents to the server for storage.
The following pseudo code explains the basic principle:
client
// call oracle to create a LOB
ExecuteSQL( 'DBMS_LOB.CreateTemporary( .. )' )
open file( fileHandle )
while not EOF( fileHandle )
// read data from the file
read file( fileHandle, buffer )
// write this buffer to the LOB in Oracle
ExecuteSQL( 'DBMS_LOB.writeAppend( .. )' )
end while
close file( fileHandle )
// now tell Oracle what to do with that LOB
ExecuteSQL( '...' )
.. etc..Thus the client:
a) creates a LOB in Oracle via a PL/SQL call
b) passes data from the client and appends it to the LOB
c) tells Oracle what to do with LOB, such as inserting it into a table -
How to Save XML file in the same directory as the swf file automatically?
Hi all,
I'm really new here with flash and actionscript 3, so i might not make any sense, probably. Any input is greatly appreciated.
So here's my problem, i'm trying to make a Top Score history for a flash game, which i load from an XML file. The problem comes to when i want to update the XML file. how do i do that automatically without prompting the user (ofcourse). I want it to be saved automatically to the same directory as the flash file.
here's my code right now, but it prompts the user where it wants to be saved, which i don't want to happen:
var xml:XML = <XML>
<topScoreList>
</topScoreList>
</XML>;
for(var i:Number=0; i<10; i++)
var Record:XML = <Record>
<score></score>
<playerName></playerName>
</Record>;
Record.score.appendChild(topScores[i].toString()); //topScores[] -> class variable containing scores
Record.playerName.appendChild(topNames[i].toString()); //topNames[] -> class variable containing names
xml.topScoreList.appendChild(Record);
var ba:ByteArray = new ByteArray();
ba.writeUTFBytes(xml);
var fr:FileReference = new FileReference();
fr.save(ba, "topScoreList.xml");yeah that makes sense, actually - after reading a dozen more forums. It's really weird tho that flash doesn't have a Buffer writer, unlike other programming frameworks.
But yeah, thanks. i'll start reading on flash.net.SharedObject, correct ? Thanks.
Anyways, if anyone out there has a different input, will be greatly appreciated!! -
How to save a file in the newer version of muse to use it in an older version of muse
I started to work in a project at home with a 30 day trial of the latest Muse, I was going to continue working at school, and I can't open it. So how can I save the file to open it in an older version?
Hi Luisis,
Any file that is saved in the latest version of Muse cannot be opened in any previous of Muse and as of now there is no option available in Muse such that you can save the file in such a manner that it opens in the previous version.
However, I would request you to post this as a feature request at Ideas for features in Adobe Muse
Regards,
Rohit Nair -
Save Uploaded file in BLOB column of Database
Hey,
Anyone knows how to save uploaded file in BLOB column of database.
Please need help asap.
i get following error:
Cannot convert org.apache.myfaces.trinidadinternal.config.upload.UploadedFiles$FixFilename@1c1fc8d of type class org.apache.myfaces.trinidadinternal.config.upload.UploadedFiles$FixFilename to class oracle.jbo.domain.BlobDomain.
Can anyone tell me what needs to be done.
Thanks,
SnehaHi Timo,
We are using oracle Jdeveloper Studio Edition Version 11.1.1.6.0 . logs are just showing nullpointer exception. Following errors are shown in logs:
<ActionListenerImpl> <processAction> java.lang.NullPointerException
javax.faces.el.EvaluationException: java.lang.NullPointerException
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.lang.NullPointerException
at view.bean3.ImageBean.uploadFileValueChangeEvent(ImageBean.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
... 51 more
<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
javax.faces.FacesException: #{samplebean2.uploadFileValueChangeEvent}: java.lang.NullPointerException
And one more error i get and i.e.
XmlErrorHandler> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
javax.servlet.ServletException: java.lang.NullPointerException
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
... 36 more
Caused by: java.lang.NullPointerException
at view.bean3.ImageBean.uploadFileValueChangeEvent(ImageBean.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
... 51 more
<Utils> <buildFacesMessage> ADF: Adding the following JSF error message: Attempt to access dead view row of persistent id 17
oracle.jbo.DeadViewRowAccessException: JBO-27102: Attempt to access dead view row of persistent id 17
Can you help me on this one. Any other details you need let me know. -
I am trying to make my fiels viewable to someone who has Adobe CC version 9.2, but I have version 10.0. Does anyone know how to save my files so the are readable?
You will likely get better program help in a program forum
The Cloud forum is not about using individual programs
The Cloud forum is about the Cloud as a delivery & install process
If you will start at the Forums Index https://forums.adobe.com/welcome
You will be able to select a forum for the specific Adobe product(s) you use
Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll -
How do I upload and attach the file to Service Request
[This thread was migrated from the On Demand Developer Forum in the old Siebel Community]
drangineni
New Contributor
Hi,
I am trying to upload a file and add it to a Service object as an
attachement. I greatly appreciate if you could provide any code or
sample...
Thanks.
Daya
Product: CRM OnDemand
10-21-2006 10:58 AM
Re: How do I upload and attach the file to Service Request...
BigSlick
Valued Contributor
On Demand doesn't support adding attachments via web services. One
solution I've seen is depending on the scenario is to create a web link
field on an object that's based on a custom text field. Your web service
can populate that custom field and the web link can generate a dynamic
link to the file in On Demand's UI. However, this depends on where the
attachment is located and if the user needs some sort of firewall access.
Hope this helps
-BigSlick
10-23-2006 11:43 AM
==============================================================================
Click on the board or message subject at the top to return.Yes this still holds ture.
Bardo -
How to download a file from the net and save it into .txt format in a datab
Can some one show me a tutorial on how to download a file from the net and save it into .txt format in a database?
Thank you,http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html
-
How can I save a file in the server?
Hello,
I am writing a Java Web Start program that it will generate a html file, how can I save the generated file in the server, fro example, the directory where I stored my JAR files. Because right now, it will create the html file in the local client mahcine instead of the server. Can anyone tell me how can I do this? Thanks you.Yeah, thanks but that's not what I was trying to ask.
I know that you can save and open a document by performing these three steps:
1. Confirming to save a file to the Downloads folder
2. Open the download manager by clicking the temporarily green arrow
3. Clicking on the downloaded file
What I would like to know is whether or not it is possible to have Firefox open a saved file ''automatically''. At the moment, if I choose to open it automatically, it is only saved to my temp folder.
It would be great though if it was saved to my Downloads folder ''and'' opened with the respective program on my pc. Is there a way to do this? -
Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory
Here are a few Links to a helpful Knowledge Base article and a White Paper that should help you out: http://digital.ni.com/public.nsf/allkb/BBCAD1AB08F1B6BB8625741F0082C2AF and http://www.ni.com/white-paper/10435/en/ . The methods for File IO in Real Time are the same for all of the Real Time Targets. The White Paper has best practices for the File IO and goes over how to do it.
Alex D
Applications Engineer
National Instruments -
Infopath submit - how to hide - Save as dialog box - You can only save this file to the current site
HI,
I have a infopath form. In the submit options, i have used the below:
submit options -
sharepoint document library
Data connection - Sharepoint Library Submit
Doc library - lib location
File name: concat("User Info - ", ResourceName, "-", PersonalID)
Allow overwrite if file exists is checked.
When I try to save a record, I am getting a popup:
Save As:
You can only save this file to the current site
File Name: textbox
save location: doc lib.
save, cancel buttons.
How to override this save as option(save as option should not be shown to user), and save the file using the file name mentioned?
ThanksAre you clicking "Save" when you're using the form or "Submit"??
You should be using "Submit" and it will ... submit your form to the document library with the file name you specified.
To disable the "Save" button, click on "File" then "Form Options". Under the "Filler Features" area you can uncheck the box beside "Save and Save As". Click OK then re-publish your form. -
How to list the uploaded files on the server with a jsp page
hi every body , iam stuck up with yhis problem . I a have use Random Access File to upload files to the web server , now i want the user can see the files he /she has uploaded or the the files uploaded by others . plese help me how to implement this .
Message was edited by:
joshiashutoshhi every body , iam stuck up with yhis problem . I a
have use Random Access File to upload files to the
web server ,Huh?
now i want the user can see the files he
/she has uploaded or the the files uploaded by others
. plese help me how to implement this .So get the directory using the File class the files are in and list the files inside, showing the result to the user... how difficult would that be? -
Our version of ID saves all files with the time/date of December 31, 1999. How do we fix this?
That's interesting. The file date should match the system date. What's the system date? What version of InDesign? What operating system?
-
How can I save a file in the Downloads folder and automatically have it opened?
Often, I'd like to download a file, save it to my Downlaods folder and have it opened right away.
Currently, you can only decide between the two options "open" or "save to...". There's seemlingly no way Firefox can do both at once.
I know I can download it, open the downloads manager and open it manually. But when working with over a dozen documents a day, that doesn't quite do the trick.
In Chrome, you only have to click twice: Once for downloading and once for opening it from the download bar on the bottom of the screen. You do not have to open a download manager.Yeah, thanks but that's not what I was trying to ask.
I know that you can save and open a document by performing these three steps:
1. Confirming to save a file to the Downloads folder
2. Open the download manager by clicking the temporarily green arrow
3. Clicking on the downloaded file
What I would like to know is whether or not it is possible to have Firefox open a saved file ''automatically''. At the moment, if I choose to open it automatically, it is only saved to my temp folder.
It would be great though if it was saved to my Downloads folder ''and'' opened with the respective program on my pc. Is there a way to do this? -
How to make the active save-to-file with the data from GPIB ?
Hello,,everybody !!
I want to make the active save-to-file with the data from GPIB since starting the measurement. To save-to-file at the end of measurment is somehow risky for losing the data because my measurment have to take for long time (eg. 24-48 hours).
Thank you in advance for anybody's help !!Thanks Dennis,
I have already append, I got it but still have one small problem that between each line it has the blank line. Example as below ,
16:40:33 54.24
16:40:34 54.23
16:40:35 54.24
I want to get rid of the blank line in between.. Do you have the idea about it ?
Maybe you are looking for
-
I need a help in this jsp and bean Please provide the solution This is the bean import java.text.*; import java.util.*; import java.io.Serializable; public class DateBean implements Serializable {
-
Please could you help. I am using TOAD to connect to a number of databases but for a particular database, it hangs and crashes TOAD. 1.How can I diagnose the problem? I can connect to the same database successfully using sqlplus. 2. If I want to set
-
Cluster is not coming up after changing the network
Hi All, I changes the network using srvctl modify command. Accidently i modify it to Private interconnect. After restarting the cluster,The crsd is not coming up. I can see this in crsdlog which mean it is trying to listen on private IP. (ADDRESS=(PR
-
Measuring audio parameters on data streamed via UDP
Hello, I have the task of trying to measure some audio parameters from multiple wave files that has been streamed over a network using UDP. I can capture the individual streams at the UDP ports, but when I try to make a measurement on the data the fr
-
IPhone WiFi Switch is greyed out
iPhone WiFi Switch is greyed out