0

How do i enable webapp to be distributable in grails 3+ since there is no web.xml?

ujjwol shrestha
  • 145
  • 1
  • 12

1 Answers1

2

step 1: go to src\main\webapp\WEB-INF location. (if not, create the path)
step 2: create a folder WEB-INF
step 3: create a file web.xml and paste the following code

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
         metadata-complete="true"
         xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

    <distributable/>

</web-app>

step 4: generate war and deploy the war file on tomcat server.

Hope it will work

Vega
  • 27,856
  • 27
  • 95
  • 103
  • When deployed in a tomcat clustered environment it throws- java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute – dcdrns Aug 19 '23 at 01:23