• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

first whack at JSP not working

 
Trailboss
Posts: 23990
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul,
Change "file" to "page".
 
paul wheaton
Trailboss
Posts: 23990
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay - I made the change and now I get:
500 Internal Server Error
JSP Parse Error
JSP Directive <%@ %> pageis not recognized.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 23990
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's the demo samples that are not working.
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
which server/JSP engine are you using?
 
paul wheaton
Trailboss
Posts: 23990
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 23990
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I too recommend the book by Duane Fields & Mark Kolb. Highly.
 
Oh. Hi guys! Look at this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic