This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with XML style syntax

 
Raul Martinez
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • 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)

 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did you use

or

?
The second is illegal, the syntax is case sensitive.
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joeren
What is difference between the two? I dont see any?
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • 0
  • Mark post as helpful
  • send pies
  • 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: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Keith Sader
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • 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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic