Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-04-2008, 05:10 AM
Member
 
Join Date: Jul 2008
Posts: 2
grinsalot is on a distinguished road
Invalid usebean class attribute - new to java
Hello,

I am new to Java and attempting to code my first application. I have a query form with textboxes that I'd like to use with a databean. I get a compiler error complaining that my class attribute is invalid. I've tried everything I can think of. I have a public constructor, my classpath should be correct - notes below. I also tried compiling this file from the command line, but received an error saying javac could not find the file. It's there though. I read other posts on this site but wasn't able to resolve the issue. Your help would be greatly appreciated.
This is my searchdata.java file.


Code:
package querydata; public class queryBean{ private String title; private String author; private String yearOfPub; private String date; public queryBean() { title = ""; author = ""; yearofPub = ""; date = ""; } public String setTitle(String Title) { title = Title; } public String getTitle() { return title; } public String setAuthor(String Set_Author) { author = Set_Author; } public String getAuthor() { return author; } public String setYearofPub(Year_of_Pub) { year = Year_of_Pub; } public String getYearofPub() { return year; } public String setDate(Date) { date = Date; } public String getDate() { return date; } }
This is the bean in my search.jsp file. I haven't included the search form, I didn't think it was relevant to the question.

Code:
<%@ page import="querydata.queryBean.*"%> <jsp:useBean id="querybean" class="querydata.queryBean" scope="session"> </jsp:useBean>

searchquery.java is stored in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\ROOT\searchquery

My classpath is set to C:\Program Files\Java\jdk1.6.0_06\bin, and the javac.exe file is there - I checked.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-04-2008, 05:31 AM
sukatoa's Avatar
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 526
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
This should be posted in JSP section....
__________________
A specific, detailed, simple, well elaborated, and "tested before asking" question may gather more quick replies. hopefully
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-04-2008, 05:54 AM
Member
 
Join Date: Jul 2008
Posts: 2
grinsalot is on a distinguished road
My apologies - have reposted in appropriate forum!

-grins
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply

« Login page | jsp »

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
java.util.zip.ZipException: invalid bit length repeat EXCEPTION hemanthjava Advanced Java 1 07-02-2008 03:15 PM
java.io.IOException: invalid header field osval Advanced Java 1 08-07-2007 12:09 AM
Error :Invalid path, C:\Program Files\Java\j2re1.4.2_06\bin\javac.exe silvia New To Java 2 07-30-2007 09:55 AM


All times are GMT +3. The time now is 04:42 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org