problem with jsr168 with customtag - Websphere

This is a discussion on problem with jsr168 with customtag - Websphere ; Hi Friends, i am facing one problem when using jsp customtag with jsr168 portlet that i have used values in dropdown list-- to be applied to be issue some thing if we select 'to be applied' i just can get ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: problem with jsr168 with customtag

  1. problem with jsr168 with customtag

    Hi Friends,

    i am facing one problem when using jsp customtag with jsr168 portlet that



    i have used values in dropdown list-- to be applied

    to be issue

    some thing



    if we select 'to be applied' i just can get only 'to' first word, i unable to get entire sentence.


    tag handler class:




    package mytaghandlers;

    import misreport1.Constants;

    import misreport1.MISReport1Portlet;



    import java.io.PrintWriter;

    import java.util.List;



    import javax.servlet.jsp.JspException;

    import javax.servlet.jsp.PageContext;

    import javax.servlet.jsp.tagext.TagData;

    import javax.servlet.jsp.tagext.TagExtraInfo;

    import javax.servlet.jsp.tagext.TagSupport;

    import org.apache.taglibs.standard.lang.support.*;



    public class ListItaration extends TagSupport{



    List _list=null;

    public String s1=null;

    // public PageContext context=null;

    public void setPageContext(PageContext context){

    //this.context=context;

    super.setPageContext(context);

    }



    public int doStartTag() {

    try {

    int index=0;

    System.out.println("list1 values------------------"+_list);

    pageContext.getResponse().setContentType("text/html");

    pageContext.getOut().println(" index){



    pageContext.getOut().println(" option value=" ((List)_list.get(index)).get(0) "+

    ((List)_list.get(index)).get(0) +

    " ");


    index++;



    }



    }



    catch (Exception e) {

    System.err.println(e.toString());

    }

    return SKIP_BODY;

    }


    public void setValue(List _list) throws Exception{

    this._list=_list;


    }


    public int doEndTag() throws JspException{

    try {


    }

    catch (Exception ioe){

    System.err.println(ioe.getMessage());

    }

    return EVAL_PAGE;

    }



    }


    custom tag:








    usage in jsp:




    itaration:list value="



    code in portlet:




    System.out.println(request.getParamter('select tag name'));



    out put for 'to be applied value' is 'to'


    please let me know that solution.

  2. Re: problem with jsr168 with customtag

    well the big problem looks to be

    pageContext.getOut().println(" "+

    ((List)_list.get(index)).get(0) +



    you are not escaping the quites that you should have show up in the html so that you end up with



    my Test


    Instead you should have

    pageContext.getOut().println(" "+

    ((List)_list.get(index)).get(0) +




    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  3. Re: problem with jsr168 with customtag

    Hi friend,



    I got it by fallowing your sugission

    thanks a lot.

+ Reply to Thread