NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

images or css in jsp's

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
cyberfrog



Joined: 21 Feb 2011
Posts: 5

PostPosted: Mon Apr 04, 2011 7:51 pm    Post subject: images or css in jsp's Reply with quote

heyall, newbie to using jsp's and have just followed an example to generate a jsp web page with a servlet with just some text box's and a button, now i would like to put in some images, can someone help how I can do this? preferably by an example my jsp code so far is:

Code:

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Welcome to MyFirstServlet!</h1>
        <form action="GreetingServlet" method="POST">
            First Name: <input type="text" name="firstName" size="20"><br />
            Surname: <input type="text" name="surname" size="20">
            <br /><br />
            <input type="submit" value="Submit">
        </form>
    </body>
</html>
Back to top
jyeary



Joined: 21 Oct 2008
Posts: 639
Location: Simpsonville, SC

PostPosted: Tue Apr 05, 2011 2:01 pm    Post subject: Re: images or css in jsp's Reply with quote

Since you are just using some basic HTML, check out w3schools.com for the HTML tutorial including images.

On Mon, Apr 4, 2011 at 3:51 PM, cyberfrog <address-removed ([email]address-removed[/email])> wrote:
Quote:
heyall, newbie to using jsp's and have just followed an example to generate a jsp web page with a servlet with just some text box's and a button, now i would like to put in some images, can someone help how I can do this? preferably by an example my jsp code so far is:


Code:

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
Back to top
cyberfrog



Joined: 21 Feb 2011
Posts: 5

PostPosted: Tue Apr 05, 2011 2:12 pm    Post subject: Reply with quote

thanks jyeary

do you happen to know how I would go about using java only?
Back to top
jyeary



Joined: 21 Oct 2008
Posts: 639
Location: Simpsonville, SC

PostPosted: Thu Apr 07, 2011 5:52 pm    Post subject: Re: images or css in jsp's Reply with quote

http://jakarta.apache.org/taglibs/sandbox/doc/image-doc/

On Tue, Apr 5, 2011 at 10:12 AM, cyberfrog <address-removed ([email]address-removed[/email])> wrote:
Quote:
thanks jyeary

do you happen to know how I would go about using java only?







--
John Yeary
--
http://javaevangelist.blogspot.com
http://www.johnyeary.com
@jyeary

"Far better it is to dare mighty things, to win glorious triumphs, even though checkered by failure, than to take rank with those poor spirits who neither enjoy much nor suffer much, because they live in the gray twilight that knows not victory nor defeat."
-- Theodore Roosevelt
Back to top
ShraddhaKapoor



Joined: 13 Apr 2017
Posts: 1

PostPosted: Thu Apr 13, 2017 10:43 am    Post subject: CSS Tutorial Reply with quote

CSS stands for Cascading Style Sheets. CSS was invited by Hakon Wium Lie on October 10, 1994 and maintained through a group of people within the W3C called the CSS Working Group. The CSS Working Group creates documents called specifications. When a specification has been discussed and officially ratified by W3C members, it becomes a recommendation. CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes. CSS describes how HTML elements are to be displayed on screen, paper, or in other media. CSS is easy to learn and understand but it provides powerful control over the presentation of an HTML document. Most commonly, CSS is combined with the markup languages HTML or XHTML.

CSS files are termed “cascading” stylesheets because of two reasons: one stylesheet can cascade, or have influence over, multiple pages. Similarly, many CSS files can define a single page. We can apply CSS in 3 ways such as Internal CSS, Inline CSS and External CSS.

CSS is designed primarily to enable the separation of document content from document presentation, including aspects such as the layout, colors, and fonts. This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, enable multiple HTML pages to share formatting by specifying the relevant CSS in a separate .css file, and reduce complexity and repetition in the structural content. Separation of formatting and content makes it possible to present the same markup page in different styles.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo