May 24, 2005 at 3:43 pm #230101
[ XP SP2, Eclipse 3.0.2, MyEclipse 4.0 M1 ]
For some reason, I’ve had a problem openning JSPs that have JSF taglibs.
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
This only happens if the file uses taglibs. If I have JSF tags without specifying the taglibs, it works fine. With the taglibs specified, however, Eclipse locks up. There wasn’t anything in the logs to help out, so I’m not sure what to think about this. The odd thing is that everything was working last week. I’m going to try to see if something changed on my network that might cause this. Does anything attempt to connect to the URLs? If so, that’s probably the issue. My anal network admins feel that no apps should connect to the internet except for web browsers. Damn annoying.
Anyway, I’m at a work stoppage with this, so I’d appreciate any and all help. Thanks!May 24, 2005 at 5:12 pm #230105
Try and restart Eclipse with -clean command line parameter, also try disconnecting your computer from the netwokr entirely, and then restarting MyEclipse and opening one of the files, did it work? ANything in the log file?May 25, 2005 at 9:17 am #230129
The -clean restart didn’t work, but opening the file w/o network connectivity did. Once connectivity was returned, tho, I couldn’t open the file again. Nothing was in the log, so I guess I’ll just open the file without connectivity and connect after the file’s open.
Can you think of any way to get around this? In the meanwhile, I’ll try to see if something’s changed with the network. Thanks!May 25, 2005 at 9:29 am #230132
Looks like I was wrong… I can’t even edit the file with connectivity. I have to be disconnected to work with the file in any capacity.May 25, 2005 at 9:45 am #230135
We will look into this, in the mean time do your admins block outgoing traffic?May 25, 2005 at 9:46 am #230137
Also try and open a file while connected to the network and see if you leave it alone for a minute (timeout) does the file eventually open?May 25, 2005 at 9:59 am #230140
Right now, I just commented those lines out so they’re ignored.
<!--%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %--> <!--%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %-->May 25, 2005 at 10:05 am #230142
Oh, and in response to your question about blocking traffic, yes they do (for non web browsers, last I heard). I’m going to try to talk them into openning it up for Eclipse, but no promises on that. They tend to be quite anal.May 25, 2005 at 10:42 am #230144
They tend to be quite anal.
That sounds like the understatement of the year =/May 25, 2005 at 2:21 pm #230158
No, there’s no timeout in effect. I let it sit for 30 minutes and it was still locked up.
I haven’t heard back from my network team, but I’m hoping I get somewhere with those guys.June 3, 2005 at 8:35 am #230587
Is there any work-around to this? I’m getting nowhere with my LAN guys. They’re ready to tell me that I can’t use the tool, honestly (that will never happen, tho – we have 30+ developers using Eclipse). I’m having to disconnect my LAN cable whenever I want to edit my JSF with code completion. Quite the annoyance.June 3, 2005 at 11:21 am #230598
Flanakin, I’m curious, do you have web.xml <taglib> entries explicitly mapping these URIs to local files in your WEB-INF directory? If you don’t, try and add that so the JSP editor will immediately resolve against the TLDs. This MIGHT still hit the net (Because of the Schema specified in the TLD) in which case you can go into the XML Catalog and add a new Entry mapping the URI of the Schema to a local file so instead of hitting the net to load it, it will use the XML Catalog (now that I think about it, this is what is happening I believe).
Keep in mind that there is a bug to doesn’t allow deleting XML Catalog User entries… so try and get it right on the first try, if not, just keep adding new ones 🙂June 3, 2005 at 11:36 am #230599
Hmm… This may actually be the problem. First off, where are the TLDs? I’m assuming they’re embedded in the JARs, but don’t have the time to look right now (on my way out of the office). If they aren’t added as part of the “Add JSF capabilities”, then I’ll go download them. Also, what web.xml file does this have to be in? I’m assuming the one that MyEclipse creates. Unfortunately, I have a different project setup and my web.xml file is in another place, so I deleted the one ME created. I’ll try to add the taglibs to both web.xml files to see if one or the other will fix the problem. Thanks for the ideas.June 3, 2005 at 11:47 am #230601
I’m assuming they’re embedded in the JARs, but don’t have the time to look right now (on my way out of the office)
If they aren’t added as part of the “Add JSF capabilities”, then I’ll go download them.
We don’t add them because you don’t need to, but in this case we need them, you can just rip them out of the jar.
Also, what web.xml file does this have to be in? I’m assuming the one that MyEclipse creates
There should be only one, in your WEB-INF folder. That’s the one your app server reads. Don’t forget, if you are using 2.4 web spec, your <taglib> entries need to be wrapped in a <jsp-config> tag.
Unfortunately, I have a different project setup and my web.xml file is in another place, so I deleted the one ME created.
Hmm… MyEclipse uses web.xml to resolve the taglibs IF availabe… you can TRY and skip all this TLD stuff and jump right to modifying the XML catalog, that might do the trick…June 6, 2005 at 9:36 am #230647
I know that there should only be one web.xml file, but I have a directory stucture not supported by MyEclipse. I can’t change it, or I would, but the second web.xml file, which is overridden by the build script, is the one ME puts there.
Well, I extracted the taglibs and added the taglib declarations in both of my web.xml files and it seems to have worked. Then, I commented it out of the ME web.xml file – still worked. I then renamed the ME web.xml file to see how it would react to it not being there – still worked. I finally deleted it, restarted Eclipse, opened the file and… still works! 🙂 I’m assuming that having the TLDs there is enough for it to work.
One note: loading the file takes a second or two but that’s quite tollerable considering what it was doing 🙂 Thanks for the help!!!
JSP Editor (with JSF taglibs)
- This topic has 15 replies, 2 voices, and was last updated 18 years, 6 months ago by .
Viewing 15 posts - 1 through 15 (of 16 total)
Viewing 15 posts - 1 through 15 (of 16 total)