Results 1 to 5 of 5
  1. #1
    impact is offline Member
    Join Date
    May 2008
    Posts
    18
    Rep Power
    0

    Default What to upload in the server?

    Hi
    I am totally confused as to what I should upload and where? Please help me. I created a lot of small programs to learn JSP and now I cant even run any of these in the real server.

    Here I go from netbean

    my project name is 'name'. which is ttp://localhost:8084/name/


    name -> Web Pages -> index.jsp
    name -> Web Pages -> WEB-INF -> web.xml

    Source Packages -> newpackages -> Hi.java

    I have my hosting account with goddady.com, they say my java class fine which Hi.java should be placed into htt://ww.abc.com/WEB-INF/classes/Hi.java

    If I do this then I should be able to access my servlet @
    ww.abc.com/servlet/index.jsp

    Then where do I place my package which is "newpackage" ??

    Then how do link a form created at index.jsp to my servlet? Like this
    <FORM Method="POST" Action="/servlet/newpackage.Hi"> </FORM>

    Please help me I am just not able to get my programs run on real servers.

  2. #2
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Post keep going

    Quote Originally Posted by impact View Post
    HiI am totally confused ...
    Your not the only one, we are never alone when totally confused.
    Quote Originally Posted by impact View Post
    HiI am totally confused ...
    Note change here:
    Java Code:
    http://ww.abc.com/WEB-INF/classes/Hi.class
    Quote Originally Posted by impact View Post
    my project name is 'name'. which is http://localhost:8084/name/
    Project name is not the same as package name.
    Quote Originally Posted by impact View Post
    If I do this then I should be able to access my servlet @
    ww.abc.com/servlet/index.jsp
    jsp goes in the root, much like standard web page. At least that is what I was able to get going. It may be that jsp should be placed under WEB-INF, in which case I would expect it should go /WEB-INF/page.jsp
    Quote Originally Posted by impact View Post
    Then where do I place my package which is "newpackage" ??
    In general, the system is designed to work such that packages in dot jar files can be found by Java Server using conventions of Java Servers. Try building a lib, that goes in /lib/ under /WEB-INF/
    Classes, similarly: /WEB-INF/classes/yourwork.class
    Quote Originally Posted by impact View Post
    Then how do link a form created at index.jsp to my servlet?
    Like this: <FORM Method="POST" Action="newpackage.Hi"> </FORM> note the elimination of servlet in action, the /servlet/ goes in url written in jsp shipped on initial get request.
    At least that is how I undersand it so far. All caveats apply except as noted in the caveat correction manual.
    Quote Originally Posted by impact View Post
    Please help me I am just not able to get my programs run on real servers.
    The server you are able to get running is a real server. Examine how that works, that will be how the real server works.
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

  3. #3
    impact is offline Member
    Join Date
    May 2008
    Posts
    18
    Rep Power
    0

    Default

    Hi,
    Thanks a lot for replying.

    If I upload only .jsp pages and servlet in my site then how do I access them?

    will it be ww.sdb.com/servlet or ww.sdb.com/WEB-INF

    and in both cases i need to have a redirect file from ww.sdb.com/index.html to ww.sdb.com/servlet or ww.sdb.com/WEB-INF isn't?

    thank you again.

  4. #4
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Default keep going

    Quote Originally Posted by impact View Post
    If I upload only .jsp pages and servlet in my site then how do I access them?
    See next.
    Quote Originally Posted by impact View Post
    will it be ww.sdb.com/servlet or ww.sdb.com/WEB-INF
    jsp goes in / ( or at least it can, I am still studying that one ) access URL for servlet has /servlet/ somewhere in it. Servlets go in WEB-INF, which never goes in url.
    Quote Originally Posted by impact View Post
    and in both cases i need to have a redirect file from ww.sdb.com/index.html to ww.sdb.com/servlet or ww.sdb.com/WEB-INF
    Servlet container will do all the re-directing, this is called serlet mapping.
    Last edited by Nicholas Jordan; 07-15-2008 at 04:53 PM. Reason: add word servlet to "access URL for ..."
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

  5. #5
    impact is offline Member
    Join Date
    May 2008
    Posts
    18
    Rep Power
    0

    Default

    I just came across a great tutorial

    htp://java.sun.com/j2ee/1.4/docs/tutorial/doc/WebApp3.html

Similar Threads

  1. how to upload a file?
    By tommy in forum JavaServer Pages (JSP) and JSTL
    Replies: 4
    Last Post: 06-30-2008, 03:50 PM
  2. file upload
    By sundarjothi in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 06-27-2008, 12:52 PM
  3. xml upload very slow
    By sandeeprao.techno in forum Advanced Java
    Replies: 1
    Last Post: 06-10-2008, 07:24 AM
  4. File Upload
    By ShoeNinja in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 11-09-2007, 11:09 PM
  5. Rad Upload 3.12
    By levent in forum Java Software
    Replies: 0
    Last Post: 06-01-2007, 07:50 AM

Posting Permissions

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