struts

<html:errors> struts tutorial or example

Hi, I'm trying to make a login page in Struts. The idea is to validate if the user exists, etc, and then if there is an error, return to the login page with the errors in red (the typical login or any form page validation). I would like to know if someone knows an errors management tutorial in Struts. I'm looking specially for a tutori...

Is MVC from Microsoft the new Struts for Dot net ?

I have not used MVC but am merely wondering as a Java person, hence the q. ...

Supplying credentials safely to a RESTFUL API

Hello, I've created a RESTful server app that sits and services requests at useful URLs such as www.site.com/get/someinfo. It's built in Spring. However, these accesses are password protected. I'm now building a client app that will connect to this RESTful app and request data via a URL. How can I pass the credentials across? Currently...

How to have a class use applicationContext beans?

I'm working on my first java struts2 webapp and want to be able to inject bean parameters into any arbitrary class that is called. But I find that I can only do this with struts action classes... Let's say I have this bean in my applicationContext.xml file: <bean id="BeanTest" class="BeanTest"> <property name="test" value="someval...

how and where to catch exceptions in a j2ee application

ok, im working in a j2ee project that has 2 branches in the repo and i'm ordered to mix them. i was coding and then netbeans ask me "unreported exception blah bla bla must be caugth or declared to be thrown" and gives me the choice of just handle each exception or just throw it hoping someone else catches. The classes i'm working with ...

Does anyone here use Struts 1 for a new project?

I have a scenario where customers are asking to develop a new project on struts 1. It appears they have many applications running on Struts 1 and the in house IT team is comfortable with it. For data access, we are asked to write JDBC, no ORM, not even Spring DAO. They have developed a framework and we have been asked to use that. I'm ...

Intermitent problem with Struts 1.2.8 HTML taglib and JBoss

I have a legacy Struts 1.2.8 application that I'm maintaining and porting from Oracle Application Server (OAS) 10g to JBoss 4.2.3. I have a JSP that uses the Struts HTML tag library. The JSP page is backed by EJBs. The user enters an item number and the page displays the details of the item (e.g. item from a product catalog). On the ...

Populate Collection from Struts2 Form Submission

I'm trying to populate a List of beans from a form: public class Foo { public String attr1; public String attr2; } public class Bar { public List<Foo> foos; } public class StrutsAction extends Action { public Bar bar; } So in my Struts2 form, what's the best way to populate Foo? Intuitively, I want to do: <input type="...

How to access another bean form in an Struts Action?

I have a form bean named "SearchForm" that I use to display search results. The user then clicks on one of the element. I populate a "ElementForm" with the details of the element and generate a JSP page with it. (so far so good) What I would like however is to display a column on the left of the JSP page with the same search results (so...

Finding Struts version?

What is the easiest way to find the Struts library version? I'm adding Struts libraries to an generic eclipse project, and need to be able to differentiate between versions. (Other libraries like Spring have a getVersion() call) I can always read the jar manifest, but I'm looking for an easier way. ...

Accessing Liferay web content from inside a portlet?

I have a Struts portlet being used in a Liferay Portal environment. I have been localizing my resource strings using standard resource files so far. I can access the message bundle from my portlet using the <bean:message> tag, and it works great. So for example, in a form I might have the following label defined in my JSP file. ... <lab...

Restrict HTTP requests to 'POST' only in Struts 1.x

Hello, Is there a configurable way in Struts 1.x so my action classses are only executed on HTTP 'POST' only. I understand I can use request.getMethod() within my action class and then do certain 'stuff' based on that. Regards, Jonathan ...

Using JSTL within JSP Pages in Struts based web app

I have a Struts 1.2 based Web App which uses lot of scriptlet code in the JSP page, I wish to clean up the code by using JSTL.The Servlet Specification Level: 2.3 and JSP Specification Level: 1.2. I am using WSAD 5.1. I tried using <c:if></c:if> tag, but I get the following error on building the project. "JSP Translate: unable to load i...

How to maintain null for numeric values when using BeanUtils.copyProperties?

I have a numeric database field (numeric(3) in SQL Server 2000) that allows nulls, and null is my preferred "no value" value. That field is mapped to the non-primitive java Long class in Hibernate: <property column="my_column" name="my_column" type="java.lang.Long" not-null="false" /> The field is set as java.lang.Long in both my stru...

struts common error forward

how can i use common forward for all actions . measn i dont want to writ common forward in all actions i dont want to write this in all ...

How can I set WindowState in Struts bridge based portlet links?

I am developing a JSR-286 compliant portlet based on struts 1.2.9 (for historical reasons we want to reuse a lot existing code) using the struts portlet bridge. I want some links to change the WindowState, but the FormTag and LinkTag provided by the portal bridge don't have an easy way to set the WindowState. I'm happy to extend these tw...

Struts/Spring with Tiles error-page

I'm still a newbie, and I'm not sure how else to implement custom error pages. I'm using tiles, and I believe this project has the struts2 and spring framework mangled together. I did the basic stuff in my web.xml: <error-page> <error-code>404</error-code> <location>/WEB-INF/jsps/404error.jsp</location> </error-page> Works p...

"title" attribute for <html:options> struts tag

Hi, In a regular select box you can show the full title on mouseover using "title" attribute in the "option" field. In Apache Struts, you make the select box with the "html:options" tag. I don't think this tag supports the "title" attribute. Is there another way to show the full title of an option on mouseover for the "html:options" s...

Jquery dialog box disappering after some time

I have use jquery dialog box in which I have populated drop down lists using ajax,it is working fine on I.E 6 but on mozilla when I click the button to show the dialog box for the desired purpose.After approx 5 sec later it disappears. My code is something like var confirmDialog = null; function processConfirm() { $(confirmDialog...

Struts 1 not user-friendly with the browser back button: any solutions?

I have inherited a Java website that uses Struts 1. Currently if the brosers back button is pressed midway through a journey they get a 'Webpage has expired' error. From my limited understanding, this seems to be a flaw in the design of Struts - every page is a form. Is there anyway to get around the problem, or would the only way be mi...