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: 612
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: 612
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
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 can 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