struts

Implementing Struts 2 Interceptors using Struts 1

Hello all, I have a legacy application written with Struts 1. The only feature I was asked to add is to protect some actions. Currently any user can do whatever he/she wants. The idea is to allows all user see the data, but block modification operation, i.e. to modify data a user should log in. I know Struts2 has interceptors, so I cou...

How do i view the log/console for the J2EE Preview server/container in Eclipse?

Hi, I'm working on a struts2 web app in Eclipse, and am using the built-in J2EE Preview server. How can i view the logs / console for it? I'm having some problems and now my previously working site is showing Error 404 everywhere, and the console tab at the bottom window of eclipse isn't showing anything. Cheers all edit: Here's some...

Caught exception while loading file struts-default.xml

I'm not that new to Java. I've done plenty of stuff with it before. But I'm migrating from PHP to Java Servlet/JSP (which I am new to) and I can't figure out this error to save my life. I installed Tomcat6 using Ubuntu 9.04's Synaptic Package Manager and it works like a charm. But when I put struts in my WEB-INF/lib directory and try to ...

Deleting an element from one-to-many collection (Java + HIbernate + Struts)

Hi all, I can't delete a child object from the database. From the org.apache.struts.action.Action.execute() method, I am removing the child from the parent's List, and also calling session.delete(child). I've simplified the code below and only included what I believe to be relavent. Hibernate Mapping <class name="xxx.xxx.hiber...

Getting a 'No thread-bound request found' error from spring in my web app

I'm getting a 'No thread-bound request found' error in my web app and hoping to get some help. I'm trying to use struts2 + spring + hibernate, and use spring to manage the hibernate session factory, and inject hibernate sessions into my struts actions. I hope that made sense. When the app starts up, there are no errors, but when i make t...

How to optimize screen real estate in a J2EE struts app?

I am working on a old J2EE struts app which has very bad UI design. Most of the pages are misusing the screen real estate like there are uneven spaces among dropdown, labels, text boxes etc. Alignment of different items on page is not very efficient leading to space wastage. And sometimes users are forced to use unnecessary scroll bars w...

I need to resize images upon upload in Java / Struts. How to do this?

The title says it all. We're building an application that handles image uploads. I want users to be able to upload an image at a given size, say 128x128, and then have the server automatically generate other sizes based on that, such as 64x64, 57x57, and 25x25. Are there libraries that can help me with this? Edit: I should note that th...

Struts 1.3.10 Digester.getParser() UnsupportedOperationException

I am attempting to start up a Struts 1.X (version 1.3.10) application using OC4J version 10.1.3.5. The application manages to initialize all the Spring beans, including the Struts Actions defined in action-servlet.xml. However, once all the beans are initialized, I get a rather ugly exception in the log. I suspected an issue in xalan (2...

Does Spring Webflow 2.x still support gradual conversion from Struts 1.x?

I've been trying for a long time to move this large project I'm working on away from the now quite dated struts 1.x framework and on to something newer. The main blocker has been that we aren't given enough time for a complete re-write. I came across this article: http://www.devx.com/webdev/Article/28041/0/page/3 Which seems to sugges...

Adding a crossdomain.xml file in a Struts2 REST webapp

I've been using struts2 + the rest plugin successfully to create a simple rest api web service. I'd like to make that service accessible to Flash and Silverlight clients, which means I need to add a crossdomain.xml access file at the root of my webapp. Normally I would just copy a crossdomain.xml file into the root of my webapp and ser...

What is a good resource for learning equivalent JSP, JSTL tags/EL, and Struts tags?

I'm looking to separate business logic from presentation in a project, but the business logic is written using a mixture of tag libraries. Are there any good resources for going from one taglib to another, converting Scriptlet code to EL and back, etc? ...

How to stay in Current Page

I have one form of user name and password fields followed by submit button. How do I stay in current page after clicking submit button without reloding page? Any help is appreciated. ...

Change isRequired star position in Struts 1

I am using Struts 1 on a form and need to mark some inputs as required. The thing is that the red star ('*') showing the required fields when marking them with isRequired="true" is by default shown right after the textbox: Is there a way to change the star position to the left, right before "Input"? If needed, the code of this is now...

Page display "false" in struts application

Hi, I am using struts1.1. When i click submit button in one jsp page, it displays "false". After that the desired page is displayed successfully. I do not know where the "false" will come from. See that image. ...

Customizing controller

While reading Struts2 documentation, I encountered the passage as quoted below customizing controller - Struts 1 lets to customize the request processor per module, Struts 2 lets to customize the request handling per action, if desired. What do the author exactly mean. Simple examples in code form for the demonstration on ...

Is frameworks really necessary for this problem?

Hi Guys I'm creating an online music store application (in Java) for signed and unsigned artist for my client. I'm currently using Struts 1.3.10 (I was recommended Spring but Spring setup is sort of similar to Struts) for my Web application. My Database is currently a MySQL 5 (or higher) and I'm using a DAO pattern to talk to it. Ther...

On load of JSP, selectively change Jquery declaration to input values.

Gentlepeeps, I'm new with Jquery. Apologies in advance for the basic question. I'm trying to bring in Jquery to our struts/jsp environment. Existing code is riddled with pure javascript. I'm writing a validation rule using JQuery's validation plugin like so: $("#advanceValidateform").validate({ rules: { advanceAmt1: { min: 0, m...

S:form is specific to struts2 framework ???

"s:form" is specific to struts2 framework or can we use it in struts1 framework also ??? ...

submit a disabled combo box

Using Struts 1.2 In Jsp page a combo box is set as disabled and I tried to submit the page with errors. html:error is shown, but the combo box is not loading the selected value. ...

At what point should I change the way Struts acquires the session token?

It seems I have to find a different way to transmit the session token from a Flex client to a Struts backend without using cookies. If I were to put the session token in the payload of a request, at what point would I have to customize Struts' behaviour so that I can reuse as much of the existing session handling as possible? In particu...