JSP CSS and Templates

Posted on 2006-06-01
Last Modified: 2013-11-24
Hello I am new to JSP .

I have developed the requsite functionality (using EL,JSTL tags , I am not using stryts) and works just fine.

Now comes the "difficult" part of adding CSS and making the application look "pleasing". I was wondering how I should use CSS stylesheets in JSP ..a tutorial or example would be helpful.

Also a "off the shelf" template  or an example with a lot of Tables and formating would go a long way for me that I can copy from this.

Could you suggest some sources for the same .

Thanks for your time.
Question by:micro_learner
    LVL 16

    Accepted Solution


    Using CSS in the JSP is exactly the same with the way you used CSS in the HTML.

    To give you a good idea, look at the statement below.

    <p><c:out value="${requestScope.mainString}" /></p>
    <td><c:out value="${requestScope.whatever}" /></td>

    You can change them into

    <link href="/css/your.css" rel="stylesheet" type="text/css" />
    <p class="whateverStyle"><c:out value="${requestScope.mainString}" /></p>
    <table class="whateverStyle">
    <td><c:out value="${requestScope.whatever}" /></td>

    I hope that it gives you a good idea and I will try to look at any sample in Internet

    LVL 3

    Assisted Solution


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    I get error: useBean: Duplicate bean name: {0} 1 49
    NotAlone Challenge 20 65
    array220 challenge 8 32
    json format text only 4 50
    Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
    Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
    The viewer will learn how to implement Singleton Design Pattern in Java.
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now