Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The requested resource is not available in Netbeans

 
catrine ohm
Greenhorn
Posts: 13
IBM DB2 Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I have a web application.I have a problem about form action to Servlet.When I submit form I get this error:"The requested resource (/EventServlet) is not available ."My servlet name is: EventServlet.

web.xml


and my form.jsp code is:


My file manager is:
ROOT
|
|_public_html
|
|_cgi-bin
|_images
|_form.jsp
|_WEB-INF
|_web.xml
|_lib
|_classes
|_com
|_EventServlet.java

I researched this error and solution.But I can not find solution.I tried many solution but it does not work.What can I do?I am waiting your golden comments

 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whether your WEB-INF--->classes contains com.EventServlet.class?
 
catrine ohm
Greenhorn
Posts: 13
IBM DB2 Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

No, it does not contain EventServlet.class.Only EventServlet.java
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You must compile the servlet first. The .java file is useless for deployment.

Also see the ServletsFaq for more info.
 
catrine ohm
Greenhorn
Posts: 13
IBM DB2 Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I deployed project in NetBeans.Then I uploaded EventServlet.class in classes folder.But I get the same error. The requested resource (/EventServlet) is not available.How can I solve this Problem?What's wrong?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to configure things correctly in Netbeans. As that's an IDE issue, not a servlet issue, I've moved this to the IDEs forum.
 
catrine ohm
Greenhorn
Posts: 13
IBM DB2 Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hane developed project in Netbeans.Now I want to move project in server.I moved .jsp files, servlets.java, servlet.class and web.xml files.But I get error.Is it related Netbeans or server configuration?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic