• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP / CSS

 
shashi sarle
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i want to call css file from jsp...how can i do that...please help
 
shashi sarle
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried following in <head> section

<link href="crickHomeCSS.css" rel="stylesheet" type="text/css" title="Style" />

but still unable to call...
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you explain it in detail?

If you want to use classes of your css the you can simply import your css file with normal import statement of HTML.
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you checked the path? is it correct?
 
Ananth Chellathurai
Ranch Hand
Posts: 349
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

<link href="crickHomeCSS.css"


if you have both the JSP and the css in the same location it should work.

Regards
Ananth Chellathurai
 
shashi sarle
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes path is correct...
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then it should work. Do one thing make use of firebug to check this. Or try changng the locatin of the css file and path both.

If possible show your code here so that we can also try to see what the problem is?
 
shashi sarle
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Thanks guys, i got it, actually i kept jsp files in one folder and trying to call css file which was not there in that same folder....
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The more correct solution, which does not force you to put the files in the same folder, can be found in the JSP FAQ on Resource URLs.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"shashy", please check your private messages for an important administrative matter.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!