0

i have
project folder name: website_test
package name: hello_servet
testing_01.java
web.xml
index.html

i need help with servlet name. i think iam names wrong. for ex is servlet-name the class name or project folder name??
web.xml file:

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

  <servlet>
    <servlet-name>website_test</servlet-name>
    <servlet-class>hello_servet.testing_01</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>website_test</servlet-name>
    <url-pattern>/website_test</url-pattern>
  </servlet-mapping>

</web-app>

Edited by happygeek: moved

2
Contributors
1
Reply
12
Views
4 Years
Discussion Span
Last Post by LastMitch
0

@hwoarang69

i need help with servlet name. i think iam names wrong. for ex is servlet-name the class name or project folder name??

This is your code:

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

<servlet>
<servlet-name>website_test</servlet-name>
<servlet-class>hello_servet.testing_01</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>website_test</servlet-name>
<url-pattern>/website_test</url-pattern>
</servlet-mapping>

You're missing some info here. How does the package controller looks like?

I mean you wrote this code.

In order to write it you have to look at your package controller code.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.