JSP not recompiled on change in Java file [message #499217] |
Fri, 20 November 2009 08:18  |
Eclipse User |
|
|
|
Using Eclipse Java EE package 3.5.1
Build id: 20090920-1017
I have a webapp project and noticed that in some cases Eclipse does not see a change and does not recompile (redetect errors).
I had a JSP file and a Java class file.
1.) The Java class has a static method.
2.) The JSP calls that method, but eclipse reports an error, as the java class is not imported.
3.) I add a page import directive
4.) Now I get that the method is not accessible/visible.
5.) I change the Java method to be "public" and sav the change.
Expected: the error mark in JSP goes away.
Actual: the error mark stays.
I added a meaningless space character to JSP and saved it, that triggered eclipse to notice, that the error is not present anymore.
I think eclipse should reevaluate compile errors in JSP when related Java files change.
Regards,
David
|
|
|
|
|
|
|
Re: JSP not recompiled on change in Java file [message #501834 is a reply to message #501813] |
Thu, 03 December 2009 19:07   |
Eclipse User |
|
|
|
Originally posted by: nowhere.a.com
Nitin Dahyabhai wrote :
> Wojtek wrote:
>> David Bala wrote :
>>> Using Eclipse Java EE package 3.5.1
>>> Build id: 20090920-1017
>>>
>>> I have a webapp project and noticed that in some cases Eclipse does not
>>> see a change and does not recompile (redetect errors).
>>
>> As long as we are talking about un-recognised fixes...
>>
>> If I have a JSP file which has one or more include directives of JSPF
>> files, any changes to the included files are not recognised by the JSP file
>> unless the JSP file is recompiled.
>>
>> Not sure if this is related.
>>
>> That is Eclipse does not recognise the changes. When the files are
>> published then Tomcat does re-construct and recompile the JSP file.
>
> You mean fragments changed in the workspace don't revalidate the JSPs that
> include them when using Galileo? With automatic builds and the JSP Validator
> enabled?
One other thing, when I use content assist, and I click on one of the
suggestions I get as the Javadoc:
/* Font definitions */ html { font-family:
'Tahoma',sans-serif; font-size: 8pt; font-style:
normal; font-weight: normal; } body, h1, h2, h3, h4,
h5, h6, p, table, td, caption, th, ul, ol, dl, li, dd, dt
{ font-size:1em; } pre { font-family: monospace; } /*
Margins */ body { overflow: auto; margin-top: 0px;
margin-bottom: 0.5em; margin-left: 0.3em; margin-
right: 0px; } h1 { margin-top: 0.3em; margin-bottom:
0.04em; } h2 { margin-top: 2em; margin-bottom:
0.25em; } h3 { margin-top: 1.7em; margin-bottom:
0.25em; } h4 { margin-top: 2em; margin-bottom:
0.3em; } h5 { margin-top: 0px; margin-bottom: 0px; }
p { margin-top: 1em; margin-bottom: 1em; } pre
{ margin-left: 0.6em; } ul { margin-top: 0px; margin-
bottom: 1em; } li { margin-top: 0px; margin-bottom:
0px; } li p { margin-top: 0px; margin-bottom: 0px; } ol
{ margin-top: 0px; margin-bottom: 1em; } dl { margin-
top: 0px; margin-bottom: 1em; } dt { margin-top:
0px; margin-bottom: 0px; font-weight: bold; } dd
{ margin-top: 0px; margin-bottom: 0px; } /* Styles
and colors */ a:link { color: #0000FF; } a:hover
{ color: #000080; } a:visited { text-decoration:
underline; } h4 { font-style: italic; } strong { font-
weight: bold; } em { font-style: italic; } var { font-
style: italic; } th { font-weight: bold; } hashCode
public int hashCode()
Returns a hash code value for the object.
This method is supported for the benefit of
hashtables such as those provided by
java.util.Hashtable.
The general contract of hashCode is:
- Whenever it is invoked on the same object
more than once during an execution of a Java
application, the hashCode method must consistently
return the same integer, provided no information
used in equals comparisons on the object is modified.
This integer need not remain consistent from one
execution of an application to another execution of
the same application.
- If two objects are equal according to the
equals(Object) method, then calling the hashCode
method on each of the two objects must produce the
same integer result.
- It is not required that if two objects are
unequal according to the equals(java.lang.Object)
method, then calling the hashCode method on each
of the two objects must produce distinct integer
results. However, the programmer should be aware
that producing distinct integer results for unequal
objects may improve the performance of hashtables.
As much as is reasonably practical, the hashCode
method defined by class Object does return distinct
integers for distinct objects. (This is typically
implemented by converting the internal address of
the object into an integer, but this implementation
technique is not required by the JavaTM programming
language.)
Returns: a hash code value for this object.See
Also: equals(java.lang.Object), Hashtable
--
Wojtek :-)
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07482 seconds