top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

s:url & s:param does not work on struts 2.3.15.1

+1 vote
534 views

I am in the process of upgrading my struts2.3.1.2 application to struts2.3.15.1. Everything works fine except the and tags. In struts2.3.1.2, I have the following code in jsp file

  %{stateName}
  Add 

I used to get correct state name when using struts2.3.1.2. However, using struts2.3.15.1, I am getting the following on web-browser page: %{stateName}

posted Aug 19, 2013 by Bob Wise

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes

it might work using ${stateName}.

answer Aug 19, 2013 by Kumar Mitrasen
Similar Questions
+2 votes

I have a couple of old struts 2 apps that are using 2.2.1. I want to upgrade them to 2.3. What is the minimal set of jar files I need in WEB-INF/lib?

I currently have:
commons-beanutils-1.7.jar
commons-collections-2.1.jar
commons-digester-1.7.jar
commons-fileupload-1.2.1.jar
commons-io-1.4.jar
commons-javaflow-20060411.jar
commons-lang-2.5.jar
commons-logging-1.0.4.jar
freemarker-2.3.16.jar
ibatis-2.3.2.715.jar
itext-1.3.1.jar
jasperreports-2.0.5.jar
javamail.jar
javassist-3.8.0.GA.jar
jdt-compiler-3.1.1.jar
jstl.jar
jxl-2.6.jar
log4j-1.2.14.jar
ognl-3.0.jar
poi-3.0.1-FINAL-20070705.jar
spring.jar
standard.jar
struts2-core-2.2.1.jar
struts2-jasperreports-plugin-2.0.11.1.jar
urlrewrite-3.2.0.jar
xalan.jar
xercesImpl.jar
xwork-core-2.2.1.jar

+1 vote

I am using struts 2.2.3 and doing client side validation using xml. I want to do validation for a field whose name is an ognl expression I have something like this :

Field is required

On debugging I can see It is adding field error properly. But i have a javascript which shows the field in red highlighted color and also shows messages that "fieldname is required". However fieldname is not coming in the message and it is not showing the required field in red highlighted color.

The same javascript code works fine for normal fields which have static name. Please can someone help in this, as I am new to struts ?

0 votes

In the context of an tag, for instance for a login action, we previously always coded forms as :

 ....

And in the struts.xml we have been using :

content.login
 content.menu
 summary_input
 welcome

This has worked in the past and allowed us to not only use the action="login" to target the execute method of the action, but also to build links to, for instance, login_checkStatus.action to target other, specific methods within the action. I am not sure this Is a common/best practice, I had no prior struts2 experience before joining this company and this is how a lot of the existing functionality is coded. (If this is wrong/there is a better way, please let me know)

Now randomly, this fails to generate the proper action url in the html (it is missing the '.action', which results in a 404 once you post the form)

The only workaround we have found so far is to add the '.action' suffix to the
s:form's action attribute. Before it was always added for us by struts.

So now we are having success with

 ...

I can only assume that this has been affected by the changes related to S2-015 and the wildcard action matching.

0 votes

I have been using struts quite a long time, but in the last days I have faced a strange behaviour of s:action tag.

In my JSP I am using the tag action to load list to be used to mount my s:select. But in the redered HTML, the result of the action is showing, even when the executeResult is false.

There is something I missing?

JSP code:

struts.xml:

 ^estados[d+].idEstado,
 ^estados[d+].nmEstado

As you can see, in the struts.xml, I have only json result, and I only need as json, but when I use the action tag, I just only need the populated list to be used in the select tag. It is working very well, but the problem is that the json result is showing in the HTML. And it is showing in the top, not in the action tag position, what is strange.

Also, I try to change the struts.devMode to false, but nothing changes.

The project is using struts 2.3.14.3 with rest-plugin. But for this kind ok action, I avoid rest and use just json-plugin.

0 votes

i need to have multiple on single web page,

(at top panel, our site always provide parts search box/)
(at middle panel, could have other form such as checkout section, login section, etc)

when any single form's validation triggered, then and displayed at all form's textfields place,

how to solve it? or that is struts 2 bug? please help...

...