MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
erouse
Post subject: JSP reconciler markers in 3.8.2 [Closed]  PostPosted: Nov 09, 2004 - 04:54 PM
Registered Member
Registered Member


Joined: Sep 14, 2004
Posts: 45

I have started getting error indications where I was previously getting warnings, after I upgraded to 3.8.2. The error occurs in the following situation.

I am using struts tiles. I have a jsp page that will be the body of the jsp page that uses the tile template. (following the struts book convention, it is a -body.jsp) The template jsp has a start tag and the -body.jsp has the close tag. I know this is not considered best practices, but it's a holdover from the converstion away from the templates tag to the tiles tag.

The close tag is considered to have an invalid location and no start tag. This was fine as a warning, but it is now an error. I would like to see this changed back to a warning or have some way to remove this as an error. We have hundereds of pages that have this pop up whenever we do an edit and it is becoming a problem with identifying the real errors from the false errors.

Thanks.

Oh, and we did consider trying to adjust the jsps to avoid this problem, but it will take too much time that we don't have. It is, was, a low priority issue that we were looking at fixing in 6-9 months, but now that it is generating errors we need an immediate fix to remove them. Should I just uninstall the upgrade? Is it even possible?
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Nov 09, 2004 - 05:13 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

erouse,
You can first turn off HTML validation for this project to make sure that isn't the issue (Right click project properties > MyEclipse-Validation > HTML).

Next, if these pages are infact NOT valid JSP pages by themselves (e.g. they need their headers and footers to be valid) then according to JSP spec they should be named with a "jspf" extension meaning "JSP Fragment" or "JSP Segment", that tells the compiler (and subsequently MyEclipse) "don't both trying to compile these, they aren't valid pages".

Can you give me an example of the types of errors you are seeing?

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
erouse
Post subject:   PostPosted: Nov 09, 2004 - 08:37 PM
Registered Member
Registered Member


Joined: Sep 14, 2004
Posts: 45

That is probably the case, but it doesn't make me very happy. It still means editting the names of over 200 files and then editting about 100 more to use the new names. I guess i will have to live with it until I can spare the time to recode the tiles for the entire site.

Just for my own edification, if a jsp doesn't have or won't create an html page with a <head> or <body> is it still considered valid? I started using jsps so long ago, the terms fragment and segmant were not part of the spec. And I haven't refreshed my knowledge of the spec in the last 2-3 years. I got kinda lazy and have only been learning the the basic new stuff like EL, the JSTL and JSF. So changes to the spec have gone on by.

Thanks
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Nov 09, 2004 - 08:42 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

Quote:
That is probably the case, but it doesn't make me very happy. It still means editting the names of over 200 files and then editting about 100 more to use the new names. I guess i will have to live with it until I can spare the time to recode the tiles for the entire site.

I agree, this can be a PIA but for now you can likely just turn off JSP Validation to work around the problems until a later time.

Quote:
Just for my own edification, if a jsp doesn't have or won't create an html page with a <head> or <body> is it still considered valid?

Very good question, yes a "valid" JSP has nothing to do with the HTML content, it has to do with the page itself. For example, if you have a jsp Page that ONLY looks like this:

user.jsp
Code:

User Name: <%= userBean.getUserName() %>
User Password: <%= userBean.getUserPassword() %>

** Compiler errors

And that is it, that page is NOT a valid JSP page because you have not told the compiler where the "userBean" reference comes from, now if you had this:
variables.jsp
Code:

<% UserBean userBean = (UserBean)request.getAttribute("userBean"); %>

** VALID Page

Then that is a valid page since it can stand on its own... now if we include the variables.jsp page in the user.jsp page, the compiler errors should disappear:
user.jsp
Code:

<%@ include file="variables.jsp" %>
User Name: <%= userBean.getUserName() %>
User Password: <%= userBean.getUserPassword() %>

** VALID Page


But it is a good idea to name the "user.jsp" page "user.jspf" instead, since it will let the compiler know that this page *cannot* stand on its own as a valid JSP page.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
erouse
Post subject:   PostPosted: Nov 09, 2004 - 08:55 PM
Registered Member
Registered Member


Joined: Sep 14, 2004
Posts: 45

