Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330986 - The "return;" in the end of a jsp cause a compile error, but the ide doesn't show any warning.
Summary: The "return;" in the end of a jsp cause a compile error, but the ide doesn't ...
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Rakesh CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-23 21:39 EST by Huang Jianfeng CLA
Modified: 2010-12-07 16:03 EST (History)
3 users (show)

See Also:
nsand.dev: review+


Attachments
Screen shot (35.12 KB, image/jpeg)
2010-11-24 00:17 EST, Rakesh CLA
no flags Details
patch (967 bytes, patch)
2010-11-24 00:18 EST, Rakesh CLA
nsand.dev: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.