| |

VerySource

 Forgot password?
 Register
Search
View: 1835|Reply: 10

Why does tomcat not work

[Copy link]

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-3-6 12:30:01
| Show all posts |Read mode
After my tomcat upgrade, the jsp in the root directory can run normally, but the jsp running in other files prompts errors:

    The value for the useBean class attribute XXX is invalid! !! !!
    I put this jsp in the root directory and it works.
Reply

Use magic Report

0

Threads

9

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-5-23 02:00:02
| Show all posts
After you upgrade, there is no bean class file in the project.


Under WEB-INF / classes of your project, see if there is a class file of the bean you want to reference. If your bean has a package name, such as package test.fff; then WEB-INF / classes / test / should exist In a directory like fff, there is that class file in this directory.
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-5-23 22:00:01
| Show all posts
Class packages and classes are available. If you put this jsp file under the webapp / test / folder, it will not run normally. If you put it in the webapp / directory, you can run this jsp file:
  <jsp: useBean id = "test" class = "com.test.test.Test" scope = "request" />
  <%
   System.out.println ("asfasfsad");
  %>
  Put it in webapp / test / and throw an exception:
    The value for the useBean class attribute com.test.test.Test is invalid! ! !
Reply

Use magic Report

0

Threads

9

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 United States

Post time: 2020-5-25 16:30:01
| Show all posts
If you want to be under test, you need to create a WEB-INF folder and related directory structure under test.
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-6-6 19:45:01
| Show all posts
Maybe you haven't read what I mean. There are corresponding bean classes in the web-inf package. Put its jsp in the root directory of webapp can display normally, if put in webapp/test/ it will prompt:
   The value for the useBean class attribute com.test.test.Test is invalid! ! !
   Why can only the jsp placed in the root directory of the webapp access the response bean class?
Reply

Use magic Report

0

Threads

9

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-6-10 15:45:01
| Show all posts
I am dizzy, where is your WEB-INF?
Reply

Use magic Report

0

Threads

9

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-6-10 18:30:01
| Show all posts
Or go to your %TOMCAT_HOME%\conf\Catalina\localhost to see if the docBase specified in test.xml is correct.
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-6-11 16:00:01
| Show all posts
Thank you for your help, my web-inf is under webapp. in my
No XML file is written under %TOMCAT_HOME%\conf\Catalina\localhost.
Reply

Use magic Report

0

Threads

9

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-6-15 17:30:01
| Show all posts
My WEB-INF is under webapp


This way you can't find the class by putting jsp in the test directory
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-7-14 03:00:01
| Show all posts
Thank you, I found the reason myself. Server.xml is wrong.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list