This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Depployed in ROOT but error in webapps  RSS feed

 
Mittal Vishal
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using usebean Action and deploying the project in Tomcat5.0/webapps/
it is giving an error called
"The value of usebean is invalid"

but when I am deploying the same in Tomcat5.0/ROOT/ it is working fine

Can anuone tell me why it is so
And how can we rectify the above mentioned problem
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please show :
1. Your useBean statement
2. The DOCTYPE of web.xml
 
Mittal Vishal
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the code for usebean Action

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<jsp:useBean id="user" class="UserInfo" scope="request">
<jsp:setProperty name="user" property="*" />
</jsp:useBean>
 
Mittal Vishal
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I forget to mention the doctype of web.xml

This is the doctype

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
class="UserInfo"


You should not use the default package for your classes. Put the bean in a package, recompile, restart Tomcat, and retry.

For example,
<jsp:useBean id="user" class="beans.UserInfo" scope="request">
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!