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

Bug 243992

Summary: Links in EL (JSPs) are not accepted
Product: [WebTools] WTP Source Editing Reporter: Ralf Josephy <ralf.josephy>
Component: jst.jspAssignee: Nick Sandonato <nsand.dev>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: itewksbu
Version: 3.0Keywords: helpwanted
Target Milestone: 3.2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
DiceTaglib.war none

Description Ralf Josephy CLA 2008-08-13 05:11:11 EDT
Build ID:  I20080617-2000

Steps To Reproduce:
1. Problem occurs in Eclipse JSP Editor, build in deployment not possible
2. export war to tomcat
3. war export is opened by tomcat and it runs


More information:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="mine" uri="/Web-INF/myFunctions.tld" %>
<-- wrong error -->

<!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>Insert title here</title>
</head>
<body>

${mine:rollIt()}
<-- wrong error -->

</body>
</html>


<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="mine" uri="/Web-INF/myFunctions.tld" %>

<!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>Insert title here</title>
</head>
<body>

${mine:rollIt()}

</body>
</html>

<taglib xmlns="http://java.sun.com/xml/ns/j2ee" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
  http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" 
  version="2.0">
  
 <tlib-version>1.2</tlib-version>
 <short-name>DiceFunctions</short-name>
 <uri>DiceFunctions</uri>
 <function>
 <name>rollIt</name>
 <function-class>foo.DiceRoller</function-class>
 <function-signature>int rollDice()</function-signature>
 
 </function>
 
 </taglib>


package foo;

public class DiceRoller {
	
	public static int rollDice() {
		return (int) ((Math.random() * 6) + 1);
	}

}
Comment 1 Ralf Josephy CLA 2008-08-13 05:26:12 EDT
Created attachment 109878 [details]
DiceTaglib.war
Comment 2 Ian Tewksbury CLA 2010-01-26 13:56:31 EST
Can not reproduce.  Furthermore the internal translation appears to be correct:

${mine:rollIt()}
translated to:
return ""+foo.DiceRoller.rollDice() ;
Comment 3 Nick Sandonato CLA 2010-02-09 16:15:05 EST
I cannot reproduce either. I think this was resolved by the work by Bug 276620.