Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9299113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:29:04+00:00 2026-06-18T22:29:04+00:00

I know this question has been asked many many times but I can not

  • 0

I know this question has been asked many many times but I can not seem to find a solution.

I am receiving this error message: “The requested resource (/package/servlet/access) is not available.”

I have this web.xml file:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- Define CRM session timeout -->
<session-config>
<session-timeout>60</session-timeout>
</session-config>

<!-- Define servlet-mapped and path-mapped example filters -->
<filter>
    <filter-name>Servlet Mapped Filter</filter-name>
    <filter-class>Filters.ExampleFilter</filter-class>
<init-param>
    <param-name>attribute</param-name>
    <param-value>Filters.ExampleFilter.SERVLET_MAPPED</param-value>
</init-param>
</filter>
<filter>
    <filter-name>Path Mapped Filter</filter-name>
    <filter-class>Filters.ExampleFilter</filter-class>
<init-param>
    <param-name>attribute</param-name>
    <param-value>Filters.ExampleFilter.PATH_MAPPED</param-value>
</init-param>
</filter>
<filter>
    <filter-name>Request Dumper Filter</filter-name>
    <filter-class>Filters.RequestDumperFilter</filter-class>
</filter>

<!-- Example filter to set character encoding on each request -->
<filter>
    <filter-name>Set Character Encoding</filter-name>
    <filter-class>Filters.SetCharacterEncodingFilter</filter-class>
    <init-param>
        <param-name>encoding</param-name>
        <param-value>EUC_JP</param-value>
    </init-param>
</filter>

<filter>
    <filter-name>Compression Filter</filter-name>
    <filter-class>CompressionFilters.CompressionFilter</filter-class>

    <init-param>
      <param-name>compressionThreshold</param-name>
      <param-value>10</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>0</param-value>
    </init-param>
</filter>

<!-- Define filter mappings for the defined filters -->
<filter-mapping>
    <filter-name>Servlet Mapped Filter</filter-name>
<servlet-name>invoker</servlet-name>
</filter-mapping>
<filter-mapping>
    <filter-name>Path Mapped Filter</filter-name>
