javax.servlet.ServletException using Tomcat 5

P

Pia

ANY HELP AT ALL IS GREATLY APPRECIATED!
I'm trying to run a very simple jsp using a simple java program, but
keep getting this exception:

org.apache.jasper.JasperException:
servlet.piaTest.yoYo()Ljava/lang/String;
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
....

ROOT CAUSE:
javax.servlet.ServletException:
servlet.piaTest.yoYo()Ljava/lang/String;
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)
at org.apache.jsp.pia_jsp._jspService(pia_jsp.java:118)
_________________________________________________________
HERE'S MY JSP:

<%@ page import="servlet.piaTest"%>

<jsp:useBean id="piaTest" class="servlet.piaTest" scope="session"/>
<jsp:setProperty name="piaTest" property="*"/>

<html>
<head>
<title>Sample Application JSP Page</title>
</head>
<body bgcolor=white>

Yo yo yo should be in here:
[
<%= piaTest.yoYo() %>
]

________________________________________________________
HERE'S MY JAVA PROGRAM:
package servlet;
import java.util.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class piaTest //extends HttpServlet
{
public String yoYo()
{
String s = "Yo Yo";
return "" + s;
}//end of yoYo
.. . . .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top