Help installing Resin

Discussion in 'Java' started by Marcel Klein, Oct 18, 2004.

  1. Marcel Klein

    Marcel Klein Guest

    Hi i hope this is not too offtopic as my newsserver does not carry all that
    much java groups...

    I have problems installing resin 3.0.9 on my WinXP machine.
    It starts and runs fine (i can call the manual homepage even from other
    computers on the internet) but i dont seem to be able to run my own
    servlets(java files)... i put them on the resin/webapps/webinf/classes Dir
    but i always get a 404 Error. Sometimes it will even compile them to class
    files but then again it will say 404.

    i installed it like in the instructions:
    having JDK1.4 already runnin i unziped to c: and ran the setup file (it only
    asks for the resin homedir)
    then ran the httpd.exe

    The instruction said to add the classpath jdk24.jar but i didnt knew how to
    do it in windows... but like i said it compiles.
    MY question is where do i put the java files to?
    the manual says i have to create a doc/webapps/webinf/classes but when i do
    it it wont use it... using the normal /webapps/webinf/classes will find and
    compile the files but wont run them(and i am not even sure how i manage
    sometimes to make it compile)... saying 404 instead...
    i can even call the javaexample servlets in the tutorial and it will compile
    them but again 404 only..


    yes im a kinda newbie to java(one year)... will be thankful to anybody who
    can help.... or point me to the right direction if i am offtopic here...
    tia
     
    Marcel Klein, Oct 18, 2004
    #1
    1. Advertising

  2. Marcel Klein

    Oscar kind Guest

    Marcel Klein <> wrote:
    > I have problems installing resin 3.0.9 on my WinXP machine.
    > It starts and runs fine (i can call the manual homepage even from other
    > computers on the internet) but i dont seem to be able to run my own
    > servlets(java files)... i put them on the resin/webapps/webinf/classes Dir
    > but i always get a 404 Error. Sometimes it will even compile them to class
    > files but then again it will say 404.


    So Resin is installed, but you cannot run your web applications.

    Let's do a "Hello World" example:
    - The directory webapps in the resin directory contains web applications.
    - Let's say you have a web application with context root "HelloWorld",
    packaged in a war file or directory structure:
    HelloWorld
    WEB-INF
    web.xml
    index.jsp
    The file index.jsp simply displays "Hello World!".
    - To install this web application, copy the war file or directory to
    the webapps directory. After Resin picks up the change, the webapps
    directory now contains a directory "HelloWorld".
    - You can access this web application as follows (assuming resin resides
    on port 8080):
    http://localhost:8080/HelloWorld/index.jsp

    Coming back to your post, it seems you forgot the directory for the
    context root.


    > yes im a kinda newbie to java(one year)... will be thankful to anybody who
    > can help.... or point me to the right direction if i am offtopic here...


    In that case you may want to stick to comp.lang.java.help for now. You're
    more likely to get newbie-friendly help there.


    --
    Oscar Kind http://home.hccnet.nl/okind/
    Software Developer for contact information, see website

    PGP Key fingerprint: 91F3 6C72 F465 5E98 C246 61D9 2C32 8E24 097B B4E2
     
    Oscar kind, Oct 18, 2004
    #2
    1. Advertising

  3. Marcel Klein

    Marcel Klein Guest

    > So Resin is installed, but you cannot run your web
    >applications.
    >
    > Let's do a "Hello World" example:
    > - The directory webapps in the resin directory contains web
    >applications.
    > - Let's say you have a web application with context root
    >"HelloWorld",
    > packaged in a war file or directory structure:



    Thanks for the quick help.
    But i think my problem is a bit more simpler:
    I am just starting to use Resin. dont know anything about "war" and "jsp"
    yet.
    yet i can run the "resin-doc.war" in my C:\resin-3.0.9\webapps directory by
    browsing http://localhost:8080/resin-doc ... they seem to be comparable to
    exe files

    My teacher said we can write java apps and call them directly by name by
    typing: http:/(resinhost):8080/servlet/(NAme of the java file).

    For example we simply write the helloworld.java and place it in the
    WEB-INF/classes dir.. then put in the browser
    http:/(resinhost):8080/servlet/helloworld and it should run the applet.

    i am able to do it on his server(version2.9) it works... straight away i
    downloaded and installed Resin(for windows version 3.0) from caucho.com but
    cant seem to be able to do that on my computer.
    i seem not to know where exactly to place them...

    btw. when starting the server Resin gives two error messages:

    "java.lang.unsatidfiedlinkerror: no resin in java.library.path"
    and hotswapping is not available.

    thanks for any further help
     
    Marcel Klein, Oct 19, 2004
    #3
  4. Marcel Klein

    Oscar kind Guest

    Marcel Klein <> wrote:
    >> So Resin is installed, but you cannot run your web
    >>applications.
    >>
    >> Let's do a "Hello World" example:
    >> - The directory webapps in the resin directory contains web
    >>applications.
    >> - Let's say you have a web application with context root
    >>"HelloWorld",
    >> packaged in a war file or directory structure:

    >
    >
    > Thanks for the quick help.
    > But i think my problem is a bit more simpler:
    > I am just starting to use Resin. dont know anything about "war" and "jsp"
    > yet.


    In that case, I'll set follow-uips to the appropriate newsgroup (cljh).

    JSP
    Java Server Page(s). Basically HTML pages, optionally with Java and/or
    use of tag libraries in it.
    WAR
    Web Application Archive. A special zip format that defines a web
    application.

    Some starting points:
    - your teacher (you mentioned him and it's his job).
    - a J2EE tutorial (using Sun's application server, but hey, it's a start):
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/
    - an overview of web applications by the Resin team:
    http://kalamari.sics.se:8080/resin-doc/webapp/begin.xtp


    > yet i can run the "resin-doc.war" in my C:\resin-3.0.9\webapps directory by
    > browsing http://localhost:8080/resin-doc ... they seem to be comparable to
    > exe files


    They're not like .exe files: web applications run on a server and are
    accessed using browser; .exe files are run on your local computer.

    Also note, that resin-doc.war is located somewhere else in the resin
    installation directory, and through the default resin configuration
    mapped to the root of the server (without a context root).


    > My teacher said we can write java apps and call them directly by name by
    > typing: http:/(resinhost):8080/servlet/(NAme of the java file).


    You can call the servlets directly like that, but you must still use the
    context root (you omitted it again). After all, if you have three web
    applications installed, Resin doesn't know where to find your servlet if
    you don't tell him. So:
    http://(resinhost):8080/(webApplication)/servlet/(servletclass)


    > For example we simply write the helloworld.java and place it in the
    > WEB-INF/classes dir.. then put in the browser
    > http:/(resinhost):8080/servlet/helloworld and it should run the applet.


    Again: if you don't create the context root, Resin can't find it.
    Especially with a default installation, as each directory below the
    webapps directory is a separate web application. Only below that will
    Resin look for a WEB-INF directory.


    > i am able to do it on his server(version2.9) it works... straight away i
    > downloaded and installed Resin(for windows version 3.0) from caucho.com but
    > cant seem to be able to do that on my computer.
    > i seem not to know where exactly to place them...
    >
    > btw. when starting the server Resin gives two error messages:
    >
    > "java.lang.unsatidfiedlinkerror: no resin in java.library.path"
    > and hotswapping is not available.


    The first should not happen with a clean install. The second is strange,
    as I have no problems with that. It's probably related.


    --
    Oscar Kind http://home.hccnet.nl/okind/
    Software Developer for contact information, see website

    PGP Key fingerprint: 91F3 6C72 F465 5E98 C246 61D9 2C32 8E24 097B B4E2
     
    Oscar kind, Oct 19, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dhek bhun kho

    Resin/JNDI: object lifecycle

    dhek bhun kho, Jul 2, 2003, in forum: Java
    Replies:
    0
    Views:
    1,623
    dhek bhun kho
    Jul 2, 2003
  2. Keith G
    Replies:
    0
    Views:
    1,666
    Keith G
    Sep 8, 2003
  3. luca passani

    Tomcat, Resin and cookies

    luca passani, Sep 13, 2003, in forum: Java
    Replies:
    0
    Views:
    617
    luca passani
    Sep 13, 2003
  4. luca passani

    detecting tomcat and resin

    luca passani, Sep 15, 2003, in forum: Java
    Replies:
    0
    Views:
    361
    luca passani
    Sep 15, 2003
  5. asaguden
    Replies:
    0
    Views:
    555
    asaguden
    Jan 24, 2005
Loading...

Share This Page