How can I get file name using JSTL ?

Hi,
I'm now using <c:out value="${pageContext.request.requestURI}"/>
this return servlet path
How can I get just file name
or user path (in location bar) ?
thanks in advance

The original uri (before forwarding) is available in a request scoped attribute.
These attributes are given the values obtained by calling the related method on the original request received by the container.
javax.servlet.forward.request_uri
javax.servlet.forward.context_path
javax.servlet.forward.servlet_path
javax.servlet.forward.path_info
javax.servlet.forward.query_stringSo if those two above don't work for you these might.
<c:out value="${requestScope['javax.servlet.forward.request_uri']}"/>
<c:out value="${requestScope['javax.servlet.forward.servlet_path']}"/>If these values are null, then the value in the request object is the correct one.
You mentioned the value in the address bar being a .html file. Do you perchance use framesets? If so the value in the address bar is always the url used to load the frameset, and doesn't change no matter where you travel within those frames. That won't be available to the server, because it has nothing to do with the current request.
Cheers,
evnafets

Similar Messages

  • How can i get rulefiles name in  appllication with using custom java code.

    Hi.
    I want to get rulefiles names from analytic service with using java api.
    How can i get rulefiles name. Which api can i use for this issue?

    Hi,
    Use IEssCube.getOlapFileObjects() api to retrieve rule files.
    Insert this code snipid in your code, it will list all the rule files.
    IEssCube cube = olapSvr.getApplication("Sample").getCube("Basic");
    IEssIterator itr = cube.getOlapFileObjects(IEssOlapFileObject.TYPE_RULES);
    IEssBaseObject[] rfs = itr.getAll();
    System.out.println("Rule file count: "+rfs.length);
    for (int i = 0; i < rfs.length; i++) {
         System.out.println("RuleFile"+i+": "+((EssOlapFileObject)rfs).getName());
    you can also list data files and other file objects by changing IEssOlapFileObject.TYPE in getOlapFileObjects()
    Regards
    Rajeev Singh

  • I have a recorder that outputs wma files. How can I get garageband to use my wma files?

    I have a recorder that outputs wma files. How can I get garageband to use my wma files?

    I don't think that GarageBand can use wmas, but there's always good old conversion, and GarageBand can definitely use mp3s. Personally, I recommend media.io for stuff like this, but of course it depends on the size of your files. Otherwise I don't know that there's anyway to get GarageBand to work with them...

  • How can I hide file names in a photostream?

    How can I hide file names in a shared photo stream on icloud.  I don't want people to see how many pictures I take at an event.  Can this be done to pictures already posted?

    The Shared Photo Stream uses the filename of the original image file as the title that is shown in the stream.  If you want to hide the original filename, export the image to a folder in the Finder, rename it, then reimport it to share it.  You can rename the files directly when exporting.
    Or, if you do not mind to change the names of the originals in Aperture use the command "Metadata > Batch change" and change the title of the image, with the option "Apply to Original file" enabled and "Add metadata from" set to "None".
    To rename the photos already shared, delete them from the Shared Album and share them again.

  • How can I get file list for a given directory?

    Hi,
    How can I get file list for a given directory? Is there a function?
    Thanks.

    Hi friend,
    Try this sample report. It displays all files in a directory.
    While executing give some directory name in input. ex:  C:\
    Mention file type in filter parameter. ex: *.DOC
    REPORT ztests.
    DATA : file_table LIKE TABLE OF sdokpath WITH HEADER LINE .
    DATA : dir_table LIKE TABLE OF sdokpath WITH HEADER LINE .
    PARAMETERS:p_dir(50) TYPE c.
    CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
      EXPORTING
        directory  = p_dir
        filter     = '*.DOC'
      TABLES
        file_table = file_table
        dir_table  = dir_table
      EXCEPTIONS
        cntl_error = 1
        OTHERS     = 2.
    LOOP AT file_table .
      WRITE:/ file_table-pathname.
    ENDLOOP.
    Might be helpful...
    Thanks.....
    Edited by: Guest77 on Feb 11, 2009 5:30 AM

  • How to find the File name using the FTP Adapter

    hi all,
    how to find the File name using the FTP Adapter with BPEL.
    Regards

    Found the solution for this.
    First In the mediator's routing rule use assign property $in.property.jca.file.FileName to $out.property.jca.file.FileName
    In the BPEL's receive activity go to the properties tab and get the property to a BPEL variable. That should do it.
    Thanks for the posts

  • Network : How can I get  the name of all computers in the lan ?

    Hi.
    Network : How can I get the name or the IP of all computers in the lan ?

    Easiest way to find all IPs would be to scan the network. Ping every possible IP in the network and all IPs that replied to the ping exist.
    Since I don't know how to do a ping in Java, I would scan for some Ports used by OS Services.
    Since I don't know which ports are used by windows, I think you should look for a ping class (or library).
    Scanning all ports for every IP in a class C network shouldn't take too long. And after finding one port you don't have to try the other ports for that IP, since it has to be online ;)

  • I have a G4 Quicksilver that no longer works, but the hd may still be good. How can I get files off the G4 hd and onto my new iMac?

    I have a G4 Quicksilver 2001 that no longer works, but the hd may still be good. How can I get files off the G4 hd and onto my new late 2013 iMac?

    Also, how do I boot the G4 into FireWire Target Disk mode?
    First, the G4 must be able to start to use FWTDM. If it can start, hold the t key at boot until you get a "screensaver pattern" that looks like this:
    If the G4 is attached via a FireWire cable to a newer Mac with a FireWire port, the G4's hard drive will appear on the other Mac's desktop just as if it were any external drive. A USB cable won't work for FWTDM.
    Just wondering if the drive in my G4, which I believe may be an ATA drive will also work in an enclosure for a SATA drive?
    No. ATA (actually "PATA" or "IDE") and SATA are different interfaces. PATA external enclosures are now very hard to find. You best and least expensive option is the adaptor that BDAqua linked. One of its connectors is for PATA drives.

  • How can I get interface name ?

    Hi there.....
    I wonder that how can I get interface names?
    We can get interface name using by "netstat" or "ifconfig".
    But I don't want to use system() or execl() function.
    Is there any function similar to netstat or ifconfig ?

    See the inet(7P) or inet6(7P) man pages for the
    programatic interface to the interface, to get its
    IP settings, and then look at the
    gethostbyname(3SOCKET) call for IPaddr to hostname
    resolution.

  • How can I get the name of a output module template

    Hey guys,
         SDK newbie here.
         How can I get the name of every output module template?
         Thanks
    Zhiqiang Li

    Ok. Bravo
    Please mark this as 'Answered' - it will help others on the forum -

  • How can I get computer to use external DVD drive?I have a HP dvd640 plug in play drive I want to ude but my iMac dosen't see it as connected.

    How can I get *computer* to use external DVD drive? (1.8 GHz PowerPC G5 Version 10.3.9)

    Place cd/dvd in drive.  cd/dvd icon will show on desktop.
    How can I get computer to use external DVD drive?I have a HP dvd640 plug in play drive I want to ude but my iMac dosen't see it as connected.
    What is ude?
    How is it connected?  firewire or usb?
    When connected it should appear in system profiler.
    blue apple > about this mac > more info button. Click on the hardware line. It has a little triangle in front of the work hardware.
    look for firewire or usb.
    Robert

  • Have tried to restore settings due to problems, now Iphone shows Sim Failure, how can I get back to using my phone? Please help, its a business phone. :(

    Hi, I have tried to restore settings on my Iphone due to problems I was having with the phone cutting out when talking on the phone, now Iphone shows Sim Failure, how can I get back to using my phone? Please help, its a business phone.

    Hi jclarke64, 
    Thank you for contributing to the Apple Support Communities. 
    I'm sorry to hear that your iPhone 4s was lost, and glad that you were able to upgrade. 
    If your iPhone 4s was backed up to iCloud or using iTunes, you can restore the backed up data to your new phone. 
    See the steps in this article for help with restoring from a backup:
    Back up and restore your iPhone, iPad, or iPod touch using iCloud or iTunes - Apple Support
    All the best,
    Jeremy 

  • How can I get files to open automatically upon download?

    I would like files I download to open automatically and for the download window to be turned off. I know how to turn off the download window, but cannot get files to automatically download.

    Hi JJMack. Thanks for getting back to me.
    I think I've created confusion about what I want. All I want is to end up with a file that is flattened so that I can save it as a tiff without getting a warning that it contains layers. Please correct me if I’m wrong but I’ve always assumed I should always flatten a file before I save it as a tiff unless I specifically want to retain layers or transparency. I’m only talking here of files that open with a single layer: ie. Layer 1. I assume that if I don’t flatten such files the resultant files will be unnecessarily big?
    The only reason I keep saying I want a Background layer is that I know that a flattened file will only have a Background layer. I don’t have any desire for a Background layer per se. I certainly don’t want to add extra layers - quite the opposite.
    So perhaps the question I should have asked should have been:
    How can I get files to open 'ready-flattened' by default so I can save them directly to tiff without having to manually flatten them every time?
    Cheers

  • Mail application is still there. All of my emails and folders are gone since iCloud. How can I get them back using Snow Leopard? Or can I? Do I have to wait for Mountain Lion?

    Mail application is still there. All of my emails and folders are gone since iCloud. How can I get them back using Snow Leopard? Or can I? Do I have to wait for Mountain Lion?

    I need to check a few other things...
    Click on 'Mail' in the upper left corner next to the Apple ()
    Click Preferences
    Click the 'Accounts' tab
    Make sure your iCloud account is highlighted in the column on the left.
    In the account information section what does it say next to:
    Incoming Mail Server?
    Outgoing Mail Server?
    Also, did you use MobileMe before the iCloud?

  • How can I get parameter name?

    ODatabase odb("test", "scott", "tiger");
    OParameterCollection params = odb.GetParameters();
    -------> and next how can I get parameter name?
    I hope get stored procedure parameter names and settiing parameter Add just like below.
    Plz tell me how can I get parameter name?
    I'm Korean, and my english is poor. sorry : )
    // add a parameter named 'DEPTNO'
    params.Add("DEPTNO", 20, OPARAMETER_INVAR, OTYPE_NUMBER);
    // add a parameter named 'EMPCURSOR'
    params.Add("EMPCURSOR", "", OPARAMETER_OUTVAR, OTYPE_CURSOR);
    //Execute the SQL statement
    odb.ExecuteSQL("BEGIN Employee.GetEmpData (:DEPTNO, :EMPCURSOR); END;");

    ok, alright. I'm trying to write a program to easily test EJBs with a user giving input and directly seeing the results of function calls to the Bean. The user gives the JNDI name of the EJB, I instantiate the bean, give the user a list of function calls from the bean, and then he/she chooses the function they want to execute and give input of the parameters values they want. Everything is done remotely and at runtime, and the only real problem is that the user only sees "myFunc ( String )" and it would be confusing if there are several parameters of the same type.
    Yes, I do realize there are other ways to test, I was developing this to try a new method that I thought could be beneficial to me.

Maybe you are looking for