Solved

jsp tag error...

Posted on 2012-04-02
3
396 Views
Last Modified: 2012-04-02
In the attached file, I have a jsp page giving an error (the error is also included in the attached txt file).

removing code, changing:

<% com.wrox.library.Book myBook = new com.wrox.library.Book("Begining JSP Web Development"); %>

Book Title:
<%= myBook.getTitle() %>

to

Book Title:

brings up the isp page but not with the code.

Question: Why am I getting the exception?


Thank you.
Error-html-class.txt
0
Comment
Question by:Mike Eghtebas
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
rrz earned 500 total points
ID: 37797458
The code you posted works.
The error message is really not clear.
>java.lang.NoSuchMethodError: com.wrox.library.Book.<init>(Ljava/lang/String;)V  
But generally the "v" at the ends means wrong version of class file. So, I suggest that you remove the class file that you have in your web app's classes folder and replace it with a new compilation of your current code.
0
 
LVL 33

Author Comment

by:Mike Eghtebas
ID: 37797701
Thank you.

Also I had out.print missing

<% out.println(myBook.getTitle()); %>
0
 
LVL 27

Expert Comment

by:rrz
ID: 37798917
Thanks for the points.  
>Also I had out.print missing  
No, actually you had  
><%= myBook.getTitle() %>  
which is fine.  That is a JSP expression.  <%="this will be printed %>  
><% out.println(myBook.getTitle()); %>
This is a scriptlet. Yes, use the print method.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
bean mapper frameworks 5 60
Set up Wildfly 10 8 393
build fail in maven project 11 186
How can I   ajax html table  rows? 20 75
How do we balance the user experience (UX) with reasonable security measures? It can be done, if you keep these fundamentals in mind.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question