Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8795929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:30:05+00:00 2026-06-13T23:30:05+00:00

I am trying to link a css i created in eclipse to the jsp

  • 0

I am trying to link a css i created in eclipse to the jsp and when i run the project i get no results in my browser. I’ve tried it in multiple ways, by putting

<link rel="stylesheet" href="css/first.css" type="text/css">

<link rel="stylesheet" href="boe/WebContent/first.css" type="text/css">

<link rel="stylesheet" href="(my full path to the file)" type="text/css">

I’ve tried so much that i don’t remember how i got it to not error out. i am getting this

Tag (link) should be an empty-element tag. 

as the caution error.

i can not find any step by steps on creating the css and making it link to the jsp, so it can show up in my browser.

here is my code for both the jsp and the css.

jsp:

<?xml version="1.0" encoding="UTF-8" ?>
<%@ page import="java.util.*" language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link rel="stylesheet" href="css/first.css" type="text/css">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>TestPage - Test1</title>
</head>

<body>
    <div id="page-container">Hello World</div>
    <%Date d = new Date(session.getLastAccessedTime());%>
    this page was last viewed <%= d.toString() %>
</body>
</html>

css:

@CHARSET "UTF-8";
html, body {
    margin:0;
    padding:0;
}

#page-container {
    width: 760px;
    margin: auto;
    background: red;
}

any help on finding a step by step or if you have a good explanation, it would be much appreciated. Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:30:06+00:00Added an answer on June 13, 2026 at 11:30 pm

    Tag (link) should be an empty-element tag.

    This error message is telling you that your link tag needs a closing slash:

    <link rel="stylesheet" href="css/first.css" type="text/css" /> <-- see the closing '/'
    

    If that doesn’t fix it, my guess is that your path is not quite right.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to integrate PrimeFaces 3.0 into my JSF 2.0 project. I've created
I'm trying-out qUnit for the first time but can't get any tests to run.
I created the following css file : @charset utf-8; /* CSS Document */ link
[[self mainFrame] loadHTMLString:@<html><body><link href='main.css' rel='stylesheet' type='text/css' /></body></html> baseURL:nil]; I am trying to load a
Im trying to link my program to the shared library. Im using a makefile
I am trying to link to an external link using the anchor tag like
I'm trying to link a 2d list of objects to a contentcontrol. I'm getting
i am trying to link a Unity game to a Java server using C#
I'm trying to link two tables in the same database using a third. The
I am trying to link a remote database to a local database using dblink.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.