I need to use this css file in my Java file


I need to use this css file in my Java file. It's attached as follows.

Is this right way to use it?
out.println("<link href='../../css/bootstrap.min.css' rel='stylesheet' media='screen'>");

Check the screenshot.

LVL 12
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

out.println("<link href='/css/bootstrap.min.css' rel='stylesheet' media='screen'>");

Open in new window

is probably what it should be (if you're NOT using xhtml)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jazzIIIloveAuthor Commented:
the java file is in src and a package whereas the css is in a css folder which is in WebContent..
A web page doesn't care about java source. All it cares about is the web root and current directory. In relation to the web root 'css' seems to be a top level directory, so the above should work.  If that is not the case, then you need to discover where that directory is in relation to the web root
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.