Thymeleaf login problem in weblogic server

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Thymeleaf login problem in weblogic server

nbia
Hi,




I have a login page with thymeleaf template, and everything is OK in local editor with tomcat server. But when I want to deploy it to a weblogic server, I can not log in the page. I look at weblogic logs and I see this error;


<nabble_embed>The exception "The request content-type is not a multipart/form-data" occurred when processing getParameter or getParameterValues from a multipart value of a ServletRequest.> The exception "The request content-type is not a multipart/form-data" occurred when processing getParameter or getParameterValues from a multipart value of a ServletRequest.> The exception "The request content-type is not a multipart/form-data" occurred when processing getParameter or getParameterValues from a multipart value of a ServletRequest.> </nabble_embed>

here is my login html.


<form class="col s12" action="#" th:action="@{/admin/login}" method="post">
            <div class="row">
                <div class="input-field col s6 offset-s3">
                    <input name="username" id="first_name" type="text" class="validate">
                    <label for="first_name">user:</label>
                </div>
            </div>

            <div class="row">
                <div class="input-field col s6 offset-s3">
                    <input name="password" id="password" type="password" class="validate">
                    <label for="password">pass:</label>
                </div>
            </div>
            <button class="btn waves-effect waves-light col s2 offset-s3 cyan" type="submit" name="action">
                login send
            </button>
        </form>



Why I can not login, could you help us?



Reply | Threaded
Open this post in threaded view
|

Re: Thymeleaf login problem in weblogic server

yvanavermaet
I'm not a backend developer, but it looks to me that you use getParameter or getParameterValues in your java code and that the weblogic server expects the form to have an attribute "enctype" with a value of "multipart/form-data".

You could probably fix it like that, but imo you need to look at the weblogic server, because you shouldn't add that attribute (read: the attribute shouldn't be there normally, so don't add it because of a "bug"/misconfiguration in your weblogic server.
Reply | Threaded
Open this post in threaded view
|

Re: Thymeleaf login problem in weblogic server

nbia
Hi,


I resolved the problem. It was about weblogic server, and I added this definition to weblogic.xml file. Now It works fine.


    <wls:session-descriptor>
        <wls:cookie-path>/myApplicationPath</wls:cookie-path>
    </wls:session-descriptor>