struts2

Struts2 in RAD raises error - xwork has already been loaded by bean

Hi I am using RAD 7.0 for developing Struts2 app. When I run the web app inside RAD on websphere 6.1, I get following error: could not be initialized]: Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - wsjar:file:/C:/workspace_test/Jars/struts2-core-2.0.11.2.jar!/struts-default.xml:30:72 at com.opensym...

Mixing HTML and STRUTS2 tags

I have a form which has both HMTL tags and struts tags. I use the HTML tags because of alignment issues with struts tags. <s:form action = "setNode" name = "processing" method ="POST"> <script> <!-- createTree(catArray); </script> <br/> <s:radio name="processOption" label="" list="{'Add','Move','D...

Struts2 - How to use the Struts2 Annotations?

I'm trying to implement the Struts 2 Annotations in my project, but I don't know how. I added the convention-plugin v 2.1.8.1 to my pom I modified the web.xml ... <init-param> <param-name>actionPackages</param-name> <param-value>org.apache.struts.helloworld.action</param-value> </init-param> ... My Action package org.a...

Struts 2 multipart plugin

Hi, I am facing issue, while using PellMultiPartRequest. Add constant name="struts.multipart.parser" value="pell" in web.xml. copied struts2-pell-multipart-plugin-2.1.6.jar into lib folder. But request is parsing using org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest. Is there are some properties I need to override?...

Freemarker hash for Struts2 @s.select tag's list property

I'm using Freemarker as the templating engine for a Struts 2 application and having some problems trying to pass a Freemarker hash to the @s.select tag's list value. Currently I'm trying something like this in my template: <@s.select name="myDropdown" list={"1":"Foo", "2":"Bar", 3:"Baz"} /> The resulting HTML that's rendered is this:...

Struts 2 TypeConversion problem

Hello... i have a big problem... i have this map HashMap<Long, String> examValues; It gets populated by textboxes automatically with name="examValues[id]" Although i explicily defined the element as String , it doesnt care!!! I want everything to be a String... The result is to get a java.lang.ClassCastException: java.lang.Long c...

What are the "allowedTypes" for .rar file (interceptor "fileUpload") in struts2?

<package name="my-default" extends="struts-default" namespace="/"> <interceptors> <interceptor-stack name="globalInterceptor"> ..... <interceptor-ref name="fileUpload"> <param name="maximumSize">1048576</param> <param name="allowedTypes">application/x-rar-compressed</param> </interceptor-ref> ..... </interceptor-stack> ...

Maven archetype for basic spring hibernate struts2 application

Hello I am looking for a basic maven archetype which can help me create a spring hibernate struts2 application. I have tried using appfuse but it sucks. It took more than half an hour to download n number of dependencies and the project it created was having errors also. if you know anyother maven archetype please tell me. Thanks...

Struts2 combine with domain specific servlet

I have struts2 web application. Right now I need embed with help of iframe some functionality from stand-alone servlet. But according to following rule, servlet is never get calling. <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> Unfortunately I cannot change it to /prefix/...

problem with struts actions and redirections

I am trying to update a simple web app that was built with struts2, jsp and standard servlets. I am trying to redirect a url to a specific action but can't seem to get it to work right. For example, the url that is correct is: http://localhost:8080/theapp/lookup/search.action Here is my web.xml: <?xml version="1.0" encoding="ISO-8859...

Annoying struts 2 problem

Hello... I am using this code to include some menus to my code... <s:action namespace="/" name="get_header" executeResult="true" /> <jsp:include page="/get_menu" > <jsp:param name="menuKey" value="configuration"></jsp:param> <jsp:param name="subMenuKey" value="user.add"></jsp:param> </jsp:include> THe problem is that...

Reload Grid not working for mutiple jqgrid

I am using jqgrid.My page has three tabs and each tab contains a different grid.All grids have different ids.The content of tabs is fetched via AJAX request lazily.Now after all three grids are rendered and i try to reload grid via function jQuery("#myOffersTable").trigger('reloadGrid'); Only the grid which loaded last reloads and i...

Struts 2 discard cache header

I have strange discarding behavior of struts2 while setting cache option for my image. I'm trying to put image from db to be cached on client side To render image I use ( http://struts.apache.org/2.x/docs/how-can-we-display-dynamic-or-static-images-that-can-be-provided-as-an-array-of-bytes.html ) where special result type render as foll...

Struts 2 or JSF?

I am just starting with web application. Which framework should I try : struts 2 jsf? Both seem pretty good. ...

accordion in struts2-jquery-plugin-2.1.0 not working

Hi I've just started playing with struts2-jquery-plugin-2.1.0 and was trying the 'accordion from list' from Struts2 jQuery Plugin Showcase, version 2.1.0. Strangely enough, I am getting the data retrived but not the accordion look and feel. Here is the image showing what I am trying to say here, image. I am not on comission for that add,...

Can an Aspect conditionally render parts of a JSP page ?

At present the jsp pages have normal authorize tags to conditionally render links and information etc. The website is on the intranet, and we're using Spring Security 2.0.4. Ive now got a business user who wants to allow all roles to access everything for the first few weeks, then gradually add the security back in as feedback is gather...

Tags usage in Struts 2

Hi, I have the following code snippet <s:iterator status="stat" value="masterAccountList"> <tr> <td><s:property value="name"/></td> <td><s:property value="status"/></td> <s:set name="DrStat" id="DrStat" value="<s:property value='status'/>"/> <td><s:i...

Struts2 jQuery Plugin Autocompleter renders HTML with style attributes <== changing this?

I'm using the Struts2 jQuery plugin 2.1 and render an autocompleter in my JSP. Here's the code: <s:form id="search-form" action="search" theme="simple"> <s:url id="remoteurl" action="jsonlanguages"/> <div> <sj:autocompleter cssClass="bgstandardelement empty" id="languages" ...

Using struts 2 with no tags

Hi everyone, I wonder if you could guide me on this struts issue - I feel hopeless on this... I am working on migrating our web application to a Struts 2 portlet (I'm using Struts 2.1.8). The thing is, I am forced to avoid struts tags because our application relies on Dijit widgets, which are omitted when using struts tags. So now I sh...

Problem with struts 2 dojo tree and ajax

I'm having a really strange problem in struts 2.1.8.1 with the dojo tree and ajax links. Ok, I got a dynamic navigation tree that looks like the second example in the showcase project that comes with struts(not the one named ajax). When the link in the tree is clicked a target div is updated. This works fine. Now for the weird bit. If ...