struts

Piecemeal Conversion from Struts to Tapestry 5

I have a Struts (1.3.8) application that I'd like to convert to Tapestry 5. There will probably not be time to do the whole conversion in one fell swoop. I'd like to deliver new functionality in Tapestry and convert existing Struts / JSPs as time permits. Has anyone attempted something like this? Can Struts and Tapestry co-exist? ...

How do I configure Struts 2 with Tomcat 6?

Can anyone help me to configure struts 2.0.14 (I'm using tomcat 6.0). I want to know what is the procedure to build my first application in struts. Also tell me how xml is used to build a struts application. I have tried and tired of Google and that's why I'm here. Please suggest me some nice tutorial for struts out of your own experienc...

Comparing struts ognl value to scriptlet value in JSP

I have to compare this to a value like below: ${page_id } ---- <% out.print(a); %> <c:if test="${page_id != a}"> How can I do this? ...

Removing unnecessary whitespace in a J2EE/Struts Application in WebSphere

Is anyone familiar with a technique for removal of whitespace that results from the use of tag libraries such as JSTL? I know that you can do this in Tomcat via a trimSpaces initialization parameter, but does anyone have similar experience doing this type of thing within WebSphere App Server? ...

Flow of struts

Can anyone tell me the control flow of struts. Which program will be called first? ...

Why use 'redirect=true' in struts 1.* forward?

I've been having some problems with ActionMessages created during execution of an action which didn't display, and i found out that my problems were due to my forwards having redirect=true in struts-config.xml. Since the default behaviour is redirect=false, i've been thinking about which benefits can one have using redirect=true and i c...

Any fast way to convert a scriptlet-infected JSP app into Struts?

We've got a legacy app to support. It's pure JSP, i.e. JSP opens connections, does business logic, submits forms (usually to the same JSP), and so on. It's 400+ pages, with some pages are as large as 100K. The app is expected to be extended and modified over the next few years, so we're looking into ways to split presentation and busine...

How to get value from struts bean?

I am new to struts. I'm just trying to build a simple application that gets the input from the user and display it. For which I got the input from the user and stored it in a bean and I have also displayed it in the next page using bean:write but how to place it in a text box. I tried to use html:text but I don't know how to place the v...

Tag library?

What is the purpose of having tag library? Though we have the basic tags available which makes our work very simple, what is the reason to have a struts-html.tld. Though we can call and use the bean easily through usebean, setProperty and getProperty tags why we have struts-bean.tld. I am a newbie, so kindly clarify my doubts.. Thanks i...

struts-tiles

I have developed a simple struts application which retrieves and manipulates customer data from the database. Now I want to include an image at the top of all the pages. I know tiles is the best way to do it. Since I'm a newbie can anyone help me to include an image in my existing project using tiles. Thanks in advance ...

Struts & bean

I have two questions : 1) Where do we call a bean in struts (what is the exact line through which we call the bean and from which file) and how the getter and setter methods are called? 2) Also we are fixing the scope as request or session or something else, I can understand that the values will be stored in the request object or ses...

Purpose of DynaValidatorForm

What is the use of DynaValidationForm in struts? I have read an article that it reduces the lines of code and complexity. Can anyone tell how it is so. Thanks in advance ...

Objects of session and request

In struts, where does the session object created & which class or method creates it? Likewise where does the request object created & which class or method invokes it? Thanks in advance ...

In Struts, where should the computations reside?

Hi, I'm strating out web programming in Java and I want to know the best practices. I'm wondering where should my computations reside in let's say a Java MVC app or a Struts apps? ...

Hibernate not reflecting changes

I have a struts application that uses Hibernate to access a MYSQL DB. I have a number of pages that make changes to the DB. These changes go through fine, data is update in the DB. However when browsing to the page that should show this updated information its often not there, and even after a few page refreshes it still isn't there. Eve...

ONGL in struts 2.1.6

Hi, I am using struts 2.1.6 with ONGL. Please see the code below and tell me where should I define properties to <td> tag like width, height, bgcolor etc. in line no 3 and 4. 1) s:form action="Login"> 2) <table> 3) <tr><s:textfield key="username"/></tr> 4) <tr><s:password key="password" /></tr> 5) </table> 6) </s:form> ...

Can EventActionDispatcher publish "this" before the constructor finishes?

The recommended way to use the EventActionDispatcher is as follows (per the API docs @ http://struts.apache.org/1.2.9/api/org/apache/struts/actions/EventActionDispatcher.html ) public class MyCustomAction extends Action { protected ActionDispatcher dispatcher = new EventActionDispatcher(this); public ActionForward exe...

How to place a bean:write inside an html:link in struts?

Hi, I'm creating a blog in struts (as an exercise) and I want to create a delete link for a post. Here's my desired link: blah/Post.do?delete={postid} how do I do something like: ">Delete BTW I'm using DispatchAction in my PostAction class. Thanks in advance! ...

How do I fix a StackOverflowError on Struts DispatchAction?

Here's the situation: I practiced creating a mini blog application. I used Strut's EventDispatchAction to handle all post related methods like updating and listing posts. I have an update() method (http://mywebsite/post?update) that updates the database and then if it's successful it forwards to the same action class but I used a differ...

How to redirect NullPointerExceptions in Struts?

Hi, is there a way to redirect all NullPointerExceptions to a pretty jsp page perhaps in Struts? Thanks in advance! ...