Here is a full example given here: https://github.com/GoogleCloudPlatform/getting-started-java/tree/master/appengine-standard-java8/helloworld
Running procedure is also attached.
For Gradle Users:
For non-maven users, you can use gradle.
In gradle build file, line number 39 denotes: https://github.com/GoogleCloudPlatform/getting-started-java/blob/master/appengine-standard-java8/helloworld/build.gradle#L39
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
Running locally:
gradle appengineRun
If you do not have gradle installed, you can run using ./gradlew appengineRun.
To use visit: http://localhost:8080/
For Maven Users
In pom.xml, line number 62 to 70 denotes that it is using servlet version 3.1.0: https://github.com/GoogleCloudPlatform/getting-started-java/blob/master/appengine-standard-java8/helloworld/pom.xml#L66
<!-- [START servlet] -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<!-- [END servlet] -->
Resource Link: https://stackoverflow.com/a/44901461/2293534
No comments:
Post a Comment