954,549 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

netbeans problem

hi

does any1 knw how to put the path for servlets in netbeans.

it is located in src/java/controll/servlet

i have this in my code action = "servlet/controll.servlet" but it says directory not found

thanx
ps I posted it here because nobody is answering it in jsp section!! :rolleyes:

sam1
Posting Whiz
300 posts since Nov 2004
Reputation Points: 10
Solved Threads: 1
 

What are you trying to accomplish?
I don't have Netbeans installed here (don't like the product, too slow and cumbersome) but you should be able to add the requires jar to compile them like any other.
If you want to have Netbeans generate a web application it should automatically do that for you and set up your web.xml and server environment as well (if Netbeans supports such options, I think it does by now).

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

hi

it does everything automatically. I have a page where someone should enter their names, it should read the servlet to display the names or store it. But it does not read the path it says 404 error servlet not found. I think it is something to do with the path name in action, i couldnt figure it out.

sam1
Posting Whiz
300 posts since Nov 2004
Reputation Points: 10
Solved Threads: 1
 

Hi,

Have you sorted out your problem? I have a similar problem and it is for my college project. Please let me know if you have managed.

My email is [email]brcvogt@yahoo.com[/email]

src/java/Bradshaw/servlet/LoginServlet.java

And the action property in my form tag is as follows:

I do not know hot ot do this correctly.

Regards,
Brendan

brcvogt
Newbie Poster
3 posts since Jan 2006
Reputation Points: 10
Solved Threads: 0
 

that would be Bradshaw.servlet.LoginServlet which would need a mapping in your web.xml deployment descriptor as well.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

Thanks for the quick reply!!

In my web.xml file I have the following:

LoginServletBradshaw.servlet.LoginServletLoginServlet/LoginServlet

Is this correct?

Regards,
Brendan

brcvogt
Newbie Poster
3 posts since Jan 2006
Reputation Points: 10
Solved Threads: 0
 

Still not working, unless if something is wrong in my web.xml file? I've posted this as well. I don't usually work with java, but it's for my college project.

that would be Bradshaw.servlet.LoginServlet which would need a mapping in your web.xml deployment descriptor as well.
brcvogt
Newbie Poster
3 posts since Jan 2006
Reputation Points: 10
Solved Threads: 0
 

given your web.xml mapping you should use /servlet/LoginServlet for the relative URL, nothing more.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

hi..
i m using netbeans 5.whenever i try to run any jsp/servlet /html file in netbeans,an error occurs "port 8084 is already occupied.but in 8084,apache tomcat runs.still the files does not run...

violet.shiney
Newbie Poster
1 post since Oct 2009
Reputation Points: 10
Solved Threads: 0
 
hi.. i m using netbeans 5.whenever i try to run any jsp/servlet /html file in netbeans,an error occurs "port 8084 is already occupied.but in 8084,apache tomcat runs.still the files does not run...


You may want to identify what application is running at that port.
Execute

netstat -aon | findstr “8080″

(the straight line between two commands on windows will come as two shorter lines over each other)
In my case last data in executed command stands for process ID (PID) was 3016. Next is

tasklist | findstr “3016″

this returned java.exe find_port.png

If you got java as return then you have already running instance of Tomcat and you need to use Administrative Tools >> Services to shut down this instance. In case it is different application you need to configure either application to use different port of NetBeans to open Tomcat on different port

Attachments find_port.png 9.12KB
peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

Are you under windows vista and using internet explorer? try changing "localhost" to "127.0.0.1"

mxd4n13l0n
Newbie Poster
1 post since May 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You