• 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

HTC behaviors & Tomcat

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is anyone out there making serious use of HTC components to encapsulate tag behaviors? I'm at my wits' end trying to make the darn things work. Locally (accessed directly off my disk) linking "behavior" css properties to htc files and importing the files with <?import... both work just fine, but when I deploy the things on my little Tomcat standalone webserver, the browser acts like it doesn't know what I'm talking about. I'm using IE 5.5 with all the latest patches, and my security settings allow my local machine to do whatever it wants. My tomcat server logs indicate that the HTC file is being downloaded just fine, but for some reason the browser just plain ignores it.
I'm using tomcat 4.0 with windows 2000 pro. (at home, my win98 machine running tomcat 3.x doesn't have this same trouble.)
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is htc? i have apache/tomcat/php server here. i run mostly srvlets so far but i have never heard of htc
 
Chris Treglio
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it stands for "hyper text component." Essentially it's a way to assign event handlers through stylesheets. There are a number of ways to do it, but the simplest is by using the 'behavior' characteristic, for example :
.someclass {
behavior : url(behave.htc);
}
behave.htc would have a list of the events you want to attach to the 'someclass' elements, and a mappings to the javascript funtions that should handled by them.
There's another method that's more XMLish, where instead of using a style, you define a namespace, import an .htc file to describe that namespace, and define custom tags within that attached .htc. These tags can have events associated with their event handlers in a similar way.
check out http://www.webreference.com/js/column64/index.html for a pretty good description of the second method, or msdn.microsoft.com for a description of the first. This is an IE 5+ technology, but there's a standard of some kind that's fueling it.
 
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic