aspose file tools*
The moose likes JSP and the fly likes problem with XML style syntax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problem with XML style syntax" Watch "problem with XML style syntax" New topic
Author

problem with XML style syntax

Raul Martinez
Greenhorn

Joined: Mar 01, 2004
Posts: 17
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)



Learning new things, I LIKE!<p>---certification---<br />none so far, experience (considerable, yeah)
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
did you use

or

?
The second is illegal, the syntax is case sensitive.


42
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Joeren
What is difference between the two? I dont see any?


Groovy
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
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

Joined: Feb 27, 2002
Posts: 8919

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

Joined: Oct 12, 2000
Posts: 5093
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

Joined: Mar 01, 2004
Posts: 17
I used <jsp irective.page import="java.lang.*" />
I'm reading Core Servlets and JSP PDF version to get started.
Raul Martinez
Greenhorn

Joined: Mar 01, 2004
Posts: 17
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

Joined: Mar 01, 2004
Posts: 17
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

Joined: Mar 10, 2004
Posts: 3
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.
 
subject: problem with XML style syntax