wood burning stoves 2.0*
The moose likes JSP and the fly likes Another Newb failing at HF Servlets & JSP Beer Example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Another Newb failing at HF Servlets & JSP Beer Example" Watch "Another Newb failing at HF Servlets & JSP Beer Example" New topic
Author

Another Newb failing at HF Servlets & JSP Beer Example

Kai Karius
Greenhorn

Joined: Feb 03, 2009
Posts: 7
First off,

relax. I didnt fail completely . Its just the last step involving an actual JSP file that troubles me. My deployment structure is as given in the book. Each of the previous examples worked fine. Now, building in the result.jsp my fox gives me the following:



Now, i cant get smart of this....Here are my files:

Its the BeerExpert.java :



The BeerSelect.java



The web.xml



And, ofc. the result.jsp



Thanks in advance.
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3775

org.apache.jasper.JasperException: /result.jsp(1,5) Invalid directive


Here where it comes from,

, where it should be



You are using an import statement but there's no directive called import but page and import is an attribute of it.
This will solve your problem


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
A little hint:
<%@ import="java.util.*" %>

is a "directive", and it's where the error occurs. The other files are not relevant to this problem. Consult the book or the JSP specification on what the valid directives are, and what their syntax is.


Ping & DNS - updated with new look and Ping home screen widget
Kai Karius
Greenhorn

Joined: Feb 03, 2009
Posts: 7
Hi!

Tanks, i checked the statement. Ofc, it should read:

<%@ page import="java.util.*" %>


Guess i was so glad to see some familiar Java that i didnt consider the differences.

Thank you very much,

TWERP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Another Newb failing at HF Servlets & JSP Beer Example
 
Similar Threads
calling jsp from servlet
help needed with tomcat/requestDispatcher - example form HeadFirst servlets and jsp
Unable to compile class for JSP
Head First BeerSelect problems
Using Model 2 - NullPointer problem.