File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Help me... Pls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply locked New topic

Help me... Pls

poli reddy

Joined: Nov 21, 2007
Posts: 17
I am new to Struts2_ajax tags. And I am using Ajax tags in my page just to check the ajax supported tags in Struts2. Following is my code:

The testajax.jsp => home page
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<title>Ajax Examples</title>
<!--// START SNIPPET: common-include-->
<jsp:include page="/ajax/commonInclude.jsp"/>
<!--// END SNIPPET: common-include-->

<div id="div1">Div 1</div>
<div id="div2">Div 2</div>
<s:url id="ajaxTest" value="/showAjaxResponse.action" />
<s:a theme="ajax" href="%{ajaxTest}" targets="dev1,dev2">Update divs</s:a>

"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"

<package name="ajaxexample" extends="struts-default">
<action name="showAjaxResponse">


<%= "Hello.. This is ajax jsp response" %>

When i click on the link "Update divs", i am getting response in the next page, not getting in the same page div tags.
And one more thing: commonInclude.jsp i don't have and also ajax folder.
I found code like this:
<jsp:include page="/ajax/commonInclude.jsp"/>
Where will be this file, will this come with struts2 libraries??

Any other configurations required?
Can anyone please suggest me in running this Struts2_ajax jsp?

~ Thanks in advance..!
Joe Ess

Joined: Oct 29, 2001
Posts: 9190

Please don't post the same question more than once. It causes confusion and duplication of effort as the community tries to help everyone.
Also, expecting a response in 20 minutes is a little unreasonable. Patience Is A Virtue

[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Help me... Pls
It's not a secret anymore!