• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

JavaBean and jsp Help

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wrote a Jsp file . In that i used a javabean. I am using weblogic 8.1. This is the code
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
<html>
<head>
<title> Global Auctions - view item, Holder Bean </title>
</head>
<boby>
<h1>View Item Holder Bean </h1>
<jsp:useBean id="item" class="Item" scope="session" >
<jsp:setProperty name="item" property="catId" value="3000" >
<jsp:setProperty name="item" property="desc" value="Mango" >
</jsp:useBean>
<table>
<tr><td>Item number : </td><td><%= item.getCatId() %></td></tr>
<tr><td>Item Desciption : </td><td><%= item.getDesc() %></td></tr>
</table>
</boby>
</html>
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The above code giving an error
##############################################################
Compilation of 'C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_myservletExp_dir_myservletExp\jsp_servlet\__item.java' failed:
--------------------------------------------------------------------------------
C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_myservletExp_dir_myservletExp\jsp_servlet\__item.java:128: cannot resolve symbol
probably occurred due to an error in /item.jsp line 8:
<jsp:useBean id="item" class="Item" scope="session" >
C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_myservletExp_dir_myservletExp\jsp_servlet\__item.java:129: cannot resolve symbol
probably occurred due to an error in /item.jsp line 8:
<jsp:useBean id="item" class="Item" scope="session" >
C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_myservletExp_dir_myservletExp\jsp_servlet\__item.java:132: cannot resolve symbol
probably occurred due to an error in /item.jsp line 8:
<jsp:useBean id="item" class="Item" scope="session" >
C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_myservletExp_dir_myservletExp\jsp_servlet\__item.java:134: cannot resolve symbol
probably occurred due to an error in /item.jsp line 8:
<jsp:useBean id="item" class="Item" scope="session" >

--------------------------------------------------------------------------------
Full compiler error(s):
C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_myservletExp_dir_myservletExp\jsp_servlet\__item.java:128: cannot resolve symbol
symbol : class Item
location: class jsp_servlet.__item
Item item = null; //[ /item.jsp; Line: 8]
^
C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_myservletExp_dir_myservletExp\jsp_servlet\__item.java:129: cannot resolve symbol
symbol : class Item
location: class jsp_servlet.__item
item = (Item)session.getAttribute("item"); //[ /item.jsp; Line: 8]
^
C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_myservletExp_dir_myservletExp\jsp_servlet\__item.java:132: cannot resolve symbol
symbol : class Item
location: class jsp_servlet.__item
item = (Item)session.getAttribute("item"); //[ /item.jsp; Line: 8]
^
C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_myservletExp_dir_myservletExp\jsp_servlet\__item.java:134: cannot resolve symbol
symbol : class Item
location: class jsp_servlet.__item
item = new Item(); //[ /item.jsp; Line: 8]
^
4 errors
###########################################################

anyone can rectify the problem
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
try providing a package for your javabeans, I've seen errors using javavabeans from jsp when there were no package structure for the beans.
 
Get me the mayor's office! I need to tell him about this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic