Solved

jsp tag error...

Posted on 2012-04-02
3
392 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
Comment Utility
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
Comment Utility
Thank you.

Also I had out.print missing

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

Expert Comment

by:rrz
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
A procedure for exporting installed hotfix details of remote computers using powershell
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 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

10 Experts available now in Live!

Get 1:1 Help Now