File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply locked New topic

dont want a JSP page appear as XML

Joe Marchi

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="" version="2.0">
< session="false"/>
< contentType="text/html; charset=ISO-8859-1"/>
<jsp:useBean id="searchBean" scope="request" class="com.learnweblogic.ch4.UserSearchBean"/>
<head> <title>Using Search Bean: no items found</title> </head>
<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>
<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"/>
<input type=submit value="Submit"/>

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 contentType="text/html; charset=ISO-8859-1" but it still doesnt display the page as a jsp..

please help

Devaka Cooray
ExamLab Creator

Joined: Jul 29, 2008
Posts: 3929

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

Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
I agree. Here's the link:
subject: dont want a JSP page appear as XML
It's not a secret anymore!