This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes running a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "running a servlet " Watch "running a servlet " New topic
Author

running a servlet

adwin berkowits
Greenhorn

Joined: Feb 23, 2012
Posts: 6
fail in running a servlet
i get error messages:

package javax.servlet does not exist

package javax.servlet.http does not exist

i found general servlet jar at:
C:\Program Files\NetBeans 7.1\ide\modules\locale
C:\Program Files\NetBeans 7.1\ide\modules\ext
C:\Program Files\NetBeans 7.1\ide\modules
C:\Program Files\NetBeans 7.1\ide\update_tracking
C:\Program Files\NetBeans 7.1\ide\config\Modules

were in the netbeans i write the class or jar path to enable compilation
and were do i get the missing packages
tried to launch a resin server but the setup file makes an error
may be there is the other way to download other server than resin and run the servlet without the need to fetch the missing packages
Vicky Vijay
Ranch Hand

Joined: Apr 23, 2008
Posts: 125
Hi,

Refer the below link

http://briggs.myweb.port.ac.uk/WEBP/notes/tools/nbservlets.htm

http://www.java-tips.org/java-tutorials/tutorials/introduction-to-java-servlets-with-netbeans.html


adwin berkowits
Greenhorn

Joined: Feb 23, 2012
Posts: 6
"If you don't have any Tomcat available, you need to go back and reinstall NetBeans"

1. system windows xp home edition fail to uninstall netbean. i have 7.1 netbeans so i cant install tomcat
2. i downloaded tomcat on a separate directory but i cant run it all the bat files open a console that is being shut down immediatly
3. the categories "Java Web" and project "Web Application doesnt appear
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5811
    
    7

1) Why can't you uninstall NetBeans? What error do you get? There are free products that can help uninstall things, search for windows uninstallers

2) That is the way the Tomcat startup.bat file works - it calls another bat file to do the work and then exits. It is the other bat file that really runs Tomcat. You should be able to access Tomcat at http://localhost:8080.

And another though on that. Given your description, you are double-clicking startup.bat in Explorer. Don't! Instead, open a command prompt , cd to the Tomcat bin directory, and enter "startup" there. Then if there are issues such as an improper JAVA_HOME setting, you'll find out about it.

Also, if you don't want startup.bat to exit, you can start Tomcat as:



3) Sounds like you did not install the NetBeans package that has Java EE support.

And finally: you need to read your private messages and take care of that administrative matter. It is not optional.


JBoss In Action
adwin berkowits
Greenhorn

Joined: Feb 23, 2012
Posts: 6
succeede to uninstall netbeans and install the proper one
after making the new project i have index.jsp file with hello world i have a certain servlet which suppose to work
without the need to use jsp
how can i replace the index.jsp with it the instructions you had given me :

Creating a new servlet
The easiest way to create a new servlet is to use the servlet wizard. Select File | New File...
In step 1 of the wizard, select category "Web" and file type "Servlet".
In step 2, choose an appropriate class name and an appropriate package name. A good package name is "fred.first" if your name is fred and this is your first project.
In step 3, accept all the defaults. NetBeans will automatically add information about your servlet to the web.xml configuration file.
NetBeans will generate the outline of the new servlet. In mos

will have conflict with the jsp.index so what should be the type of project to create before this steps (servlet file) because main file is now index.jsp

i think i succeeded to invoke the tomcat but how can i launch the servlet
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

http://www.coderanch.com/t/568454/Tomcat/running-servlet#2584090


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: running a servlet
 
Similar Threads
newbie- can't compile java servlet
IBM toolbox for JAVA
OSGi vs. NetBeans module system
HTTP status 404 error on page
Importing own Packages