gigaZhang / struts2-jquery

Automatically exported from code.google.com/p/struts2-jquery
0 stars 0 forks source link

I am trying to integrate struts2-jquery plugin in to my portal but unable to use the component div #1083

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
(This is for feature requests and bugs in Struts2 jQuery Plugin - for
getting help, please use the User Group.
http://groups.google.com/group/struts2-jquery )

What steps will reproduce the problem?
1. use sj:div (src attribute) to replace iframes in portal 
2. <sj:div src="ShowConfigurations.action" ></sj:div>
3.

What is the expected output? What do you see instead?
i should be able to see my jsp page inside the sj:div

Which struts2 version?
struts2-core-2.2.1.jar

Which struts2-jquery plugin version?

struts2-jquery-plugin-1.4.jar 

Please provide any additional information below.

i am able to see the page loaded first and then i am getting the below error in 
the browser console:

ReferenceError: _struts2_jquery is not defined
http://localhost:9080/Main.action
Line 1

ReferenceError: _struts2_jquery is not defined
http://localhost:9080/struts/jquery/jquery.js?
Line 540

Original issue reported on code.google.com by vidhya20...@gmail.com on 20 Feb 2014 at 1:05

GoogleCodeExporter commented 9 years ago
My jsp page code:

<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="java.util.ResourceBundle"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib prefix="sj" uri="/struts2-jquery-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<sj:head  compressed='false'/>
<script type="text/javascript" src="/app/javascript/jquery-1.8.3.js"></script>
</head>
<body>
<sj:div src="ShowConfigurations.action" ></sj:div>
</body>
</html>

web.xml

<filter>
  <filter-name>struts2</filter-name>
  <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
 </filter>
 <filter-mapping>
  <filter-name>struts2</filter-name>
  <url-pattern>/*</url-pattern>
 </filter-mapping>
 <filter-mapping>
 <filter-name>struts2</filter-name>
  <url-pattern>/struts/*</url-pattern>
 </filter-mapping>

Original comment by vidhya20...@gmail.com on 20 Feb 2014 at 1:11