• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem accessing a bean from a JSP

 
D Prasad
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alright, I have tried a different design based on a template. The controller servlet dispenses the JSPs and the dataBean stores values into the database.
I haven't gotten to the display servet yet, I just want to get the values into the database to start wtih. Here is the error I get trying to compile addPage.jsp
showPage$jsp.java [70:1] cannot resolve symbol
symbol : class dataBean
location: package burnaby
com.brainysoftware.burnaby.dataBean dbBean = null;
^
showPage$jsp.java [73:1] cannot resolve symbol
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wow, that's a lot of code for a post!
-sorry if I missed it, but, where's the constructor for your bean?
 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi...
Shouldn't you be importing the package in your JSP files...
<%@ page import="java.util.*, com.brainysoftware.burnaby.*" %> or
<%@ page import="java.util.*" %>
<%@ page import="com.brainysoftware.burnaby.*" %>
hth
MB
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Malhar Barai:
hi...
Shouldn't you be importing the package in your JSP files...
<%@ page import="java.util.*, com.brainysoftware.burnaby.*" %> or
<%@ page import="java.util.*" %>
<%@ page import="com.brainysoftware.burnaby.*" %>
hth
MB

why not ?
 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Andres Gonzalez:

why not ?

You should
MB
 
D Prasad
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alright, I tried to import the package, both by combining it with the import of the sql package, also importing it on its own line..still the same problem. This is probably a really simple thing I am overlooking...GRRRRRRRRRRRRRRRR!
 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..
No constructor in dataBean.java...!!!??

Also in ControllerServlet

import com.brainysoftware.burnaby.DbBean

should be

import com.brainysoftware.burnaby.dataBean

hth
MB
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Malhar Barai:

You should
MB

yes, I didn't understand your first post
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic