.css and .js file with dynamic content

Hi all !
I would need to move all my javascript and css code from the JSP to separate files and then just include them to the page.
This is of course just standard html code so no probs. there. The little twist is though that both the stylesheet and javascript content should be a bit different depending on the request parameters from the user.
For example the css contains a few images that would need to be used and the paths and names of these images are defined by a custom taglibrary.
The questions would then be: What is the preferred strategy to handle this? Is there a way to actually change the content of those files dynamically or is it just better to leave the dynamic parts on the page.
Of course I can always create a separate servlet that generates them on the fly but that is not the way I would like to go...

if you include your css like
<LINK HREF=\"/application/css.jsp\" REL=\"stylesheet\" TYPE=\"text/css\">");
then make sure your jsp has <%@ page contentType="text/css" %> set and you can make that css.jsp be dynamic and give you the css you need.
SAme applies to javascript with <%@ page contentType="application/x-javascript" %>

Similar Messages

  • Performance, minimum bandwidth, thumbnail previews for PDF and InDesign Files with web content viewer

    Hi,
    We are considering using DPS with a web content viewer for large PDFs and/or InDesign files. The client using a web viewer might have very limited bandwidth (some as low as 256Kbps). We ask:
    1 - How well does the web viewer perform with very large PDFs and InDesign files  (500 MB+) with limited bandwidth? Does the file stream in chunks and the PDF shows as soon as the first page or two are available, with the rest loading in the background, or does the entire file come down in one part and then shown?
    2 - Can PDF and InDesign files support thumbnail previews? For example, one image per PDF page and user can scroll forward and back.
    Your thoughts and comments are greatly appreciated.
    Thanks!
    -Stephen

    Hi Stephen,
    The way the web viewer works is that it converts the PDF/InDesign files to PNGs along with additional HTML assets. Assets are downloaded as they’re ready for a given page (e.g. first, page 1 is filled with its assets as they become available, then page 2, etc), so a reader wouldn’t need to wait for the entire article to load. The next few pages are also loaded in the background, so the reader wouldn’t be likely to notice lag as they flipped through pages to the next page after reading the current one. So the lag will depend on the size of an individual page.
    For your question around thumbnails, the web viewer does not load a preview image so the reader would need to wait for the assets I described above to load.
    Hope this helps...
    Brian

  • .css and .swf files are getting generated with Ibot email

    Hi Team,
    I have an Ibot which use to run on daily basis which contains graph and normal table views, .css and .swf files are getting generated and attached with Ibot email to the users. I'm facing this issue from last two days. Earlier there was no such attachments sent to the users.
    Could anybody let me know what might be the reason for that?

    any inputs?

  • Create Portal Page Design with Dynamic content in Moss2007(without using Visual Studio)

    Hi All,
    I am facing a issue while designing a page in MOSS 2007. I can't use custom code as the client doesn't want it to be used.
    The page is with dynamic content coming from sharepoint lists and picture library. I tried using SharePoint Listview after adding zones as per my page design..but was unsuccessful because I am unable to change its design and css styles in its xslt view.
    Plesae help me to find any alternative so that I can easily style my page with the dynamic content. Is there any way using Content editor webparts? Can we get List data in Content editor html as this can be easily styled. I googled and tried it by using javascript
    and jquery but again unsuccessful.
    Please help me with some solution.
    Thanks..!!

    I recommend your repost this in the WebLogic Portal forum.
    WebLogic Portal

  • Importing From Flat File with Dynamic Columns

    HI
    I am using ssis 2008,i have folder in which I have Four(4) “.txt” files each file will have 2 columns(ID, NAME). I loaded 4
    files in one destination, but today I receive one more “.txt” file here we have 3 columns (ID, NAME, JOB) how can I get a message new column will receive in source. And how can I create in extra column in my destination table dynamically …please help me

    Hi Sasidhar,
    You need a Script Task to read the names and number of columns in the first row of the flat file each time and store it in a variable, then create a staging table dynamically based on this variable and modify the destination table definition if one ore more
    new columns need to be added, and then use the staging table to load the destination table. I am afraid there is no available working script for your scenario, and you need some .NET coding experience to achieve your goal. Here is an example you can refer
    to:
    http://www.citagus.com/citagus/blog/importing-from-flat-file-with-dynamic-columns/ 
    Regards,
    Mike Yin
    TechNet Community Support

  • To create 3 diff files with same content but with diff names in same target

    Hi SapAll.
    i have got a a requirement where pi need to create 3 different files with same content but with different names under same target from a single Idoc.
    its an IDOC to 3 File Inteface.
    can any body help me in providing the differnt solutions for this without use of any script executions.
    will be waiitng for response.
    regards.
    Varma

    > i want to use only one communication channel to produce 3 different file names with same content ,so here i should use only one message mapping in 3 operation mappings .
    This is not possible to produce 3 different file names with single CC. You have to use 3 different CCs. unless you have going to use some other trick e.g some script to rename the file etc..
    As I suggested in my previous reply use Multi-Mapping Or create 3 different Interface Mappings (by using the same MM).
    Note: You have to create 3 different Inbound Message Interfaces (you can use the same Inbound Message Type) otherwise while creating the 3 Interface Determination it won't allow because of same Outbound & Inbound Message Interface. It will simply say Interface alreday exists..
    So, just use the Multi-Mapping which is best solution in my opinion, because the benefit of using multi-mapping are:
    1. You have to create only single Message Mapping
    2. Single Interface Mapping
    3. Single Receiver Determination
    4. Single Interface Determination
    5. 3 Receiver CCs (3 you have to use in any case)
    6. Performance wise it is good (read the blog's last 2 para)
    7. And last but not the least easy to maintain the scenario.

  • Logic to upload file with dynamic columns

    hi
    in my requirement i hav given to add logic to upload file with dynamic columns so that this upload program can be reused.
    this way the program is flexible, irrespective of the number of columns in the file.
    can any one explain this?
    and let me know what actually i hav to do.

    Check the program and the dynamic column is in the col_pos internal table and in the routines get_structure onwards.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/scm/dynamic%2bstructures%2band%2bcomponents
    cheers
    Aveek

  • How do I create a product or item database so I can search fr the product and its files with hte pro

    How do I create a product or item database so I can search for the product and its files with the products name or four digit code

    Ok so I made some progress on this. I have figured out, that I can add a chained "add to cart" to certain items, then when they click the button for Buy now, it will add both items to the cart. However, this would require me to manually build each product page and generate a custom button for each one with both product IDs in it.
    Can anyone offer help on how to put some JS in that would append a second function to the onclick function that BC Generates dynamically?
    For the products that require a set up fee, I would assume I would add in to either the product templates or in to the item description some JS that would find the onclick of the buynow button and append a second function to also add to cart the setup fee product. The end result being code that looks like this:
    <input type="submit" class="productSubmitInput" onclick="AddToCart(188536,6314368,'',4,'','',true);AddToCart(188536,6314367,'',4,'','',tr ue);return false;" value="Buy Now" name="AddToCart_Submit" />
    Except of course, the product ID on the first AddToCart would be the main product with the second one being the one appended.
    Does any of that make sense? lol

  • How can I upload and download files with uiXML?

    I want to implement upload and download files with uiXML. In some previouse topic I got answare to look in AbstractPageBroker class in JavaDOC. I did it but this is a very-very little resolution description for this problem. I think for developers YOU (UIX Team) must in very quick time to put some examples on the NET because this is a nice technology but with adecvate samplase and developers guide it will be dead very soon. I digging this forum for information. I see many many people have same problems about this technology. They like it and want to use and try but documentation is very very poor.
    WE WANT EXAMPLES and separate forum for UIX. I think it deserve this.
    If You have any more detailed documentation would be nice to put on the net. I have uixdemo.zip file but this is in very early fase of development. I downloaded it before fwe months. And now I can't find it anymore on youre site. What happend?

    Attila -
    I went back and re-read the JavaDoc for AbstractPageBroker and MultipartFormItem and put together the following sample PageBroker based on the description from the JavaDoc:
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletContext;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.share.util.MultipartFormItem;
    import oracle.cabo.servlet.xml.UIXPageBroker;
    * An extension of UIXPageBroker which stores all uploaded
    * files in the temporary directory.
    public class UploadingPageBroker extends UIXPageBroker
    * Override of AbstractPageBroker.doUploadFile() which saves
    * all files to the temporary directory.
    protected String doUploadFile(
    BajaContext context,
    Page page,
    MultipartFormItem item) throws IOException
    // Get the location of the file to create in the temp directory.
    // Of course a real application probably wouldn't upload files to
    // the temp directory - just using this contrived example to
    // demonstrate basic uploading support.
    File file = _getFile(context, item);
    if (file != null)
    // Create a FileOutputStream. Of course, a real application would
    // probably want to buffer the output
    FileOutputStream out = new FileOutputStream(file);
    // Write out the file
    item.writeFile(out);
    // Close up the output stream
    out.close();
    // We can return a value here to add to the PageEvent
    // if so desired.
    return null;
    // Gets the File for the item that we are uploading
    private File _getFile(
    BajaContext context,
    MultipartFormItem item
    // Get the file name
    String name = item.getFilename();
    // If we don't have a file, bail...
    if (name == null)
    return null;
    // Get the path to the temporary directory
    File dir = _getTempDir();
    // Return the File object
    return new File(dir, name);
    // Returns the path to the temprary directory
    private File _getTempDir()
    // Get the temporary directory from the ServletContext
    ServletConfig sConfig = getServlet().getServletConfig();
    ServletContext sContext = sConfig.getServletContext();
    return (File)sContext.getAttribute("javax.servlet.context.tempdir");
    In this sample, each uploaded file is simply saved in the temporary directory. You'll want to replace the code that creates the FileOutputStream for the uploaded file to use whatever OutputStream makes sense for your application.
    BTW - I used the following UIX page to test this out:
    <?xml version="1.0" encoding="UTF-8"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller">
    <content>
    <pageLayout xmlns="http://xmlns.oracle.com/uix/ui">
    <contents>
    <form name="uploadForm" usesUpload="true">
    <contents>
    <fileUpload name="uploadedFile"/>
    <submitButton name="upload" text="Upload"/>
    </contents>
    </form>
    </contents>
    </pageLayout>
    </content>
    </page>
    Hope this sample helps with the uploading part of your question. I'll see if I can provide a download sample in a later post.

  • Enable Gzip compression for .CSS and .JS files

    This may be posted on the wrong forum, but I did not know a better place. My excuses if it should have been posted elsewhere.
    Situation:
    Several webpages are slow to load. Well, they are pretty large. Google Webmaster Tools suggests to GZIP several .CSS and .JS files to save up to 164 KB per page and my guess is that will make the loading a lot faster. I looked around the hosting site for tools to enable GZIP compression, but did not find them.
    Question:
    How can I enable GZIP compression on my pages and how do I do that? Does it pay to extend GZIP to the .HTML pages as well or is that not possible?
    Reference: PPBM5 Benchmark and Holländische Poffertjes
    The hosting company is 1and1.com

    Barry, go to: http://ppbm5.com/Benchmark5.html and use one of the buttons for the performance charts.
    There are 5 HTML pages, each around 740 KB. Compressing them would make a huge difference I think, but also the 164 KB that Google mentions.
    These pages contain the same functionality, but different content.

  • Cannot print PCL file with graphical content

    If I try to print a PCL file with graphical content using lp then the output is corrupt on a network printer. I've tracked the problem down to the netpr program - which seems to be performing some sort of filtering on the data. Does anyone know how the flags work for netpr - or know of a work around?

    Assuming you are running 10.10.2 and not the ancient 10.0.2, can you tell us what printer and printer driver you are using? How is the printer connected to the computer (network, usb)? See if you can delete the Reader preference files? Years ago I resetting the printer subsystem would sometimes cure a problem like this.

  • A drag and drop game with dynamic text response

    Hi,
    I am a teacher and my school has recently upgraded to Adobe Design Premium.  Our previous version was about 5 versions out of date.
    I teach A Level which requires students to create an Interactice Multimedia product.
    In the previous 6 years, I have taught students how to create simple drag and drop game with dynamic text responses.
    Since the upgrade to Actionscript 3.0 the dynamic text response has ceased working.
    When creating the game from scratch, I need to move to Actionscript 2.0 as 3.0 does not allow me to add actionscript to objects - I know and am sure that this is a better way of doing things, but I would prefer to keep working the way I am used to.
    I use a switch case statement which I have copied below to make the drag and drop work.  The objects I apply the code to work in that they can be dragged, however, my dynamic text box with a variable name of "answer" is no longer displaying the response when an answer is left on a dropzone (rectangle converted to a symbol and given an instance name).
    on(press) {
    startdrag(this);
    on(release) {
    stopdrag();
    switch(this._droptarget) {
      case "/dropzoneB":
       _root.answer="Well done";
       break;
      case "/dropzoneA":
      case "/dropzoneC":
       _root.answer="Hopeless";
       break;
      default:
       _root.answer="";
       break;
    Any help would be much apeciated.
    Thanks
    Adrian

    To drag in as3
    blie_btn is the instance of the object drawin on the stage. In AS3 you have to assign a even listener, in this case MOUSE_DOWN, and MOUSE_UP, as we want the drag to stop if the mouse is not clicked. Then we fire the functions, and tell the object to start drag.
    // Register mouse event functions
    blue_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    blue_btn.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    red_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    red_btn.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    // Define a mouse down handler (user is dragging)
    function mouseDownHandler(evt:MouseEvent):void {
         var object = evt.target;
         // we should limit dragging to the area inside the canvas
         object.startDrag();
    function mouseUpHandler(evt:MouseEvent):void {
         var obj = evt.target;
              obj.stopDrag();
    if you want to make the text do what you want then something like this might work.
    In the function, you could add a text box onto the stage, give it a instance of something like outputText
    and then:
    outputText = ("Bla Bla Bla");
    (^Not sure if this will work exactly^)
    PS. I am currently a A-level student

  • [svn:fx-trunk] 7661: Change from charset=iso-8859-1" to charset=utf-8" and save file with utf-8 encoding.

    Revision: 7661
    Author:   [email protected]
    Date:     2009-06-08 17:50:12 -0700 (Mon, 08 Jun 2009)
    Log Message:
    Change from charset=iso-8859-1" to charset=utf-8" and save file with utf-8 encoding.
    QA Notes:
    Doc Notes:
    Bugs: SDK-21636
    Reviewers: Corey
    Ticket Links:
        http://bugs.adobe.com/jira/browse/iso-8859
        http://bugs.adobe.com/jira/browse/utf-8
        http://bugs.adobe.com/jira/browse/utf-8
        http://bugs.adobe.com/jira/browse/SDK-21636
    Modified Paths:
        flex/sdk/trunk/templates/swfobject/index.template.html

    same problem here with wl8.1
    have you sold it and if yes, how?
    thanks

  • My macbook won't strat and show file with question mark on it?

    Hi
    is there anyone can help me please my macbook can't boot and show file with "?"mark on it. 

    Restart and hold command + R (both keys) down. The screen will show four options. Select Disk Utility. Next click on the name of your drive, and run Repair Disk.
    After that is done, restart in the usual way.

  • I have my camera (Canon 5D MARK 2) set to take both JPEG Large and Raw files with each shot. I uploaded the images from the card to my Pro (Aperture 3) and while the import info said 1500 images were uploaded, I can't find the RAW images.  Aperture put ab

    I have my camera (Canon 5D Mark 2) set to take both JPEG Large and Raw files with each shot. I uploaded the images from the card to my Pro (Aperture 3) and while the import info said 1500 images were uploaded, I can't find the RAW images.  Aperture put about 700 images in an untitled project folder, but all the images are the JPEGs.  What am I missing?
    Thanks,
    upsjdris

    Have you checked your "Import" settings for "Raw&Jpeg" pairs in the "Import" panel?
    You can set Aperture to import raw, jpeg, or raw&jpeg.
    If you imported Raw&Jpeg, but have set Aperture to use the Jpeg as original, you will see the imported image as Jpeg image, not as a raw image, even if the raw has also been imported. You can switch between Raw and Jpeg originals for selected images from the Photos menu:
    Photos > Use Raw as original.
    Regards
    Léonie

Maybe you are looking for

  • Email report as attachment with link to webi version

    I want to schedule a webi report such that the report is sent as an excel attachment. In addition I want to provide a URL to the report that the user can click to view the report in Webi in the browser with live/current data if required. The actual r

  • Menubar on external monitor

    The menubar does not appear on the external monitor, the dock does

  • Problem in runtime environment

    Hello all I have installed j2sdk 1.4.2 and setted all paths correctly recently I installed oracle 9i it has replaced my java runtime environment with 1.3 (when I type java -version in the command window) how to fix that?

  • Agent Real Time Displays 1 hour ahead

    Greetings all, Agent Real time display are showing 1 ahead hour of clock system. Anyone have a suggestion if this is a bug or configuration issue ?? I have attached a screenshot to simplify UCCX: 7.0

  • OpenVPN - and NWClient =, am I missing something obvious?

    I'm running NOWS 2.5. I have installed OpenVPN on the server. I successfully created the necessary key and client file for a Windows user. I've transferred and installed these on a pc running XP. I can connect via the vpn client to the server. I can