#Can't create a new servlet in my maven (webapp) project in Intellij IDEA

1 messages · Page 1 of 1 (latest)

kindred shell
#

hi, I'm learning Servlet and I can't create a new servlet in my maven (webapp) project in Intellij IDEA, please help me

inland pollenBOT
#

<@&987246527741304832> please have a look, thanks.

inland pollenBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

dreamy garden
#

Create a dependency in your nom.xml file under your java main in intellij
<project>javafx.servlet</project>
<artifact>javafx.servlet.api</artifact>
<version>1.3.0 </version>

  1. implement servlet class
    Public homepage extends HttpsServer{

@broken dome
protected void doGet{HttpRequest Request, HttpsResponse Response) throw HttpsException
IOException{
response.setContentType("text/html");
response.getHeader("<html><header><body>This is homepage</body></header></html>");
}
}

broken dome
#

damn