Error in jsp page-- when i add <s:head theme="ajax"
File: TemplateObject.
my jsp page-
<%@page contentType=
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional/
"http://www.w3.
<%@taglib prefix="s" uri="/struts-
<html>
<head>
<s:head theme="ajax"
<title>Chetan<
</head>
<script>
function show_details(
dojo.event.topic.
}
</script>
<body>
<s:form id="frm_demo" name="frm_demo" theme="simple"
<table border="0">
<tr>
<td><s:select list="lstList1" name="lst"
onchange="javascrip
</td>
<td><s:url id="d_url" action="DetailActio
<%-- <s:div showLoadingText=
listenTopics=
</s:div>--%>
</td>
</tr>
</table>
</s:form>
</body>
</html>
<%@page contentType=
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional/
"http://www.w3.
<%@taglib prefix="s" uri="/struts-
<s:if test="lstList != null">
<s:select list="lstList"
</s:if>
web.xml file-
<?xml version="1.0" encoding="UTF-
<web-app version="2.5" xmlns="http://java.
<filter>
<filter-name>
<filter-class>
</filter>
<filter-mapping>
<filter-name>
<url-pattern>
</filter-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-
<welcome-file>
</welcome-file-
</web-app>
struts.xml
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//
<struts>
<package name="StrutsAjax" extends="struts-
<action name="ListingAction
<result>/Listing.
</action>
<action name="DetailAction" class="ajaxdemo.
<result>/Detail.
</action>
</package>
</struts>
action class-
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ajaxdemo.action;
import com.opensymphony.
import java.util.ArrayList
import java.util.List;
public class ListingAction extends ActionSupport {
private List lstList1 = null;
public String execute() throws Exception {
System.out.println(
populateDetail(
return SUCCESS;
}
private void populateDetail(
lstList1 = new ArrayList();
lstList1.add(
lstList1.add(
lstList1.add(
}
public List getLstList1(
return lstList1;
}
public void setLstList1(
this.lstList1 = lstList1;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ajaxdemo.action;
import java.util.ArrayList
import java.util.List;
import com.opensymphony.
public class DetailAction extends ActionSupport {
private String lst;
private List lstList = null;
private List lstList2 = null;
public String execute() throws Exception {
if (getLst() != null && !getLst().equals(
populateDetail(
return SUCCESS;
} else {
return SUCCESS;
}
}
private void populateDetail(
lstList = new ArrayList();
if (id.equalsIgnoreCas
lstList.add(
lstList.add(
lstList.add(
lstList.add(
lstList.add(
} else if (id.equalsIgnoreCas
lstList.add(
lstList.add(
lstList.add(
lstList.add(
lstList.add(
} else {
lstList.add(
lstList.add(
lstList.add(
lstList.add(
lstList.add(
}
}
public List getLstList() {
return lstList;
}
public void setLstList(List lstList) {
this.lstList = lstList;
}
public String getLst() {
return lst;
}
public void setLst(String lst) {
this.lst= lst;
}
}
Thanking You
Chetan Patel
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.
[Non-text portions of this message have been removed]
Java Official Group is created for the following topics: Java 2 Enterprise Edition - J2EE, Java 2 Standard Edition - J2SE, Java 2 Micro Edition - J2ME, XML, XSL, XSD, XPATH, Web Services, Jini, JXTA for all type of Java Geeks.
Whoever posts spam / ads / job related message will be BANNED IMMEDIATELY
No comments:
Post a Comment