javax.servlet.ServletException using Tomcat 5

Discussion in 'Java' started by Pia, Sep 11, 2003.

  1. Pia

    Pia Guest

    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
    .. . . .
     
    Pia, Sep 11, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page