Solved

jsp tag error...

Posted on 2012-04-02
3
394 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Fisheye tool 2 104
Looking for some programs to resell or buy source codes 1 75
struts exact match support 3 51
listing all functions in JavaScript 19 180
In the hope of saving someone else's sanity... About a year ago we bought a Cisco 1921 router with two ADSL/VDSL EHWIC cards to load balance local network traffic over the two broadband lines we have, but we couldn't get the routing to work consi…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

862 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now