struts2

what is a TOPIC in Struts2

HI, I am learning struts 2 with Tiles 2 and the word "topic" shows up very frequently... What is a topic? for example: The sx:a tag (specifically the ajax a template) and the div tag support an ajax event system, providing the ability to broadcast events to topics. You can specify the topics to listen to using a comma separated list in...

OptionTransferSelect issue in Struts2

the optiontransferselect in the JSP is not populating the doubleList values. though the value is printed on the JSP as an iiterator . the double list is a List <Editor> . <pre><s:optiontransferselect headerKey="-1" headerValue="---Please Select---" doubleHeaderKey="-1" doubleHeaderValue="---Please...

Struts2 + jQuery - Sending regular updates to the client

Hi, I am implementing a functionality in my web app such that a client can generate the report by entering some data and clicking on the submit button. The problem is that report generation takes lot of time and the report might not generate if the user entered data is wrong. The complete report generation task has many sub-tasks and ...

Struts 2 Select tag

I'm pretty new to the jsp and struts way of doing things and so far I like what I see. My current question is with the use of the struts select tag. I have a page that displays a number of dropdown boxes using struts select currently the options are hard coded in the jsp. I would like to populate them based on a properties file. Howeve...

How to force relative pathing with Struts 2.1 and Dojo?

I upgraded from Struts 2.0.6 to 2.1.6 and converted all my Ajax themes to plugins. Everything works except the pathing has changed from relative to absolute. For example, here is the rendered HTML before upgrade: <script type="text/javascript" src="../struts/simple/dojoRequire.js"></script> And here it is after upgrade: <script lan...

Struts 2 File Upload Interceptor configuration problem

I'm having two problems when trying to configure the Struts 2 File Upload Interceptor in my application. I want to change the parameter maximumSize (the default value is 2 MB, I need it to be 5 MB) and the message resource struts.messages.error.file.too.large (the app locale is pt_BR, so the message is in portuguese, not english). The a...

struts2: On checkbox click control go to action written in url tag like <s:url action="smactiion">

On clicking the anchor tag link “click me” control goes to the action defined in <s:url> tag and sends all the param values defined under <s:url> tag . See below - <s:url id="matchId" action="someAction"> <s:param name="QuotFileName" value="FileName"/> <s:param name="QuotContentType" value="ContentType"/> </s:url> <s:a href="%{ matchId...

I get an error when using redirectAction with struts2 and portlets inside jboss portal

I have the following struts.xml: <struts> <package name="default" namespace="/view" extends="struts-portlet-default"> <action name="index" class="com.gigi.LoginAction"> <result type="redirectAction"> <param name="actionName">showAlerts</param> <param name="namespace">/view</par...

How to open a new window without using window.open() and <a href="'> in Struts2

Hi All, In my struts2 application I want to open a new window when user click on a link available on jsp page. I don’t want to user window.open() function of javascript and anchor tag i.e <s:a href=””>. Onclick control should goto action class, after some processing there it should open a new window. Please help if it is possible. ...

problem of entering text in combobox created by using <sx:autocompleter>

im trying to use autocompleter tag for displaying autosugget in my application,but with the following code i am not able to write in the combo box but has a populated list which is displayed when down arrow image(along with the combo box) is pressed. <sx:autocompleter list="state" name="StateName" list="{'CA','TR','GP','CL'}" searchT...

Struts 2 integration with Tiles issue

I started to integrate struts 2 with tiles on IntelliJ environment. I searched several tutorial on the web, but I still see some wierd symbol not found issue. This is the web.xml: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xs...

Issue with Struts 2 Dispatcher Result

Hi We are using Struts 2 Dispatcher Result to forward our request to some jsp page. In struts.xml <action name="sampleAction" class="com.mycomp.action.sampleAction"> <result name="success" type="dispatcher"> <param name="location">/jsp/success.jsp</param> </result> <result name="error">/jsp/error.jsp</r...

How to reset my save page after saving?

I want to modify my jsp page after submission with some additional readonly fields. I have used iterators and if conditions. I am working in struts2. How to reset my save page after saving? public String savePerson(){ Session hSession = ActionManager.getHibernateSession(); profileObj.setProfileId(pid); Date doBir...

Resource ... is not available.

If i try to use this action (test2) it always returns "The requested resource (/WebApplication4/newFolder/test2.jsp) is not available." Running tomcat6 and netbeans 6.7.1 config.xml (it is included in struts.xml): <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuratio...

Spring & Struts2 REST - junit tests

I have three hierarchical layers injected in Spring - rest, business logic and database operations. Junit tests for BL and DAO are working OK, when rest can inject only business logic ioc layer. My supper class for junit tests: import org.springframework.test.AbstractTransactionalSpringContextTests; public class AbstractTest extends A...

Struts2 ParametersInterceptor problem with oauth_token

I am developing an application in Struts2 with Twitter4J at GAE/J. I am getting following exception in the GAE log. Unable to understand whats wrong with it. com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'oauth_token' on 'class com.a...

Struts - Passing parameters between action

I have got two actions - ActionA and ActionB, Im trying to invoke ActionB from the result of ActionA using 'action' tag in the following way <s:action namespace="/myNameSpace" name="actionB" executeResult="true"> <s:param name="param1" value="Value1"/></s:action> The tag is invoking 'actionB' and Im getting the result from ActionB ...

How do I set a float without using an OGNL converter?

I have a class that looks like this: public class Foobar { private float value; public void setValue(float value) { this.value = value; } } I then have a webpage (Struts2) that passed in a variable foobar.value. <input type="text" name="foobar.value" value="123.456"> I then get this error: ognl.MethodFailedException...

Redirecting URL using struts2

How to redirect www.mysite.com/12345 to www.mysite.com/action?id=12345 using struts2 ? ...

Struts 2 - Problemas with validation/convertion of BigDecimal

Hi. I'm having some problems trying to convert/validate a java.math.BigDecimal[][] in a Struts 2 action class. I need to display the values localized (pt_BR) so I wrote a BigDecimal converter. Then I wrote a simples MyAction-convertion.properties file: quadroInvestimentos=my.package.converter.BigDecimalConverter My action class has a ...