473,418 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

How to create instance of a class in jsp

I am working in eclipse and i am getting this error

I pass arraylist from servlet with

request.setAttribute("myArray',col_role)

col_role contain object(role)

role is class name

I get this error at runtime.
Expand|Select|Wrap|Line Numbers
  1. org.apache.jasper.JasperException: Unable to compile class for JSP: 
  2.  
  3. An error occurred at line: 36 in the jsp file: /add_user.jsp
  4. role cannot be resolved to a type
  5. 33: java.util.ArrayList Arr =(java.util.ArrayList) request.getAttribute("myArray");
  6. 34: 
  7. 35: for( java.util.Iterator it = Arr.iterator() ; it.hasNext(); ) {
  8. 36:  role Xname = (role)it.next();
  9. 37:  out.println(Xname.getRole_description());
  10. 38:     
  11. 39: }
Oct 13 '10 #1
1 3283
Nepomuk
3,112 Expert 2GB
Is the class role known to the JSP? Looks like it's missing it.

Greetings,
Nepomuk
Oct 19 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: MKoleoso | last post by:
Problem: C#- Unable to create instance of a class implementing from an interface I have: namespace someNamespace { public __gc class SomeClass1 { }
3
by: peter | last post by:
How to create a class dynamicaly at run-time? Some documentations in MSDN say that it is feasible using the class "TypeBuilder",but I don't know how to do. Is there anyone who can help me? Sample...
2
by: Marcin Grzębski | last post by:
Hi All, How to create *component* class which do now show its instance in a component bar? I want to create other class, this *component* instance collection and i know how to show that...
5
by: Brahm | last post by:
Anyone, How can i use xsd.exe to create a class file to include in my c# project? Is this the right program to use? Doing it by hand is a pain. thanks, BRAHM *** Sent via Developersdex...
39
by: Quick Fox | last post by:
Hi All, Please help for following case: How to Load a Assembly from DLL file and create instance of the class in the loaded file. I want make a function that get 2 string parameters...
5
by: mlev | last post by:
I want function in one namespace to create instance of class defined in another namespace. (more detailed - I try to make independent "Seralizer" dll, to be used by different application, each...
4
by: VMI | last post by:
For my website, I created CrystalReportTest.rpt (through the designer in VS 2005) and I'd like to be able to display it in viewer.aspx (all in the same project). Viewer.aspx has a Crystal Report...
3
by: Joseph Lu | last post by:
Hi, all Could any boday tell me why I failed to create instance here in the following code ? Codes sample -------------------------------------------------------------------- void...
2
by: =?Utf-8?B?T2xkQnV0U3RpbGxMZWFybmluZw==?= | last post by:
I want create an instance of an object which accepts a Data Reader as a constructor. I realize that I could create a gigantic case statement in which I test for each text name, but that case...
0
by: mkadasi | last post by:
I want to dynamically create instance of class stored in other application. I am writing the following code for this purpose: Here in the AssemblyFunc() I am loading the assembly of TariffClass...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.