Need a way to customize c:url

I have a strange requirement. I use nested jsps in my application. In each of the jsps there can a number of js / and css includes. I do not want to have duplicate includes. i.e. if I have a js file included in the parent jsp, I do not want it to be included again in any of jsps imported with in the parent jsps. Is there a way to do a check for this in c:url tag? or do we have any tag that does a check of the urls included before and only then includes the new url?.
Please let me know your comments.

Nope thats not what the c:url tag does.
The c:url tag just formats a url and parameters for you.
It knows nothing about what urls you have used on the page before.
I think a custom tag is the way to go - in fact it would be quite simple to write as a tag file, leveraging the c:url tag.
You could declare a map/list in request scope. Anytime a script is included, you check that map for the script. If it is not there, "include" the script, and add that script to your map. If it is there, you know you have it included already.
Something like
scriptImport.tag
<%@ attribute name="src" required="true" %>
<%@ attribute name="includeMap" type="java.util.Map" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:if test="${not exist includeMap[src]}">
  <c:set target="${includeMap}" property="${src}" value="${src}"/>
  <script src="${pageContext.request.contextPath}${src}" type="text/javascript"></script> 
</c:if>And then use it in a jsp something like this
<jsp:useBean id="scriptUseMap" type="java.util.Map" class="java.util.HashMap" scope="request" />
<%@ taglib prefix="my" tagdir="/WEB-INF/tags %>
<my:scriptImport src="/javascript/myFunc.js" includeMap="${scriptUseMap}"/>{code}
All your imports would have to be done using this tag, using absolute includes relative to the web application root.
I think that would do what you want.
Disclaimer: this is untested code.  Its simple enough that it might work right off, but don't count on it :-)
Cheers,
evnafets                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Is there a way to affect the URL used when running a report subscription?

    We are using SQL Server 2008 R2.  I am finding out that when running a report subscription to extract a file in csv format, an extra blank line is created at the bottom (i.e., extra line feed), and the mysterious BOM characters also get inserted at
    the beginning.  Both of these "features" are causing problems with a client's import of these files.  Of course, it affects multiple clients.
    I have done some research and have found information on how to edit the rsconfigserver file to render CSV files using ASCII and to not use Excel formatting.  This removes both "features"/problems stated above.
    However, editing the server config file will affect all csv extractions on that report server.  Is there a way to control the URL of a specific report subscription to include these values (so only the reports that need the fix get it)?  For example,
    someone gave this URL as an example of how to add parameters including encoding in the URL.   http://MyReportServer/ReportServer?%2fReport+Folder%2fReportName&rs:Command=Render&rs:Format=CSV&rc:Encoding=ASCII
    Is there a way to have the report subscription run the report using a URL like this so it extracts it without the BOM characters?  I was thinking a data driven subscription would allow me to set the values like this, but these parameters are only pertinent
    AFTER the report is run and only needed for the final rendering.  Not sure how to do this. Maybe it's not possible. If it's not, that's fine.  I just need to write a proposal to our DBA's to talk them into making a couple edits to the server config
    file.
    Has anyone ever worked around this before in SSRS?
    Thank you!!
    Dana

    Hi DanaSSRS,
    According to your description, you want to have some report exported into CSV file with ASCII encoding when running a subscription. Right?
    In Reporting Services, when we run the subscription, it will call the Render Extension as we configured in rsreportserver.config file, we can't set the Render format with ASCII Encoding on subscription level. As you said, the Render Extension we configured
    in the rsreportserver.config will apply to all reports. In this scenario, you only want that extension apply to specific reports. For your requirement, we suggest you add a custom Render Extension in configure file. You just need to copy the CSV Extension
    and add a <OverrideNames/> to override a new name. Then set the <Encoding> in <Configure>. And you can select this custom Extension when creating the subscription. This might be the most effective workaround.
    Reference:
    Customizing Rendering Extension Parameters in RSReportServer.Config
    CSV Device Information Settings
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Is there a way to paste an URL into the file selection dialog box?

    Hi,
    I would like to share on Friendfeed.com images that I find on websites. On Windows, I click on "Add - photos" and I can paste the URL of the image directly into the dialogue box.
    On my Mac 10.6.6, I can't find a way to do that: the dialog box only allows me to click on a file's name, I can't paste anything. So I have to save the image on my disk, and then upload it on Friendfeed.
    It's not a big deal, but still more cumbersome.
    Is there a way for me to avoid saving the image on my hard drive?
    thanks for any help that will come this way

    Thomas, you really need to relax I just asked a simple technical question: is X technically possible?
    There were only two meaningful answers to that: yes and no.
    But, no, you and others started to imply there were some dark issues of image copyright infringement, which - if I was not very relaxed myself - would be offending. You don't know what images I'm talking about, so why in the world did you start by assuming that I was infringing copyright?
    (read again my previous answers to you, and you'll see I was not condoning infringement. I was simply saying it was not an issue here). Are you going around the web entering any discussion about how guns work, warning that killing people is a crime? What about knifes? Car forums and speed limits? (I could go on, as you can imagine).
    But, since we're talking about copyright, you may want to lower your expectations about how "easily" you could sue me. The world - and its legal systems - is quite a different thing from the USA, you know.
    Finally, about Friendfeed. Read again what I wrote (leaving aside all the copyright concerns that are distracting you ) and you'll see I mentioned that of course there's a "normal" way to enter the Url. It's just two different actions, with two different results. One of these actions is apparently not possible with a Mac. Too bad. As for Friendfeed being a crappy website: I see you're a web developer. I wish you to be as successful a developer as the people who created Friendfeed (http://en.wikipedia.org/wiki/Bret_Taylor). Some of its functionalities were years ahead of the competition, which is why they have been acquired by Facebook, and today - after more than a year with no development whatsoever - they still make for a very good social network. Go and have a look at it, you may learn a thing or two.
    (I wrote finally, but I was wrong). One more thing: I couldn't resist, and I took a look at your webpage and resumé. I'm not going to write here what you did from "August 1997 to August 2007" (although it's public, so it shouldn't be a problem). But let me express my full appreciation for that! (I'm serious).
    cheers!

  • Need a way to verify from SAP if an email address really exists

    Hi Guru,
    I need a way to verify from SAP if an email address really exists.
    Thanks in advance
    Soufiene

    Hello,
    Try the following code. It gives an option of using a webservice to validate an email address. This piece of code may help in solving your query.
    PARAMETERS: p_mail(100) LOWER CASE.                 " E-Mail id to be verified
    DATA: http_client TYPE REF TO if_http_client .
    DATA: w_string TYPE string ,
          w_result TYPE string ,
          r_str    TYPE string .
    DATA: result_tab TYPE TABLE OF string.
    START-OF-SELECTION .
      CLEAR w_string .
      CONCATENATE
      'http://www.webservicex.net/ValidateEmail.asmx/IsValidEmail?Email=' p_mail
    INTO
      w_string .
      CALL METHOD cl_http_client=>create_by_url
        EXPORTING
          url                = w_string
        IMPORTING
          client             = http_client
        EXCEPTIONS
          argument_not_found = 1
          plugin_not_active  = 2
          internal_error     = 3
          OTHERS             = 4.
       CALL METHOD http_client->send
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2.
        CALL METHOD http_client->receive
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2
          http_processing_failed     = 3.
      CLEAR w_result .
      w_result = http_client->response->get_cdata( ).
       REFRESH result_tab .
      SPLIT w_result AT cl_abap_char_utilities=>cr_lf INTO TABLE result_tab .
       READ TABLE result_tab INTO r_str INDEX 2.
      IF r_str+44(1) = 't'.
        WRITE:/ 'Valid email address'.
      ELSE.
        WRITE:/ 'Invalid email address'.
      ENDIF.
    Regards,
    Sachin

  • Any way to customize the headerClick event of an Accordion control

    Hi,
    Is there any way to control the transition of the accordion
    headers. I want a confirm message to appear when a header in an
    accordion control is clicked and if the user selects Yes then only
    the accordion should open the clicked header portion else the
    previous header portion should remain open.
    I tried to override the headerClick event and its event
    Handler but both are declared as private in the Accordion class
    also the event.preventDefault doesnot function. Is there any way to
    customize the header click event handling?
    I am working on Flex version 2.0.1.
    Thanks and Regards,
    Paromita

    But, as said before, sharing the same session shouldn't give any problems at all. Which problems are you occurring? If you have problems with that they shares the same session, then you are apparently storing values in the session scope while they belongs in the request scope.
    Hi,
    Thanks a lot for your comment.
    But if I change the backing bean to session scope, the same problem exists.
    And i need to set the userID to session for future reference.
    the scenario is like this,
    1. I am loading the JSF application in iFrame of a .NET page and the user can invoke multiple instance of the same .Net page in different browser at a time.
    2. After loading the JSF application, the server will establish session with the browser and at that time the same session is sharing by the windows.
    3. From the JSF page i am again invoking a popup window for a wizard and this popup window will be in the same session with the parent window. So whe we invoke the popup window from the any other JSF page, it will also share the same session although the userid is different
    I have tested and the same session cookies are shared among the pages. So we need someway to manage the creation of session. By writting a servletResponseWrapper and overridding the addCookie method will have any effect?
    Or can you please suggest some other alternatives?
    Regards,
    Sudheesh

  • Is there a way to customize the MDM Workflow email notification content?

    I am looking for a way to customize the MDM Workflow email / notification  content. For example, I might want to put the Supplier ID(s) of the impacted supplier records (be it Update, Insert & Delete) into the email body or put an URL into the email body.
    Can MDM Workflow do this?
    Is there any workaround?
    Thanks

    Hi,
    What you can do is add a boolean field to the repository, for instance "Send Mail". You can use an assignment in the Workflows to set this field to true. Next, define an updatelistener and pick up the change to this field. If the value is "true", send out an email. Afterwards, let the listener change the value back to "false".
    Good luck,
    Gerwin

  • Is there a way to customize the web form link in Adobe FormsCentral?

    The dedicated link has a quite complicated address, not easily added to brochures to hand out.  Is there a way to customize the web form link in Adobe FormsCentral?

    It cannot be customized. The workaround is to create your own web page and embed our form into it. That way they only see your URL.
    Randy

  • Your opinion needed - generating unique ID from a URL

    I am currently making a web crawler type program and before rushing straight in and coding something I thought i'd gather a few "expert" opinions so to speak ;)
    A crawler obviously takes a URL, downloads it and saves it in a database somewhere. However I need to keep a record of which URLs have been previously crawled - as not to crawl and recrawl the same URL.
    Ideally I need to make an algorithm which takes a String URL and outputs a unique ID for that URL - no other URL would be assigned the same ID.
    After a while researching I have ran into base64 which could take a URL and output a long String of characters. I have a question here though:
    1. Is base64 always going to output UNIQUE IDs for every URL or is there a slight offchance you could have duplicates?
    However even if base64 worked and it gave me the ID:
    aHR0cDovL3d3dy5qYXZhLmNvbQ==
    For the URL:
    http://www.java.com
    I still have to record it in a database and search for its prescence to determine if the URL has been crawled before.
    So my question is:
    Is there a way to construct a unique NUMERICAL ID for a URL?
    This way, it would be much easier to find the record if all were sorted by their numerical ID number.
    Hope I havent confused you, if I have just tell me!
    Thanks
    -Myles

    I need a numerical representation of a URL as it would reduce the time to search for a URl to check if it had been previously crawled.BUNKUM! Sorry, but it is... you're talking about saving pooftenths of second on each database seek... but if you're web-crawler isn't inherently I/O bound (say what 2 to 5 seconds a page) then who's your ISP? and how much do they charge.
    IE: Your barking up the wrong tree. Just use an MD5's, keep your "current site" in a hashset... for instance if was crawling http://forum.java.sun.com I'd load a hashset from the DB of that domain... crawl within it, and save the whole shebang back to the DB in one hit, delaying any external links until the end.. then load each of those "sites" and crawl and save them, again delaying any external links... and so on until the end of time in all probability.
    And, sorry, you're reinventing the square wheel again... ever heard of jackrabbit?
    http://mail-archives.apache.org/mod_mbox/jackrabbit-commits/200502.mbox/%[email protected]%3E
    (I love google)
    PS: Someone once told me that the internet has a higher probability of surviving a nuclear war than the human race... and if your solar power station also survives then maybe in about a 1,000,000 one cocker-roach might turn to the other cocker-roach and say, "Dad it's finally finished. Can I play Toad Killer 3 now?" ;-)
    keith.

  • Way to customize the excel file used by WEB ADI?

    Hi All,
    Is there a way to customize the appearance of the excel document created by WEB ADI? For example is it possible to create a different colour set?
    Patrick

    for this purpose you need to took help of the third party APIs.
    try POI from Apache
    http://poi.apache.org/hssf/index.html
    this is easy and efficent. and Free also.
    one more i found is
    http://es.actuate.com/xlsjbook/apibasics.html (Not sure about this one.)
    good luck go ahead

  • The Web application at could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application

    Hi,
    I have created on windows service to fetch sharepoint list ad update the list items.
    when i run this service in sharepoint server(where the sharepoint site is hosted),it is working fine. If i run the same service in another machine(sharepoint installed in this machine also). it is giving the below error
    The Web application at [URL] could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.
    Code snippet
    SPSite sharepointSite = null;
                SPWeb rootWeb = null;
                try
                    //SPList current = null, previous = null;
                    string colmId = ConfigurationManager.AppSettings[ID_COLM];
                    List<TaskEntity> list = new List<TaskEntity>();
                    sharepointSite = new SPSite(URL);
                    rootWeb = sharepointSite.OpenWeb();
                    SPList current = rootWeb.Lists[ConfigurationManager.AppSettings[OMEGA_REGISTRATION_LIST]];
                    WriteEventLog("current" + current.Items.Count.ToString());
                catch (Exception ex)
                    ExceptionMethod(ex);
                finally
                    sharepointSite = null;
                    rootWeb = null;
    I have pointed .net framework to 3.5 version and target palform as Any CPU. Please suggest me

    Hi mallela1,
    I also had similar issue couple of months back when I was trying to access a remote URL from a Windows service when the site does not exists in the server where service resides.
    You cannot access a remote url (even though it is SharePoint server and also in same network ) from server object model.
    SPSite can look in the current server only. here what is happening is SPSite will look for this in the current server DB and it is not finding this errror.
    So please dont use ServerObject model for accessing remote sites. You can use Client Object model for the code /requirement you have stated above.
    I wasted lot of time in finding a work around to make to work. It did not. So look for other options.
    Regards,
    Nandini

  • I have a few scratches on my iPod touch 4th gen screen and it really bothers me I need a way to get rid of them

    I have a few scratches on my iPod touch 4th gen screen and it really bothers me and I need a way to fix it without replacing the screen or causing further damage

    Hey Pandorafromtn, Not to rub salt in you open wounds, but prevention would have cost less than $10! Anything that will remove the scratches will most likely ruin the screen. I am aware of a product that works well for fill scratches in eyeglasses. It paints on, is kind of milky semi-transparent then drys to a haze. You then rub / polish until clear. Will it damage the coating on an iPod screen? I don't know. But may be for not, I can't remember the name of the stuff. I guess contact a eye care center, they may be able to help. Replacing the screen would be the best option you have or learn to live with it. In the future use a case and/or screen protector. Or you could start working on your incantations, "Oculus Repairus!" Don't forget the flick of the wrist to get your wand in the correct angle as you state "Repairus". All joking aside, Good luck. Cheers.

  • So i got the update on my ipod touch 5th gen and when i got it it asked me for my old itunes acount and password, except i no longer have that info for the back up and it wont let me by pass at all, i need a way to just restart it

    so i got the update on my ipod touch 5th gen and i got asked me for my old itunes acount and password so i can get the back up from icloud, except i no longer have that info for the back up and it wont let me by pass at all, i need a way to just restart it

    You need to recovery and use it. Sounds like you are running into:
    iCloud: Find My iPhone Activation Lock in iOS 7
    Is there a way to find my Apple ID Name if I can't remember it?
    Yes. Visit My Apple ID and click Find your Apple ID. See Finding your Apple ID if you'd like more information.
    How do I change or recover a forgotten Apple ID Password?
    If you've forgotten your Apple ID Password or want to change it, go to My Apple ID and follow the instructions. SeeChanging your Apple ID password if you'd like more information.

  • I ordered a new phone and shipped it to a friend in Dubai, UAE. without knowing i have to activate it by making 5minutes calls, please i need a way to activate it without sending it back to the US..any help? this has been very frustrating for me this past

    I ordered a new phone and shipped it to a friend in Dubai, UAE. without knowing i have to activate it by making 5minutes calls, please i need a way to activate it without sending it back to the US..any help? this has been very frustrating for me this past few days

    scottxx,
    That was very nice of you to provide your friend with a new phone! I am sorry to say that the device will not be able to activate while in Dubai. For a device to activate it must connect to the VZW network to become active. I apologize for any inconvenience.
    LindseyT_VZW

  • * * Procedure needs a way to  perform  update, insert or delete to...

    Hi Gurus,
    I got Assignment & need your help how to write this procedure efficiently.
    ** The procedure needs a way to actually perform the update, insert or delete to bring the reference data up-to-date with the refresh table.**These columns are for internal use and should not be compared to the refresh tables.
    Column 1
    Column 4
    Column 5
    Column 7
    Column 9
    Column 12
    Column 22
    Column 24
    1)     I would list out the columns in the cursors in place of the *. Or better define a record with %ROWTYPE.
    2)     You will need to include a way to look for rows that may be in one table and not the other.
    a.     Insert the rows that exist in the refresh table, but are missing from the reference table.
    b.     Delete the rows that are found in the reference table, but do not appear in the refresh table.
    3)     You also need to provide for handling the expiration date. Our default expiration date is ‘01-JAN-2500’, meaning if the refresh table has a futuristic expiration date or null, then our default expiration date is considered valid. Also this date needs to be added to any new rows created as a result of the refresh, if you leave the EXPIRATION_DATE column out of the insert it should default to the above date.
    4)     I assume that Differences is where you plan to list the actual data values that differ. If you don’t list the whole row I would at least list the primary key, in addition to what columns are different.
    5)     The procedure needs a way to actually perform the update, insert or delete to bring the reference data up-to-date with the refresh table.
    Thanks in advance

    Hi,
    Take a look at merge
    http://www.psoug.org/reference/merge.html
    Keep Smiling
    Bob R

  • HT1937 My phone got stolen and I don't have "find my iphone" app, I need a way to track it down

    My phone got stolen and I don't have "find my iphone" app, I need a way to track it down

    What To Do If Your iDevice Is Lost Or Stolen
    If you activated Find My Phone before it was lost or stolen, you can track it only if Wi-Fi is enabled on the device. What you cannot do is track your device using a serial number or other identifying number. You cannot expect Apple or anyone else to find your device for you. You cannot recover your loss unless you insure your device for such loss. It is not covered by your warranty.
    If your iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should have done in advance - before you lost it or it was stolen - and some things to do after the fact. Here are some suggestions:
    This link, Re: Help! I misplaced / lost my iPhone 5 today morning in delta Chelsea hotel downtown an I am not able to track it. Please help!, has some good advice regarding your options when your iDevice is lost or stolen.
      1. Reporting a lost or stolen Apple product
      2. Find my lost iPod Touch
      3. AT&T. Sprint, and Verizon can block stolen phones/tablets
      4. What-To-Do-When-Iphone-Is-Stolen
      5. What to do if your iOS device is lost or stolen
      6. 6 Ways to Track and Recover Your Lost/Stolen iPhone
      7. Find My iPhone
      8. Report Stolen iPad | Stolen Lost Found Online
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
      1. Find My iPhone
      2. Setup your iDevice on iCloud
      3. OS X Lion/Mountain Lion- About Find My Mac
      4. How To Set Up Free Find Your iPhone (Even on Unsupported Devices)

Maybe you are looking for

  • How do I import photos from my iPhone 6 into Elements 13?

    I connected my iPhone 6 to my computer, clicked Trust this Computer on the phone, and went to Organizer's photo downloader but it is not detecting any devices.  If I click Refresh List, nothing happens.  Meanwhile Windows Explorer recognizes that my

  • Help fixing/preventing horrible click/popping in Audition recording - example in topic.

    Hi, Looking for help/advice. I recently recorded a podcast using Adobe Audition CS6 for Mac and upon listening back noticed that all audio after about the 3 minute mark was plagued with a terrible crackle/pop throughout - hear the example here: https

  • Panasonic Plasma - Purple ghosting

    I purchased a Panasonic Viera 42U2 last Christmas and have been happy with it up until the beginning of the summer.  Since then I have a noticed an increase in a purple ghosting around certain bright objects and/or moving objects.  This effect doesn'

  • Is this a Bug or am i doing something wrong

    Should Get Back ='Here is a test value' What I do get back='Here isa test value' It does the same thing if i do this Should Get Back ='Here is     a test value' What I do get back='Here isa test value' declare -- Local variables here Replace_Val VARC

  • Show only part of a list in dependencies of a node

    I have a XMLlistCollection who shall fill up my Applikation. In some views I only want to show a part of all entries. Equivalent to a mysql query where I can say: give me all where myNode contains this string. Is there a way to to so? I did a researc