How to get full path of a file uploaded using file control on a jsp ?

Hi all...
I have a jsp on which i am using a file element (input type="file") to upload files present on the physical file system.. Thats working fine.. But i want to retrieve the full path of the file uploaded for further computation.
What are the possible ways which can give me the full path ?? (e.g. "D:\data\text\Output.txt" )
Thanks all for attending the question..
Regards
Prasad

Some browsers send the full path. Some do not.
You can not affect this in any way shape or form.
All you can count on receiving is a filename - no path information.
So you will have to have some other way for the user to pass along this information.
If they are uploading to a "remote web site" they could specify a folder to put the uploaded file in.
You could classify it and put all image files in "images" and all script files in "scripts" etc etc by default, and let the user deal with it in their own HTML.
Hope this helps,
evnafets

Similar Messages

  • How to get rid of "click to activate and use this control"

    Hi,
    Any idea how to get rid of "click to activate and use this control".
    I don't want user to click to start working with the form.
    We are using IE6, forms9i and 10g application server.
    Thanks in advance.
    Kumar

    I got the solution...
    Metalink - Note:357545.1
    Kumar

  • How to get full path of indesign document as well as picture path.

    Hi all,
    I am working in InDesign CS4 plugins. and I have two quetions,
    1) How can we get the indesign document full path. I am able only to get the document name but i want the full path of it.
    2) How can we get the selected picture path also. I am able only to get its name.
    Please let me know if any one have idea of  it.
    Regards,
    Jitendra Kumar Singh

    //to get full path of document, works for both mac and pc
    IDocument *document = Utils<ILayoutUIUtils>()->GetFrontDocument();
    IDataBase* theDb = ::GetDataBase(document);
    const IDFile* sysFile = theDb->GetSysFile();
    InterfacePtr<ICoreFilename> cfn((ICoreFilename*)::CreateObject(kCoreFilenameBoss, IID_ICOREFILENAME));
    if(cfn != NULL){     if(cfn->Initialize(sysFile)
    == 0){
              PMString fulldocumentnameandpath = FileUtils::SysFileToPMString(*sysFile);
    Hope this helps,
    Liz Patten

  • How to get full path in file browse item

    Hi
    I have a file item. When I submit the form and store and value in db, then the file path is stored as numbers and appended to the file name. I undestand that this is because of some wwv flow files index or something . How to get the file path? Anybody...

    For security/privacy reasons recent versions of browsers by default do not send local file path information from File Browse items to the server, nor expose the file path in the control's JavaScript methods. Firefox, Safari and Chrome only provide the filename. IE6 & IE7 still yield the path in Windows format. IE8 and Opera have adopted an irritating approach of replacing the path with a wholly imaginary "C:\fakepath\".
    Changes to IE's security config can enable the path to be exposed in IE8, but I don't think it will be available via <tt>apex_application_files</tt>.
    For more information see:
    http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018980.html
    http://blogs.msdn.com/ie/archive/2009/03/20/rtm-platform-changes.aspx

  • How to get full path using HTP.PRINT(' "input type ="file") ....

    Hello everybody,
    I am working on uploading file from page to another one using HTP package, but whenever I submit the form, it only takes the filename without the full path.
    for example :
    if i sent 'c:\dir\a.txt' , the other page receives file parameter as 'a.txt'
    the code is here
    PROCEDURE upload(appno in varchar2,wsct in varchar2) AS
    l_real_name VARCHAR2(1000);
    BEGIN
    HTP.htmlopen;
    HTP.headopen;
    HTP.title('Test Upload');
    HTP.headclose;
    HTP.bodyopen;
    HTP.header(1, 'Test Upload');
    HTP.print('<form action="https://ssltrng.uaeu.ac.ae/trng/document_api.upload1" method="get">');
    HTP.print(' File to upload: <input type="file" name="file" >
    HTP.print(' <input type="submit" value="Upload">');
    HTP.print('</form>');
    HTP.bodyclose;
    HTP.htmlclose;
    END upload;
    the other page see it as
    file is 'Water lilies.jpg'
    Thanks
    Edited by: dtabed on Mar 30, 2011 1:02 AM

    Do not understand the problem.
    The code you've posted is a PL/SQL web enabled procedure that produces a dynamic HTML page. This page contains a form. And a full URL reference to the CGI that will process the form's data.
    This is unusual - as it seems to be that the form is submitted across domains and web servers.. You usually refer to a local CGI procedure to deal with a form - no need for a fully qualified URL that includes web server and domain name.
    If the CGI procedure that receives the form is also a PL/SQL web enabled procedure, that the uploaded file will be placed in the documents table (as defined in the DAD alias) by mod_plsql, prior to the web enabled procedure being called. The documents table will contain the Mime type, file name, file contents and other details.

  • How to get PO details from SAP to VB using BAPI control

    hi friends...
    My requirement is
    In VB(Visual basic)  i will enter PO number, for that PO number i want to fetch the data from SAP to VB.
    How to get this using BAPI Control in VB.
    From SAP point of view, i checked SWo1, there standard Object (PurchaseOrder)-Method GetDetail is there.
    but my doubt is how to pass the PO number to which parameter...
    i dono how to use that standard Object (PurchaseOrder) in VB...
    can you guide me plz..
    regards
    deva

    Hi,
    You need to get .NET connector and use this in your VB.
    h6.
    The SAP .NET Connector is a development environment that enables communication between the Microsoft. NET platform and SAP systems. This connector supports RFCs and Web services, and allows you to write different applications such as Web form, Windows form, or console applications in the Microsoft Visual Studio.Net. With the SAP .NET Connector, you can use all common programming languages, such as Visual Basic. NET, C#, or Managed C++.
    In short it will make your VB talk to SAP.
    http://www.service.sap.com/connectors
    Regards,
    Firoz.

  • How to get full Path using sADMBasic- StandardGetDirectoryDialog on mac

    hi,
    While implementing  a plug-in, I am using sADMBasic->StandardGetDirectoryDialog to prompt a dialog to select the folder.code is as follow-
    SPPlatformFileSpecification outResult = {NULL};
    Boolean isDirSelected = sADMBasic->StandardGetDirectoryDialog("Select folder Location", NULL, &outResult);
    In window, I am getting the fullpath in outResult.path. but in Mac ,I am getting 3 things outResult.vRefNum,outResult.parID,outResult.name.
    suppose anyone selected the desktop when dialog prompt. The outResult.name contains only the string like"a\ desktop ".And parId contains a integer no.
    But  I  want fullpath like User/Desktop. is there any way to get the fullpath from these variables?
    thanks
    DeepAlone

    Do not understand the problem.
    The code you've posted is a PL/SQL web enabled procedure that produces a dynamic HTML page. This page contains a form. And a full URL reference to the CGI that will process the form's data.
    This is unusual - as it seems to be that the form is submitted across domains and web servers.. You usually refer to a local CGI procedure to deal with a form - no need for a fully qualified URL that includes web server and domain name.
    If the CGI procedure that receives the form is also a PL/SQL web enabled procedure, that the uploaded file will be placed in the documents table (as defined in the DAD alias) by mod_plsql, prior to the web enabled procedure being called. The documents table will contain the Mime type, file name, file contents and other details.

  • How to get full screen width and height  when using CustomItem not canvas ?

    hi..
    I have to append one Textfield and a CustomItem ( as canvas) for painting on a single form.
    I have to draw a rectangle in CustomItem in full Screen width of mobile .
    So I have to know the screen width of mobile for drawing a rectangle.
    Please Suggest me. how can I do that ?
    Thanks

    Did you check javax.microedition.lcdui.Form.getWidth() and javax.microedition.lcdui.Form.getHeight() methods?
    Atul

  • File dialog box: how get full path and filename (firefox 3.0 problem)

    Hi,
    I have a smilar problem then discussed in this thread: file dialog box: how get  full path and filename
    Now this solution doesn't seem to work in firefox 3.0,I only get the filename but not the full path.
    I have tried to solve this problem by adding *"netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");"* in a javacript function but that doesn't do the trick
    Although when i tested it local it does work.
    Any idees how to solve this?
    Best Regards
    Stijn

    Actually, that is strange and scarry. With 20% of the browser market share they decide to behave like Microsoft did in the past - they want to decide what users need and what they do not need. With 3.0 I have a real problem with some of my applications. They are all tested in IE6, IE7, FF2.0 and they all work the same way (they even work with Opera and Safari). Now, I will for sure not go there and make it work for 3.0, just because 2 out of 200 users use FF3.0. Up to now I have always recomended FF as the best browser. 3.0 causes my opinion to change completely. Competition is always good but it is a question if it is good if we have 20 different browsers out there with equal market shares.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to get full file path while uploading a file in flex Applications

    How to get full file path while uploading a file in flex applications.
    FileReference Object is giving file name and other details but not the actual path.
    Is there any workaround to to get the file path?.
    Thanks

    Why not ask in the Flex forum; it is more likely that someone over there knows.

  • How to get the path when i select a directory or a file in a JTree

    How to get the path when i select a directory or a file in a JTree

    import java.lang.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.HeadlessException;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Iterator;
    * @author Frederic FOURGEOT
    * @version 1.0
    public class JTreeFolder extends JPanel {
    protected DefaultMutableTreeNode racine;
    JTree tree;
    protected JScrollPane scrollpane;
    final static int MAX_LEVEL = 1; // niveau max de descente "direct" dans l'arborescence
    * Sous-classe FSNode
    * @author Frederic FOURGEOT
    * @version 1.0
    private class FSNode extends DefaultMutableTreeNode {
    File file; // contient le fichier li� au noeud
    * Constructeur non visible
    private FSNode() {
    super();
    * Constructeur par initialisation
    * @param userObject Object
    FSNode(Object userObject) {
    super(userObject);
    * Constructeur par initialisation
    * @param userObject Object
    * @param newFile File
    FSNode(Object userObject, File newFile) {
    super(userObject);
    file = newFile;
    * Definit le fichier lie au noeud
    * @param newFile File
    public void setFile(File newFile) {
    file = newFile;
    * Renvoi le fichier lie au noeud
    * @return File
    public File getFile() {
    return file;
    public JTree getJTree(){
         return tree ;
    * Constructeur
    * @throws HeadlessException
    public JTreeFolder() throws HeadlessException {
    File[] drive;
    tree = new JTree();
    // cr�ation du noeud sup�rieur
    racine = new DefaultMutableTreeNode("Poste de travail");
    // cr�ation d'un noeud pour chaque lecteur
    drive = File.listRoots();
    for (int i = 0 ; i < drive.length ; i++) {
    FSNode node = new FSNode(drive, drive[i]);
    addFolder(drive[i], node); // on descend dans l'arborescence du lecteur jusqu'� MAX_LEVEL
    racine.add(node);
    // Gestion d'evenement sur JTree (on �coute les evenements TreeExpansion)
    tree.addTreeExpansionListener(new TreeExpansionListener() {
    public void treeExpanded(TreeExpansionEvent e) {
    // lorsqu'un noeud est ouvert
    // on descend dans l'arborescence du noeud jusqu'� MAX_LEVEL
    TreePath path = e.getPath();
    FSNode node = (FSNode)path.getLastPathComponent();
    addFolder(node);
    ((DefaultTreeModel)tree.getModel()).reload(node); // on recharche uniquement le noeud
    public void treeCollapsed(TreeExpansionEvent e) {
    // lorsqu'un noeud est referm�
    //RIEN
    // alimentation du JTree
    DefaultTreeModel model = new DefaultTreeModel(racine);
    tree.setModel(model);
         setLayout(null);
    // ajout du JTree au formulaire
    tree.setBounds(0, 0, 240, 290);
    scrollpane = new JScrollPane(tree);
         add(scrollpane);
         scrollpane.setBounds(0, 0, 240, 290);
    * Recuperation des sous-elements d'un repertoire
    * @param driveOrDir
    * @param node
    public void addFolder(File driveOrDir, DefaultMutableTreeNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    addFolder(driveOrDir, node, 0);
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Recuperation des sous-elements d'un repertoire
    * (avec niveau pour r�cursivit� et arr�t sur MAX_LEVEL)
    * @param driveOrDir File
    * @param node DefaultMutableTreeNode
    * @param level int
    private void addFolder(File driveOrDir, DefaultMutableTreeNode node, int level) {
    File[] fileList;
    fileList = driveOrDir.listFiles();
    if (fileList != null) {
    sortFiles(fileList); // on tri les elements
    // on ne cherche pas plus loin que le niveau maximal d�finit
    if (level > MAX_LEVEL - 1) {return;}
    // pour chaque �l�ment
    try {
    for (int i = 0; i < fileList.length; i++) {
    // en fonction du type d'�l�ment
    if (fileList[i].isDirectory()) {
    // si c'est un r�pertoire on cr�� un nouveau noeud
    FSNode dir = new FSNode(fileList[i].getName(), fileList[i]);
    node.add(dir);
    // on recherche les �l�ments (r�cursivit�)
    addFolder(fileList[i], dir, ++level);
    if (fileList[i].isFile()) {
    // si c'est un fichier on ajoute l'�l�ment au noeud
    node.add(new FSNode(fileList[i].getName(), fileList[i]));
    catch (NullPointerException e) {
    // rien
    * Recuperation des sous-elements d'un noeud
    * @param node
    public void addFolder(FSNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    for (int i = 0 ; i < node.getChildCount() ; i++) {
    addFolder(((FSNode)node.getChildAt(i)).getFile(), (FSNode)node.getChildAt(i));
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Tri une liste de fichier
    * @param listFile
    public void sortFiles(File[] listFile) {
    triRapide(listFile, 0, listFile.length - 1);
    * QuickSort : Partition
    * @param listFile
    * @param deb
    * @param fin
    * @return
    private int partition(File[] listFile, int deb, int fin) {
    int compt = deb;
    File pivot = listFile[deb];
    int i = deb - 1;
    int j = fin + 1;
    while (true) {
    do {
    j--;
    } while (listFile[j].getName().compareToIgnoreCase(pivot.getName()) > 0);
    do {
    i++;
    } while (listFile[i].getName().compareToIgnoreCase(pivot.getName()) < 0);
    if (i < j) {
    echanger(listFile, i, j);
    } else {
    return j;
    * Tri rapide : quick sort
    * @param listFile
    * @param deb
    * @param fin
    private void triRapide(File[] listFile, int deb, int fin) {
    if (deb < fin) {
    int positionPivot = partition(listFile, deb, fin);
    triRapide(listFile, deb, positionPivot);
    triRapide(listFile, positionPivot + 1, fin);
    * QuickSort : echanger
    * @param listFile
    * @param posa
    * @param posb
    private void echanger(File[] listFile, int posa, int posb) {
    File tmpFile = listFile[posa];
    listFile[posa] = listFile[posb];
    listFile[posb] = tmpFile;

  • How 2 get the path of a file

    how 2 get the path of a file Using jsp
    i have tried getPath...but i'm geting the error
    The method getPath(String) is undefined for the type HttpServletRequest
    any idea how 2 get the path of a file

    You need ServletContext#getRealPath().
    API documentation: http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)

  • How 2 get the path of a file Using jsp

    how 2 get the path of a file Using jsp
    i have tried getPath...but i'm geting the error
    The method getPath(String) is undefined for the type HttpServletRequest
    any idea how 2 get the path of a file

    You need ServletContext#getRealPath().
    API documentation: http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)

  • How to get full source file name in Exporter SDK

    Hi,
    I'm making an Exporter Plug-in using SDK 5.5.
    I want to get the path and extension of the source file (when export file) and path of the sequence (when export sequence).
    Especially the extension of the source file, which is always be replaced by the output extension.
    I can't find it in the SDK guide and sample. Sorry if I'm being a noob.
    Thank you.

    Sequences are generally made up of multiple clips edited together.  It's rare that a user would take a single clip and reexport it.  So there isn't usually a one-to-one relationship between source file and exported file.  Because of that, PPro provides the sequence name as the default file name.
    If you did need to get at the source files, you could do it only under specific circumstances - only when exporting directly from PPro, or when loading a clip directly into AME, but not when exporting a sequence from PPro through AME.  You would need to use the Video Segment Suite to parse the timeline segments, as demonstrated in the player sample code in videoSequenceParser->ParseSequence().  This is quite a complicated process and not something worth pursuing unless absolutely necessary.
    Regards,
    Zac

  • How to get absolute path of a form within the Forms

    Aslam o Alikum (Hi)
    How to get absolute path of a form within the Forms 6i or 9i
    For example
    i am running a from "abc.fmx" from C:\myfolder directory
    can i get the form path 'C:\myfolder' by calling any any function from "abc.fmb"

    There is no direct call that will always work. What you need to do is call get_application_property(current_form). This may have the full path in it, depending on if that path was defined when the form was launched. If there is no path, then you need to use TOOL_ENV.GETVAR to read the Forms<nn>PATH and the ORACLEPATH, parse those out into individual directories and then check for the FMX in each.
    I already have some code to do all this for you see:
    http://www.groundside.com/blog/content/DuncanMills/Oracle+Forms/?permalink=4A389E73AE26506826E9BED9155D2097.txt

Maybe you are looking for

  • HDS live streaming to Flash not working

    Adobe Flash Media Server 4.5.5 r4013 Windows 2008 Sources: http://help.adobe.com/en_US/flashmediaserver/devguide/WSd391de4d9c7bd609-52e437a812a3725df a0-8000.html http://www.adobe.com/devnet/adobe-media-server/articles/live-multi-bitrate-video-http-f

  • In which situation I need to active objects after transport

    Hi Experts,     I'm wondering in which situation I need to active object after transport?  In some cases, I have to active transformation, DTP, infoobject, multiprovider....  Does any one make a conclusion of that?     thanks in advance. Eric

  • People report my online number gives a busy signal

    People report my online number gives a busy signal... What should I do?  Does Skype offer chat support with a live rep to resolve this issue?  

  • Workitem not seen in inbox but event is triggered in transaction SWEL.

    Hi, I have created a workflow to create and display a material master using transaction MM01. My event (created) is getting triggerd when I am creating a material but the same is not seen in my business Workplace. In display event trace i am able to

  • Unable to download my MCP Certificate

    Dear Team, Please help me as I forgot my MCID and i don't have my access code. My required details given below please help me ASAP. Name  : Sunny Date of Exam : Thursday, Jan 12, 2012 Candidate ID : SR7956766 Registration : V6ESYD5206 Thanks and Rega