Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

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

    <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;
    <input type="submit" value="Submit" name="submitbutton"/>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="reset" value="Reset" name="resetbutton"/>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    </P>
    </form>
    </body>
    </html>

    Do you need the Servlet code too?

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    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.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #4
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    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.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #5
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #6
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    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.
    Try your main servlet directory.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •