Proble with Struts Taglib "logic:iterate"

I m designing an simple application, it uses to input some data and then display them.
For example,I want to input studentID,studentName into the database,but i want to input more than one student data each time.
This is my FormBean souce:
package system.form;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMessage;
import javax.servlet.http.HttpServletRequest;
public class StudentForm {
    private String[] studentID;
    private String[] studentName;
    public String[] getStudentID() {
         return studentID;
    public String[] getStudentName() {
         return studentName;
    public void set(String[] field) {
         studentID = field;
    public void set(String[] field) {
         studentName = field;
}This is my form:
<html:form method="post" action="/add">
    StudentID: <html:text property="studentID"/>
    StudentName:<html:text property="studentName"/>
    <br/>
    StudentID: <html:text property="studentID"/>
    StudentName:<html:text property="studentName"/>
    <br/>
    <html:submit value="add"/>
</html:form>The problem is: my StudentForm is in SESSION scope.So after i have input some data,i return to the input page, the text filed will display the data i inputed last time.
But when i do it, i saw the data in the field are like this:
[Ljava.lang.String;@595420
[Ljava.lang.String;@a218a5
[Ljava.lang.String;@2f54
Not the data i input,I think the problem is that my attribute in the StudentForm is array string, not string. So there is any problem when display.
What can i do to resolve it?
Also,there is another problem.
In my input page. I must iterate the input field like:
StudentID: <html:text property="studentID"/>
    StudentName:<html:text property="studentName"/>
    <br/>
    StudentID: <html:text property="studentID"/>
    StudentName:<html:text property="studentName"/>
    <br/>
    ....So when i want to input 10 records each time, i must iterate the html above 10 times,and then 20 records needs iterating 20 times, it's bald and it makes the page hard to read and maintain.
So i want to use Struts's Tag <logic:iterate> to manipulate it.
But i don't know how to use it.
Can anybody give me a hand? Thank u.

First of all, the studentID and the studentName are related. If you keep them as two separate String arrays, it will be very hard to use logic:iterate to display them together.
I would suggest that you first create a VO class which contains only studentID and studentName and have getter-setter methods for them. (This is logically good as you are modelling a student using a separate class) And, in your form, declare a studentVO[ ] and have getter-setter methods. You may need to change them and add new ones as they will have to be indexed. This can be looked up in the Struts documentation page.
Finally in your jsp, iterate over the studentVO[ ] bean and give the respective getter property of studentID and studentName in VO with indexed = "true"....
<logic:iterate id = "studentVO" name = "<formbean name>" property = "studentVO">
<html:text name="studentVO" property = "studentID" indexed = "true"/>
<html:text name="studentVO" property = "studentName" indexed = "true"/>
etc..
</logic:iterate>
(Note that you may have to give the type attribute in your logic:iterate so that it may be cast into the right VO object)
Hope this helps.

Similar Messages

  • Help with JSP and logic:iterate

    I have some queries hope someone can help me.
    I have a jsp page call request.jsp:
    ====================================
    <%@ page import="java.util.*" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <html>
    <body>
       <%@ page import="RequestData" %>
       <jsp:useBean id="RD" class="RequestData" />
       <%Iterator data = (Iterator)request.getAttribute("Data");%>
       <logic:iterate id="element" name="RD" collection="<%=data%>">
          <jsp:getProperty name="RD" property="requestID" />
          <%=element%><br>
       </logic:iterate>
    </body>
    </html>
    And I have the RequestData.java file:
    ======================================
    private int requestID = 1234;
    public int getRequestID() { return requestID; }
    The jsp page display:
    ======================
    0 RequestData@590510
    0 RequestData@5b6d00
    0 RequestData@514f7f
    0 RequestData@3a5a9c
    0 RequestData@12d7ae
    0 RequestData@e1666
    Seems like the requestID is not returned. Does anybody know this?
    I have done the exact one using JSP and servlets, trying to learn using JSP and custom tags. The one with JSP and servlet looks like:
    ============================================
    <%@ page import="RequestData" %>
    <%Iterator data = (Iterator)request.getAttribute("Data");
    while (data.hasNext()) {
       RequestData RD = (RequestData)data.next();
       out.println(RD.getRequestID() );
    }%>

    Oh think I got it...
    but one thing I'm not sure is...
    If I use "<jsp:useBean id="RD" class="RequestData" />", do I still need "<%@ page import="RequestData" %>"?
    I tried without and it gives me error...

  • Help with struts taglib

    hi all,
    RE: Somebody had said i can use nester iterate..... but i havo no idea about that...... so plz answer with an example.....plz
    i need help rendering an ArrayList of HashMaps in jsp.
    Problem:
    I created a ArrayList of HashMaps in the action class and set it in session. Now i need to display it in the JSP. i tried all the taglib options was not able to do it.
    Using scriplets i could do it.... here is the scriptlet code....
    =====================================
    <%
    //Array list for getting the arraylist from the session
    java.util.ArrayList arrlist = new java.util.ArrayList();
    arrlist=(java.util.ArrayList)session.getAttribute("resultList");
    //HashMap to take the hashmap from the arraylist
    java.util.HashMap hash = new java.util.HashMap();
    int i, arraysize,hashsize;
    Object transactionId;
    java.util.Set keys;
    java.util.Iterator iter;
    if(arrlist!=null)
    i=0;
    //Calculating the size of the arraylist to control the execution
    arraysize=arrlist.size();
    if(arraysize == 0)
    %>
    <center class="info"><b><bean:message key="useractivity.norecord"/></b></center>
    <%
    }else{
    System.out.println(arraysize);
    //Iterator to iterate throught the arraylist
    java.util.Iterator iterator = arrlist.iterator ();
    %>
    <table border="1" width="75%" align="center" cellspacing="0">
    <tr class="tableHead">
    <td width="70" >Txn ID</td>
    <td width="70" >Txn GUID</td>
    <td width="48" >Date</td>
    <td width="120">Type Of Activity</td>
    <td width="83" >Status code</td>
    </tr>
    <%
    while(iterator.hasNext()&& (arraysize>0)){
    //getting the hashmap from the arraylist and extracing the information to display in the table
    hash = (java.util.HashMap)arrlist.get(i);
    hashsize=hash.size();
    keys = hash.keySet();
    iter= keys.iterator();
    i++;
    arraysize--;
    transactionId=hash.get("ID");
    %>
    <!-- Populating the table and making the transaction ID clickable -->
    <tr class="tablein">
    <td><a class="mainlink" href="bssUserReportDetail.do?transactionID=<%=transactionId%>"><%=transactionId%></a></td>
    <td><%=hash.get("TRNXN_GUID")%></td>
    <td><%=hash.get("TRNXN_DATE")%></td>
    <td><%=hash.get("DB_TRNXN_TYPE_ID")%></td>
    <td><%=hash.get("TRNXN_STAT")%></td>
    </tr>
    <%
    session.setAttribute("resultList",null);
    // For making the checkbox clicked default and the default value is "Today"
    %>
    </table>
    <%
    else{} %>
    ==================================================
    now how can i do the same with taglibs. i mean some thing like <bean:write> inside <logic:iterator> ..i guess.
    please help.
    Praneeth Medukonduru

    HI,
    I am tryign to do the same.Did you find the solution ?
    Thanks

  • Problem in using logic:iterate in struts

    Hello all,
    I have developed 1 application using struts.I am getting this error in my JSP.I have used logic:iterate.I am able to see the list of topics in my JSP but I am getting error when I am clicking on the hyperlink.This is the error.Please help me.Any help will be highly appreciated.Thanx in advance.
    ApplicationDispatcher[TGMC_DB1-2009] PWC1231: Servlet.service() for servlet jsp threw exception
    javax.servlet.jsp.JspException: Cannot find bean: "topic_list" in any scope
    at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
    at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232)
    at org.apache.jsp.viewThreads_jsp._jspService(viewThreads_jsp.java from :121)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:853)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366)
    at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
    at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
    at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
    at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    StandardWrapperValve[action]: PWC1406: Servlet.service() for servlet action threw exception
    javax.servlet.jsp.JspException: Cannot find bean: "topic_list" in any scope
    at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
    at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232)
    at org.apache.jsp.viewThreads_jsp._jspService(viewThreads_jsp.java from :121)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:853)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366)
    at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
    at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
    at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
    at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    *//Action class*
    package com.myapp.struts;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import java.util.ArrayList;
    public class DiscussionForumViewAction extends Action {
      public ActionForward execute(ActionMapping mapping,
        ActionForm form,
        HttpServletRequest request,
        HttpServletResponse response)
        throws IOException, ServletException
          String target = new String("success");
            try
             ArrayList TopicList = null;
             TopicList= Discussion_Forum.getTopics();
             request.setAttribute("topic_list",TopicList);
            catch(Exception ex)
                System.out.println(ex.getMessage());
          return (mapping.findForward(target));
    *// jsp*
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
        </head>
        <body>
            <html:form action="/view_topic.do">
            <br><br><br>
    <center><h2><u>Discussion Forum</u></h2></center>
    <br><br>
            <div align="center">
                  <html:errors />
                <table border="1" cellspacing="0" cellpadding="0">
                                <thead>
                                 <tr>
                                    <th>Forum</th>
                                    <th>Topic/Messages</th>
                                   <th>Last Post</th>
                                 </tr>
                                </thead>
                                <tbody>
                                    <logic:present name="topic_list" scope="request">
                                      <logic:iterate id="TopicForm" name="topic_list">
                                        <tr align="left">
                                          <td>
                                             *<a href="get_threads.do?topic_id=<bean:write name="TopicForm" property="topic_id"/>"><font color="#336699">     <bean:write name="TopicForm" property="topic_name"/></font></a>*
                                        </td>
                                        <td>
                                        <bean:write name="TopicForm" property="no_of_threads"/>
                                       </td>
                                       <td>
                                       <bean:write name="TopicForm" property="last_post" />
                                      </td>
                                    </tr>
                                </logic:iterate>
                            </logic:present>
                     </tbody>
               </table>
            </div>
        </html:form>
    </body>
    </html>
    *//struts config*
        <action path="/view_topic"
                   type="com.myapp.struts.DiscussionForumViewAction"
                   name="TopicFormBean"
                   scope="session"
                   validate="true"
                   input="/Discussion_forum.jsp">
                   <forward name="success" path="/Discussion_forum.jsp" />
                   <forward name="failure" path="/welcomeStruts.jsp" />
           </action>
    *//formbean*
    package com.myapp.struts;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    public class TopicFormBean extends ActionForm {
      protected String topic_name;
      protected String description;
      protected Integer no_of_threads;
      protected String last_post;
      protected Integer topic_id;
        public String getTopic_name() {
            return topic_name;
        public void setTopic_name(String topic_name) {
            this.topic_name = topic_name;
        public String getDescription() {
            return description;
        public void setDescription(String desc) {
            this.description = desc;
         public Integer getNo_of_threads() {
            return no_of_threads;
        public void setNo_of_threads(Integer no_of_threads) {
            this.no_of_threads = no_of_threads;
        public String getLast_post() {
            return last_post;
        public void setLast_post(String last_post) {
            this.last_post = last_post;
         public Integer getTopic_id() {
            return topic_id;
        public void setTopic_id(Integer topic_id) {
            this.topic_id = topic_id;
          }

    Thanx Praveen,
    I have already googled this error.I found many people have already posted this problem.But my problem is different.I am getting error only when clicking on hyper link otherwise that arraylist is displaying result on jsp.
    I have also gone through this link
    http://blog.smartlogicsolutions.com/2007/06/12/struts-11-problems-with-logiciterate-tags-and-cannot-find-bean-xxx-under-any-scope/
    It talks about :-
    1) using logic:present tag if your arraylist can be null.
    2) Take care that getter setter are properly written.. I mean there are no spelling mistakes.
    3)arraylist is set in request scope.
    4)I have also included the necessary taglibs.
    I have confirmed all these things.Please help me.I am pretty new to java.Thanx.
    Neha

  • Using Logic iterate to display a arraylist in STRUts

    I m having a form bean containg a string array......
    <form-bean
    name="myDynaForm"
    type="org.apache.struts.validator.DynaValidatorForm">
    <form-property name="names" type="java.lang.String[]" />
    </form- bean>
    and in my jsp , i m using .......
    <logic:iterate name="myDynaForm" property="names" id="names" >
    <tr>
    <td class="style3" align="left" width="30%" >
    <html:textarea property="names" cols="40" rows="2" size="40" indexed="true" readonly="true" />
    </td>
    </tr>
    Now this code is printing only the first element of String names.
    How can i print all the elemts of answer in my jsp

    How could you do the same thing but using only two cells?
    where the check box returns a specific value in the second.
    in this instance its for a staff registration sheet where a checkbox in (A) would return a set value in (B)
    i know this might sound simple to you guys in the know but i cant figure it out! I have been messing around trying things with the if function but still only shows me the red triangle (syntax error).
    A simple solution would be much appreciated.

  • Using Strut Logic Iterate tag in JavaScript

    Has anyone tried this or experienced this problem.
    I have JSP pages with JavaScript imbedded. Not my web page but an out of the box portal we bought from a vendor. The JavaScript uses the Logic Iterate Strut tag but gives an error in Nitro:
    "feature is not resolved" on the lines where getLink() and getID() are called. I have put the code in other editors and it does not give me any error. Does any one have a clue to why this error occurs or is this something that NitroX can not handle?
    Thanks,
    Zim 8)
    Some of Code:
    function selectFolder(folderName,doExpandPath)
                        if (typeof(doExpandPath) == 'undefined')
                             doExpandPath = true;
                        var form = document.forms['TreeForm'];
                        // unselect old one
                        var cell = document.getElementById(selectedId);
                        if (null != cell)
                             cell.className = '';
                        // select new one
                        if ('/' == folderName.charAt(folderName.length-1))
                             folderName = folderName.substring(0,folderName.length-1);
                        var targetCellId = 'cellLabel./Documents'+folderName;
                        var isContentFolderBrowser = true;
                        try {
                             var sideBarSelected = top.frames['main'].window.sideBarSelected;
                             isContentFolderBrowser = '/getfolderitems.do' == sideBarSelected;
                             if (!isContentFolderBrowser) {
                             <logic:iterate id="feature" name="userinfobean" property="sideBarFeatures"
                                       type="com.actuate.activeportal.functionality.config.Feature">
                                       if (sideBarSelected == '<%= feature.getLink()%>' )
                                            targetCellId = 'cellLabel./<%= feature.getID()%>';
                                  </logic:iterate>
                        } catch (e) {
                        cell = document.getElementById(targetCellId);

    May I ask why have you done it?
    If it is related to printing of the list then it is of no use.But it IS of use. The objects compEmployees is in scope.
    It has the list we want to print out.
    With logic:iterate:
    <table>
         <tr>
           <th>Number</th>
           <th>Employee</th>
         </tr>
         <logic:iterate name="compEmployees" property="totalEmps" id="emp">
              <tr>
                <td>
                  <bean:write name="emp" property="empNo"/>
                </td>
                <td>
                  <bean:write name="emp" property="empName"/>
                </td>
              </tr>
         </logic:iterate>
    </table>or alternatively with JSTL and c:forEach
    <table>
         <tr>
           <th>Number</th>
           <th>Employee</th>
         </tr>
         <c:forEach items="${compEmployees.totalEmps}" var="emp">
              <tr>
                <td>
                  <c:out value="${emp.empNo}"/>
                </td>
                <td>
                  <c:out value="${emp.empName}"/>
                </td>
              </tr>
         </c:forEach>
    </table>Cheers,
    evnafets

  • Help with Jsp: logic:iterate  Cannot create iterator for this collection

    Hello,
    I am developing a jsp with struts. This is the snap of the code:
            <logic:iterate id="prod" collection="productList" >
              <tr align="center">
                   <td><html:text property="prodDesc" size="50" indexed="true"/></td>
                   <td>
                        <html:select property="prodUnit" indexed="true">
                             <option selected>-</option>
                            <OPTION VALUE='NMB'>NMB
                             <OPTION VALUE='TEN'>TEN
                             <OPTION VALUE='TPR'>TPR
                             <OPTION VALUE='GWH'>GWH
                        </html:select>
                   </td>
                   <td><html:text property="prodQty" size="20" indexed="true"/></td>
                   <td><html:text property="prodVal" size="20" indexed="true"/></td>               
              </tr>
            </logic:iterate>"productList" is defined as an array of Product[], "prod" is defined as a single Product object in the form. But when i run the page, it gives me this errors:
    "javax.servlet.jsp.JspException: Cannot create iterator for this collection".
    I also tried to make "productList" an ArrayList type, but it game me this same error.
    We are using Websphere 4.0 with Struts 1.1.
    Anyone can help?
    Thanks a lot.
    All the best,
    warren

    Hi , I have similar problem. wonder anyone can help me. I have a datastructure. ArrayList contains list of Hashtable; each Hashtable has two key-value sets ; for each key-value set , value is a ValueObject.
    My jsp works ok. but when I click on the radio butten for one radio group, it sets not only the porperty on that row, but the rows belows ,which suppose to be another radio group , because I am using indexed="true". each row should be a individual group seperated by the name poDisplayVO[i] , as show in the html generated .
    <!-- JSP -->
    <logic:iterate id="poDisplayVO"
    name="testForm"
    property="poDisplayVOList"
    type="java.util.Hashtable">
    <tr>
    <td>
    <bean:write name="poDisplayVO" property="name"/>
    </td>
    <td>          
    <% String val = ((java.util.Hashtable)poDisplayVO).get("subjAreaName").toString();%>
    <html:radio indexed="true" name="poDisplayVO" property="fosVO.select" value="<%=val %>" />
    <bean:write name="poDisplayVO" property="subjAreaName"/>
    </td>
    <td>           
    <html:radio indexed="true" name="poDisplayVO" property="fosVO.select" value="no" /> NO
    </td>
    <td>           
    <html:radio indexed="true" name="poDisplayVO" property="fosVO.select" value="yes" /> YES
    </td>
    </tr>
    </logic:iterate>
    <! ------------------------ html genterated ------------------------------------------------>
    the HTML generated as folllows:
    <tr>
    <td>
              Accounting Studies
    </td>
    <td>          
         <input type="radio" name="poDisplayVO[0].fosVO.select" value="Accounting">
              Accounting
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[0].fosVO.select" value="no"> NO
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[0].fosVO.select" value="yes"> YES
    </td>
    </tr>
    <tr>
    <td>
              Accounting Studies
    </td>
    <td>          
         <input type="radio" name="poDisplayVO[1].fosVO.select" value="Bookkeeping">
              Bookkeeping
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[1].fosVO.select" value="no"> NO
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[1].fosVO.select" value="yes"> YES
    </td>
    </tr>
    <tr>
    <td>
              Accounting Studies
    </td>
    <td>          
         <input type="radio" name="poDisplayVO[2].fosVO.select" value="Computerized Accounting(Duplicate)">
              Computerized Accounting(Duplicate)
    </td>
    <td>           
    <input type="radio" name="poDisplayVO[2].fosVO.select" value="no"> NO
    </td>
    <td>           
    <input type="radio" name="poDisplayVO[2].fosVO.select" value="yes"> YES
    </td>
    </tr>
    <! ------------------------ action form-----------------------------------------------
    public ArrayList getPoDisplayVOList() {
         return poDisplayVOList;
    public void setPoDisplayVOList(ArrayList list) {
         poDisplayVOList = list;
    public Hashtable getPoDisplayVO(int i) {
         Object obj = poDisplayVOList.get(i);
         if (obj == null)
              obj = new Hashtable();
              poDisplayVOList.add(obj);
         return (Hashtable)poDisplayVOList.get(i);
    public void setPoDisplayVO(Hashtable programDisplayVO, int i) {
              poDisplayVOList.add(i, programDisplayVO);
         }

  • Why can't  the JSP display the data with logic:iterate?

    Hi,all
    I am writing a web application with Struts framework. I dont know what's the problem when I use the tag logic:iterate in my application. I have created a form bean follow source code:
    public class ProductsForm extends ActionForm {
         private Vector alist;
         public void reset(ActionMapping mapping, HttpServletRequest request) {
         this.alist = new Vector();
         public Vector getAlist() {
              return alist;
         public void setAlist(Vector alist) {
              this.alist = alist;
    I also created action for the form
    public class ProductsAction extends Action {     
    public ActionForward execute(
              ActionMapping mapping,
              ActionForm form,
              HttpServletRequest request,
              HttpServletResponse response)
              throws Exception {
                   String target = "success";
                   if(form!=null){
                        ProductsForm aForm = (ProductsForm) form;
                        Vector aList = new Vector();
         //loadProductsList() method return the Vector object
    // which is a array included Product object.
                        aList = loadProductsList();
                        if(!aList.isEmpty()){
                        request.setAttribute("aList",aList);
                   return mapping.findForward(target);
    JSP page follow:
    <logic:iterate id="aitem" name="aList">
    <tr>
    <bean:write name="aitem" property="productname"/>
    </tr>
    </logic:iterate>
    Anybody tell me why the JSP page can't display the result. Thanks.

    Are you getting any error messages, or are you just not seeing anything in the page? If you get error messages, please post them.

  • Got a list of empls but how to iterate them with  logic:iterate?

    Hi there,
    quick question:
    Say I have a class Empl with the properties: fname and id (getter and setters as well).
    I also have a list of empl emplList that has 100 objects of type empl.
    in plain java if I wish to iterate them it will simply be:
    for (int x=0; x<listEmpl.length(); x++)
          Empl empl = (Empl) listEmpl.get(x);
          System.out.println(empl.getFname());
          System.out.println(empl.getId());
    }my question is how could I do that with logic:iterate? and what should come in the ActionForm? is it:
    private List emplList = new ArrayList();
    private List getEmplList();
    private void setEmplList(List list) ???
    thanks for any pointers

    thanks for your reply.
    I did this:
    private List emplList = new ArrayList();
         public List getEmplList()
              return emplList;
         public void setEmplList(List emplList)
              this.emplList = emplList;
         }I added some bogus information in the constructor.
         public emplForm()
              for (int x=0; x<10; x++)
                   Empl e = new Empl();
                   e.setFname("ffff"+x);
                   e.setTravelerID(x);
                   emplList.add(e);
         }for some reason, the code you provided didn't work. Do you think there's something wrong with the emplList?
    thanks again

  • How can I evaluate if a collection is empty or not with struts logic tag?

    How can I evaluate if a collection is empty or not with struts logic tag?
    I tried with logic empty tag. but the tag evaluated if a collection is null or not.
    I would like to do like this below.
    List list = new ArrayList();
    set(list);
    <logic:XXXX name="someForm" property="list">
    The list size is 0.
    </logic>thanks in advance.

    U can use :
    <logic:present name="urform" property="urlist">
    </logic:present>
    to check "urlist" is empty or not

  • Struts 1.1 Iterate through input types of image

    Hi everyone,
    I'm using struts 1.1, and specifically the logic:iterate tag. Basically I'm looping through a List of Users. I print out username, userAccessLevel, two image input types (edit or remove). My actionForm associated with the JSP contains the List of Users.
    A User object has an AccessButtons field (among other things),
    an AccessButtons object contains two Buttons objects named edit and remove,
    a Button object has 3 String fields, x, y, and name, and a "pressed()" function
    Essentially I want the Action class to be able to pick up what button was pressed on the ActionForm. Specifically both the user and edit/remove action associated with the button. The code I have so far in the JSP is:
    <logic:iterate id="users" name="accessForm" property="users" indexId="index">
    <bean:define id="ssn" name="users" property="ssn"/>
    <bean:define id="accessButtons" name="users" property="accessButtons"/>
    <bean:write name="users" property="fullname"/>
    <bean:write name="users" property="accessLevel"/>
    <html:image property="accessButtons.edit" src="images/edit.gif" border="0" alt="edit" indexed="true"/>
    <html:image property="accessButtons.remove" src="images/remove.gif" border="0" alt="remove" indexed="true"/>
    </logic:iterate>
    This displays the desired output, but it doesn't help be differentiate the user for which the button was pressed. I left out some of the HTML formatting stuff to keep the code clean.
    Anyone have any ideas? I hope I explained what I wanted clearly and concisely...

    yes, this is a problem, isn't it...
    I would suggess make each user iterration include a separate form tag set and have a hidden field with the user id. but I think this will still have a problem of knowing which of the 2 buttons were pressed. There is a problem here, cuz Netscape 7 sends the button name of the button and button.x and button.y, whereas IE 6 only sends the button.x and button.y, and not the button as is... which presents a problem to figuring out what was clicked. (Plain submit type buttons seem to be fine for submitting). At least, I guess just check for the existance of the button_name.x to see which was pressed, but you still need the user ID in the forms.

  • C:forEach and logic:iterate tags repeating elements of a collection

    I have an issue that makes absolutely no sense to me. Basically I am using struts, and I am returning a form that contains a List of customers. I am simply trying to iterate that list into a simple table for each customer. The end result will have rows for each table, but I tried to simplify this example.
    The only filter is that I don't want to display customers that don't contain any data that I care to display. In my dataset, there is only one customer that has any data that I care about, and that has been verified in the database and in the backend action feeding the struts page.
    I first attempted this with the c:forEach JSTL tag. What I saw was that the customers were just getting repeated. Instead of showing one table for each customer, it was repeating the tables for each customer equal to the size of the Collection. For example, there were *5* customers in the List, only customer C should have been set into a table, but the table for customer C was being repeated *5* times. I went into the backend code, and made sure the object being sent back to struts contained the correct number of records.
    I then tried the same thing using the logic:iterate Struts EL tag. This did exactly the same thing. Instead of one table for customer C, I had 5 tables, all for customer C.
    Frustrated, I then went back to just writing a basic scriptlet in the JSP, to iterate over the object returned from the struts action. When I did this, everything came back as normal. Only customer C met my conditional statement, and only customer C had a table created in the generated HTML.
    Now I must be missing something with how the JSTL tags are handling the iteration, so I wanted to post the code to see if anyone had any idea what I am doing wrong here.
    The JSP page is found below. As you can see, the first part is done as a scriptlet, and the last part is done with JSTL tags. Unless I am mistaken, the 2 approaches should produce the same result. Please let me know if I am missing something here.
    <%@ include file="/common/customConfig.inc"%>
    <%@ page import="java.util.Iterator,
        com.pw.cemp.webapp.common.forms.CempDocumentsForm,
        com.pw.cemp.webapp.common.views.CustomerView"%>
    Write table with straight scriptlets...
    <br />
    <br />
    <%
        CempDocumentsForm cdForm =
            (CempDocumentsForm) session.getAttribute("cempDocsForm");
        Iterator itCustomers = cdForm.getCustomers().iterator();
        while (itCustomers.hasNext())
            int idx = 0;
            CustomerView customer = (CustomerView) itCustomers.next();
            if (customer.getCemps() != null && !customer.getCemps().isEmpty())
    %>
            <table>
                <% if (idx == 0) { %>
                    <caption>
                        Customer CEMP Listing
                    </caption>               
                <% } %>
                <tbody>
                    <tr>
                        <td class="level1">
                            <%=customer.getName() %> -
                            <%=customer.getSapCustomerId() %>
                        </td>
                    </tr>
                </tbody>
            </table>
    <%      
            idx ++;
    %>
    <br />
    <br />
    Now try using JSTL...
    <br />
    <br />
        <logic:iterate name="cempDocsForm" property="customers" id="customer" indexId="index">
        <!-- <c:forEach items="${cempDocsForm.customers}" var="customer" varStatus="status"> -->
            <c:if test="${not empty customer.cemps}">           
            <table>
                <c:if test="${index == 0}">
                    <caption>
                        Customer CEMP Listing
                    </caption>
                </c:if>
                <tbody>
                    <tr>
                        <td class="level1">
                            <c:out value="${customer.name}" /> -
                            <c:out value="${customer.sapCustomerId}" />
                        </td>
                    </tr>
                </tbody>
            </table>
            </c:if>
        <!-- </c:forEach> -->
        </logic:iterate>
        <br />
        <br />The code above produced the following HTML. As you can see, the scriptlet did exactly what I wanted, it produced 1 table for the only company that met the conditional statement. The JSTL section repeated the table for that one company, equal to the number of items in my List.
    Write table with straight scriptlets...
    <br />
    <br />
            <table>
                    <caption>
                        Customer CEMP Listing
                    </caption>                           
                <tbody>
                    <tr>
                        <td class="level1">
                            FMP Test Company -
                            5
                        </td>
                    </tr>
                </tbody>
            </table>
    <br />
    <br />
    Now try using JSTL...
    <br />
    <br />
            <table>           
                    <caption>
                        Customer CEMP Listing
                    </caption>           
                <tbody>
                    <tr>
                        <td class="level1">
                            FMP Test Company -
                            5
                        </td>
                    </tr>
                </tbody>       
            </table>
            <table>
                <tbody>
                    <tr>
                        <td class="level1">
                            FMP Test Company -
                            5
                        </td>
                    </tr>
                </tbody>
            </table>
            <table>           
                <tbody>
                    <tr>
                        <td class="level1">
                            FMP Test Company -
                            5
                        </td>
                    </tr>
                </tbody>
            </table>
            <table>           
                <tbody>
                    <tr>
                        <td class="level1">
                            FMP Test Company -
                            5
                        </td>
                    </tr>
                </tbody>
            </table>
            <table>       
                <tbody>
                    <tr>
                        <td class="level1">
                            FMP Test Company -
                            5
                        </td>
                    </tr>
                </tbody>
            </table>
        <br />
        <br />Thanks in advance...
    Edited by: cdbyrd on Feb 28, 2008 4:22 PM
    Edited by: cdbyrd on Feb 28, 2008 5:12 PM

    Okay, it looks like I kept moving things around until I stumbled upon something. One thing to note is that I am using Tiles in my struts 1.2.9 application. I don't know if that has anything to do with it, but this is what I found.
    If you notice in my code, with the iteration tags, I had one active and one commented version of the tag. I kept flipping them around, thinking it was some kind of syntax problem or it was specific to either the logic:iterate or c:forEach tag.
    Well, as it turns out, when you comment something the way I did, I think the custom tag processor doesn't ignore the commented sections. I had things commented like the following.
        <logic:iterate name="cempDocsForm" property="customers" id="customer" indexId="index">
        <!-- <c:forEach items="${cempDocsForm.customers}" var="customer" varStatus="status"> -->Now I have done this many times in the past, and I have never noticed any adverse behavior. I guess it was just the correct situation here to make the problem come to the surface. As soon as I removed any comments on the JSP, the page started working as expected. I can't explain why it happens, I just know it happened.
    Does anyone out there have a good explanation for this, so I can put a reason to why I lost so much hair today? Also, does anyone have the proper way to comment out JSTL tags to keep them from being parsed?
    Thanks...

  • Strut tag logic:greaterThan question

    I'm dealing with a salesperson sales data bean. The bean contains sales goals and actuals for various criteria. If the actual is less than the goal I'd like to display it in red, if greater than, green.
    The struts doc for the logic greaterThan/lessThan tags states that the value attribute must be a constant. Is there a way that I can make the value attribute another bean property? Can I use a scriptlet?
    Thanks for any information you can give me.
    bfrmbama

    <logic:iterate id="db" name="dbForm">
    <tr>
    <td>
    <bean:write name="db" property="name"/>
    </td> <td><bean:write name="db" property="name1"/></td>
    </tr>
    </logic:iterate >
    dbForm is my form name where i have getname,getname1 for storing two
    ArrayList..
    but i find error as Cannot create iterator for this collection;(
    where i went wrong;(

  • Ajax input inside logic:iterate

    sorry.. topic sent to the wrong forum inadvertantly..
    Message was edited by:
    nisha20

    Hi Nisha,
    I think I am facing a similar kind of problem like the one you have posted. Can you or anyone else help me out in this?
    Here is my problem ---------------------->>>
    I am having a page with a table whose data I am pre-populating when the page loads. The data is coming from the database based on the name of the user.
    The page gets loaded via a struts action call and the table data are populated using the <logic:iterate> and <bean:write> tags.
    Now, I have a drop down list, which contains the list of all possible users. If I change the user name from this drop-down my table data should change and this should be done without refreshing the page, which means I have to use AJAX.
    SO, my question is, how can I get the changed data placed into the table without having to change the existing codes for <logic:iterate>?
    Can anyone please help me on this?
    Thanks in advance.
    Regards

  • Tag handler class was not found "org.apache.struts.taglib.tiles.InsertTag"

    Hi All,
    I have a proble deploying my app with struts 1.3.10, when I run under tomcat 6 on my eclipse, it´s fine, but when I deploy on weblogic send next exception:
    ####<Apr 2, 2013 4:24:19 PM CDT> <Info> <ServletContext-/slagentes> <DSWLC01K> <svr-slisto> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1364937859494> <BEA-000000> <layout.jsp:142:14: The tag handler class was not found "org.apache.struts.taglib.tiles.InsertTag".
    <tiles:insert attribute="content"/>
    ^----------^
    layout.jsp:142:14: The tag handler class was not found "org.apache.struts.taglib.tiles.InsertTag".
    <tiles:insert attribute="content"/>
    ^----------^
    >
    ####<Apr 2, 2013 4:24:19 PM CDT> <Error> <HTTP> <DSWLC01K> <svr-slisto> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1364937859499> <BEA-101017> <[ServletContext@159254910[app:slagentes module:/slagentes path:null spec-version:3.0], request: weblogic.servlet.internal.ServletRequestImpl@5ebf5ebf[
    POST /slagentes/login.do HTTP/1.1
    Connection: keep-alive
    Content-Length: 37
    Cache-Control: max-age=0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Origin: http://172.17.12.129:7004
    User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 Safari/537.31
    Content-Type: application/x-www-form-urlencoded
    Referer: http://172.17.12.129:7004/slagentes/
    Accept-Encoding: gzip,deflate,sdch
    Accept-Language: es-ES,es;q=0.8
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
    ]] Root cause of ServletException.
    weblogic.servlet.jsp.CompilationException: Failed to compile JSP /jsp/template/layout.jsp
    layout.jsp:142:14: The tag handler class was not found "org.apache.struts.taglib.tiles.InsertTag".
    <tiles:insert attribute="content"/>
    ^----------^
    layout.jsp:142:14: The tag handler class was not found "org.apache.struts.taglib.tiles.InsertTag".
    <tiles:insert attribute="content"/>
    ^----------^
    at weblogic.servlet.jsp.JavelinxJSPStub.reportCompilationErrorIfNeccessary(JavelinxJSPStub.java:225)
    at weblogic.servlet.jsp.JavelinxJSPStub.compilePage(JavelinxJSPStub.java:161)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:237)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:190)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:281)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:453)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:364)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221)
    at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:567)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:263)
    at org.apache.struts.tiles.commands.TilesPreProcessor.doForward(TilesPreProcessor.java:260)
    at org.apache.struts.tiles.commands.TilesPreProcessor.execute(TilesPreProcessor.java:217)
    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:751)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3284)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)
    at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    >
    My weblogic.xml is
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-web-app
         xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
         <wls:container-descriptor>
              <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
         </wls:container-descriptor>     
    </wls:weblogic-web-app>     
    and my weblogic-application.xml is
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <weblogic-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-application http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd"
         xmlns="http://www.bea.com/ns/weblogic/weblogic-application">
         <application-param>
              <param-name>webapp.encoding.default</param-name>
              <param-value>UTF-8</param-value>
         </application-param>
         <prefer-application-packages>
              <package-name>antlr.*</package-name>          
              <package-name>org.apache.*</package-name>          
              <package-name>javax.xml.rpc.*</package-name>
              <package-name>javax.xml.namespace.*</package-name>
              <package-name>javax.xml.messaging.*</package-name>
              <package-name>javax.xml.soap.*</package-name>
              <package-name>javax.servlet.jsp.jstl.*</package-name>
         </prefer-application-packages>
    </weblogic-application>
    please help me

    The struts-template tld has been deprecated in favour of the tiles taglib.
    If you are using anything above struts 1.0, then you should be using tiles.
    Most probably the support files for the struts-template taglib are not in your distribution.
    Cheers,
    evnafets

Maybe you are looking for

  • Webutil error while generate excel form

    Hi In my forms appl. I use webutil in order to generate excel reports I have to midtier instances both running on a separate host. End users connect through a WLB frontend. At one of the midtiers, when generating a excel report using webutil "error w

  • How do you import quick time movies?

    I downloaded a clip from a stock video company, and it does not want to import into Final Cut Pro.

  • Looks like we are out of luck on JellyBean...

    So the XperiaBlog guys have been looking at some discussions on Facebook and it looks as though Sony will be the first company to officially flout the Android Update Alliance guidelines and will leave 2011 phones to swing in the wind... http://www.xp

  • "Move row up" option in dreamweaver cc 14.00 missing

    ANY BODY KNOW HOW TO GET IT BACK...?

  • Newbie's problem with executable jar file

    hello i create an executable jar file and it seems ok except it fails to locate all of my image files. when i use java -jar myproject.jar it fails to display included pictures and files. however, when i extract this jar file and run, it works fine (d