Page not found in new plugin

I am trying to create a new TC plugin.  I have followed several samples to structure my project using intelliJ and I believe I have done everything correctly but can't get my custom BuildTypeTab content to display.When I open a Build Configuratin in TC my CI Game tab shows no problem, but if I click on the tab I see nothing.  When I view the source I can see a long exception stack where all exceptions report File "/plugins/teamCityCiGame/configurationTab.jsp" not foundI have checked the contents of teamCityCiGame.jar inside teamCityCiGame.zip that Ant generates and configurationTab.jsp is in the server/buildServerResources folder where I expect it to be, but still not found.configurationTab.jsp is basically a copy of the page of the same name from samplePlugin in the TC dev package so don't think it is the file itself that is the problem.Any help in resolving this would be greatly appreciated.  Happy to share source code if that helps, nothing much in it at the moment.It's been a while since I did any Java programming and not an intelliJ expert either so probably something dumb I am doing.Mike Hanson
3 comments
Comment actions Permalink
Just remembered no need to share code as it is already available on GitHub at MikeHanson/TeamCityCiGame
0
Comment actions Permalink

When TeamCity unpacks the plugin it uses the name in the teamcity-plugin.xml file to create a directory under webapps/ROOT.war/plugins, this contains the buildServerResources. When you create the BuildTypeTab the path to the jsp is, I believe, relative to the tabCode, in your case 'teamCityCiGame' this is different from the name in the teamcity-plugin.xml. You could change the case of one of them, but a better approach is to add another parameter to your configurationTab class constructor, PluginDescriptor and pass in the path for the jsp to the super class by calling pluginDescriptor.getPluginResourcesPath("configurationTab.jsp").

Rod

0
Comment actions Permalink
Thanks Rod that was spot on.  I changed the case initially and that worked.  Your recommendation of a better approach was much cleaner so implemented that once I had it working.Can't believe I missed the casing in the XML file I must have scanned every file at least 5 times trying to find something like that and missed it every time.Thanks again.
0

Please sign in to leave a comment.