Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 158699

Summary: Format jsp source with scriptlet causes content loss
Product: [WebTools] WTP Source Editing Reporter: Lee Wang Soo <leewas>
Component: jst.jspAssignee: David Williams <david_williams>
Status: CLOSED DUPLICATE QA Contact: David Williams <david_williams>
Severity: normal    
Priority: P3 CC: nsand.dev
Version: 1.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Lee Wang Soo CLA 2006-09-26 01:56:40 EDT
This is simple JSP:
=======================================================================
<%@ page language="java" contentType="text/html; charset=EUC-KR"
	pageEncoding="EUC-KR"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<%! %>
<%

%>
<br />
<%
 
%>
<br />
</body>
</html>
=======================================================================
Result after souce formatting:
=======================================================================
<%@ page language="java" contentType="text/html; charset=EUC-KR"
	pageEncoding="EUC-KR"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<%!%>
<%%>

<%%>


</html>
====================================================================
This bug happen when script element(<%%>,<%!%>,<%=%>) doesn't have inner code 

and two more script elements exist. If no 'blank' script element exist, this error

doesn't happen.
Comment 1 Nick Sandonato CLA 2009-09-25 16:08:34 EDT
Looks to be a duplicate of bug 189318.

*** This bug has been marked as a duplicate of bug 189318 ***