How to include CSS file in JSP

Hi Experts,
CSS file availabe in server. I need user that CSS in one of PDK application.
Example: "/usr/sap/ED1/JC03/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/portalapps/style1.css"
I need to include this in one of JSP file.
Regards,
Satya.

You would have to place the file in the project folder of your PDK application and give a relative or absolute path to it.
<link rel="stylesheet" type="text/css" href="path_to_your_css_file" />
Thanks,
GLM

Similar Messages

  • How to include .css file into jsp file in portal application

    Hi,
    I have included a .css file in a .jsp file using following tag :
    <link rel="<%=componentRequest.getWebResourcePath()%>/css/ts.css">.
    I have kept .css file under /dist/css folder.
    Preview of jsp file is fine but when I upload the jsp file and .css file to server, Look and feel of the screen is changing. When I paste the style code in jsp file, look and feel is fine.
    Can some body suggest me that why the look and feel is changing when I put the style code in css file and include it in jsp.
    Thanks in advance.
    Manish

    Hello
    We're using <link rel="stylesheet" type="text/css" href="http://ourserver/eclib/css/ecstandard.css">
    between <head> and </head>
    It works.
    Hope it helps.
    Regards
    Benoit

  • How to include external files in JSP

    hi,
    How to include external files like image or javascript in to jsp pages.
    I am using MVC frame work. So i have to use request dispatcher. While calling the pages trough dispatcher the external files are missing from the output. Also am using tomcat as server,web.xml(deployment descriptor ) is also configured.
    regards
    sree

    When you use the request dispatcher, the relative path for all your ressources becomes the relative path of your calling serlvet and not the JSP/servlet that you call. Make sure to use the full relative path such as:
    /PATH_TO_YOUR_DIRECTORY/myRessource.ext
    NOT
    SOME_DIRECTORY/myRessource.ext
    Jeff

  • How to include HTML file in JSP using HTML elements or Javascript?

    Hi,
    I have around 15000 static html files one for each item which we display each upon invoking an item.The HTML file should be part of a JSP file.
    Please note that the name of the HTML file is determined dynamically
    Placing all the HTML files within the web application does not give us good performance so i would like to put all of them in the webserver.
    I am not able to include the file in the JSP using the jsp:include attribute if i place the HTML files in the webserver ,
    in order to do that i think should use either HTML element or javascript to include the HTML in the JSP.is there any alternative to <Jsp:include>
    Does anyone have an idea how to include the HTML file and take advan tage of webserver?
    Any ideas are appreciated

    What you need to do is simply read the HTML file from the disk and dump it out to the outputstream. It really is that simple.
    There's no reason you need to include all 15000 files in the actual WAR, you can place those files any place handy that is easy for the application to see (in another directory, or accessible from a file server if you have multiple front ends).
    Then, just write a utiility function that takes the output stream (i.e. the 'out' JSP variable), and the file name, read the file, and write it to the stream.
    If you start noticing performance issues, then you can try doing some caching, but truth is your OS should be doing that for you.
    But, truth be told that's the only practical way to do it.
    Another solution would be to use JavaScriipt and XMLHttpRequest (i.e "AJAX") to load the file at the client side, and simply replace a tag with the results.
    That's also pretty trivial to write, any web site talking about AJAX should give you hint there.
    Of course, that won't work for folks who have JavaScript turned off, or some other incompatible browser, whereas the server side solution obviously works everywhere.

  • @import css support? How to include CSS files in CSS file?

    Is it possible to use the @import command in CSS files? Or how to include other CSS files in a main CSS file?

    I think it's very important to support the import statement because if you build a real world application the css can be very complex. so there is a really need for css modularization....

  • How to include .js file in jsp file?

    hi,
    i have a jsp file with struts tag. right now i have all the javascript code as a separate function inside the jsp file itself. i want the javascript code to be present in a .js file and i want to refer that .js file from the jsp file with struts tags.
    <html:text property="Phone" value="" size="3" maxlength="3"
         onkeyup="return autoTab(this, 3, event);"></html:text>
    the above is the html tag which will call the function "autoTab" of the .js file. please help.
    thanks,
    Jayanth.

    You include javascript into a jsp in exactly the same way you do with html
    <script src="myJavascriptFile.js"/>
    It has nothing to do with the jsp per se, but rather the generated HTML page.

  • How to include a file in jsp!

    I need dynamic inlude a jsp file by use inlude file �B

    Use
    <%@ include file="file.jsp" %>
    which works at translation time so your file can be a jsp file or use
    <jsp:include page="relative url" flush="true" />
    which works at request time so the file can't contain JSP.

  • How to include .js file into validater-rules.xml

    iam doing project using struts.
    i have .js file for client side validation.how to include .js file into struts validate-rules.xml so that i can use those validation in my project.
    without writing any class.
    is there any way

    copy + paste from my book...............
    Enabling Client-Side Validations
    In addition to providing a framework for simplifying server-side form data validations, Validator provides an easy-to-use mechanism for performing client-side validations. Each validation routine defined in the validator-rules.xml file optionally specifies JavaScript code that can be run in the browser (client side) to perform the same validations that take place on the server side. When run on the client side, the validations will not allow the form to be submitted until they have all passed.
    To enable client-side validation, you have to place the HTML Tag Library's javascript tag in each JSP for which you want validation performed, as shown here:
    <html:javascript formName="logonForm"/>
    The javascript tag requires that you use the formName attribute to specify the name of a <form> definition from the validation.xml file, as shown here, for which you want validations performed:
    <form name="logonForm">
    <field property="username" depends="required">
    <arg0 key="prompt.username"/>
    </field>
    <field property="password" depends="required">
    <arg0 key="prompt.password"/>
    </field>
    </form>
    All the validations that you have specified for the <form> definition to run on the server side will be run on the client side.

  • How to include .jar files in coldfusion code 

    To Integrate our cfm code with paypal jar files we do the
    following steps with our local coldfusion server ,and to run and
    integrate the paypal Java SDK jar files, I think we need to do the
    same process on the server, can you suggest any thing to do the
    following setting for my domain on the server, without setting the
    class path in coldfusion administrator.
    The ColdFusion application server must be configured to know
    the location of the PayPal JAR
    files, and your ColdFusion Markup (CFM) pages must be
    configured with the absolute path to
    the PayPal API certificate for the PayPal API user on whose
    behalf the calls are made.
    1. Install the PayPal Java SDK “Installing the
    SDK”.
    2. Copy a subset of the Java SDK JAR files to a location
    accessible by the ColdFusion
    application server. The JAR files are in SDK_root\lib and
    their exact names are as
    follows:
    – bcmail-jdk14-128.jar
    – bcprov-jdk14-128.jar
    – paypal_base.jar
    – paypal_stubs.jar
    sax2.jar
    – xerces.jar
    – xpp3-1.1.3.4d_b4_min.jar
    – xstream.jar-1.1.3.jar
    3. With the ColdFusion Application Server Administrator, add
    the absolute path of the
    location you determined in Step 2 to the Java and JVM
    CLASSPATH environment variable.
    4. Restart the ColdFusion Application Server.
    Suggest me how to include .jar files without setting
    classpath.

    > Suggest me how to include .jar files without setting
    classpath.
    Copy them to {CF_HOME}\lib, where {CF_HOME} is, for example,
    C:\CFusionMX7. Restart Coldfusion.

  • How to include the file name as an XML field

    Hi,
    I'm using a file adapter for process a flat file and convert it into an XML. Does anybody knows how to include the file name into an XML field.
    Ex.
    I process the file named <b>XXIMN21022007.txt</b> and I need an XML like:
    <MT_FILE>
    <field1></field1>
    <field2></field2>
    <field3></field3>
    <filename><b>XXIMN21022007.txt</b></filename>
    </MT_FILE>
    Regards
    Gonzalo

    Just go for dynamic configuration.
    Check the sender file adapter to write the filename in the header (as explained in Michal's blog) and then read that header in some mapping.
    U can use that even in simple message mappings.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm
    Your code for the filename tag would be something like:
    <i>DynamicConfiguration conf = (DynamicConfiguration) container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
        “http://sap.com/xi/XI/System/File”,
        “FileName”);
    return conf.get(key);</i>
    Regards,
    Henrique.

  • Dreamweaver Extension to view all included CSS files in a document?

    Is there such an extension that would allow you to view, via a panel, all inlcuded CSS filed within a document?
    It would be so nice to see a nice list of all of your included CSS files, especially when there are several, and also being able to launch them and edit them without having to go into code view within the document, find the reference, and then Ctrl+D to edit the stylesheet.  I swear I saw something like this once, but I can't find it anywhere now...

    Have you looked in the CSS Styles panel? If you have "All" selected, then you can see cach attached CSS file and perofrm any edits you want to and not have to open the files. Also, if you have Dreamweaver CS4, then the Related Files bar lists all related files, including any CSS files and you can select the CSS file name and you can edit the files directly.
    While in the CSS Styles panel, if you right click on the selector, or on the properties for a selector, then you can choose Goto Code which will take you to the correct file and the correct line for the code of the specific selector.
    Or am I missing something that you're trying to accomplish?

  • How to include a file as variable in %@ include file tag.

    Hi,
    I have a interesting problem here, how can I include a file in <%@ include file tag. where the include file path is a variable. I am trying to implement the following statement.
    <@ include file="<%=headerLogic_template %>">
    where headeLogic_template is a variable which contains the actual path of the include file.
    Thanx,
    Ramana.
    email:[email protected]

    Please note that you can not write anything else between the quotes nor for page specification or parameters.
    BAD EXAMPLE!!
    <% for (int i = 0; i < 20; i++) { %>
    <jsp:include page="included.jsp" flush="false">
      <jsp:param name="apa" value="prestring_<%=i%>"/>
    </jsp:include>
    <% }BAD EXAMPLE!!

  • Code relocation... how to "include '.js' file in the page" ..?

    Several weeks back I was advised in a post ..: "For non .mac slideshow you need to include the photo page's .js file in the page that you want to jump from."
    I asked for clarifications, but got no response.
    Now, recovering from file corruptions and an os reInstall, I'm back up to speed again - at least sufficient to get back into that issue.
    The subject was "remote link to 'slideshow' " at this page:
    "http://discussions.apple.com/thread.jspa?messageID=4247476&#4247476
    I was asking how to activate a s.s. from a link on a different page, given that I was not publishing to dot-mac.
    The response of moving the .js file was a real left curve for me; I've no idea of what do do with the suggestion.
    Can someone explain in more detail what that was trying to suggest?
    -Like, include the whole '.js' file..?
    -Like where in the initiating page would I include the .js?
    -Like would that .js need some of it's own modifications before moving it or after?
    -Like are the modifications needed in page with the initiating link.
    -and, am I suppose to move the whole .js file, or just refer to it someway?
    Or is there some other way to do it?
    I sure would appreciate some guidance with this remote link thing...
    Thanks in advance..!
      Mac OS X (10.4.7)  

    You include javascript into a jsp in exactly the same way you do with html
    <script src="myJavascriptFile.js"/>
    It has nothing to do with the jsp per se, but rather the generated HTML page.

  • How to Include JS file already available in SharePoint Site(Style Library) in Command action

    I have included JS file in command Action Using below command 
     <CommandUIHandlers>
            <CommandUIHandler
              Command="EnableCustomGroup"
              CommandAction="javascript:return true;" />
            <CommandUIHandler
              Command="CustomGroupHelloWorld"
              CommandAction="javascript:openPopup();" />
          </CommandUIHandlers>
        </CommandUIExtension>
      </CustomAction>
      <CustomAction Id="Ribbon.Library.Actions.Scripts"
     Location ="ScriptLink"
     ScriptSrc="/_layouts/15/images/Scripts/Popup.js" /> 
    It was working fine now I am embeding my project to Development Project in which we have divided the Modules in to two different projects One project with all Branding work including all CSS and JS files (including the above Popup.JS file) which once deployed
    and the js file is residing in Style Library. 
    The Second project has the Command Action to call the JS file which is already residing in Site (Style Library) I am unable to refer that file path I tried using "/Style Library...... Popup.js" and also the full URL "http://site collection/style
    Library/... Popup.js" just to make sure if it is working or not. But it is throwing error saying file is not found. Can anyone help me how to refer the file what source URL should i give. Thanks in Advance
    Thanks and Regards,
    Raj Kamal Singh Rathore

    Hi,
    According to your description, my understanding is that you want to reference the custom JavaScript file which stored in the style library in custom action.
    I suggest you can reference the js file using the relative path of Style library like below:
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction
    Title="test"
    ScriptSrc="~SiteCollection/Style Library/jquery-1.11.2.min.js"
    Location="ScriptLink"
    Sequence="100"
    >
    </CustomAction>
    More information:
    Referencing JS files using CustomAction element
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Include .PDF file in JSP

    Am I able to include .pdf file in a .jsp page? If it is yes, how to do it?

    Not directly, no.
    You use HTML to include it as a seperate html frame/iframe, but nothing specific to JSP will help here.
    cheers,
    evnafets

Maybe you are looking for

  • Can't setup POP3 E-mail on mail client on my MacBook Pro

    So this problem is getting really out of hand and I'm not sure what options I have left. So here are the details: I'm trying to set up my work e-mail (the site host is Network Solutions) with Mail. There seem to be no problems with the online client.

  • Is there any way to make windows "sticky" in mission control?

    If I have several applications open, then invoke mission control, then click on a window to select it, the windows are in a different position the next time I invoke mission control.  This is like trying to hit a moving target, or as I sometimes refe

  • Macbook Pro and iphoto/imovie updates

    I have a new macbook pro and iphoto and iMovie will not update.  The error message states that the apple id is incorrect, but it's the only one I've ever used.  How can I update?

  • PROXY

    Explain me about JAVA proxy and ABAP proxy

  • Skype keeps crashing

    Hi Skype keeps on crashing have tried reinstalling several times. See below for problem details. Also please see attachment, any ideas? Problem signature:   Problem Event Name:    BEX   Application Name:    Skype.exe   Application Version:    7.6.0.1