Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp

 
anis Farim
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi



you have to change Instance variable as Public like that


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


 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is that you are not creating the DVDItem anywhere.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ankit Garg
Sheriff
Posts: 9528
32
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anis if you are a newbie, then I would recommend that you read about jsp:useBean from a tutorial like this or this...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic