Re: Tomcat 5.0.19 - softlink issue
Any clues about this issue? Sandeep N <[EMAIL PROTECTED]> wrote: Hi, We have a web application deployed on Tomcat 5.0.19 running on Solaris 9. Our connection is https configured on port 8443. The web application runs fine. Here is my issue. We have two subfolders under the context folder named folderA and folderB. folderB is a softlink pointing to another folder outside of our context folder. The resources like images, reports etc stored under this folder is not accessible through URL whereas all the content stored under folderA can be accessed through url.Why I am not able to access anything stored under folderB? Am I missing some settings or configuration?? Please advise. Thanks Sandeep. - New Yahoo! Messenger with Voice. Call regular phones from your PC and save big. - Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min or less.
Re: Relative Link Question
Hi, maybe the element will solve your problem... PETR On 4/15/06, Arshad Mahmood <[EMAIL PROTECTED]> wrote: > Hi, > > Hmm. What are you trying to do? Surely your images are not actually in a > directory called "/webapp/images/...". Your images are probably at the top > level of your docBase. The "webapp" is surely just a context that is being > mapping to a webapp under tomcat, and you probably want Apache to serve the > images anyway (since you're fronting it with Apache). > > Are the images really not being displayed? What have you set the > DocumentRoot to in the apache httpd.conf. > > Regards. > > -Original Message- > From: Steven Huey [mailto:[EMAIL PROTECTED] > Sent: 14 April 2006 23:49 > To: users@tomcat.apache.org > Subject: Relative Link Question > > Hello, > > I've got a setup with Apache 2.2, Mod_Jk 1.2.15, and Tomcat 5.5.16 > and things are working pretty well except for relative links in my > webapp. > > When accessing my webapp at http://myserver.com/mywebapp/index.jsp > any relative links within subdirectories of the mywebapp directory > don't include /mywebapp/ in the URL. For example I have a mywebapp/ > includes/ directory and some of the files use links such as: > > > > Instead of linking to http://myserver.com/mywebapp/images/pic.jpg the > link is http://myserver.com/images/pic.jpg. > > I've read that if I remove the leading "/" from the links it will > work, but I already have a lot of links in this format and am > wondering if there is a configuration change or something else I can > do to resolve this. > > Thanks, > Steve Huey > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Petr Hadraba graphic artist and software designer http://people.hadraba-soft.com/~petr hadrabap AT bluetone DOT cz
Re: Tomcat 5.0.19 - softlink issue
Sandeep N wrote: > folderB is a softlink pointing to another folder outside of our context > folder. The resources like images, reports etc stored under this folder is > not accessible through URL whereas all the content stored under folderA can > be accessed through url.Why I am not able to access anything stored under > folderB? > > Am I missing some settings or configuration?? Yes. For starters please read the FAQ, particularly http://tomcat.apache.org/faq/tomcatuser.html#why There is no need to post your question twice. Once you have read the above, have a look at http://tomcat.apache.org/tomcat-5.0-doc/config/context.html You need to configure one of these attributes (which one should be obvious as soon as you read the description). Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
servlet mapping request
Hello Tomcat Users. I need your help regarding servlet mappings in our WEB-INF/web.xml file running on an Apache webserver with a Tomcat container(most recent release) on a public website. After putting our web.xml file in public\WEB-INF and asking our web host to restart Tomcat, our servlet mappings stilll do not work in our test web page. I've searched through many books, even a Tomcat Quickstart book and they all say Tomcat has to be restarted for the servlet mappings in web.xml to work. So we requested a Tomcat restart and after this, the servlet mapping we use gives a error. When I use /servlet/EventsServlet in link, it calls the servlet and it works, but according to Tomcat documentation this is a security issue that we don't want to implement. I'm hoping that you know what the solution(s) are and can point me in the right direction. I'm appreciative for assist that you may provide. Raymond P. Jones Ph: 518-446-9845 E: [EMAIL PROTECTED]
[ANN] Apache Tomcat v5.5.17-beta Now Available
The Apache Tomcat team is proud to announce the immediate availability of Tomcat v5.5.17-beta. This release contains dozens of bug fixes and a number of other updates. Please consult the change log below for more details. Release Notes: http://tomcat.apache.org/tomcat-5.5-doc/RELEASE-NOTES Change Log: http://tomcat.apache.org/tomcat-5.5-doc/changelog.html Downloads: http://tomcat.apache.org/download-55.cgi Thank you, -- The Apache Tomcat Team - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: servlet mapping request
Info we need to help you: 1. Exact Tomcat version. I would be extremely surprised if this really is the most recent release (5.5.17) 2. The content of your web.xml 3. Given that you are using Apache as well, the relevant Jk directives from your httpd.conf file Related to point 3, can you direct your browser to Tomcat directly, bypassing Apache? If so, does this work? Mark Raymond P. Jones wrote: > Hello Tomcat Users. > I need your help regarding servlet mappings in our WEB-INF/web.xml file > running on an Apache webserver with a Tomcat container(most recent release) > on a public website. After putting our web.xml file in public\WEB-INF and > asking our web host to restart Tomcat, our servlet mappings stilll do not > work in our test web page. > I've searched through many books, even a Tomcat Quickstart book and they all > say Tomcat has to be restarted for the servlet mappings in web.xml to work. > So we requested a Tomcat restart and after this, the servlet mapping we use > gives a error. When I use /servlet/EventsServlet in > link, it calls the servlet and it works, but according to Tomcat > documentation this is a security issue that we don't want to implement. > > I'm hoping that you know what the solution(s) are and can point me in the > right direction. > I'm appreciative for assist that you may provide. > > Raymond P. Jones > Ph: 518-446-9845 > E: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Autodeployment of web.xml Does Not Work
Hi, First of all I just want to say that this issue has been dragging me for the last 3 days and I've had it up to here. You have to excuse my sophomoric knowledge of Tomcat as I've just started learning servlet and thought Tomcat would be a suitable container for a novice. Sorry for posting such a long post... I have an issue with autodeployment of my context. Before I explaing my problem, allow me to give the specificaitons of the products I am utilizing: OS: Linux (Slackware) 2.6.14 Tomcat: 5.5.16 Apache Webserver: 2.0.54 jk_mod: 1.2.15 JDK: 1.5.04 I am trying to setup a virtualhost that would deploy a web application with Apacha webserver, jk_mod as a connector, and Tomcat as a servlet engine. Everything has been set up properly and I can deploy my web application just fine. The issue rises when I try to modify `WEB-INF/web.xml' (for example changing the url-mapping) but the changes would not take effect despite the fact it (web.xml) is under WatchResource monitoring. However, I "can" compile an existing class and dump it in WEB-INF/classes/ and have the server autodeploys it without restarting the actual server. But again, "ANY" classes that does not have "url mapping" in WEB-INF/web.xml, would not be autodeployed even if Tomcat server is restarted. So once again, any class that has an existing url-mapping in WEB-INF/web.xml, can be recompiled and autodeployed upon placement in WEB-INF/classes but no newly compiled class that does not have url-mapping in web.xml can be autodeployed or deployed at all (or at least I get status 404 when I point my browser to the servlet). Anyway, here are the content of my Apache virtualhost/jk_mod, Tomcat's conf/server.xml, web application's WEB-INF/web.xml, and the actual layout of what is placed where. # apache2/conf/httpd.conf # JkWorkersFile "/usr/local/apache2/conf/workers.properties" JkLogFile "/usr/local/apache2/logs/mod_jk.log" JkLogLevel info JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" ServerAdmin [EMAIL PROTECTED] ServerName vh.domain.com DocumentRoot /var/webapps/vh/demo ErrorLog /var/webapps/vh/logs/error_log CustomLog /var/webapps/vh/logs/access_log common JkMount /*.jsp wrkr JkMount /* wrkr # JkMount /servlet/* wrkr # I have tried /otherdirs as well # Deny direct access to WEB-INF AllowOverride None deny from all # Tomcat's conf/server.xml ## WEB-INF/web.xml Regarding conf/server.xml... I have tried to set `appBase' to /var/webapps and use a relative path with respect to it for my `docBase' to set it to `vh/demo' or `appBase="/var/webapps/vh"' and `docBase="demo" and ALL the combinations "WORK." So I don't have any problem as far as running the servlet or having *.jsp getting compiled and all that. But one thing that I haven't been to get to work is to apply the recommendation given for 5.5 to place the `Context' element outside of the `conf/server.xml'. That is to place in `conf/$engine/$host/context.xml.default (or context.xml OR demo.xml) `conf/appserver/vh.domain.com/context.xml.default' OR `conf/appserver/vh.domain.com/context.xml' OR `conf/appserver/vh.domain.com/demo.xml' None of such settings would allow the execution of my servlets. With having in its own directory and the same settings. When I point my browser to the designated servlet URI, I get a blank page. As soon as I put back to conf/server.xml, everything works as before and for the life of me I cannot figure out why. Despite of the fact logs/catalina.out reports of processing the context from those locations... I have even changed the Engine name to `Catalina' with no luck. Tomcat does indeed, as you can see in the logging below, that looks for the context in `conf/$engine/$host/context.xml.default' but as I have mentioned, if context is taken out of conf/server.xml to that location, nothing will work as oppose to autodeploment issue of web.xml. I have also taken WatchedResource out of the context with no luck. I have read that placing context of Host in conf/server.xml would only allow it to be "read" at the start up and at no other time this re-read is being performed. Is that true? If so, then why can't I get the recommended version to work!!! Even the default conf/web.xml also has WEB-INF/web.xml under monitor... (SIGH). I have even played with various attribute settings thinking maybe having multiple "deployment" schemes (i.e. autodeploy, reloadable...) would conflict for some odd reason, but it didn't help. ## logs/catalina.out ... FINE: ContextConfig: Initializing Apr 15, 2006 5:24:25 PM org.apache.catalina.startup.ContextConfig processContextConfig FINE: Processing context [] configuration file /usr/local/tomcat conf/context.xml Apr 15, 2006 5:24:25 PM org.apache.catalina.startup.ContextConfig processContextConfig FIN
Re: Autodeployment of web.xml Does Not Work
On 4/15/06, Evan J <[EMAIL PROTECTED]> wrote: > But again, "ANY" classes that does not have "url mapping" in > WEB-INF/web.xml, would not be autodeployed even if Tomcat server is > restarted. So once again, any class that has an existing url-mapping > in WEB-INF/web.xml, can be recompiled and autodeployed upon placement > in WEB-INF/classes but no newly compiled class that does not have > url-mapping in web.xml can be autodeployed or deployed at all (or at > least I get status 404 when I point my browser to the servlet). If there is no mapping in web.xml, Tomcat doesn't know what to do with the request, so the 404 is expected. You can't just "point your browser to the servlet". At least, not unless you enable the invoker servlet... > http://vh.domain.com/SomeNewClass (or /servlet/SomeNewClass). ... and this URL containing /servlet/ makes me think you're working from some old documentation that expects the invoker servlet to be enabled. * http://tomcat.apache.org/faq/misc.html#evil You should put your servlet classes in packages and explicitly map them in web.xml. URLs matching those mappings are the only ones you can expect to work. Whether changes to web.xml are picked up without reloading the context is a different question. I always re-deploy for web.xml changes, so I'm not sure. You might want to try your experiments again, (using only URLs that match mappings in web.xml,) and post another (shorter!) question if you're still not seeing the behavior you want. -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Relative Link Question
Hi- One possibility might be to make your application the default application by moving it to the ROOT directory. Another might be to configure it as a virtual host. In the long run though, it's probably worth making all of your image URLs relative. The result will be a more flexible application which will pay dividends if you ever have to move the application. One specific example of this would be performing maintenance or further development on a non-production system. -Terence M. Bandoian >>>-Original Message- >>>From: Steven Huey [mailto:[EMAIL PROTECTED] >>>Sent: 14 April 2006 23:49 >>>To: users@tomcat.apache.org >>>Subject: Relative Link Question >>> >>>Hello, >>> >>>I've got a setup with Apache 2.2, Mod_Jk 1.2.15, and Tomcat 5.5.16 >>>and things are working pretty well except for relative links in my >>>webapp. >>> >>>When accessing my webapp at http://myserver.com/mywebapp/index.jsp >>>any relative links within subdirectories of the mywebapp directory >>>don't include /mywebapp/ in the URL. For example I have a mywebapp/ >>>includes/ directory and some of the files use links such as: >>> >>> >>> >>>Instead of linking to http://myserver.com/mywebapp/images/pic.jpg the >>>link is http://myserver.com/images/pic.jpg. >>> >>>I've read that if I remove the leading "/" from the links it will >>>work, but I already have a lot of links in this format and am >>>wondering if there is a configuration change or something else I can >>>do to resolve this. >>> >>>Thanks, >>>Steve Huey >>> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Autodeployment of web.xml Does Not Work
On 4/15/06, Wendy Smoak <[EMAIL PROTECTED]> wrote: > On 4/15/06, Evan J <[EMAIL PROTECTED]> wrote: > > > But again, "ANY" classes that does not have "url mapping" in > > WEB-INF/web.xml, would not be autodeployed even if Tomcat server is > > restarted. So once again, any class that has an existing url-mapping > > in WEB-INF/web.xml, can be recompiled and autodeployed upon placement > > in WEB-INF/classes but no newly compiled class that does not have > > url-mapping in web.xml can be autodeployed or deployed at all (or at > > least I get status 404 when I point my browser to the servlet). > > If there is no mapping in web.xml, Tomcat doesn't know what to do with > the request, so the 404 is expected. You can't just "point your > browser to the servlet". At least, not unless you enable the invoker > servlet... > > > http://vh.domain.com/SomeNewClass (or /servlet/SomeNewClass). > > ... and this URL containing /servlet/ makes me think you're working > from some old documentation that expects the invoker servlet to be > enabled. > > * http://tomcat.apache.org/faq/misc.html#evil > > You should put your servlet classes in packages and explicitly map > them in web.xml. URLs matching those mappings are the only ones you > can expect to work. > > Whether changes to web.xml are picked up without reloading the context > is a different question. I always re-deploy for web.xml changes, so > I'm not sure. > > You might want to try your experiments again, (using only URLs that > match mappings in web.xml,) and post another (shorter!) question if > you're still not seeing the behavior you want. > > -- > Wendy > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > Hi, The reason I posted my question in such a long thread was because I did not want any ambiguity as far as what has been done to tackle the issue. And from your response, I take it you did not read the post throughly. I wasn't following any document and the reason I mentioned servlet/MyClass was because, as for one of my settings in the Apache webserver, I had /servlet/* mounted for servlets but I had long gone moved away from that. As far as packaging, I mentioned that I had been trying to only examin this issue with web.xml redeployment and used packaging where it's applied. My problem lies in the realm of not being able to re-deploy web.xml for any modification. If I could get that to work, I would be more than happy to use the url-mapping to map my new classes. Again, I can access servlets accordingly with url-mapping already presented in web.xml but since I cannot redeploy it, I have no other choice but to restart the server. I wonder if I have understood the purpose of WatchedResource in Context correctly... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: Tomcat 5.5.16 configuration problem--THIRD RESEND
Hi, Do you really need that resource-ref in the web.xml. Your resource is defined under Context so you shouldn't need one. Other than that Your code looks fine and I can't see any problems with it. Regards. Hi, Why have you got servlet-api.jar under your WEB-INF/lib. You should Be using the servlet implementation that comes with tomcat (under common/lib). I don't know enough about tomcat to know what it would mean if you have the jar under WEB-INF/lib, but I am sure it won't be very happy with it. Regards. >OK, I removed the unnecessary Contexts (at least they are unnecessary >for the time being) and did notice the following messages. > >WARNING: A docBase c:\webapps\myapp inside the host appBase has been >specified, and will be ignored >Apr 15, 2006 2:09:41 AM org.apache.catalina.loader.WebappClassLoader >validateJarFile >INFO: >validateJarFile(D:\MSD\Prog0\NewsBrowser\webapps\medias\WEB-INF\lib\serv >let-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. >Offending class: javax/servlet/Servlet.class >Apr 15, 2006 2:09:41 AM org.apache.catalina.loader.WebappClassLoader >validateJarFile >INFO: >validateJarFile(D:\MSD\Prog0\NewsBrowser\webapps\medias\WEB-INF\lib\serv >let.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. >Offending class: javax/servlet/Servlet.class - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jasper Exception
I ported my Struts application from Tomcat 5.5.9 to Tomcat 5.5.16. When I ran the application, I got the following error: org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.tiles.UseAttributeTei org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) I googled the error and realized that others have experienced something similar but did not find any solutions. Your help would be appreciated. Thank you. - Asad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]