NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
cyberfrog
Joined: 21 Feb 2011 Posts: 5
|
Posted: Mon Apr 04, 2011 7:51 pm Post subject: images or css in jsp's |
|
|
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
|
Posted: Tue Apr 05, 2011 2:01 pm Post subject: Re: images or css in jsp's |
|
|
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
|
Posted: Tue Apr 05, 2011 2:12 pm Post subject: |
|
|
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
|
Posted: Thu Apr 07, 2011 5:52 pm Post subject: Re: images or css in jsp's |
|
|
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 |
|
 |
|
|
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
|
|
|