The Artima Developer Community
Sponsored Link

Java Answers Forum
Linking a Style Sheet to a Servlet

1 reply on 1 page. Most recent reply: Oct 23, 2003 2:26 PM by Joe Parks

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Dar

Posts: 9
Nickname: dar
Registered: Oct, 2003

Linking a Style Sheet to a Servlet Posted: Oct 23, 2003 11:06 AM
Reply to this message Reply
Advertisement
Is their anyway to link a Cascading Style Sheet to a Servlet? If so, can someone point me to the right direction?

I would appreciate any help.

Thanks,


Dar


Joe Parks

Posts: 107
Nickname: joeparks
Registered: Aug, 2003

Re: Linking a Style Sheet to a Servlet Posted: Oct 23, 2003 2:26 PM
Reply to this message Reply
Is your servlet writing the html to the response? If so, then you have to include the <link/> text in the output:
java.io.PrintWriter out = response.getWriter();
out.println("<html><head><title>CSS Test</title>");
out.println("<LINK rel='stylesheet' type='text/css' href='../artima.css'>");
out.println("</head><body><span class='ts'>Hello!</span></body></html>");
out.flush();
out.close();

Flat View: This topic has 1 reply on 1 page
Topic: Tester class Previous Topic   Next Topic Topic: CallableStatment reuse

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use