java - How to configure the Project ( depends on maven/web.xml/servlet APi) AJAX call not to include the Project name in it? -


i trying deploy war in tomcat server, , using maven 2. project name "jira-synchronization". project simple ajax call , returns result display user. have 1 page( that's scope of project). how made ajax call , web.xml

$.getjson('/jira-synchronization/jirarequest','ok', function(jiradata)    <?xml version="1.0" encoding="utf-8"?><web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="webapp_id" version="3.0"> <display-name>jira-synchronization</display-name> <welcome-file-list>     <welcome-file>index.html</welcome-file>     <welcome-file>index.htm</welcome-file>     <welcome-file>index.jsp</welcome-file>     <welcome-file>default.html</welcome-file>     <welcome-file>default.htm</welcome-file>     <welcome-file>default.jsp</welcome-file> </welcome-file-list>  <servlet>     <servlet-name>jirasyncservlet</servlet-name>     <servlet-class>jirasyncservlet</servlet-class> </servlet> <servlet-mapping>     <servlet-name>jirasyncservlet</servlet-name>     <url-pattern>/jirarequest/*</url-pattern> </servlet-mapping> 

if notice ajax call taking project name( first felt weired why doing , move on project kept way) , every thing worked fine inside eclipse running tomcat(this url used when running eclipse http://localhost:8080/jira-synchronization/index.html).

when tried build using maven , deploy in tomcat(out side of eclipse) war made using name "jira-synchronization-0.0.1-snapshot. url has changed tohttp://localhost:8080/jira-synchronization-0.0.1-snapshot/index.html , ajax call have project name in need changed. how pom.xml looks like

enter image description here

how should configure web.xml or pom.xml ajax request excludes project name it?

what worked me in pom.xml added <finalname>jira-synchronization</finalname> under <build> tag , able output war desired name like


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -