daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Dec 7th, 2018 48 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3.          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5.     <modelVersion>4.0.0</modelVersion>
  6.  
  7.     <groupId>tests</groupId>
  8.     <artifactId>vktest2</artifactId>
  9.     <version>1.0-SNAPSHOT</version>
  10.  
  11.     <properties>
  12.         <maven.compiler.source>6</maven.compiler.source>
  13.         <maven.compiler.target>1.6</maven.compiler.target>
  14.     </properties>
  15.  
  16.  
  17.     <dependencies>
  18.         <dependency>
  19.             <groupId>com.vk.api</groupId>
  20.             <artifactId>sdk</artifactId>
  21.             <version>0.5.12</version>
  22.         </dependency>
  23.  
  24.  
  25.         <dependency>
  26.             <groupId>org.slf4j</groupId>
  27.             <artifactId>slf4j-jdk14</artifactId>
  28.             <version>1.7.22</version>
  29.         </dependency>
  30.  
  31.         <dependency>
  32.             <groupId>org.apache.logging.log4j</groupId>
  33.             <artifactId>log4j-slf4j-impl</artifactId>
  34.             <version>2.7</version>
  35.         </dependency>
  36.  
  37.         <dependency>
  38.             <groupId>org.apache.logging.log4j</groupId>
  39.             <artifactId>log4j-api</artifactId>
  40.             <version>2.7</version>
  41.         </dependency>
  42.         <dependency>
  43.             <groupId>org.apache.logging.log4j</groupId>
  44.             <artifactId>log4j-core</artifactId>
  45.             <version>2.7</version>
  46.         </dependency>
  47.         <dependency>
  48.             <groupId>org.apache.tomcat</groupId>
  49.             <artifactId>tomcat-servlet-api</artifactId>
  50.             <version>9.0.13</version>
  51.         </dependency>
  52.  
  53.  
  54.  
  55.     </dependencies>
  56.  
  57.  
  58. </project>
  59.    
  60. <?xml version="1.0" encoding="UTF-8"?>
  61.  
  62. <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
  63.   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  64.   xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
  65.                       http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
  66.   version="4.0"
  67.   metadata-complete="true">
  68.  
  69.   <display-name>test</display-name>
  70.   <description>
  71.   test
  72.   </description>
  73.  
  74. <servlet>  
  75.  
  76.     <servlet-name> privetstvie </servlet-name>
  77.     <servlet-class>testvk</servlet-class>
  78.  
  79.  
  80. </servlet>
  81.  
  82.  
  83. <servlet-mapping>
  84.  
  85. <servlet-name>privetstvie </servlet-name>
  86. <url-pattern>/hello</url-pattern>
  87.  
  88.  
  89. </servlet-mapping>
  90.  
  91.  
  92.  
  93. </web-app>
  94.    
  95. import com.vk.api.sdk.actions.Messages;
  96. import com.vk.api.sdk.actions.Users;
  97. import com.vk.api.sdk.client.TransportClient;
  98. import com.vk.api.sdk.client.VkApiClient;
  99. import com.vk.api.sdk.client.actors.GroupActor;
  100. import com.vk.api.sdk.exceptions.ApiException;
  101. import com.vk.api.sdk.exceptions.ClientException;
  102. import com.vk.api.sdk.httpclient.HttpTransportClient;
  103. import org.apache.http.protocol.HTTP;
  104.  
  105.  
  106. import javax.servlet.ServletException;
  107. import javax.servlet.http.HttpServlet;
  108. import javax.servlet.http.HttpServletRequest;
  109. import javax.servlet.http.HttpServletResponse;
  110. import java.io.IOException;
  111. import java.io.PrintStream;
  112. import java.io.PrintWriter;
  113.  
  114.  
  115. public class testvk extends HttpServlet  {
  116.     @Override
  117.     protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
  118.  
  119.         PrintWriter printWriter = resp.getWriter();
  120.         printWriter.write("test");
  121.         sendvk();
  122.  
  123.  
  124.  
  125.     }
  126.  
  127.  
  128.     public static void sendvk() {
  129.  
  130.            // тут код, который отправляет в лс сообщение
  131.  
  132.     }
  133.  
  134. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top