- This topic has 15 replies, 2 voices, and was last updated 19 years, 4 months ago by Riyad Kalla.
-
AuthorPosts
-
Michael FlanakinMember[ 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!
Riyad KallaMemberTry 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?
Michael FlanakinMemberThe -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!
Michael FlanakinMemberLooks 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.
Riyad KallaMemberWe will look into this, in the mean time do your admins block outgoing traffic?
Riyad KallaMemberAlso 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?
Michael FlanakinMemberWill do.
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" %-->
Michael FlanakinMemberOh, 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.
Riyad KallaMemberThey tend to be quite anal.
That sounds like the understatement of the year =/
Michael FlanakinMemberNo, 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.
Michael FlanakinMemberIs 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.
Riyad KallaMemberFlanakin, 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 🙂
Michael FlanakinMemberHmm… 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.
Riyad KallaMemberI’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)
Yes exactly
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…
Michael FlanakinMemberI 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!!!
-
AuthorPosts