The Artima Developer Community
Sponsored Link

Java Answers Forum
Using Javabeans with Tomcat

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
David Huselius

Posts: 1
Nickname: davmal
Registered: Nov, 2004

Using Javabeans with Tomcat Posted: Nov 30, 2004 5:33 AM
Reply to this message Reply
Advertisement
Hi!
I´m trying to start using javabeans with jsp but can´t get my jsp-file saved in:
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\kise
to use my javabean saved in:
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes\Beans

The code for the bean is:
package Beans;
import java.io.*;
import java.beans.*;

public class test implements java.io.Serializable {

public String name;

public String getName() {
return name;
}
public void setName(String value) {
name=value;
}
}

the code for the jsp-page is:
<HTML>
<HEAD><TITLE>Test</TITLE>
<BODY>
<%@ page language="java" %>
<%@ page import="Beans.test" %>
<jsp:useBean id="malin" scope="session" class="Beans.test" />
<jsp.setProperty name="malin" property="name" value="korv" />
<jsp:getProperty name="malin" property="name" />
</BODY>
</HTML>

I get the internal error message:
org.apache.jasper.JasperException: /kise/test.jsp(6,6) The value for the useBean class attribute Beans.test is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.jav a:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1223)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Generator.generate(Generator.java:3268)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Does anyone have a clue what to do? /davmal

Topic: matching of fingerprints in JAVA Previous Topic   Next Topic Topic: Factory pattern

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use