Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » JSP not recompiled on change in Java file
JSP not recompiled on change in Java file [message #499217] Fri, 20 November 2009 13:18 Go to next message
David  Balažic is currently offline David BalažicFriend
Messages: 130
Registered: July 2009
Senior Member
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 #500193 is a reply to message #499217] Wed, 25 November 2009 10:23 Go to previous messageGo to next message
Mauro Molinari is currently offline Mauro MolinariFriend
Messages: 285
Registered: July 2009
Senior Member
David Bala ha scritto:
> I think eclipse should reevaluate compile errors in JSP when related
> Java files change.

Could you please add your use case to the following bug report?
https://bugs.eclipse.org/bugs/show_bug.cgi?id=130399

Mauro.
Re: JSP not recompiled on change in Java file [message #501536 is a reply to message #499217] Wed, 02 December 2009 16:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nowhere.a.com

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.

--
Wojtek :-)
Re: JSP not recompiled on change in Java file [message #501813 is a reply to message #501536] Thu, 03 December 2009 21:58 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

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?

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: JSP not recompiled on change in Java file [message #501833 is a reply to message #501813] Fri, 04 December 2009 00:01 Go to previous messageGo to next message
Eclipse UserFriend
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?

I am on 3.4 and automatic builds and publishing are on.

The JSP and JSP fragment validator is on.

Again not sure if it is related, but refactoring and CTRL-SHIFT-G
searches do not include any JSP files.

Hovering over classes/methods does not show the associated Javadoc.

However content assist (CTRL-Space) does work and so does CTRL-Click to
go to the class/method

--
Wojtek :-)
Re: JSP not recompiled on change in Java file [message #501834 is a reply to message #501813] Fri, 04 December 2009 00:07 Go to previous messageGo to next message
Eclipse UserFriend
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 :-)
Re: JSP not recompiled on change in Java file [message #501870 is a reply to message #501834] Fri, 04 December 2009 08:43 Go to previous messageGo to next message
Mauro Molinari is currently offline Mauro MolinariFriend
Messages: 285
Registered: July 2009
Senior Member
Wojtek ha scritto:
> 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:

This seems to be:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=277530

Fixed in 3.2 M1.

Mauro.
Re: JSP not recompiled on change in Java file [message #501871 is a reply to message #501833] Fri, 04 December 2009 08:46 Go to previous messageGo to next message
Mauro Molinari is currently offline Mauro MolinariFriend
Messages: 285
Registered: July 2009
Senior Member
Wojtek ha scritto:
>>> 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.

I think you may also add your use case on:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=130399

> Again not sure if it is related, but refactoring and CTRL-SHIFT-G
> searches do not include any JSP files.

Regarding the search in workspace you may comment on:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=151689

Regarding the refactoring issues, there are many reports on this, for
example:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=105172
https://bugs.eclipse.org/bugs/show_bug.cgi?id=129123
https://bugs.eclipse.org/bugs/show_bug.cgi?id=148592
https://bugs.eclipse.org/bugs/show_bug.cgi?id=164263
https://bugs.eclipse.org/bugs/show_bug.cgi?id=166906

> Hovering over classes/methods does not show the associated Javadoc.

This might be one of these:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=275749 (marked as fixed in
3.0.5)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=209300 (marked as
"worksforme")

Mauro.
Re: JSP not recompiled on change in Java file [message #501967 is a reply to message #501871] Fri, 04 December 2009 15:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nowhere.a.com

Mauro Molinari wrote :
> Wojtek ha scritto:
>>>> 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.
>
> I think you may also add your use case on:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=130399
>
>> Again not sure if it is related, but refactoring and CTRL-SHIFT-G searches
>> do not include any JSP files.
>
> Regarding the search in workspace you may comment on:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=151689
>
> Regarding the refactoring issues, there are many reports on this, for
> example:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=105172
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=129123
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=148592
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=164263
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=166906
>
>> Hovering over classes/methods does not show the associated Javadoc.
>
> This might be one of these:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=275749 (marked as fixed in
> 3.0.5)
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=209300 (marked as "worksforme")

Yikes!

I have added my vote to some of these already, but you are better at
bug searching than I am :-)).

--
Wojtek :-)
Re: JSP not recompiled on change in Java file [message #501996 is a reply to message #501871] Fri, 04 December 2009 16:16 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Mauro Molinari wrote:
> Wojtek ha scritto:
>>>> 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.
>
> I think you may also add your use case on:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=130399

No, that was implemented for fragment files in WTP 3.1, Galileo.
Ganymede includes Eclipse 3.4.x and WTP 3.0.x. Responding to
changes in Java classes is still to be implemented.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: JSP not recompiled on change in Java file [message #666342 is a reply to message #499217] Wed, 20 April 2011 03:14 Go to previous messageGo to next message
Harsono Ng is currently offline Harsono NgFriend
Messages: 1
Registered: April 2011
Junior Member
I have quite same problem with this post , I think.

I have testing helloworld.java file when I start the project it (for the 1st times) it will create automatically an helloworld.class run smoothly.

but when I try to modify some text for output and I run again,
the java console also pop-up and changed as what I modifed.

but the helloworld.class file didn't change, it keep the old one. if I try delete the helloworld.class manually from window it become error (see below) when I run the compiling inside Eclipse. it didn't create helloworld class automatically amymore.

error message :
load: class HelloWorld.class not found.
java.lang.ClassNotFoundException: HelloWorld.class
	at sun.applet.AppletClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.applet.AppletClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.applet.AppletClassLoader.loadCode(Unknown Source)
	at sun.applet.AppletPanel.createApplet(Unknown Source)
	at sun.applet.AppletPanel.runLoader(Unknown Source)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)


I need to recreate new whole java project to change it.
please help. thanks in advance.
Re: JSP not recompiled on change in Java file [message #666729 is a reply to message #666342] Fri, 22 April 2011 01:44 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

You've made sure that automatic builds are enabled from the Project menu?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:XDEBUG & PECL
Next Topic:getting started with adding custom library support to JSDT
Goto Forum:
  


Current Time: Thu Apr 25 00:55:36 GMT 2024

Powered by FUDForum. Page generated in 0.03920 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top