Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URL NOT FOUND

Status
Not open for further replies.

tarawfp

IS-IT--Management
Jul 5, 2004
17
0
0
US

Im doing a small web application, it runs fine on the stand alone tomcat but when I copied everything to the web server that uses tomcat 5.0 and tried to execute the servlet I got the message URL NOT FOUND. I think i need to change something in the XML file but Im not sure how? please help
 
Hi,

Did you restart the web server after copying ?



Cheers
-Venu
 
No as I have no control over the web server.Im just allowed to use it. all that I know that the web server is running on lunix o.s and the one I used in windows XP. woulld that be an issue.

is there any changes that need to be done for web apps when switching them from a stand alone tom cat to a web server
 
Hi,

Yes, you need to restart your web server when ever you load a new application.

If you making changes to the existing existing Web Application in tomcat you need to rebuild the WAR file and deploy it then the server with notice the changes.

Cheers
Venu
 
Hi,

Sorry, for your 2nd Question:

There is no need to change any thing when you are copying a Web Application from stand-alone to any other server.

Best way is to create a WAR file of the existing web application and deploy the WAR in any Servlet Container.

Cheers
Venu
 
THanks.. I will try it. Im u can see Im new to web prog
 
Venur..thanks for the info..I still have a problem..well I tried to write a simple server and put it under the rootdirectory\web-inf\classes\ and tryed to access the servlet it worked. but when I put it under
rootdirectory\web-inf\classes\joining\servlets it doesn't work. by the way (joining.servlets) are included in the package name
package joining.servlets;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;


public class WelcomeServlet extends HttpServlet
{
protected void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
response.setContentType("text/html");

PrintWriter out = response.getWriter();
out.println( "<?xml version = \"1.0\"?>" );

out.println( "<!DOCTYPE html PUBLIC \"-//W3C//DTD " +
"XHTML 1.0 Strict//EN\" \" +
"/TR/xhtml1/DTD/xhtml1-strict.dtd\">" );

out.println("<html xmlns = \" );

// head section of document
out.println( "<head>" );
out.println( "<title>A Simple Servlet Example</title>" );
out.println( "</head>" );

// body section of document
out.println( "<body>" );
out.println( "<h1>Welcome to Servlets!</h1>" );
out.println( "</body>" );

// end XHTML document
out.println( "</html>" );
out.close(); // close stream to complete the page
}
}

any tips
 
Hi,

Did you compile the servlet after adding the package ? if not you have to compile the sevlet.


Did you make the change in the web-inf.xml? Your servlet has to point it to joining.servlets.WelcomeServlet now.

Hope this will help you.

Cheers
Venu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top