• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

stylesheets

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
how to do u import stylesheets using struts costom tags? i have tried alot but i hava failed to get my stylesheets to work using struts tags, any help will be apprecitated, an example would really help.
my directory structure is as follow:-
------------------ for stylesheeets-------------------------------------
CSS
|___testStyleSheets
|___ myStyleSheets.css

------------------------- my JSP page--------------------------------

JSP
|___testJSP
|___newTest
|___ myJSPPage.jsp

---------------------------------------------------------------------------

thanks
aziz dhanani.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Struts custom tags have nothing to do with whether you use CSS stylesheets or not -- or where the browser should look for them.

Now, if you have a JSP file under /jsp/MyPage.jsp, it should refer to a stylesheet under /css/MyStyle.css with
<link rel="stylesheet" type="text/css" href="../css/MyStyle.css">
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Adding to Lasse 's :

once you have defined <link ....
you can customize your struts tags by setting the styleClass attribute to a
css class.

Eg:

If you have defined a class as below in your css file

.SmallBoldText { font: bold 10px Verdana; }

then

<html:submit property="someName" styleClass="SmallBoldText">
Submit
</html:submit>

Hope this helps
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic