This is a discussion on "problem in Servlet Deployment on remote site" within the Other Programming Languages section. This forum, and the thread "problem in Servlet Deployment on remote site are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
problem in Servlet Deployment on remote site
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
problem in Servlet Deployment on remote site
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: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>AUTHENTICATION</title> </head> <body> <form method="POST" action="/servlet/emploginServlet"> </P> </P> <FONT size="6">Welcome to Theory Yes!</FONT> </P> </P> User Id <input type="text" name="userid"/> </P> Password <input type="password" name="userpswd"/> </P> </P> <input type="submit" value="Submit" name="submitbutton"/> <input type="reset" value="Reset" name="resetbutton"/> </P> </form> </body> </html> Do you need the Servlet code too? |
|
|
|
|||
|
I assume you have a web.xml file or similiar setup to map the servlets to the servlets directory you are trying to call them from?
|
|
|||
|
so where and how should we check web.xml if its correct or not
|
|
|||
|
You should have a web.xml file in your WEB-INF directory. If you are unaware of how this works then you really need to learn JSP thoroughly. Consider buying a book or similiar.
But to eliminate other problems, simply call the full name of the servlet instead. If the servlet doesn't have a package, then you can call it from the root of your development structure (your jsp files should be in the view directory, so the directory above that). eg: http://localhost:8080/emploginServlet Obviously if the classes are in a package, then call the class using it's full package name eg: http://localhost:8080/com.example.pa...mploginServlet |
|
|||
|
so you r talking about deploying a servlet locally ..as we need to deploy servlet on to a remote server.
and should we check web.xml on our local machine or it shd be checked on the remote server too as we dont have tomcat installed on local machine we r wokring with Jdeveloper..tomcat is on our remote webserver. help!! |
|
|||
|
You need to web.xml setup on the tomcat server.
To be honest though, you might as well download and install tomcat locally for development - it's not difficult to setup and will make your development easier as your development environment will be quite similiar to your production environment. |
|
|||
|
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.
Thanks |
![]() |
| Tags |
| problem, servlet, deployment, remote, site |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with my Servlet - retrieving images from database | Love2Java | Other Programming Languages | 2 | May 27th, 2008 17:15 |
| information passed from servlet to JSP | pesho318i | Other Programming Languages | 1 | May 26th, 2008 18:22 |
| [SOLVED] Dreamweaver - I can only see /htdocs/ in Remote Site | pawpour | Scripts and Online Services | 5 | Oct 7th, 2007 11:40 |
| search results with servlet or JSP | twix_ | Other Programming Languages | 1 | Nov 2nd, 2006 21:25 |
| Problem with Dependencies and the error "Cannot find the remote service" | shav | Databases | 0 | Dec 16th, 2005 07:08 |