- This topic has 5 replies, 3 voices, and was last updated 19 years, 11 months ago by
Riyad Kalla.
-
AuthorPosts
-
rogue_devMemberWe structure our JSP page includes and imports.
Each Use Case JSP page includes a setup.jsp file. This file contains all the standard imports for the project as well as extracting common objects from the session.
There is a common header.jsp which contains the required HTML tags to set up a page, sets up the meta information, does the banner and titles, etc.
There is a common footer which closes the body tag and includes some comments.
So a Use Case page will look like:
-include the setup jsp
-import the use case package
-setup the page title
-include the header
-fill in the content (editing, reports, …)
-possibly include a utility JSP (shows common row info for instance)
-include the footerThis type of sturcture allows quick creation of new use case JSP’s. However the MyEclipse editor shows a lot of errors when editing the header, footer, etc. Since the header does not include the setup.jsp, there is no direct path to the imports.
As a WHOLE, all the parts fit together.
Is there any way you could keep a map of JSP includes and imports, so that I do not see false errors? Right now I have all error reporting turned off, as it contains so many, that I cannot find the needles for the hay.
Riyad KallaMemberrogue,
These “partial” files are the exact definition of “JSP Fragments” or “JSP Segments” per the JSP spec from Sun, they suggest to name them with the “jspf” extension instead of “jsp”, MyEclipse honors this naming convention as well as it will stop trying to treat the pages as full valid JSP pages and instead will recognize that they are parts of a whole page instead.
Edward KunsParticipant@support-rkalla wrote:
rogue,
These “partial” files are the exact definition of “JSP Fragments” or “JSP Segments” per the JSP spec from Sun, they suggest to name them with the “jspf” extension instead of “jsp”, MyEclipse honors this naming convention as well as it will stop trying to treat the pages as full valid JSP pages and instead will recognize that they are parts of a whole page instead.When I take my JSP fragements and rename them JSPF, MyEclipse still complains that script and link tags are in an invalid location. Am I doing something wrong? Also, I have to change all the jsp:include into something different. (I haven’t tried c:import … I will try that, but it won’t change the MyEclipse validation complaints.)
Is this expected on the most recent version of MyEclipse with Eclipse 3.1M7?
Riyad KallaMemberIf you navigate to your project settings > Validation and turn off HTML validation, hit OK then right click on project root and go to MyEclipse > Remove error markers and rebuild the project, do the errors go away? The HTML validator shouldn’t be trying to validate your fragments, this is odd… (please turn HTML validation back on if you need it, we ship it off by default since it is 4.01 strict and many people feel it is too pedantic).
Edward KunsParticipant@support-rkalla wrote:
If you navigate to your project settings > Validation and turn off HTML validation, hit OK then right click on project root and go to MyEclipse > Remove error markers and rebuild the project, do the errors go away?
Yes, if I do the above the errors go away. However, if I right click on a file in an editor and use that menu to remove error markers, the markers in that file do not go away. Using Project -> Clean also does not get rid of all of the markers (and maybe does not get rid of any). From your description above, I now know a functioning way to remove all of the markers. I’ve been stopping Eclipse, manually going to the markers file and deleting it, then restarting Eclipse.
This could be a Eclipse 3.1M7 / MyEclipse 3.8.4+QF2-BetaFor3.1M7 issue, because since using this combo my error descriptions in the “Problems” view disappear after a while. The problems are still listed, but with a blank description. I was previously using Eclipse 3.0.1 without MyEclipse. Since MyEclipse was replacing so many of my plugins, I went for a fresh install, so went with the latest supported Eclipse version.
It now looks like when (within Eclipse) I copied the JSP file into a new file and named it JSPF, the error markers were copied with the file.
I imagine this is the kind of thing that will be OK once Eclipse 3.1 has settled on a stable API. (Don’t you love moving targets? 🙂
Thanks for your reply.
Riyad KallaMemberI imagine this is the kind of thing that will be OK once Eclipse 3.1 has settled on a stable API. (Don’t you love moving targets? 🙂
Ha, I think you nailed it on the head that this is likely an M7 specific issue. We don’t see this in 3.0.2 + 3.8.4 which is our supported stable release. We will be making a release of 4.0 M2 soon on Eclipse 3.1RC1 assuming you need to stay on the Eclipse 3.1 platform, that should help stabalize things as we squashed about 8 3.1 specific bugs since M7 in this upcomming release (about 2 weeks away).
-
AuthorPosts