Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Link to new page

Joshua McNeil August 26, 2015

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. 

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Josh Wheeler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 27, 2015

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.

0 votes
Josh Wheeler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 27, 2015

This is in my atlassian-plugin.xml file:

&lt;servlet name="Anthill Build Integration" i18n-name-key="anthill-build-integration.name"
         key="anthill-build-integration" class="org.lds.alm.servlet.AnthillBuildIntegration"&gt;
    &lt;description key="anthill-build-integration.description"&gt;The Anthill Build Integration Plugin&lt;/description&gt;
    &lt;url-pattern&gt;/anthillbuildintegration/*&lt;/url-pattern&gt;
&lt;/servlet&gt;
&lt;!-- Link to servlet via web-item --&gt;
&lt;web-item name="ServletLink" i18n-name-key="servlet-link.name" key="servlet-link"
          section="stash.repository.settings.panel/repository-settings-section" weight="1000"&gt;
    &lt;description key="servlet-link.description"&gt;The ServletLink Plugin&lt;/description&gt;
    &lt;label key="servlet-link.label"&gt;&lt;/label&gt;
    &lt;link linkId="servlet-link-link"&gt;
        /plugins/servlet/anthillbuildintegration/${repository.project.key}/${repository.slug}/settings
    &lt;/link&gt;
    &lt;!-- The important part here is the link, it needs to be "/plugins/servlet/&lt;servlet "url-pattern"&gt;" The rest of the url is for ease of access and to make less confusing --&gt;
&lt;/web-item&gt;

It might help...

Joshua McNeil August 27, 2015

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.

TAGS
AUG Leaders

Atlassian Community Events