Posts

Showing posts from September, 2016

spring 4.2.x with cross domain profile

1.what i need write cross domain profile in my java server with spring. 2.how after spring web 4.2.2,can simple write below code in spring-mvc.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xmlns:mvc="http://www.springframework.org/schema/mvc"   xsi:schemaLocation="http://www.springframework.org/schema/beans     http://www.springframework.org/schema/beans/spring-beans-4.1.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd>       <!-- other code -->      <mvc:cors> <mvc:mapping path="/**" allowed-origins="*" allowed-methods="*" allowed-headers="*" exposed-headers="X-Requested-With, X-PKRSS-Toke...

tomcat manager with eclipse maven deploy profile

1. what my java web server is tomcat 9 m9,with tomcat manager,i can deploy web app war with eclipse maven menu,or by tomcat manager web,or by script. 2. how 2.1 install tomcat 9 # yum install -y java wget # mkdir ~/download # cd ~/download # wget -c http://mirrors.cnnic.cn/apache/tomcat/tomcat-9/v9.0.0.M9/bin/apache-tomcat-9.0.0.M9.tar.gz # tar -zxvf apache-tomcat-9.0.0.M9.tar.gz # mv apache-tomcat-9.0.0.M9 /usr/local/tomcat9 # vi /etc/profile export TOMCAT_HOME=/usr/local/tomcat9 export CATALINA_HOME=/usr/local/tomcat9 # source /etc/profile (6) # vi /usr/local/tomcat9/conf/tomcat-users.xml <role rolename="tomcat"/> <role rolename="manager-script"/> <user username="manager" password="123456" roles="manager-gui"/> <user username="script" password="123456" roles="manager-script"/> # mkdir -p /usr/local/tomcat9/conf/Catalina/localhost/ # vi /usr/local/to...