How to import a jsp into a jsp
Hello, I'm using jstl to make jsp's. I have code structures that are the same for a lot of jsp. I want to make a jsp with this structures, and then import them into the jsp. The problem that I've encountered is that, in this common jsp I define jstl variables that in the jsp that imports the common jsp I create. Is it possible to do it? For example: Common JSP: <%@ page contentType="text/html" %> <%@ taglib uri="http://jakarta.apache.org/taglibs/xml"; prefix="x" %> <%@ taglib uri="http://jakarta.apache.org/taglibs/core"; prefix="c" %> <%@ taglib uri="/s2ktaglib.tld" prefix="s2k" %> Normal JSP #The sentence to import the common JSP, that I don't know it . . . . . . A lot of thanks, Marcial Atienzar === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: How to import a jsp into a jsp
No problem, if you use the include directive (@ include) and not the . We do this for some 500 pages. > -Original Message- > From: A mailing list about Java Server Pages specification and reference > [mailto:[EMAIL PROTECTED]]On Behalf Of Marcial Atienzar Navarro > Sent: Thursday, January 09, 2003 12:16 PM > To: [EMAIL PROTECTED] > Subject: How to import a jsp into a jsp > > > Hello, > > I'm using jstl to make jsp's. I have code structures that are > the same for a lot of jsp. I want to make a jsp with this > structures, and then import them into the jsp. > > The problem that I've encountered is that, in this common jsp I > define jstl variables that in the jsp that imports the common jsp > I create. Is it possible to do it? > > For example: > > Common JSP: > > <%@ page contentType="text/html" %> > <%@ taglib uri="http://jakarta.apache.org/taglibs/xml"; prefix="x" %> > <%@ taglib uri="http://jakarta.apache.org/taglibs/core"; prefix="c" %> > <%@ taglib uri="/s2ktaglib.tld" prefix="s2k" %> > > > dataName="cadena_buscada"/> > > > Normal JSP > > #The sentence to import the common JSP, that I don't know it > . > . > . > > > > . > . > . > > A lot of thanks, > > Marcial Atienzar > > == > = > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set > JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
[no subject]
>How do you find values in HttpSessonListener? Can you be a bit specific? >Say, if I store set session variable useName with the value "abc". How do >I get that value in HttpSessionListener? See Session Administration in JSOS: http://www.servletsuite.com/servlets.htm and Session Administration taglib in Coldtags suite: http://www.servletsuite.com/servlets/sessadmtag.htm -- Coldbeans Software - server-side Java (tm) components http://www.servletsuite.com __ The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Location.href
I have a button on a page that uses location.href to go to other pages. One of these buttons options goes to the previous page. However, it loads the page out of history rather than loading a new page from the server.url Replace does not work and gives syntax error and other options so far load a blank page. Any suggestions. Best, Keith E. Kosmicki Applications Consultant State of IL Human Services STL Technology Partners ==To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Location.href
Try 1)Configure your Browser to Check for newer version of page for Every visit to the page..2)Clear the cache (again Browser settings)3)Find out if there is a Proxy Server that is caching the pages ..if so as the Admin to down itfor your tests Martin Gainty __In my next life I want Health Insurance..-Personal Quote _GMT-5___ >From: KEITH KOSMICKI <[EMAIL PROTECTED]> >Reply-To: A mailing list about Java Server Pages specification and reference <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Location.href >Date: Thu, 9 Jan 2003 09:36:45 -0600 >MIME-Version: 1.0 >Received: from mc2-f29.law16.hotmail.com ([65.54.237.36]) by mc2-s7.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Thu, 9 Jan 2003 07:39:25 -0800 >Received: from swjscmail2.java.sun.com ([192.18.99.108]) by mc2-f29.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Thu, 9 Jan 2003 07:39:24 -0800 >Received: from swjscmail1 (swjscmail1.Sun.COM [192.18.99.107])by swjscmail2.java.sun.com (Postfix) with ESMTPid 8868D215E2; Thu, 9 Jan 2003 08:33:58 -0700 (MST) >Received: from JAVA.SUN.COM by JAVA.SUN.COM (LISTSERV-TCP/IP release 1.8d) with spool id 5038617 for [EMAIL PROTECTED]; Thu, 9 Jan 2003 08:31:34 -0700 >Received: from mail.dhs.state.il.us (mail.dhs.state.il.us [163.191.134.131]) by swjscmail1.java.sun.com (Postfix) with ESMTP id 9867F4811 for <[EMAIL PROTECTED]>; Thu, 9 Jan 2003 08:31:34 -0700 (MST) >Received: from DSMTP-MTA by mail.dhs.state.il.us with Novell_GroupWise; Thu, 09 Jan 2003 09:36:56 -0600 >Delivered-To: [EMAIL PROTECTED] >X-Mailer: Novell GroupWise Internet Agent 6.0.2 >Message-ID: <[EMAIL PROTECTED]> >Sender: A mailing list about Java Server Pages specification and reference <[EMAIL PROTECTED]> >Return-Path: [EMAIL PROTECTED] >X-OriginalArrivalTime: 09 Jan 2003 15:39:24.0847 (UTC) FILETIME=[498A5BF0:01C2B7F5] > >I have a button on a page that uses location.href to go to other pages. >One of these buttons options goes to the previous page. >However, it loads the page out of history rather than loading a new page from the server.url >Replace does not work and gives syntax error and other options so far load a blank page. Any suggestions. > >Best, > > >Keith E. Kosmicki >Applications Consultant >State of IL Human Services >STL Technology Partners > >==To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". >Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com The new MSN 8 is here: Try it free* for 2 months === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Location.href
Am Donnerstag, 9. Januar 2003 16:36 schrieb KEITH KOSMICKI: > I have a button on a page that uses location.href to go to other pages. > One of these buttons options goes to the previous page. > However, it loads the page out of history rather than loading a new page > from the server.url Replace does not work and gives syntax error and other > options so far load a blank page. Any suggestions. Obviously, the previous page was cached. For dynamic pages that should be requested again each time, you have to tell the browser | proxy that it shouldn't use the cache. Unfortunately, the mechanism is not standardized, but putting the following lines in your JSP page somewhere before sending body content should normally suffice: <% response.addHeader("Pragma", "no-cache"); response.setHeader("Cache-control", "no-cache"); response.setDateHeader("Expires", 0); %> There is a fourth possible line which I saw once but don't remember right now, but that's kind of esoteric anyway. As this is a common task, you can also write a handy little tag for such stuff, as described in O'Reilly's JSP book, for example (www.TheJSPBook.com). If the page in question is static HTML, those lines should go into tags in the section of your page. HTH, -- Chris (SCPJ2) OK, I'll also add the code for my own solution. Most parts are generated by Sun ONE Studio, as I was lazy and used the wizard, so the code is kind of verbose. But still. Here it comes: package de.christianbollmeyer.tags; import javax.servlet.jsp.tagext.TagSupport; import javax.servlet.jsp.JspException; import javax.servlet.jsp.PageContext; import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.jsp.tagext.BodyTagSupport; import javax.servlet.jsp.tagext.BodyContent; import javax.servlet.jsp.JspWriter; import java.io.PrintWriter; import java.io.IOException; import javax.servlet.jsp.tagext.Tag; import javax.servlet.jsp.tagext.IterationTag; import javax.servlet.jsp.tagext.BodyTag; public class NoCacheTag extends TagSupport { public NoCacheTag() { super(); } // doStartTag() public void otherDoStartTagOperations() {} public boolean theBodyShouldBeEvaluated() { return false; } // doEndTag() public void otherDoEndTagOperations() { HttpServletResponse rsp = (HttpServletResponse)(Object) pageContext.getResponse(); rsp.addHeader("Pragma", "No-cache"); rsp.addHeader("Cache-Control", "no-cache"); rsp.addDateHeader("Expires", 0L); } public boolean shouldEvaluateRestOfPageAfterEndTag() { return true; } // doAfterBody() public boolean theBodyShouldBeEvaluatedAgain() { return false; } /** .//GEN-BEGIN:doStartTag * * This method is called when the JSP engine encounters the start tag, * after the attributes are processed. * Scripting variables (if any) have their values set here. * @return EVAL_BODY_INCLUDE if the JSP engine should evaluate the tag body, otherwise return SKIP_BODY. * This method is automatically generated. Do not modify this method. * Instead, modify the methods that this method calls. * */ public int doStartTag() throws JspException, JspException { otherDoStartTagOperations(); if (theBodyShouldBeEvaluated()) { return EVAL_BODY_INCLUDE; } else { return SKIP_BODY; } }//GEN-END:doStartTag /** .//GEN-BEGIN:doEndTag * * * This method is called after the JSP engine finished processing the tag. * @return EVAL_PAGE if the JSP engine should continue evaluating the JSP page, otherwise return SKIP_PAGE. * This method is automatically generated. Do not modify this method. * Instead, modify the methods that this method calls. * */ public int doEndTag() throws JspException, JspException { otherDoEndTagOperations(); if (shouldEvaluateRestOfPageAfterEndTag()) { return EVAL_PAGE; } else { return SKIP_PAGE; } }//GEN-END:doEndTag } > Best, > > > Keith E. Kosmicki > Applications Consultant > State of IL Human Services > STL Technology Partners > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set > JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com ==To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found
No action instance for path /register could be created
I am learning struts, I bought the book "Struts in Action" but when I tried the first example register.jsp , when I submit I got this error : HTTP Status 500 - No action instance for path /register could be created The server encountered an internal error (No action instance for path /register could be created) that prevented it from fulfilling this request. could you please help. thanks _ The new MSN 8 is here: Try it free* for 2 months http://join.msn.com/?page=dept/dialup === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
advice on jsp include
Hi all, I have a web app in which all the pages have exactly the same header, side bar and footer. At first I was going to make these 3 seperate jsp files and use a jsp include, (probably the <%@ include %> since the pages won't change?). Then the web designer returned a 'template' to me which had all 3 on one page, laid out, with an area, a table cell which contains the actual difference for each page, the idea being that if I have 10 different pages I can make 10 copies of the template and just fill in the table cell. So then I thought, what about just having the one 'template' page which all the webapp links reference, and include the portion that changes, using the include statement and using a request attribute to tell the page what to include. For example like this: I hope I being clear. I guess what I'm asking is the pro's cons of such a setup. I haven't really seen anyone else doing it and am wondering if this is because it increases compilation time significantly or something else I don't know about. Is there a better way to do it? Any comments / criticisms appreciated Thanks Joel === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com