<url-pattern>/servlet/*</url-pattern>
</filter-mapping>


<!-- Example filter mapping to apply the "Set Character Encoding" filter
     to *all* requests processed by this web application -->
<!--
    <filter-mapping>
        <filter-name>Set Character Encoding</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
-->

<!--
    <filter-mapping>
      <filter-name>Compression Filter</filter-name>
      <url-pattern>/CompressionTest</url-pattern>
    </filter-mapping>
-->

<!--
    <filter-mapping>
        <filter-name>Request Dumper Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
-->

<!-- Define example application events listeners -->
<listener>
    <listener-class>Listeners.ContextListener</listener-class>
</listener>
<listener>
    <listener-class>Listeners.SessionListener</listener-class>
</listener>

<!-- Define servlets that are included in the example application -->
<servlet>
    <servlet-name>SendMailServlet</servlet-name>
    <servlet-class>SendMailServlet</servlet-class>
</servlet>

<servlet>
    <servlet-name>
        snoop
    </servlet-name>
    <servlet-class>
        SnoopServlet
    </servlet-class>
    <!--
        <init-param>
            <param-name>foo</param-name>
            <param-value>bar</param-value>
        </init-param>
    -->
    <run-as>
        <description>Security role for anonymous access</description>
        <role-name>tomcat</role-name>
    </run-as>
</servlet>

<servlet>
  <servlet-name>
      servletToJsp
  </servlet-name>
  <servlet-class>
      servletToJsp
  </servlet-class>
</servlet>
<servlet>
    <servlet-name>
        CompressionFilterTestServlet
    </servlet-name>
    <servlet-class>
        CompressionFilters.CompressionFilterTestServlet
    </servlet-class>
</servlet>

<servlet-mapping>
    <servlet-name>
        CompressionFilterTestServlet
    </servlet-name>
    <url-pattern>
        /CompressionTest
    </url-pattern>
</servlet-mapping>

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

<servlet-mapping>
    <servlet-name>
        snoop
    </servlet-name>
    <url-pattern>
        /snoop
    </url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>
        servletToJsp
    </servlet-name>
    <url-pattern>
        /servletToJsp
    </url-pattern>
</servlet-mapping>

<taglib>
    <taglib-uri>
   http://jakarta.apache.org/tomcat/debug-taglib
    </taglib-uri>
    <taglib-location>
       /WEB-INF/jsp/debug-taglib.tld
    </taglib-location>
</taglib>

<taglib>
    <taglib-uri>
   http://jakarta.apache.org/tomcat/examples-taglib
    </taglib-uri>
    <taglib-location>
       /WEB-INF/jsp/example-taglib.tld
    </taglib-location>
</taglib>

<resource-ref>
  <res-ref-name>mail/Session</res-ref-name>
  <res-type>javax.mail.Session</res-type>
  <res-auth>Container</res-auth>
</resource-ref>

<security-constraint>
  <display-name>Example Security Constraint</display-name>
  <web-resource-collection>
     <web-resource-name>Protected Area</web-resource-name>
 <!-- Define the context-relative URL(s) to be protected -->
     <url-pattern>/jsp/security/protected/*</url-pattern>
 <!-- If you list http methods, only those methods are protected -->
 <http-method>DELETE</http-method>
     <http-method>GET</http-method>
     <http-method>POST</http-method>
 <http-method>PUT</http-method>
  </web-resource-collection>
  <auth-constraint>
     <!-- Anyone with one of the listed roles may access this area -->
     <role-name>tomcat</role-name>
 <role-name>role1</role-name>
  </auth-constraint>
</security-constraint>

<!-- Default login configuration uses form-based authentication -->
<login-config>
  <auth-method>FORM</auth-method>
  <realm-name>Example Form-Based Authentication Area</realm-name>
  <form-login-config>
    <form-login-page>/jsp/security/protected/login.jsp</form-login-page>
    <form-error-page>/jsp/security/protected/error.jsp</form-error-page>
  </form-login-config>
</login-config>

<!-- Environment entry examples -->
<!--env-entry>
  <env-entry-description>
     The maximum number of tax exemptions allowed to be set.
  </env-entry-description>
  <env-entry-name>maxExemptions</env-entry-name>
  <env-entry-value>15</env-entry-value>
  <env-entry-type>java.lang.Integer</env-entry-type>
</env-entry-->
<env-entry>
  <env-entry-name>minExemptions</env-entry-name>
  <env-entry-value>1</env-entry-value>
  <env-entry-type>java.lang.Integer</env-entry-type>
</env-entry>
<env-entry>
  <env-entry-name>foo/name1</env-entry-name>
  <env-entry-value>value1</env-entry-value>
  <env-entry-type>java.lang.String</env-entry-type>
</env-entry>
<env-entry>
  <env-entry-name>foo/bar/name2</env-entry-name>
  <env-entry-value>true</env-entry-value>
  <env-entry-type>java.lang.Boolean</env-entry-type>
</env-entry>
<env-entry>
  <env-entry-name>name3</env-entry-name>
  <env-entry-value>1</env-entry-value>
  <env-entry-type>java.lang.Integer</env-entry-type>
</env-entry>
<env-entry>
  <env-entry-name>foo/name4</env-entry-name>
  <env-entry-value>10</env-entry-value>
  <env-entry-type>java.lang.Integer</env-entry-type>
</env-entry>

<!-- EJB Reference -->
<ejb-ref>
  <description>Example EJB Reference</description>
  <ejb-ref-name>ejb/Account</ejb-ref-name>
  <ejb-ref-type>Entity</ejb-ref-type>
  <home>com.mycompany.mypackage.AccountHome</home>
  <remote>com.mycompany.mypackage.Account</remote>
</ejb-ref>

<!-- Local EJB Reference -->
<ejb-local-ref>
  <description>Example Local EJB Reference</description>
  <ejb-ref-name>ejb/ProcessOrder</ejb-ref-name>
  <ejb-ref-type>Session</ejb-ref-type>
  <local-home>com.mycompany.mypackage.ProcessOrderHome</local-home>
  <local>com.mycompany.mypackage.ProcessOrder</local>
</ejb-local-ref>

The java file which is not being found is located in the Package.Servlets package in the sources folder in netbeans.

I am new to Tomcat Environment and would like to know needs to be done. I tried to check for usages from that class, but none could be found. Therefore I am assuming this is related to the web.xml settings.

EDIT: I have also checked the logs, there doesn’t seem to be any exceptions being raised.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T22:29:05+00:00Added an answer on June 18, 2026 at 10:29 pm

    The problem with the web.xml file that you provided is that there are no <servlet>s and <servlet-mapping>s defined. Tomcat needs all the servlets in your application defined in the web.xml file, plus the mappings in order to know which servlet to call when you open a URL.

    You can see an example of this in the webapps/examples/WEB-INF/web.xml file in your tomcat installation

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this question has been asked many times before but I can't find
I know this question has been asked many times on SO, but I can't
I know this question has been asked many times, but I have not been
I know this question has been asked 100x but I can't seem to find
I know this question has been asked many times, but I'm not able to
I know this question has been asked before numorous times but they seem to
Yes, I know this question has been asked before, but I can't find an
I know this question has been asked many times, but I couldn't manage to
I know this question has been asked and answered many times. But almost all
I know this question has been asked many times. But from what I read,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.