I turned off HTML validation and am still getting 'invalid tag location' messages, but they're warning again, not errors. I will play around with it for a few days and see if I can get it doing what I want. I tried changing one of the pages extension to jspf as a test and, if I turn off HTML validation, the warnings go away.

Is there a way to specify by file extension which validators are used? I would like the HTML syntax validation to be used for html pages but ignored for jsp and jspf pages.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Nov 09, 2004 - 09:09 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

Quote:
I turned off HTML validation and am still getting 'invalid tag location' messages,

These might be legit warnings... what does the exactly @taglib entry look like? What does your web.xml entry for it look like? This FAQ entry might help explain how URIs in the taglib entries work: http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-31.html#251

Quote:
Is there a way to specify by file extension which validators are used?

Not that I'm aware of, let me check on this.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
pstanton
Post subject:   PostPosted: Nov 10, 2004 - 01:08 AM
Registered Member
Registered Member


Joined: Nov 10, 2004
Posts: 75

MyEclipse jsp editor is telling me i have uncaught exceptions in jsps that were previously fine. The error shows up on the RHS of the page, but does not show up in the 'problems' pane or the file tree. Turning jsp validation on/off has no effect on this.

Also when I hit ctrl+space after typing a class name, the jsp editor replaces the name with the fully qualified name (ie: List -> java.util.List) instead of adding an import statement. This appears to be a regression.

Is there anyway to return to the old behaviour without uninstalling 3.8.2?
 
 View user's profile Send private message  
Reply with quote Back to top
pstanton
Post subject:   PostPosted: Nov 10, 2004 - 01:11 AM
Registered Member
Registered Member


Joined: Nov 10, 2004
Posts: 75

to clarify my versions

myeclipse..
Version: 3.7.200
Build Id: 200407091200-3.8-Beta2

eclipse..
Version: 3.0.0
Build id: 200406251208
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Nov 10, 2004 - 03:24 AM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

pstanton,
Please upgrade to MyEclipse 3.8.2 + QuickFix 2 before we continue, you are running a Beta of MyEclipse 3.8.0 and between the version you are running and MyEclipse 3.8.2 + QF2 there were probably 200+ bugs fixed and enhancements.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
pstanton
Post subject:   PostPosted: Nov 10, 2004 - 03:36 AM
Registered Member
Registered Member


Joined: Nov 10, 2004
Posts: 75

where do i find the quickfix? its not listed in the downloads
 
 View user's profile Send private message  
Reply with quote Back to top
pstanton
Post subject:   PostPosted: Nov 10, 2004 - 04:05 AM
Registered Member
Registered Member


Joined: Nov 10, 2004
Posts: 75

ok, i found and installed the quickfix. neither of the 2 problems aforementioned are fixed by this tho.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Nov 10, 2004 - 04:24 AM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

Quote:
where do i find the quickfix? its not listed in the downloads

Did you upgrade MyEclipse completely to 3.8.2 or just apply the quickfix ontop of your 3.8.0 Beta 2 install?

I know you started this thread saying you were running 3.8.2, but when you printed out your build information it made me realize we are probably dealing with a bad/old install of sorts more than a bug... can you grab your Build ID from the Windows > Prefrences > MyEclispe menu for MyEclipse and tell me what it is? (Don't use the Help > About menu, it doesn't show the quickfix version)

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
pstanton
Post subject:   PostPosted: Nov 10, 2004 - 04:41 AM
Registered Member
Registered Member


Joined: Nov 10, 2004
Posts: 75

i installed the quickfix over 3.8.2. i realised after posting the version info .. i was looking at the wrong computer!
 
 View user's profile Send private message  
Reply with quote Back to top
pstanton
Post subject:   PostPosted: Nov 10, 2004 - 04:42 AM
Registered Member
Registered Member


Joined: Nov 10, 2004
Posts: 75

the same symptoms are also occuring for another guy here with the same setup and he's not getting any love either (same probs as me)
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Nov 10, 2004 - 04:54 AM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

pstanton,
First please tell me what the line of code is that is causing the "uncaught exception" error.

Also the FQN issue is a regression that will be fixed in 3.8.3, sorry about the inconvenience.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits