• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Beans and Form processing

 
venkat bagavathi subramanian
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
am trying to capture inputs from a html file into a jsp file using beans.
the code for this is as given in this url.
http://www.jsptut.com/Forms.jsp
-----------now the problem/exception-------------------
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 0 in the jsp file: /savename.jsp
Generated servlet error:
[javac] Compiling 1 source file
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\savename_jsp.java:41: cannot resolve symbol
symbol : class UserData
location: class org.apache.jsp.savename_jsp
UserData user = null;
^
-----------------------------------------------
i am running this code in win98 and have set the classpath.
pl help!!!
thanks
venkat
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are u actually importing your class in your jsp file?
<%@page import="fully.qualified.class"%>
 
venkat bagavathi subramanian
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no i am not actually importing the class. i am trying to use that bean to capture the inputs in a html file.
according to the tutorial i read, the class file must be there in the web-server's classpath.
i am using tomcat, so am placing it in webinf/classes/.
while the servlets run beautifully, why is this jsp not able to locate the bean class?
thanks
venkat
 
venkat bagavathi subramanian
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have not packaged the class file in to jar.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why is this jsp not able to locate the bean class?

Because as Andres already pointed out, you need to import a class before you can use it. This is elementary Java.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic