aspose file tools*
The moose likes Servlets and the fly likes first whack at JSP not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "first whack at JSP not working" Watch "first whack at JSP not working" New topic
Author

first whack at JSP not working

paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20629
    ∞

I made a tiny JSP like this:

And I called it test.jsp
fragment.html contains a pinch of text, nothing more.
If I take out the "<%@ include file="fragment.html" %>", the page comes up fine. If I leave it in, I see:
500 Internal Server Error
JSP Parse Error
JSP Directive <%@ %> fileis not recognized.
I'm using JRun. What am I doing wrong?

permaculture Wood Burning Stoves 2.0 - 4-DVD set
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Paul,
Change "file" to "page".
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20629
    ∞

Okay - I made the change and now I get:
500 Internal Server Error
JSP Parse Error
JSP Directive <%@ %> pageis not recognized.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Paul,
Sorry, "file" is correct. If you keep the two files in the same directory, then it should work. Have you tried the demo samples?
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20629
    ∞

It's the demo samples that are not working.
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
which server/JSP engine are you using?


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20629
    ∞

I'm using JRun, although I think I found out that it is not JSP 1.1 compliant. And the include tag I'm trying to use is a 1.1 thing.
I've downloaded Tomcat and am struggling to get it working.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Paul,
If you really wish to get into this jSP thing, perhaps you should buy the book "web development with java server pages" by Duane Fields & Mark Kolb. It is available also as an e-book for a mere $13.50. You can also ask questions in their website forum.
http://www.manning.com/Fields/index.html
The book has an appendix which helps with configuration.
Gook luck,
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20629
    ∞

Thanks sheil.
I bought that book a few days ago.
I now have tomcat running and my stuff seems to be working okay. Time to do some serious reading.
Thanks for the tip on the forum. I'll probably head out there.
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
I too recommend the book by Duane Fields & Mark Kolb. Highly.


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: first whack at JSP not working