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

Bug 330986

Summary: The "return;" in the end of a jsp cause a compile error, but the ide doesn't show any warning.
Product: [WebTools] WTP Source Editing Reporter: Huang Jianfeng <huangjianfeng.zg>
Component: jst.jspAssignee: Rakesh <rakes123>
Status: RESOLVED FIXED QA Contact: Nick Sandonato <nsand.dev>
Severity: normal    
Priority: P3 CC: huangjianfeng.zg, rakes123, thatnitind
Version: 3.1Flags: nsand.dev: review+
Target Milestone: 3.2.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Screen shot
none
patch nsand.dev: iplog+

Description Huang Jianfeng CLA 2010-11-23 21:39:49 EST
Build Identifier: A bug about jsp compile warning in eclipse-jee-galileo-SR2-win32

Hi:
My eclipse version is:
Eclipse Java Development Tools
Version: 3.5.2.r352_v20100108-7r88FEwFI0WTuoBl0iaG0tyhfZH6
Build id: M20100211-1343

The "return;" in the end of a jsp cause a compile error, but the ide doesn't show any warning.
When I run this jsp, it cause an error.

for example, the content in jsp file is:
----------------------------
<%@ page language="java"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%
System.out.println("test");
return;//this line cause an compile error,but the ide doesn't show any warning.
%>






Reproducible: Always
Comment 1 Nitin Dahyabhai CLA 2010-11-23 21:59:10 EST
What compile error?
Comment 2 Huang Jianfeng CLA 2010-11-23 22:59:04 EST
when I run this jsp file in weblogic (from IE browser). 
There's error message showed in the page:

the path of test.jsp is 'D:\bea\user_projects\ETSDomain_jy\applications\etrading\test.jsp

Compilation of 'D:\bea\user_projects\ETSDomain_jy\.\myserver\.wlnotdelete\extract\myserver_etrading_etrading\jsp_servlet\__test.java' failed:
--------------------------------------------------------------------------------
 D:\bea\user_projects\ETSDomain_jy\.\myserver\.wlnotdelete\extract\myserver_etrading_etrading\jsp_servlet\__test.java:125: unreachable statement
(No more information available, probably caused by another error)

--------------------------------------------------------------------------------
Full compiler error(s):
D:\bea\user_projects\ETSDomain_jy\.\myserver\.wlnotdelete\extract\myserver_etrading_etrading\jsp_servlet\__test.java:125: unreachable statement
      _writeText(response, out, _wl_block1, _wl_block1Bytes);
      ^
1 error

--------------------------------------------------------------------------------
Wed Nov 24 11:51:38 CST 2010
Comment 3 Rakesh CLA 2010-11-24 00:17:02 EST
Created attachment 183727 [details]
Screen shot

IDE generates error.Here is the screen shot showing that.Its just that error is not marked on the left side of the editor.Attaching patch for that
Comment 4 Rakesh CLA 2010-11-24 00:18:05 EST
Created attachment 183728 [details]
patch
Comment 5 Nick Sandonato CLA 2010-12-03 11:26:00 EST
Looks good. Code checked in.