File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes dont want a JSP page appear as XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply locked New topic
Author

dont want a JSP page appear as XML

Joe Marchi
Greenhorn

Joined: Apr 25, 2010
Posts: 11
hello, im trying to run a simple example using JSP document using xml syntax but cannot display the content output as jsp. the page loads in xml tree format in the browser.

how do i display the content as jsp/html?

here is my html


it goes to a jsp file with the following code


which forwards to this jsp page


<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
<jsp:directive.page session="false"/>
<jsp:directive.page contentType="text/html; charset=ISO-8859-1"/>
<jsp:useBean id="searchBean" scope="request" class="com.learnweblogic.ch4.UserSearchBean"/>
<html>
<head> <title>Using Search Bean: no items found</title> </head>
<body>
<h1>No items found</h1>
<form action="search">
<p style="color: red">
<jsp:text>Your search for "</jsp:text>
<jsp:getProperty name="searchBean" property="keywords"/>
<jsp:text> " returned no items. Try another search to find a match. </jsp:text>
</p>
<p>
<jsp:text>Search keywords: </jsp:text>
<jsp:text> <![CDATA[<input type="text" size="30" name="keywords" value="]]> </jsp:text>
<jsp:getProperty name="searchBean" property="keywords"/>
<jsp:text><![CDATA["/>]]></jsp:text>
</p>
<input type=submit value="Submit"/>
</form>
</body>
</html>
</jsp:root>


now when i enter the first html form it takes me to a page with xml tree for the above jsp instead of displaying it in jsp or html format. I have added the jsp:directive.page contentType="text/html; charset=ISO-8859-1" but it still doesnt display the page as a jsp..

please help
thanks


Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3013
    
  35

Please CarefullyChooseOneForum.
Let's continue the discussion in your other topic.
Closing this one.


Founder of ExamLab and Systemup
See how I can help you to become an awesome programmer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dont want a JSP page appear as XML
 
Similar Threads
include directive doesn't work
Jsp Pagination
JSF Components does not appear on the browser
jsp page appears in xml tree format. how can i fix this?
wanted to create own tag in struts using NetBeans and use it in .jspx file