Results 1 to 3 of 3

Thread: Scripting Variables

  1. #1
    LewisClark is offline Senior Member
    Join Date
    Dec 2009
    Posts
    260
    Rep Power
    3

    Default Scripting Variables

    I am last year BSc(I.T) student.I have little bit knowledge of Java Programming Language.currently I am learning JSP(Java Server Pages). I want detail information about the Scripting Variables in JSP. If you are having any information about it, then please give me that, it will be helpful to me.Thanks in advanced.

  2. #2
    WalkerCook is offline Senior Member
    Join Date
    Dec 2009
    Posts
    253
    Rep Power
    3

    Default

    if you declare variable from the JSP script then that variables are called as JSP scripting variable. So, the JSP tags Scripting variables are the variables are the page level variables declared by jsp tags. If you think about the variable below then you will come to know about the Jsp tag scripting variables:

    Code:
    <star:secondtag>
    	<p align="center">Date value retrieved from JSP Tag : <%= time %></p>
    </star:secondtag>

  3. #3
    AllenBrown is offline Senior Member
    Join Date
    Dec 2009
    Posts
    240
    Rep Power
    3

    Default

    Following code which is given below is helpful for you to understand JSP tag variables.

    Code:
    package com.stardeveloper.tag.test;
    
    import java.util.*;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    
    public final class SecondTag implements Tag {
    
    	private PageContext pc = null;
    
    	
    	public void setPageContext(PageContext p) {
    		pc = p;
    	}
    
    	public void setParent(Tag t) {}
    
    	public Tag getParent() { return null; }
    
    	public int doStartTag() throws JspException {
    		Calendar cal = Calendar.getInstance();
    		pc.setAttribute("time", cal.getTime().toString());
    
    		return EVAL_BODY_INCLUDE;
    	}
    
    	public int doEndTag() throws JspException {
    		return EVAL_PAGE;
    	}
    
    	public void release() {
    		pc = null;
    	}
    }

Similar Threads

  1. Difference between awk and sed scripting
    By PerryCollins in forum Programming
    Replies: 2
    Last Post: 04-01-2010, 02:23 PM
  2. Variation among awk and sed scripting
    By Davismoore in forum Video Card
    Replies: 3
    Last Post: 03-29-2010, 03:05 PM
  3. Practice Scripting In Frinika
    By shaun12 in forum Everything Else
    Replies: 0
    Last Post: 08-02-2008, 04:09 PM
  4. Basic Scripting Rules
    By jack01 in forum Everything Else
    Replies: 0
    Last Post: 07-01-2008, 01:59 PM
  5. Practice Scripting In Frinika
    By networkman in forum Applications
    Replies: 0
    Last Post: 05-17-2008, 02:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48