Skip to content
Advertisement

Tag: struts2

Getting Result type in Interceptor

I have Struts 2 actions with different (HTML and JSON ) result types. They use common interceptor. If needed to intercept the request, how to return a result based on given action result type? For example, my Action.ERROR forwards to JSP page. If action is JSON type I want to forward JSON error instead. Answer I have Struts2 actions with

How to put variable in OGNL tag

In this code questions is a list which contain questions object with In my program, I will make it appears in browser like The list may contain multiple question objects so I made it to show 5 question per page. My problem is (for example) the user may go from page 4 to page 2 and I want to refill

PageOutputStream causing java.lang.OutOfMemory

We have a struts2 web application running in Tomcat 7 that is intermittently experiencing the same problem: Application operating perfectly normally After a variable amount of time (anywhere from 10 minutes to 7 days) the application slows down to a halt Multiple java.lang.OutOfMemory errors in catalina.out Linux free -m shows all physical and swap memory is used up (even though

Struts2 Tags Radio button

I have this iterator that loops through an object. where answer is a boolean value, that I am trying to set through radio buttons. but the problem is, upon on the generated html, teh radio buttons. is like this It did not have the indice/index. it only gave me the %{#key.index} Answer you have to use property tag to get

NoSuchMethodError when using submitting form in Struts 2

I’m currently working through the tutorial found on the Apache Struts website. Currently, whenever I press submit on the form, or when I click the Bruce Philips hyperlink, I get a NoSuchMethodError. I’m not too sure what the issue is either and I believe I’ve included everything the tutorial states. I’ve tried including the dependency in my pom.xml, but that

Advertisement