facebook

Problem getting style sheets in struts layout

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #245378 Reply

    Ollie
    Member

    Hi everyone,

    I need to incorporate css. files in my jsp pages. At the moment I am having problems doing this. In the webroot path of my project I have placed a folder called “styles” in which I have then placed my css. file, the file being called “admin.css”. In the struts-layout properties I make the following declaration “directory.css = styles”. Then for example, I do the follwing in a jsp page:

    <layout:collection
    name=”GroupActionForm”
    id=”group”
    styleClass=”FORM”
    property=”groupList”>

    However, the style class “FORM” is not applied. Do I have to insert a statement or link or something refering to”admin.css”. This is probably quite simple but I don’t know how this is done.

    Thanks for any help,

    Ollie

    #245424 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

    Ollie,
    I’m not farmiliar with the layout tag, but if you create a new JSP using our default JSP template, you’ll see a commented out section at the top, a link tag, that includes a CSS. You can use that code to include your CSS into your page, then FORM should work.

    #245490 Reply

    Ollie
    Member

    Thanks Riyad,

    I had a look at the link tag and then did the following:

    <link rel=”stylesheet” type=”text/css” href=”<html:rewrite page=’/admin.css’/>”>

    Thanks for the suggestion

    #245507 Reply

    Riyad Kalla
    Member

    Glad it helped.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Problem getting style sheets in struts layout

You must be logged in to post in the forum log in