File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "jsp " Watch "jsp " New topic
Author

jsp

anis Farim
Greenhorn

Joined: Oct 09, 2010
Posts: 5
I try run my code but it does not work. Please help me

Here my DVDItem.java code



Here my add_dvd.html code




and it my success.jsp code



I got an error:

HTTP Status 500 -

type Exception report

message

descriptionThe server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: java.lang.InstantiationException: bean dvdItem not found within scope

root cause

java.lang.InstantiationException: bean dvdItem not found within scope

note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 3.0.1 logs.
GlassFish Server Open Source Edition 3.0.1


PLEase.....
ayyappan Bas
Ranch Hand

Joined: Oct 11, 2008
Posts: 37
Hi



you have to change Instance variable as Public like that


public String title;
public String year;
public String genre;




Thanks & Regards
Ayyappan
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14672
    
  11

ayyappan Bas wrote:you have to change Instance variable as Public like that

public String title;
public String year;
public String genre;


No. There are already getter/setters. Instance variables could even be private.


[My Blog]
All roads lead to JavaRanch
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14672
    
  11

The problem is that you are not creating the DVDItem anywhere.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56185
    
  13

Please be sure to take the time to compose descriptive subjects for your posts. You will attract people who will can give you better and faster answers when your posts have good, descriptive subjects. For more information, please click this link ⇒ UseAMeaningfulSubjectLine.

Using a title of "jsp" in a forum completely dedicated to questions on JSP isn't going to attract the attention of those who can best help you. You can change your subject line by clicking the button on your post.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9189
    
    2

Anis if you are a newbie, then I would recommend that you read about jsp:useBean from a tutorial like this or this...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: jsp
 
Similar Threads
the two forms in a single jsp .how can i differentiated inside a jsp file?
HTTP Status 405 - HTTP method GET is not supported by this URL
the two forms in a single jsp .how can i differentiated inside a jsp file?
The value for the useBean class attribute is invalid
Page 569-571 : Formatting output AND making program in book (Generics and collections)