Hi I'm trying to further develop my stash page. In my stash page i have created a web panel item. when i click on that item i want to link it into another page. Right now when i try to link it i either get a 404 error or 500 error. What is the general steps to linking to another page?
In my web item in atlassian-plugin, i have a plugins/servlet link linking to a page(which i'm trying to link to). Also in my servlet section i'm linking to same page. What are the steps to linking a web panel to a completely new page.
Thanks
EDIT
Thanks for the reply, but i'm still getting a 404 error. Here is my code so far.
<servlet name= "Report" i18n-name-key= "report.name" key= "report" class = "com.atlassian.stash.plugin.servlet.Report" > <description key= "report.description" >The Report</description> <!--<url-pattern>report</url-pattern>--> <url-pattern>/report/*</url-pattern> </servlet> |
<web-item key= "report-plugin-tab" name= "Report Plugin tab" il8n-name-key= "report.name" section= "atl.admin/admin-settings-section" weight= "100" > <label>Report Plugin</label> <link linkId= "report-page-link" >/plugins/servlet/report/*</link> <!--<link>/plugins/servlet/example/admin/report</link>--> <tooltip>Hooray, this is the report tab</tooltip> </web-item> |
Still gettin 404 error, i wan this to just open a new page so i can post information about repos, and projects on that page.
Community moderators have prevented the ability to post new answers.
I think it's something wrong with the <link> element in the <web-item>. I think the servlet should allow for a dynamic path because it pulls information from the URL, but the link to the servlet should be static. I'm not 100% sure, but I'd try something like <link>/plugins/servlet/report</link>. Thinking about it, a 404 error is a "not found" error, so I'd imagine it to be a problem with where you're pointing to.
This is in my atlassian-plugin.xml file:
<servlet name="Anthill Build Integration" i18n-name-key="anthill-build-integration.name" key="anthill-build-integration" class="org.lds.alm.servlet.AnthillBuildIntegration"> <description key="anthill-build-integration.description">The Anthill Build Integration Plugin</description> <url-pattern>/anthillbuildintegration/*</url-pattern> </servlet> <!-- Link to servlet via web-item --> <web-item name="ServletLink" i18n-name-key="servlet-link.name" key="servlet-link" section="stash.repository.settings.panel/repository-settings-section" weight="1000"> <description key="servlet-link.description">The ServletLink Plugin</description> <label key="servlet-link.label"></label> <link linkId="servlet-link-link"> /plugins/servlet/anthillbuildintegration/${repository.project.key}/${repository.slug}/settings </link> <!-- The important part here is the link, it needs to be "/plugins/servlet/<servlet "url-pattern">" The rest of the url is for ease of access and to make less confusing --> </web-item>
It might help...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply, but i'm still getting a 404 error. Here is my code so far. <servlet name="Report" i18n-name-key="report.name" key="report" class="com.atlassian.stash.plugin.servlet.Report"> <description key="report.description">The Report</description> <!--<url-pattern>report</url-pattern>--> <url-pattern>/report/*</url-pattern> </servlet> <web-item key="report-plugin-tab" name="Report Plugin tab" il8n-name-key="report.name" section="atl.admin/admin-settings-section" weight="100"> <label>Report Plugin</label> <link linkId="report-page-link">/plugins/servlet/report/*</link> <!--<link>/plugins/servlet/example/admin/report</link>--> <tooltip>Hooray, this is the report tab</tooltip> </web-item> Still gettin 404 error, i wan this to just open a new page so i can post information about repos, and projects on that page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.