jGuru maintains FAQs and Forums on Servlets, JSP, and Tomcat (as well as many other Java topics). Here is an automated update on recent postings to Tomcat-related FAQs. Please direct flames and feedback to [EMAIL PROTECTED] .
- Alex ++ JavaServer Pages (JSP) FAQ: http://www.jguru.com/faq/JSP I have several jsp pages that are referenced in an SSL server, and non-SSL server. To avoid the "this document contains some unencrypted data" error, I want to have it look at the HTTPS variable apache sets and see if its in secure mode. <p> So, if $HTTPS == on, I want to write:<br> img src="https://content.domain/images/foo.jpg" <br> else I want to write:<br> img src="http://content.domain/images/foo.jpg How do I do this? http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=741813 How can I make a JSP page implement the SingleThreadedModel interface? http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=741113 Using JSP I can use implicit object <tt>exception</tt> when my JSP page is declared with <%@ page isErrorPage="true" %> directive. But how to get this reference programmatically, for example with a servlet ? http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=740991 <p>I have a framed JSP application and would like to make it so pages meant to be viewed as a frame can only be viewed as a frame. <p>So, if they type the direct URL to that frame, I would like that page to check to see what frame it is in, and if it is in, say, _top, then redirect to the main (framed) page. <p>Is this possible? http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=740988 I want to ship my JSP-based application to my customers by bundling it with Tomcat. Is Jakarta Tomcat 4.0 freeware? http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=740986 If we declare a variable, say int i=3 in jsp file, then in what method does this variable reside? Is it within service() or the init() method? If this resides in service(), how can I make to be in init() and vice versa? http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=739377 I want to create a Error Page and save the StackTrace within a String type variable.<br> <p> My code is:<p> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><br> <%@ page import="java.lang.Exception,java.io.*"%><br> <%@ page isErrorPage="true" %><br> <html><br> <head><br> <title>Untitled</title><br> </head><br> <body><br> Fehler!!!!<p> <p>Fehler: <%=exception.getMessage()%> <p><% PrintWriter writer = new PrintWriter(out);%> Stack: <% exception.printStackTrace(writer);%> <p>getLocalizedMessage = <%=exception.getLocalizedMessage()%> <p>toString = <%=exception.toString()%><br> </body><br> </html><p> But here, the StackTrace is printed directly within the Page. How do I save it in a String variable? I want to send myself an automatic report if there is any error.<p> http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=739375 <p>Hello! I am trying to include a JSP page that contains commonly used html/java code, into another JSP page multiple times using the jsp include directive.</p> <p>This causes the parser in Websphere Appl. Server 3.5.3 to display an error page that says<br> <tt>org.apache.jasper.compiler.ParseException: Seen file include.jsp already, maybe this is a recursive include?!</tt></p> <p>However, when developing and testing the JSP page in Visual Age's 4.0 Websphere Test Environment, everything works fine....Why?</p> <p>If Websphere Application Server is right about not allowing me to include the same JSP page several times, is there some other way perform this task?</p> http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=739372 I need to allow users to upload files and pictures. <br> When they upload pictures, I need to create thumbnail for them on the fly. <br> Is there any taglibs or java source to do this from JSP or servlets? http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=735673 I need to allow users to upload files and pictures. <br> When they upload pictures, I need to create thumbnail for them on the fly. <br> Is there any taglibs or java source to do this from JSP or servlets? http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=735672 My Jsp file need to forward a request to another servlet which is located in another Web Application on another machine. How can I do that? If I also want to add more parameters to the original request from the jsp file, what should I do? http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=735653 ++ Servlets FAQ: http://www.jguru.com/faq/Servlets Using JSP I can use implicit object <tt>exception</tt> when my JSP page is declared with <%@ page isErrorPage="true" %> directive. But how to get this reference programmatically, for example with a servlet ? http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=740991 Why do I get the error <b>org.xml.sax.SAXParseException : Element type "web-app" must be declared</b> when starting my web application? It has a <tt>web-app</tt> element already! http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=740497 How can I prevent the expiration of a Session?<br> http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=738277 ++ Tomcat FAQ: http://www.jguru.com/faq/Tomcat Why do I get the error <b>org.xml.sax.SAXParseException : Element type "web-app" must be declared</b> when starting my web application? It has a <tt>web-app</tt> element already! http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=740497 You can shut email notification off at the FAQ home page(s) or: http://www.jguru.com/guru/notifyprefs.jsp -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>