jQuery in Action, 2nd edition*
The moose likes JSP and the fly likes Beans and Form processing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Beans and Form processing" Watch "Beans and Form processing" New topic
Author

Beans and Form processing

venkat bagavathi subramanian
Greenhorn

Joined: Dec 21, 2003
Posts: 19
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

Joined: Nov 27, 2001
Posts: 1561
are u actually importing your class in your jsp file?
<%@page import="fully.qualified.class"%>


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
venkat bagavathi subramanian
Greenhorn

Joined: Dec 21, 2003
Posts: 19
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

Joined: Dec 21, 2003
Posts: 19
i have not packaged the class file in to jar.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Beans and Form processing