Tarun Oohri wrote:Hello,
I am very new to this servlet. I am unable to execute my very first program through command prompt .
James Boswell wrote:" it can not recognize as internal or external command "
Which command can it not recognise?
James Boswell wrote:Saying things like help!help! isn't going to make people help you more.
Can you tell us exactly what you have typed at the command line and the exact error message returned by the compiler?
~ Mansukh
C:\Program Files\Apache Software Foundation\Tomcat 6.0>bin\startup.sh
'bin' is not recognized as an internal or external command,
operable program or batch file.
Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)
Mansukhdeep Thind wrote:What exactly is the problem that you are facing Tarun? Is it any/some or all of the following:
a) The tomcat container is not starting up and/or throwing errors.
b) Container starts but it fails to deploy the servlet.
c) Container starts and servlet is also deployed, but when you hit the servlet from the browser, you get error. OR
d) Your servlet java source itself is not compiling. There is no class being formed in WEB-INF/classes folder?
Please be discrete with precise information.
Saif Asif wrote:Greetings,
C:\Program Files\Apache Software Foundation\Tomcat 6.0>bin\startup.sh
'bin' is not recognized as an internal or external command,
operable program or batch file.
You are working in a Windows environment , so the bash shell is not available to you to directly execute bin files. To start the server use the startup.bat file. This is a window batch file . This should solve the problem of starting the server.
As for the other issue, try to enclose the paths in double qoutes.
Tarun Oohri wrote:
Hi Saif
Yes , i am using windows environment . I have tried using you command but still same error coming .
C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin>startup.bat
'startup.bat' is not recognized as an internal or external command,
operable program or batch file.
~ Mansukh
Mansukhdeep Thind wrote:
Tarun Oohri wrote:
Hi Saif
Yes , i am using windows environment . I have tried using you command but still same error coming .
C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin>startup.bat
'startup.bat' is not recognized as an internal or external command,
operable program or batch file.
OK Lets go step by step. Go to the above location in the bin directory. Then double click on the startup.bat file. Then tell me what happens.
Mansukhdeep , i am very sorry to say my bin folder does not contain startup file.
If things do not fall as it should be, one tends to get irritated..so am i :-(
~ Mansukh
Mansukhdeep Thind wrote:
Mansukhdeep , i am very sorry to say my bin folder does not contain startup file.
No no. No need for sorry buddy. Lets rectify the problem at hand. OK? Download tomcat 6.0 from the net and extract it into the C:\ drive. Then make the necessary changes to startup.bat. Try starting it. If you have any issue, come back. Always happy to assist.
If things do not fall as it should be, one tends to get irritated..so am i :-(
There will be times when you will go through these mood swings caused by the silliest of human errors. Nobody matures instantly. My suggestion to you - Shut down your PC for now. Have a good night sleep. We will get back to this tomorrow. You will also be fresh then. Agree?
Tarun Oohri wrote:
Mansukhdeep Thind wrote:
Mansukhdeep , i am very sorry to say my bin folder does not contain startup file.
No no. No need for sorry buddy. Lets rectify the problem at hand. OK?
If things do not fall as it should be, one tends to get irritated..so am i :-(
There will be times when you will go through these mood swings caused by the silliest of human errors.
Thanks Mansukh...i will try to re-install it .
~ Mansukh
Mansukhdeep Thind wrote:Are you sure that tomcat is asking for the username and password or are you getting something like this:
Tarun Oohri wrote:
Mansukhdeep Thind wrote:Are you sure that tomcat is asking for the username and password or are you getting something like this:
No, its not showing like this. It ask for user name and password when i click on the links given on the http://localhost:8080 page.
When i try to open http://localhost:8080/ch1/Serv1 , it shows 404 error.
Now, when i tried to open the tomcat again..even the localhost:8080 page is not opening
Tomcat is asking for some username and password, which i tried to set up opening the( tomcat-users.xml )file in conf as follows ::
~ Mansukh
James Boswell wrote:In the tomcat-users.xml file, you have:
You need to remove the first < character and the last > character.
~ Mansukh
Mansukhdeep Thind wrote:You are seeing this message because the tomcat server is unable to locate your servlet. Have you made the entry of the servlet in the web.xml file? And if you have made it, are you sure it is correct with respect to the context path. Web application is very specific when it comes to locating resources placed in the application folder. Check those entries and make sure that relative paths are correct.
~ Mansukh
Mansukhdeep Thind wrote:I need the following things to go ahead with this:
a) Your web application structure. What is the context root name?
b) The servlet java source file
c) web.xml file
Tarun Oohri wrote:
WEB.XML CODE :-
~ Mansukh
Mansukhdeep Thind wrote:
Tarun Oohri wrote:
WEB.XML CODE :-
~ Mansukh
Mansukhdeep Thind wrote:Which edition of the book are you referring to? What is the page no. on which the assignment is given? I will have to go through the problem to solve it.
~ Mansukh
Mansukhdeep Thind wrote:Please share tomcat start up console log. Also, check if your server.xml file has entry for ch1 application. Share your server.xml file. I will have a look at it.
~ Mansukh
Mansukhdeep Thind wrote:Try connecting via port number 8443 instead of 8080. Does it allow?
Tarun Oohri wrote:
Mansukhdeep Thind wrote:Try connecting via port number 8443 instead of 8080. Does it allow?
No it do not :-( ....i guess i have to switch to IDE....Can anybody rectify this problem ??
~ Mansukh
Mansukhdeep Thind wrote:
Tarun Oohri wrote:
Mansukhdeep Thind wrote:Try connecting via port number 8443 instead of 8080. Does it allow?
No it do not :-( ....i guess i have to switch to IDE....Can anybody rectify this problem ??
Nobody but only you can only rectify your problem. Switching to IDE would but make thinks more difficult as learning how IDE works is itself a task. Having said that, I would not want to just give up on this. I tried the same on my machine. It is working. I did it on Eclipse by creating a dynamic-web-project. I am successfully able to hit the servlet and display the date and time. Tell me one thing- How does your tomcat know that application named ch1 is present?
~ Mansukh
Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)
Saif Asif wrote:Do one thing, re deploy your web application and then stop and then start the server and post the startup logs here.
~ Mansukh