JSP Style Sheets

can somebody pl help me....
how to lonk an external style sheet to a jsp page.
CSS page and JSP can be at two locations.
the appliction will be in ear...
thanks in anticipation
Maruti

i did used the same syntax but no result
here is the dir structure
MyApp/
inclusde/my.css
jsp/myjsp.jsp
web-inf/web.xml
my.css
i used the following links
<link rel = "styleshee" href="/MyApp/my.css" type="text/css">
<link rel = "styleshee" href="my.css" type="text/css">
<link rel = "styleshee" href="/my.css" type="text/css">
<link rel = "styleshee" href="http://localhost:8080/MyApp/my.css" type="text/css">
nothing working
but if i include the css file using include tag (along with one of above) it works
pl some body help me
Maruti

Similar Messages

  • JSP + Cascading Style Sheet + Javascript problem

    Hello, I've got a JSP page that has included a Javascript (JS).
    In that JS, a Cascading Style Sheet (CSS) is included. Also on the JSP page, I have some code that makes use of the JS to create a Windows-style combobox, which is not available through raw HTML. The code is as follows:
    <BODY>
    <SCRIPT language="javascript" src="ComboBox.js"></SCRIPT>
    <SCRIPT language="javascript">
    dm=new ComboBox("dm")
    dm.add(
           new ComboBoxItem("barge",1),
           new ComboBoxItem("benluc",2),
           new ComboBoxItem("benlieeeeck",3),
           new ComboBoxItem("taco",4)
    </SCRIPT>
    <CENTER><H2>Choose Project Number</H2><CENTER>
    <FORM METHOD=POST ACTION="">
    <% //DB connection to populate the combo box %>
    <% // Database Connection Parameters
        String DB = "dbname",
        query = "",
        HOST = "jdbc:postgresql://URL:5432/",
        ACCOUNT = "username",
        PASSWORD = "password",
        DRIVER = "org.postgresql.Driver";
        // authentication properties
        Properties props = new Properties();
        props.setProperty("user", ACCOUNT);
        props.setProperty("password", PASSWORD);
        // load driver and prepare to access
        Class.forName(DRIVER).newInstance();
        Connection con = DriverManager.getConnection(HOST + DB, props);
        Statement stmt = con.createStatement();
        try{
        query= "SELECT * FROM Projects ORDER BY Name";
        ResultSet rs = stmt.executeQuery(query);
    %>
    Project S/O:
    <SELECT NAME=projid>
    <option value="dummy">Choose one...</option>
    <% while (rs.next() ) { %>
    <OPTION VALUE="<%=rs.getString("Name") %>">
    <%=rs.getString("Name")%> ,   <%=rs.getString("Desc")%>
    </OPTION>
    <% } %>
    </SELECT>The problem I am experiencing is that if I move the 2nd SCRIPT tag anywhere but where it is, it makes IE bomb and takes me to an error page. The error message is as follows:
    "Internet Explorer cannot open site http://myURL. Operation aborted."
    Any ideas?
    Haig

    I need help in this matter. Someone please reply. Thanks.

  • Using a style sheet with hbj:link

    Hi guys,
    I'm looking for a way to use a style sheet that I've created in my jsp with an hbj:link tag. Here's my style sheet:
    <STYLE type="text/css">
    a.button
    a.button:active, a.button:focus, a.button:hover
    </STYLE>
    Here's my link:
    <hbj:link
         id="<%=linkId%>"
         text="Sign Me Up"
         tooltip="<%=toolTip%>"
         onClick="signupLinkClick"
         linkDesign="REPORTING"
         >
    </hbj:link>
    I've tried wrapping an <a href="#" class="button"> tag around the hbj:link tag, but that didn't work. Any ideas?
    Thanks!
    -Stephen Spalding
    Web Developer
    Graybar

    Hi,
    there is a possibility to change the default style, but is not really clean. The browser when rendering a tag uses the last defined style for this tag. So you can redefine it. I used it in a DynPage, it worked ok.
    First run the iview with standard style (normally). Look into the sourc of the page and find your "Sign Me Up" link. Check the class of the <a> tag. For instance it is a "urLnk".
    Now just modify your style definition:
    <STYLE type="text/css">
    urLnk.button {
    padding: 2px 10px 3px 10px;
    border: 2px outset #cccccc;
    background: #C0C0C0;
    color: #000;
    font-size: 11px;
    text-decoration: none;
    height: 19px;
    vertical-align: bottom;
    urLnk.button:active, a.button:focus, a.button:hover {
    border: 2px inset #c0c0c0;
    vertical-align: middle;
    background: #cccccc;
    color: #000000;
    text-decoration: none;
    </STYLE>
    and so on...
    Hope this helps,
    Romano

  • Style sheet with Struts frame work

    Hi,
    I am using MyEclipse editor. I am trying to use Style sheet in my JSP page using Struts frame work. I tried several ways but style sheet is not applying on my JSP page. Please look at my code and let me know where is the problem.
    1. I created a project called "AcmiReports". In the webroot I created folder called "CSS". In this folder I created "AcmiReports.css" file. In my JSP I am using like this
    <head>
    <link rel="stylesheet" type="text/css" href="/AcmiReports/WebRoot/css/AcmiReports.css">
    </head>
    Where am I doing wrong? I read somewhere that I need to set some thing in struts-config file. Is this true.
    Please help me.
    Thanks,
    Anamika

    No its not working fine, i m also facing the same problem with my code..
    when ever i come to jsp page through action css works fine, but if i directly forward to jsp page, css doesnt work
    can any body help me, its to urgent.. i need to submit my project till 1st of april... please do the need full asap
    i m copying the code used to apply the css in my jsp file
    <title><bean:message key="login.title" /></title>
    <link href="default.css" rel="stylesheet" type="text/css" />
    <script language=javascript src="clock.js" type="text/javascript"></script>
    same code works fine through action, but through normal forward it doesnt...

  • Style Sheet Problem with Websphere

    Hello. If anyone here has any experience with Websphere or iSeries, I would appreciate some help. I posted this topic in the Websphere forum , but it seems that forum isn't very active. Anyway, I can't get my style sheet to work with a java servlet application that I installed on an iSeries server. I put together the app and style sheet through WebSphere and exported everything to the server as an .ear file, installed the application and the program works; however, the app isn't accessing the style sheet. I'm new to both iSeries and Websphere. I've been trying this line:
    writer.println("<LINK rel='stylesheet' type='text/css' href='Master.css'>");
    and have tried putting the style sheet in the same folder as the class file, tried putting it in the Java Source folder, tried it all over the place really and have tried making the path absolute. I've also tried pasting the .java file into the classes folder with the .class file. None of my efforts have been successful. Is this even possible? Any help would be appreciated. Thank you.

    have tried putting the style sheet in the same folder as the class file, tried
    putting it in the Java Source folder, tried it all over the place really...In your web application, it should go in the same directory where you would put an HTML file or a JSP file. All those places you tried are places that the web server keeps hidden from clients. You should be able to request the CSS file from your browser in exactly the same way you would request an HTML or JSP file.

  • How to use own style sheet

    Hi my friends,
    I created a JSP file that contains a report built using Reports Builder. When I run this page using a browser, my report is displayed correctly, including the style imported from Report Builder. But when I try run this page as a portlet, my report is being displayed, but style sheet is not being displayed. Why this is happening?
    Someone could help me?
    Thanks.

    Hi my friends,
    This page should use style css/wine.css, for example, but it is not doing this when I put it as a portlet. How should to stay my provider.xml file? When I must put the css directory?
    Thanks,
    Carla.

  • How to include external style sheet

    Hi !!
    Can any one explain how to include external style sheet.

    Anil,
    Simply include the css file as I demonstrated in my last post and then reference one the css classes by name in the "styleClass" attribute of the component. So, if the css file that have included in my JSP file (as demonstrated in the prev post) contains a class like:
    .spicyPink {
    color:#FF1CAE;
    font-weight:bold;
    Then I would simply reference this class in the component as folows:
    <af:outputText value="Pretty In Pink" styleClass="spicyPink"/>
    However, you can also add styling to a component inline and accomplish the same task:
    <af:outputText value="Pretty In Pink" inlineStyle="color:#FF1CAE;
    font-weight:bold;"/>
    The thing to remember is that other than the use of styleClass and inlineStyle, referencing and including css in your JSP/JSPX pages is really no different that used in an HTML page.
    Here is reference to help you along:
    http://www.w3.org/TR/REC-CSS1#containment-in-html
    --RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Applying style sheets to Jato

    Is there an example of this somewhere or some documentation? I'm using Jato
    1.2.
    Also, in the emails that fly back and forth I have seen a date sample
    mentioned.
    Where is this? I have got the JatoSamples.war deployed and I don't see a date
    example. I just wonder if I'm missing some other Jato examples.
    Thanks.
    Belinda

    There is some confusion here. The JatoSample project that shipped with the
    Developer CD does not include the Components samples (which includes the Date
    example). The "live" sample that is viewable on the intenal web site
    http://ias.red.iplanet.com/jato/ does include the Component samples.
    We intentionally disabled the Component samples in the Developer CD version
    because at the time that it shipped we had an unresolved issue with running the
    Component samples on certain servlet containers. That issue has been favorably
    resolved.
    The downloadable version of Jato 1.2 should contain a version of the JatoSample
    which does have the Component sample enabled.
    ----- Original Message -----
    From: Matthew Stevens
    Sent: Thursday, November 29, 2001 8:39 AM
    Subject: RE: [iPlanet-JATO] applying style sheets to Jato
    Belinda,
    Sorry for the delay. JATO is now available on http://developer.iplanet.com
    and the JATO Sample WAR file is available separately for download - so make
    sure you have this latest example. The sample is available LIVE on internal
    sites which I will send you offline. We are working to have this and other
    samples running live on the public web site shortly.
    For the Date component example please check out the Components section in
    the Index of the running application and the following in the WAR file
    WEB-INF/classes/jatosample/module1/E0130Viewbean.java
    WEB-INF/jatoSample.tld
    WEB-INF/classes/jatosample/components
    Could you please elaborate on your requirements for style sheets. Other
    than using style sheets normally as you would with JSPs, what are you trying
    to do? We would like to be focused in our answers.
    matt
    -----Original Message-----
    From: Belinda Garcia [mailto:<a href="/group/SunONE-JATO/post?protectID=014056235009078154169082148140172241239144044214017123152006048067">belinda.garcia@s...</a>]
    Sent: Tuesday, November 27, 2001 5:08 PM
    Subject: [iPlanet-JATO] applying style sheets to Jato
    Is there an example of this somewhere or some documentation? I'm using Jato
    1.2.
    Also, in the emails that fly back and forth I have seen a date sample
    mentioned.
    Where is this? I have got the JatoSamples.war deployed and I don't see a
    date
    example. I just wonder if I'm missing some other Jato examples.
    Thanks.
    Belinda
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    [Non-text portions of this message have been removed]

  • Style sheete issue

    I'm having a small issue with div tags in on my jsp. Has anyone seen this or can anyone tell me what is wrong.
    I just have two div tags in my style sheet as follows.
    .OmniIframeWrapper
         background-color:#F2F0E6;          
         width:98%;
         overflow:auto;
         border:1px solid black;
    .OmniIframeContent
         background-color:#F2F0E6;
         width:100%;
         margin:5px;
         padding: 5px;
    }then I nest those on my jsp to create a scrolling area for my data. In IE this works just fine. But in firefox the bottom scrollbar is always on. Even if the content of the inner div tag is only an empty table.
    <DIV class="OmniIframeWrapper" style="height: 450">
              <DIV class="OmniIframeContent"><table><tr><td>test data</td></tr></table></DIV>
              </DIV>

    I've change the size of the inner div tag to 99% instead of 100% . This does fix the problem.. but I don't like the fact that FF handles it the way it does.

  • Km/docs/etc/wpceditor/css/runtime/ is using all custom style sheets(runtime

    Hello ,
    I am using km/docs/etc/wpceditor/css/runtime/File.css for web content where File.css is a custom stylesheet. This works fine. If I upload more than one custom style sheets, all of them are simultaneously used even though am only referencing one style sheet in the custom JSP layout. How can I use only one custom style sheet that I reference in my JSP layout:
    <LINK REL="stylesheet" HREF="irj/go/km/docs/etc/wpceditor/css/runtime/File.css" />

    Hi Vishal,
    Can you be more specific when you said
    "But if some styles does not match in that specified css Then it will refer the other css present at runtime folder."
    In my case,am using 3 custom style sheets(File1.css, File2.css, File3.css). At run time, all my pages are using all 3 style sheets, even though, I have referenced only one stylesheet in the JSP layout:
    <LINK REL="stylesheet" HREF="irj/go/km/docs/etc/wpceditor/css/runtime/File1.css" />
    Thanks for your response.

  • Linking Cascading Style Sheets to a Servlet

    Can anyone tell me if it's possible to include a Cascading Style Sheet in a Servlet? I know this can be done in a JSP file. But I need to be able to do this in a Servlet.
    Please point me in the right direction if this is possible. Below is the sample code that I wrote, but it doesn't work.
    cssURL = "../jsp/drawingsQueryCSS.css";
              RequestDispatcher dispatch = getServletContext().getRequestDispatcher(cssURL);
              dispatch.include(request, response);
    I appreciate your help,
    Dar

    It looks like you are trying to copy the contents of the CSS file into your servlet response. Why not just write out a link to the CSS file in the header of your HTML? Mine looks like this:
    <meta http-equiv="Content-Style-Type" content="text/css"/>
    <link href="../nav_style.css" rel="stylesheet" type="text/css"/>

  • Style sheets are getting applied even though am not referring them.

    Hello,
    I have uploaded 2 custom style sheets under "km/docs/etc/wpceditor/css/runtime". I am referencing only one stylesheet in my jsp layout. The web pages are using both custom style sheets in the runtime. How can I make the layout use only one custom style sheet that I am referencing in the JSP.

    Hi Vishal,
    Can you be more specific when you said
    "But if some styles does not match in that specified css Then it will refer the other css present at runtime folder."
    In my case,am using 3 custom style sheets(File1.css, File2.css, File3.css). At run time, all my pages are using all 3 style sheets, even though, I have referenced only one stylesheet in the JSP layout:
    <LINK REL="stylesheet" HREF="irj/go/km/docs/etc/wpceditor/css/runtime/File1.css" />
    Thanks for your response.

  • Setting the default style sheet

    I am trying to set the default style sheet to my customized css - mainstyle19-en.css. I know that I have to run this command - ant make_main_css -DCOLOR=19 but I don't have ant in my path and it is not recognizing it as a command. How do you put that in the path? Also - where are you supposed to run this command? I know somewhere on the server where the image server is located, but where exactly?
    Thanks for your help,
    Karen.

    In addition, if you are using .net, Sarah Wheeler created a simple portlet that allows the user to create a header portlet with the ability to change the stylesheet. I have modified it a little and would be happy to share my version. Take a look at this thread - http://portal.plumtree.com/portal/server.pt/gateway/PTARGS_0_283309_4352_2758_4823_43/http;/PRODGADGET12.plumtree.com/collab/discussion/app/threadDetails.jsp?projID=39883&forumID=48674&threadID=80810&messageID=80894 (If the link doesn't work, it is located Discussions: Pluggable Nav, Style Sheet Mill, PEI, UI Cust: Changing colors/style sheets with custom header portlets?)
    If you send me an email at [email protected] will send you the code.
    Michael [email protected]

  • Forcing ADF Faces Style Sheet regeneration in Emb OC4j

    Does anybody know a way to force the style sheet to be regenerated in the embedded OC4j? I'm trying to modify the css fill for a custom skin. Changes to the jsp files show up immediately but changes to the style sheet only show up after I run the application again and then refresh the page.
    JDev 10.1.3.2.0
    Thanks,
    Brent

    Hi,
    I tried to have a custom skin in my application. I basically need a blue background for my application in all the pages.
    Here is the code that I added in my stylesheet (rebillSkins.XSS). I have also configured the path of the stylesheet in adf-faces-skins.xml file.
    Code:
    <style name="AFDarkBackground">
    <property name="background-color">#c5d4e9</property>
    </style>
    <style selector="af|body">
    <includeStyle name="AFDarkBackground"/>
    </style>
    But when I run my application I get the white backgroud as before. Am i wrong in my code anywhere? Please could you help me?
    Thanks,
    Haripriya.S

  • Style sheet with ADF

    Hi,
    I want to use Style sheet in my ADF project. I use the 'styleclass' component for each of my field in the jsp page. But I dont see any effect on my jsp page. Is there any thing to be added to web.xml or faces-config.xml files?
    Please let me know as I need this soon.
    Thanks,
    Haripriya.S

    Hi,
    I tried to have a custom skin in my application. I basically need a blue background for my application in all the pages.
    Here is the code that I added in my stylesheet (rebillSkins.XSS). I have also configured the path of the stylesheet in adf-faces-skins.xml file.
    Code:
    <style name="AFDarkBackground">
    <property name="background-color">#c5d4e9</property>
    </style>
    <style selector="af|body">
    <includeStyle name="AFDarkBackground"/>
    </style>
    But when I run my application I get the white backgroud as before. Am i wrong in my code anywhere? Please could you help me?
    Thanks,
    Haripriya.S

Maybe you are looking for

  • How do I transfer data from IPAD to USB drive?

    How do I transfer data from my IPAD to my PC or USB port?  I have orginal files and documents that I need to put on a USB drive and I do not know enough about the IPAD to figure it out.  Thank you.

  • Invalid Plug ins

    I cannot open PDF files-- or Adobe Reader itself-- because I immediately  receive a message "Invalid plug-ins Adobe Reader will close", which it  does immediately.  I unistalled Reader and reinstalled it but still  there seems to be an invalid plug-i

  • Logical type Partition of an existing table

    Dear All, My database is 10gR2 and Linux is the operating system. One of my table in production database is huge and contains lot of data. Table is growing on daily basis. There are many queries that users execute on this table and the criteria of se

  • I need to go back to the future

    I have an issue that is complicated, or at least seems complicated to me.  I will try to be succint and hopefully someone can help me out. My brother bought a new Macbook and handed me down his old one.  Before giving me the old one, he copied all of

  • Do I need to load nano s/w. I have 20 GB iPod

    hi folks Just bought my wife a new nano. I have, I believe, a 2nd gen. iPod (20 GB) with all updated software for iTunes and this particular iPod. #1. Do I need to load the nano s/w on our iBook too? #2. Also, I use a FW cable to update my 20 GB iPod