?
Solved

jsp tag error...

Posted on 2012-04-02
3
Medium Priority
?
400 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
rrz earned 2000 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 34

Author Comment

by:Mike Eghtebas
ID: 37797701
Thank you.

Also I had out.print missing

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

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

777 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