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

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 ]
 
Evacuate the building! Here, take this tiny ad with you:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic