You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jimmy Ray <ji...@yahoo.com> on 2005/03/17 22:31:11 UTC
Mapping JSP
I have several JSP that I want to be able to forward
to from servlets. Right now I stick my JSP in
WEB-INF/jsp for security reasons. I guess I need a
way to include a JSP mapping in the web.xml so that my
request dispatcher call does not include the WEB-INF
directory in its path. Anyone know the syntax for
this JSP mapping?
Regards,
Jimmy Ray
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Tomcat startup with jsvc on Linux
Posted by Bernard <bh...@actrix.gen.nz>.
Hi,
How can I start Tomcat with jsvc so that the jsvc command returns
control to the command prompt or script exactly after the
"Daemon started successfully" ?
I would like it to behave in the same way as other services such as
Apache httpd so I can cod success and failure messages in the script.
The supplied script redirects output to a log file and in that way
jsvc returns immediately, long before writing "Daemon started
successfully" to the log file.
If I do NOT code the
-outfile $CATALINA_HOME/logs/catalina.out \
-errfile '&1' \
parameters, then the command does not return at all and I have to
press [Enter] or [Ctrl+C] at the console.
It looks as if I am lacking some knowledge here.
Many thanks for your help,
Bernard
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Filter-mapping
Posted by Steve Farmer <to...@steve-farmer.com>.
Please accept my apology for my previous inappropriately formatted
message. (At least I hope that's the reason it was ignored.) If I'm
in the wrong forum, please accept my additional apologies and direct
me to an appropriate forum. If I need to "RTFM", please tell me
which "FM" I need to "R" 'cause I've studied multiple books and the
Java Servlet Spec 2.4, and I still don't understand this behavior. A
search of the web turned up some other folks who may have observed
the same behavior, but as far as I can tell they're just as confused
about it as I am.
I'm experimenting with filters in Tomcat 5.0.28 to test my
understanding. In one test I have the following
<filter-mapping> ...
<dispatcher>ERROR</dispatcher>
... </filter-mapping>
and I try to stimulate it with the following JSP
<%@ page errorPage="/filtex-dummy.do" %>
${10%0} <%-- throw exception --%>
The servlet runs and receives the request attributes that an error
handler expects, but the filter does not run. However, if I change
ERROR to FORWARD, then both the filter and the servlet run.
JSS 2.4 seems to indicate that the <filter-mapping> must use
<url-pattern> when <dispatcher> has a value of ERROR, but I tried
both <servlet-name> and <url-pattern> with no apparent difference
in behavior.
My questions are
* Is this standard behavior or is it peculiar to Tomcat?
* In either case, is it possible to trigger the filter when
<dispatcher> = ERROR? If so, how?
Thanks in advance and best regards,
Steve Farmer
tomcat-user@steve-farmer.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Filter-mapping
Posted by Steve Farmer <to...@steve-farmer.com>.
I've created a "toy" filter and servlet to experiment with filters in
Tomcat 5.0.28. If I map the filter to the servlet like this
<filter-mapping> ...
<dispatcher>ERROR</dispatcher>
... </filter-mapping>
and invoke the following JSP
<%@ page errorPage="/filtex-dummy.do" %>
${10%0} <%-- throw exception --%>
then the servlet executes but the filter does not. If I change the
mapping to
<filter-mapping> ...
<dispatcher>FORWARD</dispatcher>
... </filter-mapping>
then both the filter and the servlet execute.
A lengthy search seems to indicate that other folks have encountered
this, but I can't determine whether it's a bug or just a
misunderstanding of the standard. If it's my misunderstanding, please
point me to an explanation of when
<dispatcher>ERROR</dispatcher>
will cause the filter to execute.
Note: the v2.4 servlet spec seems to indicate that the <filter-mapping>
must use <url-pattern> when <dispatcher> has a value of ERROR, but I
tried both <servlet-name> and <url-pattern> with no apparent difference
in behavior.
Thanks in advance and best regards,
Steve Farmer
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org