• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with XML style syntax

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a JSP page named 'directives.jsp' with xml-style syntax. Everytime I try to view the JSP page.. JasperException occurs (see below). I am new to JSP.. sorry
jun


<html>
<head><title>Directive stuff</title></head>
<body>
<jsp irective.page import="java.util.*" />
.. ....
</html>



Errors:


org.apache.jasper.JasperException: /jspTest/directives.jsp(4,6) jsp.error.badaction
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)
at org.apache.jasper.compiler.Parser.parseAction(Parser.java:671)

 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
did you use

or

?
The second is illegal, the syntax is case sensitive.
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joeren
What is difference between the two? I dont see any?
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
forgot to turn off smilies
the syntax is case sensitive, you probably used a capital D in Directive where a lowercase d is required.
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by J Martin:
I have a JSP page named 'directives.jsp' with xml-style syntax. Everytime I try to view the JSP page.. JasperException occurs (see below). I am new to JSP.. sorry
jun


Where have you declared that this page is in XML syntax?
[ March 10, 2004: Message edited by: Pradeep Bhat ]
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmm, tried it on Tomcat 4.1 and gives the same error here too no matter what I do...
running it on JWSDP 1.2 (which includes Tomcat 5) it works as expected.
This now leads me to believe there's a bug in the Tomcat 4 implementation.
 
Raul Martinez
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used <jsp irective.page import="java.lang.*" />
I'm reading Core Servlets and JSP PDF version to get started.
 
Raul Martinez
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pradeep Bhat:

Where have you declared that this page is in XML syntax?
[ March 10, 2004: Message edited by: Pradeep Bhat ]



I declared it in 'directives.jsp'. This file contains mixed syntax, XML style and scriptlets..
 
Raul Martinez
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way, I am using Jakarta Tomcat 5.x stable and my JSDK is JSDK v1.4.x ( i forgot the exact version..) Tomorrow i'll post a follow-up.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there, I had some simliar issues working with XML-ized jsps last May. You may find my experience helpful. You can probably point out my mistakes too.
Keith's XML follies
[ March 10, 2004: Message edited by: Keith Sader ]
[ March 10, 2004: Message edited by: Keith Sader ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic