i really let tomcat do the job...
with the paths: isn't it so, that "docBase=..." means, that all my links would be added to this entry? and why does it work in netbeans (i tried to find any differences but i didn't!)?
tell me, that i mustn't recode all my links!
and: installing my files under a domain: isn't it allowed(?) too, to say "/formats.css"??
hans
Shapira, Yoav schrieb:
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-----some
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 22, 2003 4:33 PM
To: Tomcat Users List
Subject: Re: does tomcat work without apache? ... a real beginner asks
basic!?i
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
want it to place beneath "webapps"-dir in tomcat.available.
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
in netbeans i have a project: sygenews, there are the files in normalmade.
order: /*.jsp, /WEB-INF/classes/*.java, *.class. i right-clicked on
document-root and chose: make war-file (or similar); the war-file was
itin 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
withGood.right as the installer did. called once "localhost" and i got the greeting-screen from tomcat (meant: installation was ok!).
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
forthe servlets: i coded "/<mywar>/servlet/<anyservlet>" and it looked
directory.</servlet/<anyservlet>.If you have a war file, simply copy it into tomcat's webapps
intendedcommunication, and may contain information that is confidential,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 afas
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
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)
recipient, please immediately delete this e-mail from your computersystem
and notify the sender. Thank you.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
