Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

dont want a JSP page appear as XML

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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


 
Sheriff
Posts: 7134
1360
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please CarefullyChooseOneForum.
Let's continue the discussion in your other topic.
Closing this one.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic