This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JSP and the fly likes jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
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: 39
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: 14687
    
  16

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: 14687
    
  16

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

Joined: Jan 10, 2002
Posts: 60041
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

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://aspose.com/file-tools
 
subject: jsp
 
Similar Threads
the two forms in a single jsp .how can i differentiated inside a jsp file?
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)
HTTP Status 405 - HTTP method GET is not supported by this URL