Skip to main content

Struts Related Items on

hiii..i am new to struts 2 framework...i developed my jsp code into sturs frame work...but its showing some warning and the "menujsp.jsp" page is not opening...its showing the following on my log: WARNING: Could not find action or result There is no Action mapped for namespace [/] and action name [menujsp] associated with context path [/Basic]. - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare( at org.apache.struts2.impl.StrutsActionProxy.prepare( at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy( at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy( at org.apache.struts2.dispatcher.Dispatcher.serviceAction( at at at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at org.apache.catalina.core.StandardWrapperValve.invoke( at org.apache.catalina.core.StandardContextValve.invoke( at org.apache.catalina.core.StandardHostValve.invoke( at org.apache.catalina.valves.ErrorReportValve.invoke( at org.apache.catalina.core.StandardEngineValve.invoke( at org.apache.catalina.connector.CoyoteAdapter.service( at org.apache.coyote.http11.Http11Processor.process( at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process( at$ at Source) Following are the contents of my application: package pkg; import java.sql.Connection; import java.sql.DriverManager; public class ConnectionProvider { public static Connection getConnection(){ Connection con=null; try{ Class.forName("org.postgresql.Driver"); con=DriverManager.getConnection("jdbc:postgresql://localhost:5433/labway","postgres","sachin"); } catch(Exception e){ System.out.println(e); } return con; } } package pkg; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.*; public class DAO { public List<MenuList> fetch(){ try{ Connection con=ConnectionProvider.getConnection(); PreparedStatement stmt=con.prepareStatement("select * from application where application_id in (select distinct application_id from applicationmenu order by application_id)"); ResultSet rs=stmt.executeQuery(); ResultSet rs1=null; MenuList menulist; List<MenuList> list=new ArrayList<MenuList>(); while({ menulist=new MenuList(); menulist.setmenuId(rs.getString(1)); menulist.setmenuTitle(rs.getString(3)); PreparedStatement stmt1=con.prepareStatement("select * from menu where menu_id in (select menu_id from applicationmenu where application_id='"+rs.getString(1)+"')"); rs1=stmt1.executeQuery(); menulist.setsubmenuTitle(rs1.getString(3)); list.add(menulist); } return list; } catch(Exception e) { System.out.println(e); } return null; } "": package pkg; public class MenuList { String menuId; String menuTitle; String submenuTitle; public MenuList() { super(); } public MenuList(String menuId,String menuTitle,String submenuTitle) { super(); this.menuId=menuId; this.menuTitle=menuTitle; this.submenuTitle=submenuTitle; } public String getMenuId() { return menuId; } public String getmenuTitle() { return menuTitle; } public String submenuTitle() { return submenuTitle; } public void setmenuId(String menuId) { this.menuId = menuId; } public void setmenuTitle(String menuTitle) { this.menuTitle = menuTitle; } public void setsubmenuTitle(String submenuTitle) { this.submenuTitle = submenuTitle; } } package pkg; import java.util.*; import com.opensymphony.xwork2.ActionSupport; public class MenuListAction extends ActionSupport { private MenuList menulist; private List<MenuList> menulistlist; DAO dao=new DAO(); public String execute() { menulistlist=dao.fetch(); return "success"; } public MenuList getMenulist() { return menulist; } public void setMenulist(MenuList menulist) { this.menulist = menulist; } public List<MenuList> getMenulistlist() { return menulistlist; } public void setMenulistlist(List<MenuList> menulistlist) { this.menulistlist = menulistlist; } } web.xml : <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="" xmlns:xsi="" xsi:schemaLocation=""> <welcome-file-list> <welcome-file>index</welcome-file> </welcome-file-list> <filter> <filter-name>struts2</filter-name> <filter-class> </filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app> struts.xml : <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" ""> <struts> <constant name="struts.devMode" value="true"></constant> <package name="Basic" extends="struts-default"> <action name="fetch" class="pkg.MenuListAction" method="execute"> <result name="success" >/menujsp.jsp</result> </action> </package> </struts> index.jsp : <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@taglib uri="/struts-tags" prefix="s" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ""> <html> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <head><title>DYNAMIC DROPDOWN MENU</title></head> <body><br><br><center> <a href="menujsp.jsp">Home Page</a> </center> </body> </html> menujsp.jsp : <%@ taglib prefix="s" uri="/struts-tags" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ""> <html> <head> <style> body{ background-image:ur(C:\indian-flag-12.gif) no-repeat ; font-family:arial;} table{font-size:80%;background:black} a{color:black;text-decoration:none;font:bold} a:hover{color:#606060}{background:lightgrey} { font-size:100%; position:absolute; visibility:hidden; } </style> <script type="text/javascript"> function showmenu(elmnt) { document.getElementById(elmnt).style.visibility="visible"; } function hidemenu(elmnt) { document.getElementById(elmnt).style.visibility="hidden"; } </script> </head> <body> <h3>EMPLOYMENT EXCHANGE Test Page</h3> <table width="100%"> <tr bgcolor="#FG8080"> <s:iterator value="menulistlist" var="menulist"> <td onmouseover="showmenu(<s:property value="#parent.menuId"/>)" onmouseout="hidemenu(<s:property value="#parent.menuId"/>)"> <a href="/default.asp"><s:property value="#parent.menuTitle"/></a><br /> <table class="menu" id="<s:property value="#parent.menuId"/>" width="120"> <s:iterator value="menulistlist" var="menulist"> <tr><td class="menu" id="<s:property value="#parent.menuId"/>"><a href="/html/default.asp"><s:property value="submenuTitle"/></a></td></tr> </s:iterator> </s:iterator> </table> </td> </body> </html> plzz help me out...i might have problem in my struts.xml...its not mapping with the action resource my menujsp.jsp code must also be incorrect but thats another issue...first i need to display this jsp whic isn't happening... regards Sachin
United Indian Java User Group. Home for all JUGs around India.
Web site for the Richmond Java Users Group, Richmond, VA
Capital District Java Developers Network
ZK is Ajax Java framework. With direct RIA, 200+ Ajax components and a markup language, developing Ajax/RIA as simple as desktop apps and HTML/XUL pages. Support JSF/JSP/JavaEE/Spring.., Ajax Push, and Ajax script in Java/Ruby/Groovy/Python/JavScript..
El portal de la comunidad de desarrolladores en Java en el Per&uacute;.
Java User Group for Costa Rica
JBoss User Group Argentina
Lithuanian Java User Group is the community intented to bring together Java developers, Java users, and Java-driven companies in Lithuania.
Bring together Java programmers, Java users in Brazzaville Congo
The Boulder JUG meetings are always free and open to the public. We cover topics related to Java Software Development. This includes APIs, tools, frameworks, dynamic languages, agile practices, and more. BJUG meets the second Tuesday of each month (or the Tuesday before the DJUG meeting). Meetings begin at 6PM and includes two sessions. The first session is from 6:00 - 7:00 PM. We break from 7:00 - 7:30 PM for Pizza / Drinks and Networking. The second session runs from 7:30 - 9:00 PM. Meetings also include a few minutes for announcements; such as, job openings and other events. Meetings are held on the campus of the University of Colorado at: Wolf Law Building 2450 Kittredge Loop Road Boulder, CO 80309 Normally, we meet in room 207. That my change depending on availability. The Boulder Java User Group has been in existence since 1997. Jay Zimmerman has been the President of the Boulder JUG since late 1999. For 2009, Frederic Jean will be organizing speakers and hosting meetings.
The rheinjug is the Java User Group for Germany's Rhineland, located in Duesseldorf. meetings take plave about once a month at the Heinrich-Heine-University, with more than 100 attendees. It is officially registered as a non-profit organization
About CDJDN The Java Developer's Network (JDN), located in the Capital District of New York State, is a users' group dedicated to the JAVA&#153; platform Through its members, the JDN provides a unique forum for developers of all experience levels to engage in technology presentations, cross-training improving Java Skill sets and social interaction. The JDN accomplishes its mission through a member-built web site, monthly meetings at entertaining locations, short seminars, and contact with local & national software companies.
Java User Group Graub&uuml;nden - Switzerland
The ruhrjug is the Java User Group for Germany's Ruhr area. Meetings take a place in the Unperfekthaus in the city of Essen on a regular basis.
We are St. Louis' newest Java User Group dedicated to Java education, mentoring, and community outreach. Besides our monthly meetings, we frequently host evening classes on Java development topics.
United States National JUG
OrlandoJUG is the Orlando, FL Java User Group
GatorJUG is the Gainesville, FL Java User Group
The Gauteng chapter of the Java User Group in South Africa. This chapter has been active since around 2001. Our web site is We have a JUGSA Yahoo group which we use extensively. Please register on the groups mailing list there. Make sure the mailing list forwards the messages to the correct e-mail address. Group address on Yahoo:
Java es un mundo muy amplio y la unica forma de no perderse en el es estar en contacto con gente que conozca otros aspectos de este mundo tan vasto y cambiante. Con el fin de poder encontrar gente profesionales con conocimientos en Java y con interes de compartirlos, profundizarlos y aplicarlos en Espa&ntilde;a he creado este espacio. Si te interesa participar, sumate al grupo ingresando en: La participaci&oacute;n es abrierta y gratuita!
Java User Group Mannheim, Germany
Java Users Group de Jujuy
Tulsa Java Developers Group
The New England Java Users Group (NEJUG) was formed in November 1998. It is open to everyone interested in Java and the JVM. Meetings are usually held on the second Thursday of each month. They usually start at 6pm, at the Sun Microsystems Campus in Burlington, Massachusetts.
Michael is a site dedicated to quality software development. We have a number of tutorials on java, testing and JavaScript and are adding new ones all the time.