View Full Version : Servlet Deployment on remote site

09-09-2005, 10:29 PM
We are calling a servlet from the action of a html page, which is a simple login page.The servlet performs the business logic & matches the username & password with the data base.If the information entered is correct it send the response to the next jsp page.
The whole process is working fine when we run it locally using Jdeveloper.But when we upload the pages on our Linux web server(Apache Tomcat 5.0.27), the login html page is being displayed & when any button is clicked on this page , it says "Page not found" or HTTP404 Resource not found" error.

Is it because we are creating the application on Windows & then uploading on Linux web server?

This is the login page which transfers the action to emploginServlet:

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">


<form method="POST" action="/servlet/emploginServlet">

<FONT size="6">Welcome to Theory &nbsp;Yes!</FONT>
<P>User Id &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" name="userid"/>

<P>Password &nbsp;&nbsp;
<input type="password" name="userpswd"/>

<input type="submit" value="Submit" name="submitbutton"/>
<input type="reset" value="Reset" name="resetbutton"/>


Do you need the Servlet code too?

09-09-2005, 10:50 PM
And does Apache know where the servlet is?
It doesn't happen automagically. It's in some config file somewhere. Maybe web.xml?
The servlet container must also be present. i.e. Tomcat.
You can't just plop this stuff on another server and it will work, unfortunately.

09-09-2005, 11:04 PM
actually we are having our web support and web server from godaddy ..so how shd we check that web.xml at their support is correct or not

we can just check web.xml on our local machine
please help

09-12-2005, 04:37 PM
Sounds like you need to contact them to verify paths for your servlet directory and to get help.
I didn't know they even supported servlets.

09-14-2005, 11:32 PM
Finally, our servlet & the web.xml is working.Thanks for getting our attention towards the web.xml.However, the is one problem: The servlet uses EJB & JDBC to interact with the database.Does anybody know how to call the ejb & what and where to upload the ejb? Does Tomcat support EJB?Please refer to the Servlet code given before.Help will be appreciated.

09-15-2005, 02:15 PM
Enterprise Java Beans?
Those are for use in JSP, which compiles to a servlet, so I'd imagine it would work all right...
But I think they're really meant to be used in JSP, not a regular servlet. (not sure)
You could try instantiating the classes, but I'm not sure if that would work quite right.
As to where to put them, anywhere the web server knows to look for java classes. :D
Try your main servlet directory.