[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Problems running a simple Hello World JSP/Bean

Posted on 2007-12-01
1
Medium Priority
?
834 Views
Last Modified: 2013-12-15
I am trying to teach myself some JSP to see about redoing our company website sometime down the road.  I have installed apache tomcat and tested it with a simple servlet which ran fine.  Next I wanted to make a trial JSP page that uses a java bean to say hello world -- looked at a few tutorial and I cam up with this:

Java Structure:
Project Test
package my
Java file TestBean.java (code included below)
JSP file BeanTester.jsp (code included below)

I am using Jbuilder Turbo (eclipse based) IDE.  

I compile the file as  a war and deploy it to tomcat like I did the servlet which worked fine.

the resultant page that I get back is entirely blank -- I will post the source below as well.
I am not sure what I am doing wrong -- if it is tomcat that is set up wrong, the code is wrong somehow, or something else that I haven't even thought of.  
TestBean.java code:
 
package my;
 
public class TestBean {
	private String greeting = "Hello Wiorld";
	public String getWelcome(){
		return greeting;
	}
}
________________________________________________________________
JSP code 
 
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!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=ISO-8859-1">
	<title>Insert title here</title>	
</head>
 
<body>
<jsp:useBean id="testBean" class="my.TestBean" />
  <h1> <c.out value="${testBean.welcome}" /> </h1>
</body>
</html>
_______________________________________________________________
source page when I run http://localhost:8080/test/BeanTester.jsp
 
 
<!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=ISO-8859-1">
	<title>Insert title here</title>	
</head>
 
 
 
<body>
 
  <h1> <c.out value="Hello Wiorld" /> </h1>
</body>
</html>

Open in new window

0
Comment
Question by:VoodooFrog
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 27

Accepted Solution

by:
mrcoffee365 earned 2000 total points
ID: 20389347
<c.out value="Hello Wiorld" />

should be

<c:out value="Hello Wiorld" />


0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses

656 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