This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSP and the fly likes JSP and XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » JSP
Bookmark "JSP and XML" Watch "JSP and XML" New topic


Jaggi Kunal
Ranch Hand

Joined: Jan 21, 2003
Posts: 45
I am trying to create a JSP page using XML.
Here is the code snipper :-
<%-- XMLJsp.jsp --%>
Now, when I try to access the JSp page using the URL http://localhost:8080/XMLJsp.jsp?name=Kunal
I get a compiler error jsp.error.badaction.
Is there something wrong with the code. I am using Tomcat 4.1.12
Kunal Jaggi
Mark Bensing
Ranch Hand

Joined: Mar 09, 2003
Posts: 40
I see several things wrong with the code:
  • The entire page has to be enclosed in a <jsp:root> element
  • <%-- --> is not a valid comment in XML syntax; XML comments are <!-- -->
  • The <HEAD> element is not properly terminated

  • Your code should looks something like this:

    Note that I haven't tried to run this page, but I think it does fix most of your problems.
    I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
    subject: JSP and XML
    jQuery in Action, 3rd edition