• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jsp + javabean path

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting an error on my <jsp:usebean> tag when i try to compile it.-cannot resolve symbol-
my jsp directory path is the following:
C:\Tomcat\webapps\ProjectJSP\jsp\RegistForm\User.jsp
my bean directory path is the following:
C:\Tomcat\webapps\ProjectJSP\WEB-INF\classes\User.class
my bean compiles ok;
public class User{

protected String lastName;
protected String firstName;

public String getLastName(){
return lastName;
}

public void setLastName (String lname){
this.lastName = lname;
}
public String getFirstName(){
return firstName;
}
public void setFirstName (String firstName){
this.firstName = firstName;
}
}
and this is the jsp;
<%@ page language="java" contentType="text/html" %>
<html>
<head><title>JSP Page</title></head>
<body>
<H1>this is a text </H1>
<jsp:useBean id="input" class="User" />
<%
input.setLastName("AA");
%>
<%--<jsp:getProperty name="user" property="getFirstName()" />--%>
</body>
</html>
I was able to compile it if i move it under the examples directory in Tomcat, but i don't want it there. I'm also using NetBeans as an IDE.
Any help would be appreciated.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic