aspose file tools*
The moose likes JSP and the fly likes How to display RAW jsp in JSP page? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to display RAW jsp in JSP page?" Watch "How to display RAW jsp in JSP page?" New topic
Author

How to display RAW jsp in JSP page?

udhayan kumar
Greenhorn

Joined: Jan 28, 2010
Posts: 16
Hi ,

I am currently writing a tutorial section for JSP and servlets. I am using Google App Engine as my infra structure.

I want to display the JSP programs in my tutorial section such that those programs should not be processed by the server.

For ex:

I want to display the below JSP program in my example1.jsp program. When I ran the jsp I got the error stating tat "Page directive must not have multiple occurrences of pageencoding" as I have two page directives one for my example1.jsp and another for the below code snippet.

*************************
<%@ page language="java" c
ontentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1" import="com.samples.PageDirective"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>JSP Directives</title>
</head>
<body>
Page Directive tag is used to import packages, enable/disable session, set or redirect to error page etc.,<br/>
Here I'm showing how to import a class and access a method from that class! <br/>
<%PageDirective objPD=new PageDirective();%>
<%=objPD.sayHello("Tim") %>
</body>
</html>
************************

Please help me how can i display it as I am bit new to JSP..

Your help is much appreciated!

Thanks in advance.

Regards,
Udhay
olivier dutranoit
Ranch Hand

Joined: Aug 20, 2011
Posts: 81

try changing your

that should be enough i think...
it should be ignored by jsp and shown good in html
udhayan kumar
Greenhorn

Joined: Jan 28, 2010
Posts: 16
olivier dutranoit wrote:try changing your

that should be enough i think...
it should be ignored by jsp and shown good in html


Thank you...

Tats working..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to display RAW jsp in JSP page?