tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: does tomcat work without apache? ... a real beginner asks some basic!?
Date Thu, 23 Oct 2003 12:26:48 GMT

Howdy,
Your context is all default settings: you can take the whole <Context>
declaration out of server.xml and let tomcat auto-deploy your war file.

The problem with your HTML links, like the one for your stylesheet, is
that they're absolute: /myFile.css is from the server root.  There's
nothing at the server root.  Change the links to have the webapp name in
the beginning, e.g. /sygenews/myFile.css.  You can confirm for yourself
these links work by entering them into your browser:
http://yourserver:yourport/myFile.css will not work (404 error)
http://yourserver:yourport/sygenews/myFile.css will work.

These are fairly basic concepts: you might want to go through a couple
of HTML/servlet tutorials.

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: zuhans@iname.com [mailto:zuhans@iname.com]
>Sent: Wednesday, October 22, 2003 4:33 PM
>To: Tomcat Users List
>Subject: Re: does tomcat work without apache? ... a real beginner asks
some
>basic!?
>
>hello shapira - and greetings and thank to ann -,
>
>thank you for your time spent on my problem.
>
>here are more details:
>
>1. the long line in server.xml, where i declared the context for
>"sygenews":
><Context className="org.apache.catalina.core.StandardContext"
>cachingAllowed="true"
>    charsetMapperClass="org.apache.catalina.util.CharsetMapper"
>cookies="true"
>    crossContext="true" debug="0"
>    docBase="C:\Programme\Apache Group\Tomcat 4.1\webapps\sygenews"
>    mapperClass="org.apache.catalina.core.StandardContextMapper"
>    path="/sygenews" privileged="false" reloadable="true"
>swallowOutput="false"
>    useNaming="true"
>wrapperClass="org.apache.catalina.core.StandardWrapper">
></Context>
>the directory-name is sygenews, the war-file-name is sygenews.war, and
i
>want it to place beneath "webapps"-dir in tomcat.
>
>as i told you: with localhost:8080/sygenews the index.jsp was found,
>but: my "/formates.css" - link didn't work - wrong font appeared.
>why could this be?
>
>and the next problem (as you thought): the link
>"/servlet/sygenews.index" (/WEB-INF/classes/sygenews/index.class) was
>not found - it showed: localhost:8080/servlet/sygenews.index not
available.
>
>in netbeans i have a project: sygenews, there are the files in normal
>order: /*.jsp, /WEB-INF/classes/*.java, *.class. i right-clicked on
>document-root and chose: make war-file (or similar); the war-file was
made.
>in tomcat i installed it in the manager-mask (upload a war-file to
>install - out of my project-dir).
>it installed "ok", i clicked the new link and there it was... (as i
>described above).
>
>in netbeans it worked - i copied already the server.xml-file from
>netbeans to tomcat, but the result was the same.
>
>now to the path-question:
>i coded every link as "/...". i want to be sure, that the searching
>should begin on top to find everything (out of sub-dirs). is this so
>wrong? isn't it un-sure where i will go, if i write "../..."?
>and - sorry for repeating - in nb it works.
>
>must i declare a special connector?
>what is the right mapping of servlets in my web.xml? is this one ok:
>...
><servlet-class>sygenews.news</servlet-class>
>...
><url-pattern>/servlet/sygenews.news</url-pattern>
>
>so did i in my project-web.xml (but somehow blind, by hand...).
>
>bye
>hans
>
>Shapira, Yoav schrieb:
>
>>Howdy,
>>
>>
>>
>>>i downloaded the lastes tomcat-version (for windows xp!), installed
it
>>>right as the installer did. called once "localhost" and i got the
>>>greeting-screen from tomcat (meant: installation was ok!).
>>>
>>>
>>
>>Good.
>>
>>
>>
>>>but then the problems began. how to get my  site into tomcat. all the
>>>ways i tried failed. there was always the same problem: the
>>>/<mywar>/index.jsp was found, but the other files weren't: instead of
>>>/<mywar>/<anydir>/<anyjsp>.jsp it looked for in /<anyjst>.jsp!!
so
with
>>>the servlets: i coded "/<mywar>/servlet/<anyservlet>" and it looked
for
>>></servlet/<anyservlet>.
>>>
>>>
>>
>>If you have a war file, simply copy it into tomcat's webapps
directory.
>>Links in your servlets, JSPs, HTML pages should be appropriately
>>relative. Give us an example of a link that doesn't work: I bet it's a
>>link to /servlet/myservlet as opposed to /mywar/servlet/myservlet or
>>better yet ../servlet/myservlet.
>>
>>You should map all your servlets in web.xml.
>>
>>
>>
>>>questions: can i use tomcat "just right out of the box" or is this a
>>>
>>>
>>fas
>>
>>
>>>too privimitive way to use this heavy program?
>>>
>>>
>>
>>Yes, you can use it right out of the box: it's designed for that.
>>
>>
>>
>>>must i install apache as well or is tomcat sufficient?
>>>
>>>
>>
>>You don't need Apache at this point: tomcat by itself is fine.
>>
>>
>>
>>>where should i look for a solution for my (for me: heavy) problem??
>>>
>>>
>>
>>This is the place.
>>
>>Yoav Shapira
>>
>>
>>
>>This e-mail, including any attachments, is a confidential business
>communication, and may contain information that is confidential,
>proprietary and/or privileged.  This e-mail is intended only for the
>individual(s) to whom it is addressed, and may not be saved, copied,
>printed, disclosed or used by anyone else.  If you are not the(an)
intended
>recipient, please immediately delete this e-mail from your computer
system
>and notify the sender.  Thank you.
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>>



This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message