This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
Hi, I have an application where I have the dojo plugin to use its autocompleter and datetimepicker tags. The application in localhost works fine but when I install it in a server it takes several minutes to load the forms with these tags. I've read some things about this but I don't know if what I've read it's from previous versions or if these issues in performance still happen. So I've read something about making the dojo plugin lighter deleting static and not use parts of the plugin but I don't know exactly what I can delete without making the plugin not work
Anyone could help me?
This is the code I'm using
Joined: Feb 24, 2010
I've found the application doesn't even want the <%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
I've tried deleting all my calls to dojo but it didn't work. I had to delete also the taglib to get it working
By the way, I'm using tomcat 6 for this. Is there any problem with it?
Juan Manuel wrote:I've found the application doesn't even want the <%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
I'm not sure what that means.
In any case, no, there are no Tomcat-specific problems. If it's fine locally but not on the server I'd start there--what's different with the server configuration? What's different with the Dojo you're serving?
All that said, there are reasons the Dojo tags were deprecated!
Have a look at our Enterprise Performance FAQ for how to track down bottlenecks. Remember if you have a small performance problem with your server, AJAX will multiply that problem because it's making numerous round trips to the server for a single page.
I was wrong about the taglib import. It's not that, it's the <sx:head />. When I put this in a page, without doing anything else about ajax (not calling a single <sx:> tag) it just doesn't run the page you are calling for. I don't know why is this but I guess the only thing I can do is rewrite my code because I'm running out of time and if the dojo plugin doesn't work just calling for it I have no other choice
By the way, I'm using struts 2.1.8, maybe that's the reason why dojo plugin doesn't work
"It just doesn't run the page" isn't enough to begin to be able to help. The plugin works; we're using it in production right now. We're going to *stop* using the plugin.
If you want any further assistance, you'll have to post more details.
Joined: Feb 24, 2010
The problem is that when you try to get to the page where I'm using dojo plugin, it just take, I don't know, 10 or 15 minutes to load it. If I remove the tag <sx:head /> from the head of the jsp, it loads correctly but without dojo capabilities. If I remove all <sx:...> tags from the jsp but still leave the <sx:head /> where it should be, the page still takes an eternity to load. The two tags I'm using rigth now are <sx:autocompleter> and <sx:datetimepicker>. The code I use for the datetimepicker is this
I'm using struts 2.1.8 and I've tried this in my computer and it works fine so I decided to put in a server to try it. In the server it works also fine if you access the application through it but if you access it through another computer it happens what I mentioned earlier
So, another question that I realize know of. This server uses a firewall and it has opened a port to get access to tomcat, configured also with this port. Is it possible that the firewall is doing something I don't know?I don't know about this stuff and I don't know of anything I can try something to be sure. I know if a computer in the intranet try to get to the application through an internal ip it works but if you try through the ip you have to use outside the intranet it doesn't work
Sure it's possible the firewall is doing something--it's impossible for me to know. The default Dojo build is relatively large--try using Firebug to time the page load to see where the time is going. Then start figuring out the actual path on the wire that files are being served from.
Any ideas as to what method is best? Either of these? None of these?