Results 1 to 5 of 5

Thread: Change The Background Color Of The Jsp

  1. #1
    Join Date
    Nov 2009
    Posts
    652

    Change The Background Color Of The Jsp

    Hello, I am creating one project in java programming with the help of JSP technology. I want to know the details from which I can able to Change The Background Color Of The Jsp Page. If you know how can I able to change the background color of the JSP page then please help me about it. Reply me as soon as possible.

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: Change The Background Color Of The Jsp

    With the help of the Style Sheet you can able to change the background color of the page. For that you can able to use the line of code below:
    Code:
    BODY 
    {
    	background-color: # 8080FF;//For blue color
    }

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Change The Background Color Of The Jsp

    Hello, You can simply make use of the code below for changing the background color of the jsp page. It is a simple code in jsp.
    Code:
       <HTML>
        <HEAD>
         <TITLE>Background Color Changer</TITLE>
        </HEAD>
         <%
            String backColor = request.getParameter("COLOR");       
            if (backColor == null)
               backColor = "WHITE";        
         %>
        <BODY BGCOLOR="<%= backColor %>" >
         <H1>Background Color will be changed</H1>       
        </BODY>
       </HTML>

  4. #4
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Change The Background Color Of The Jsp

    Hello, I think you must need to make use of the books below and get your problem solved:
    • Concurrent Programming in Java: Design Principles and Pattern
    • Designing Enterprise Applications with the J2EE Platform, Second Edition
    • Designing Web Services with the J2EE 1.4 Platform: JAX-RPC, SOAP, and XML Technologies
    • Effective Java, Second Edition
    • Inside Java 2 Platform Security: Architecture, API Design, and Implementation

  5. #5
    Join Date
    May 2008
    Posts
    2,012

    Re: Change The Background Color Of The Jsp

    Hey, I have the program below in jsp which will simply set the color of the page which you provide and if you don't provide anything then it will simply set the white color as your background:
    Code:
    <HTML>
    <HEAD>
    <TITLE>
    JSP page Color Changer
    </TITLE>
    </HEAD>
    <% 
    String backgroundcolor = request.getParameter("COLOR"); 
    %>
    <% 
    if (backgroundcolor == null) 
    { 
    %>
    <BODY BGCOLOR="FFFFFF" >
    <% 
    } 
    else
     { 
    %>
    <BODY BGCOLOR="<%= backgroundcolor %>" >
    <% 
    } 
    %>
    <H1>
    Conditionally working
    </H1>
    <% 
    if (backgroundcolor == null) 
    { 
    %>
    It will simply use the White.
    <% 
    } 
    else 
    { 
    %>
    It will simply use your requested.
    <% 
    } 
    %>
    </BODY>
    </HTML>

Similar Threads

  1. change Metro background color on windows 8
    By Naila in forum Customize Desktop
    Replies: 1
    Last Post: 09-08-2012, 07:30 PM
  2. How Can I Change the background Color Of A JOptionPane?
    By Adrina_g in forum Software Development
    Replies: 5
    Last Post: 27-01-2010, 09:41 AM
  3. Change the background color of QTextEdit
    By Gomeler in forum Software Development
    Replies: 3
    Last Post: 27-11-2009, 01:13 PM
  4. How to change background color scheme in MSN messenger?
    By Rahman Khan in forum Windows Software
    Replies: 3
    Last Post: 28-03-2009, 05:18 PM
  5. Replies: 1
    Last Post: 24-12-2008, 10:18 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,509,109.42231 seconds with 17 queries