?
Solved

JSP CSS and Templates

Posted on 2006-06-01
4
Medium Priority
?
743 Views
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 ..so that I can copy from this.

Could you suggest some sources for the same .

Thanks for your time.
0
Comment
Question by:micro_learner
2 Comments
 
LVL 16

Accepted Solution

by:
suprapto45 earned 1000 total points
ID: 16812751
Hi,

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.

<html>
<head>
</head>
<body>
<p><c:out value="${requestScope.mainString}" /></p>
<table>
<tr>
<td><c:out value="${requestScope.whatever}" /></td>
</tr>
</table>
</body>
</html>

You can change them into

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

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

David
0
 
LVL 3

Assisted Solution

by:Kanti
Kanti earned 1000 total points
ID: 16817023
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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.
Suggested Courses

864 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