• Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaBean .. package does not exist  RSS feed

hesham katon
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone
I am not sure is it the right place to ask about simple JavaBean or not , so please execuse me if this is not the exact right place

I hava a jsp page with a simple form :

the target of this form is : q2_body.jsp
which is another simple jsp page that use a JavaBean
at the top of this page(q2_body.jsp) i have added these 3 lines :

<%@ page import="org.wantech.beans.NetworkBean" %>
<jsp:useBean id="network" class="NetworkBean" scope="session" />
<jsp:setProperty name="address" property="*" />

this is the NetworkBean :

package org.wantech.beans;

public class NetworkBean
private String name;
private String company;
private String position;
private String address;
private String telephone;
private String ifOtherBranches;
private String alexBranches;
private String outBranches;

public void setName(String name){this.name = name;}
public void setCompany(String company){this.company = company;}
public void setPosition(String position){this.position = position;}
public void setAddress(String address){this.address = address;}
public void setTelephone(String telephone){this.telephone = telephone;}
public void setIfOtherBranches(String ifOtherBranches){this.ifOtherBranches = ifOtherBranches;}
public void setAlexBranches(String alexBranches){this.alexBranches = alexBranches;}
public void setOutBranches(String outBranches){this.outBranches = outBranches;}

public String getName() { return this.name; }
public String getCompany() { return this.company; }
public String getPosition() { return this.position; }
public String getAddress() { return this.address; }
public String getTelephone() { return this.telephone; }
public String getIfOtherBranches() { return this.ifOtherBranches; }
public String getAlexBranches() { return this.alexBranches; }
public String getOutBranches() { return this.outBranches; }


and i have added this package org.wantech.beans directly under WEB-INF/

but as you can see when i click on : Next
i have this error :
package org.wantech.beans does not exist

i don't know how it's not existed ?
should i place it anywhere else ?

can any one help me about this ?
Thank you in advance
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you must add your class into WEB-INF/classes directory.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!