Results 1 to 2 of 2
  1. #1
    JDyson is offline Member
    Join Date
    Dec 2010
    Posts
    1
    Rep Power
    0

    Default Java servlet problem

    Hi, I'm not too sure if this is the right place for this so sorry in advance if it is.

    I'm having a little trouble using a CSS with my java servlet..

    I have severel HTML files which have the link to my CSSfile (which is called css.css) as follows.

    Java Code:
    <link rel="stylesheet" href="css.css" type="text/css" />
    this works fine in the html files however, my servlet which just produces a table of information from a database when it is called, won't seem to use this CSS.

    obviously I have to use an out.println() to print out the correct HTML. This is what I have tried so far...

    Java Code:
    out.println("<link rel=\"stylesheet\" href=\"css.css\" type=\"text/css\">");
    If anyone could point me in the right direction it would be very greatly appreciated

    thanks in advance

    james

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    19

    Default

    Quote Originally Posted by JDyson View Post
    Java Code:
    out.println("<link rel=\"stylesheet\" href=\"css.css\" type=\"text/css\">");
    Looks like the closing slash is missing... you have
    type="text/css">

    Should be
    type="text/css"/>

Similar Threads

  1. Replies: 2
    Last Post: 03-09-2012, 11:46 PM
  2. servlet problem plz help
    By superbg in forum Advanced Java
    Replies: 1
    Last Post: 10-18-2010, 10:43 AM
  3. java servlet problem plz help
    By superbg in forum Java Servlet
    Replies: 1
    Last Post: 10-18-2010, 10:36 AM
  4. servlet problem
    By vijayabaskar in forum Java Servlet
    Replies: 0
    Last Post: 04-29-2009, 09:34 AM
  5. Servlet problem
    By maheshkanda in forum New To Java
    Replies: 5
    Last Post: 02-10-2009, 08:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •