- This topic has 14 replies, 3 voices, and was last updated 20 years, 1 month ago by
Riyad Kalla.
-
AuthorPosts
-
vtattaMemberI created a test web-app using the wizard. During the process it asks for the jstl version to include and I choose 1.0. After creating a JSP (using struts 1.1 template) I am not able to get the context sensitive assist? I see that under the web-inf all the jstl core tld’s are listed but nothing concerned to struts tld’s are in that list. How do I add them and how can I get the context assist to work.
using Eclipse 3.0.1. myEclipse 3.8.4
thanks.
April 22, 2005 at 11:57 am #228588
Riyad KallaMemberRight click on your project root, MyEclipse > Add Struts Capabilities.
It wouldn’t hurt to run through this either: http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/struts/index.html
April 22, 2005 at 12:33 pm #228604
vtattaMemberthanks so much. I followed the link that you ‘ve provided to create an example app. However I still have a problem with adding html-el tld and context assist of jstl core. More so how do I add another tld. If there is a jar I have to add it through Build java –> libraries etc etc.
After doin that all the jar files show directly under my project and the IDE gets a bit clumsy. Is there a way to hide them?
If I switch to Resource perspective it does hide the infomation is that a way to do it?April 22, 2005 at 12:37 pm #228605
Riyad KallaMemberAfter doin that all the jar files show directly under my project and the IDE gets a bit clumsy. Is there a way to hide them?
This is default Eclipse behiavor for package view, you can hide these by clicking the down arrow in the top right corner, going to Filters… and filling out the top filter to *.jar.
If I switch to Resource perspective it does hide the infomation is that a way to do it?
No, stay in Packaged View, I know it’s strange, I didn’t like it either at first, but most all of the Java functionality is exposed through the Package view like refactoring as such, so just learn to love it 😀
April 22, 2005 at 12:46 pm #228606
vtattaMemberso just learn to love it 😀
already beginning to.
I think you missed this but again how do I add my own tag Lib. I could add the jar file but how about the tld?
and I have jstl core 1.1 and 1.0 but context assist with core tags still does not work?thanks
April 22, 2005 at 3:14 pm #228617
vtattaMemberfigured it out.
had to add tld to the web-inf and jar file on the class path and the correct URI in the jsp while importing a taglib.
April 22, 2005 at 6:45 pm #228627
Riyad KallaMemberNice catch, sorry I missed that question originally.
May 2, 2005 at 1:11 pm #228966
toryMemberI am running myEclipse 3.8.4 on a Windows 2000 machine, with Java j2sdk1.4.2_05 installed. When I use myEclipses refactor tool to change the name of a .jsp file, the java content assist ceases to function. Here is an example of what happens: I create a project. I declare a .java class under the ‘src’ folder, inside a package. I then create a .jsp under the ‘webroot’ folder. The .jsp imports the .java class. Inside the ‘<% %>’ tags I say something like ‘some.imported.package.class myClass = new some.imported.package.class();’ (where some.imported.package.class is the actual name of the class) then type ‘myClass.’ and after I type the period the content assist displays the various methods inside the imported class. Now if I use the refactor tool to change the name of the .jsp, and go back to the .jsp and type ‘myClass.’, after I type the period and press ctrl+space, the message I get is “Java Content Assist is not available for the current cursor location.” I am working in a commercial environment, and the company has licenses for myEclipse. Help with this problem would be greatly appreciated.
Thanks,
ToryMay 2, 2005 at 4:25 pm #228974
Riyad KallaMemberTory,
Have you tried closing and reopening the file? What about rebuilding the project?May 3, 2005 at 5:34 pm #229042
toryMemberRiyad,
I have rebuilt the project by going to ‘Project’, then ‘Clean’ in myEclipses menu system. After rebuilding the project, the problem persists. We are using the ‘CVS’ feature in myEclipse, would this affect anything?-Tory
May 3, 2005 at 6:17 pm #229046
Riyad KallaMemberTory,
I was unable to reproduce this, here is my setup, let’s compare notes:Setup
Windows XP Pro, SP2
JDK 1.4.2_07
Eclipse 3.0.2 SDK
MyEclipse 3.8.4 GA for Eclipse 3.0.xSteps
1) Create new Web Project
2) Create new JSP Page, MyJsp.jsp
3) Create new class TestClass in the com.test package:package com.test; public class TestClass { private String name = null; private String password = null; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
4) Use the following JSP contents:
<%@ page language="java" %> <%@ page import="com.test.TestClass" %> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; TestClass testClass = new TestClass(); testClass.setName("Bob"); testClass.setPassword("password"); %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body> Welcome <%= testClass.getName() %>, your password is "<%= testClass.getPassword() %>". </body> </html>
**NOTE: Autocomplete for getName and getPassword work fine
5) With the files still open, I refactored the name of MyJsp.jsp to index.jsp
6) Then I added a new line after the previous autocompleted line of code, like so:<%@ page language="java" %> <%@ page import="com.test.TestClass" %> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; TestClass testClass = new TestClass(); testClass.setName("Bob"); testClass.setPassword("password"); %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body> Welcome <%= testClass.getName() %>, your password is "<%= testClass.getPassword() %>". After refactoring, your name is: <%= testClass.getName() %> </body> </html>
**NOTE: Autocompletion of both getName and getPassword still worked on that new line of code.
You aren’t using the 3.1M6 release and the beta release of MyEclipse are you? This might have something to do with it.
May 4, 2005 at 12:58 pm #229091
toryMemberRiyad,
I have gone as far as uninstalling and re-installing both eclipse and myeclipse. I installed eclipse 3.0.1 and myEclipse 3.4.8. After installing these components, I imported the project from the CVS server. Now the Content Assist feature doesn’t work in any of the original .jsps.Tory
May 4, 2005 at 1:06 pm #229092
toryMemberMyEclipse IS looking to the correct jdk, so that shouldn’t be it. Would the fact that we are using CVS have any effect on things?
-Tory
May 4, 2005 at 1:08 pm #229093
Riyad KallaMemberTory,
Please keep in mind that JSP autocomplete is not going to work with Java Projects, these must be Web Projects. Additionally here is a pristine, preinstalled version of Eclipse 3.0.2 SDK and MyEclipse 3.8.4 that you can quickly download and unzip to C:\ and start using, this is sort of a “best case install”, meaning if you have something wrong with this setup, then the issue lies elsewhere: http://www.kallasoft.com/myeclipse/myeclipse_3.8.4.zipMay 4, 2005 at 1:08 pm #229094
Riyad KallaMemberMyEclipse IS looking to the correct jdk, so that shouldn’t be it. Would the fact that we are using CVS have any effect on things?
No, everyone here uses CVS, I use CVS with all my work, etc. The two do not conflict, if they did, we would notice it right away 🙂
-
AuthorPosts