Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Help installing Resin

Reply
Thread Tools

Help installing Resin

 
 
Marcel Klein
Guest
Posts: n/a
 
      10-18-2004
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


 
Reply With Quote
 
 
 
 
Oscar kind
Guest
Posts: n/a
 
      10-18-2004
Marcel Klein <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
 
Marcel Klein
Guest
Posts: n/a
 
      10-19-2004
> 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



 
Reply With Quote
 
Oscar kind
Guest
Posts: n/a
 
      10-19-2004
Marcel Klein <(E-Mail Removed)> 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/(webApplicat.../(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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resin 2.0.5 vs Resin 2.1.X XSLT diff? asaguden Java 0 01-24-2005 03:06 PM
detecting tomcat and resin luca passani Java 0 09-15-2003 04:38 PM
Tomcat, Resin and cookies luca passani Java 0 09-13-2003 04:23 PM
HTTPS connection using JSSE & Resin - the code works, but not sure why Keith G Java 0 09-08-2003 06:25 PM
Resin/JNDI: object lifecycle dhek bhun kho Java 0 07-02-2003 06:54 PM



Advertisments