aspose 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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes 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
Saloon Keeper

Joined: Jul 29, 2008
Posts: 2691
    
    3

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


Author of ExamLab (Download) - the free mock exam kit for SCJP / OCPJP
Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: dont want a JSP page appear as XML
 
Similar Threads
jsp page appears in xml tree format. how can i fix this?
include directive doesn't work
JSF Components does not appear on the browser
wanted to create own tag in struts using NetBeans and use it in .jspx file
Jsp Pagination