Help installing Resin

M

Marcel Klein

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
 
O

Oscar kind

Marcel Klein said:
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.
 
M

Marcel Klein

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
 
O

Oscar kind

Marcel Klein said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top