- This topic has 10 replies, 2 voices, and was last updated 20 years, 1 month ago by rbhogal.
-
AuthorPosts
-
rbhogalMemberHello Support:
I have just installed MyEclipse 3.8.2 over Eclipse 3.0. The istall was successfull but I think that the project doers not know that it is a struts project, although I have gone to the right click menu abd selected My Eclipse and added struts capabilities.Please note that the project has existed for more then a year and I have just started working n it as a new Developer.
Also when I load a jsp page into the editor I find that the editor does not provide the intell-isense about the struts tags.
It does not detect syntax errors in tags and also does not offer the help.
I have used myeclipse before on a different project but the difference was that in that case I had created teh project using MyEclipse.
Thanks in advance
Rajeev
Riyad KallaMemberRajeev,
We need more information from you. What is the structure of the project? What does an example JSP page that you are editing look like? What <taglib> entries do you have in the web.xml file? What version of Struts is this? Where are the struts JARs located? Are they in your build path? What is your Project Root, WebRoot and Source directory all set to? Do you have validation turned on? Do you have javac.exe in your system PATH? (open up a console and type “javac.exe”, do you get any reply or “Bad command or file name”?).
rbhogalMemberRiyad,
Answering your last question first, I have javac in the PATH.
IN order to make it more compliant and consistent with what My Eclipse expects, I went and deleted all the files from our current existing project and created a brand new project in the workspace called nsr , the web.xml file was created by MyEclipse and I added struts capability to it using teh Right Click Menu provided for that.
For this new Project struts config and web.xml was vreated by MYEclipse and jars added by My EClipse.
Instead of your WebRoot Default I used ApplicationRoots as that is how it is set in our project which I will ultimately have to import.Also instead of src for source I used WEB-INF/classes as for some reason the source files are placed in this directory as well.
I created a JSP using create New JSP option and added the taglibs declaration as under :
<%@ taglib uri=”/WEB-INF/struts-html.tld” prefix=”html” %>
<%@ taglib uri=”/WEB-INF/struts-logic.tld” prefix=”logic” %>
<%@ taglib uri=”/WEB-INF/struts-bean.tld” prefix=”bean” %>I still can not have the JSP Editor provide the JSP Intellisense.
Regarding your question if I have validation turned on. I don’t know how to turn it on.
ThanksRajeev
rbhogalMemberRiyad,
If I type <html:form/> and leave it like that the editor does find an error and tells me that a mandatory attribute is missing but it does not provide any completion and coloring of the tags. Also it does not even color and provide help for completion of html tags. I have used MYEclipse before an dit was very smart and helped with both html and jsp struts tags.
Riyad KallaMemberThose URIs are most likely invalid, please read this entry to better understand how URIs work for taglibs: http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-31.html#251
You can turn on validation globallly via the Window > Prefs > MyEclipse > Validation menu, or per-project via the Project Properties > MyEclipse-Validation preferences.
rbhogalMemberRiyad:
I looked at the post that you pointed to:
According to that if we had the following in web.xml
<taglib>
<taglib-uri>/tags/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
and following in jsp it should work:
<%@ taglib uri=”/WEB-INF/struts-html.tld” prefix=”html” %>
<%@ taglib uri=”/WEB-INF/struts-logic.tld” prefix=”logic” %>
<%@ taglib uri=”/WEB-INF/struts-bean.tld” prefix=”bean” %>however it does not, but there must be something else also wrong there as it still does not provide the intellisense for plain simple html.
Thanks
Rajeev
rbhogalMemberIf I create an HTML file (not jsp) it does provide the completion support for html tags but does not provide completion support for HTML in JSP. Does not provide the completion support for Struts Tags either , as I stated before. However it does provide the error message if a required atribute is missing.
Thanks
Rajeev
Riyad KallaMemberAre you sure you are opening the JSP pages with your editor? (right click > open with > MyEclipse JSP Editor)?
rbhogalMemberHi Riyad,
You are right It was using Java Editor as default for JSP Pages.
I remember that in my last assignment I did not have to do any file association for JSP Editor. It always aopened .jsp with Eclipse Editor. How can I set this file association so that it always opens .jsps with JSP Editor
Thanks in advance,Rajeev
Riyad KallaMemberSo now things are working?
rbhogalMemberOK Riyad
I got it , it is at the workbench level that you associate file extensions with the editors.I have set it and now it works.
Kind of strange it used to do it itself. May be I had opened a JSP file before installing MY Eclipse and it remembered the old preference.Thanks for your help
-
AuthorPosts