servlet

The simplest servlet.HTTP Status 404 error

Error 404 occurs. Previously, everything worked correctly. I tried different possible variations, used different tomcat, trie ... act is deployed successfully [2020-02-26 02:33:05,758] Artifact TestServlet:war exploded: Deploy took 578 milliseconds

How to implement ajax request with Servlet API and JSP?

I have a JSP page that looks like this I need to update the table when entering a search query or when selecting a sort. Wh ... ttps://...", "Price" : 125, "CurrSymb" : "$" }, ... } And then how to properly process it, I do not know.

does not process the servlet

I write my first servlet in Java EE, I use tomcat, for some reason my class is not processed, and it always outputs Here ... I'm confused that the search bar says http://localhost:8080/ee_war_exploded/ shouldn't it be http://localhost:8080/hallo ?

vaadin 8 bakery app login

I use vaadin 8 + tomcat 7. The vaadin website presents the bakery demo application. Specifically, I am interested in the log ... sible from the vaadin project to an additional servlet. In general, how to implement the same login as in the demo project?

Error in web.xml

In the web structure.xml has the following code. <servlet> <servlet-name>MyServlet</servlet-name> ... The reason is in mapping, if you start the server without the second definition of servlet-mapping, then everything is fine.

JavaEE out.println cannot resolve method

Started learning JavaEE. The project is built in IntelliJ IDEA on Maven, TomCat 9. Ideshka notes that it does not find the ... %> </p> <p> <% for (int i =0; i < 10; i++) { out.println(i); } %> </p>

Hosting Java Servlet on Apache Tomcat

The servlet uses JDBC. To make the servlet work, put the jar file with the driver in the folder WEB-INF/lib/. When running t ... c void main(String[] args) { Main m = Main.getInstance(); m.getItems().forEach(System.out::println) } }

Encoding in requests from Java

There are Tomcat 8 + servlets, IDE-Eclipse, OS-Debian 9. From the servlets, I send a GET request to the remote server (specif ... br.close(); } }catch (IOException e){ System.out.println("Ошибка"); } }

How do I send a post request to a servlet via javascript?

I am writing a web service interested in the following scenario. There is an html file with a table and a button. When you ... L); // ну или что там нужно вытащить httpReq("/admin", "POST", form, function(res) { console.log("response:", res); });

Where should the file for getClassLoader () be located.getResourceAsStream?

Hello. There was a need to put information about DB connections in a separate file. I tried to use this option, BUT I still ... asses/db.properties does not find it. I tried to specify an absolute path - the result is also negative. Where should it be?

StackOverflowError on jetty

I try to demonstrate it on my screen .jsp page. In response to my code, it crashes: Error for /java.lang.StackOverflowError. ... title> </head> <body> <p>Message: ${message}</p> </body> </html>

Sending an ajax post request to a servlet

I can't send the simplest request to the servlet using jQuery in any way. But at the same time, if I send it through the form ... help: I also experimented with ContentType, and either I didn't do it correctly, or nothing works either. Please help me!!!

How to programmatically display jsp

I use jetty. The task is to output jsp without using the web.xml, just through the code. How do I do this? Tried to use the code: request.getRequestDispatcher("webapp/index.jsp").forward(request, resp); But it knocks out StackOverflowError.

The essence of ServletContext

I understand the ServletContext, I understand the very essence, with this interface we can get data about the environment in which the servlet is running, but how to apply this data and where in practice, I do not understand who can explain it.

Search query for a part of a word

Hello everyone, such a question, there is a servlet in it such a search query: String query = "select * from clippersql.skis ... y by the full name of the field kiz, how do I make it so that it would search for, say, one letter or part of the field kiz?

java servlets. Choosing a DAO in runtime

There is a web application. When you log in, we get to the login page, we will omit the logic of the application itself. As ... d in-code initialization by a specific implementation: IUserDao userDao = new DatabaseUserDao(); That's not good Thanks!

How do I get an array of data from a java servlet in javascript code on a page?

Parsing the search box with autofill and faced with the question of how to transfer data from a servlet to an html page using ... work, I suspect that I'm passing the wrong data type or using the wrong method. tell me, in javascript still far away human.

How to ensure that a Servlet is deployed to Tomcat 7 using Servlet Container 3.0?

I am developing an application that uses the Servlet 3.0 API via annotations and porting does not need WEB-INF/web file.xml ... tterns Is this the right approach ? Any notes missing ? Do I need to use the javax.servlet.ServletRegistration Interface ?

Send login and password in JavaMail email

I am developing a web application using JSP and servlet and would like that when sending the email passes an image and the lo ... tem.out.println("Done"); } catch (MessagingException e) { throw new RuntimeException(e); } } }

Transfer files.class for folder / web-INF in Eclipse

I am developing a web project for a final college job. When creating files .jsp for the application, gives error because it ... , which is in 'Java Resources' and/or I have to transfer the location of the files .class for the folder / web-INF / classes.