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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,552,691
Community Members
 
Community Events
184
Community Groups

How can I map the url of my web item to a servlet

JK
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 23, 2023

I am trying to create a jira plug in so for that i created a web item in required place and now iam not able to map the url while clicking the web item to the servlet, I tried changing the web.XML of the plug in but it's not working do i want to make any change in web. XML of Tomcat 

1 answer

0 votes
Graham Twine
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.
May 29, 2023

Hello @JK 

 

There is no need to change the tomcat web.xml file for a Jira plugin.

This is configured in the plugin.xml

 

Your web item xml may look like this. All it contains is a link in the UI, admin panel etc.

The link element has a url in there that will be invoked when it is clicked

 
<web-item key="${atlassian.plugin.key}-EventListenerMenuItem"
name="Admin Menu : Event Listener Configuration Menu Link"
section="admin_plugins_menu/${atlassian.plugin.key}-AdminMenu"
weight="131"
application="jira">
<description>Event Listener Configuration</description>
<label key="el.admin.label" />
<link linkId="${atlassian.plugin.key}-EventListenerAdminLink">
/plugins/servlet/eventlistener/admin
</link>
</web-item

 

An additional element to listen for the request.

<!-- Configuration Servlet -->

<servlet key="${atlassian.plugin.key}-EventListenerAdminConfig"
name="Event Listener : Configuration"
class="za.co.liquidesign.jira.admin.events.EventListenerAdmin">
<url-pattern>/eventlistener/admin</url-pattern>
</servlet>

 

The class referenced in the servlet element

public class EventListenerAdmin extends HttpServlet {
@ @Override
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {

}
}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events