struts

Struts Tiles 1 - nested tiles problem

I am using Struts tiles 1 succesfully, however I have come across a problem when trying to nest tiles. I currently have a layout like so: I wish to have another template like this, for use in quite a few user pages: So I wish to extend the first layout for the user layout. In the tiles definiton I am using: <definition name=".bas...

deploy struts app on jboss

I'm working through some struts tutorials, and here's one of the ones I'm using: http://www.vaannila.com/struts/struts-example/struts-login-page-example-1.html I downloaded the "source + lib" link at the bottom of that page, I copied the Example2 folder from the zip to my webapps folder under tomcat, and everything works as advertised. ...

struts2 application on jboss

This is a bit of a continuation of http://stackoverflow.com/questions/1777339/deploy-struts-app-on-jboss, but it's different enough that I felt it warranted a new question. In the other question, I was working with struts, but now I'm working with struts 2. The tutorials here are broken up into struts tutorials and struts2 tutorials. ...

Java Struts Report

I am writing an excel report using an action,controller, servlet struts framework. The report is very congested and has already around 10 separate queries. I need to add about 10 more queries due to a change in the report. Is there a way to do this without having to keep nesting the Result Sets? Below is the existing code. public TotalS...

In Struts2, how do you share your common html across all pages?

In Struts2, how do you share your common html across all pages? In Asp.net, you've got Master pages, and in Rails there are Layouts. The idea is that your common html (eg the header, menu, and styles) are all easy to maintain because they are in one place, but for the life of me i can't find the equivalent feature in Struts2. Is it cal...

Struts 2 data transfer and type conversions for primitive types.

Hi. I'm using java beans with automatic data transfer and type conversion. Ex: public class MyAction { public String execute(){ // .... } private double price; public getPrice(){ return price; } public setPrice(double price){ this.price=price; } } Let my request to be http://localhost:8080/my.action?price=21.3 Then in th...

I've written a java getting-started tutorial, where would be a good site to post it for checking?

Hi all, For our company's internal training, I'm writing a java getting-started tutorial. This will go all the way from installing eclipse through to writing a working demo application with Struts, Hibernate, Sitemesh, and Sql server. Now, admittedly i'm new to Java (although have good c# experience) - where would be a good site to pos...

Putting a servlet's reponse in a struts template's tile

Hi, I've set up my servlet to get invoked through a struts action and the result is that it writes html to the screen. However, I'm using a template system (lets say header, content, footer) and would only like to write to the content title ie. keep the header and footer. Does anybody know if this is possible? Thanks, Gearoid. ...

Create PDF in Struts from data on screen

Hi, I am able to create a simple pdf using iText api inside a struts action class. The data that should be passed into the pdf is generated on screen based on user search parameters. What I am wondering is how I can pass the data into the struts action so it can be displayed in the pdf? Thanks in advance. ...

Struts 1.2.9 Action Chaining

I'm having trouble calling a method in one Struts action from a method in another Struts Action (I've been told that this is possible). I'm working with two Struts DynaValidatorForms - one is used to create an entry, the other is used purely for viewing the action (plus editing, deleting etc). I have two seperate Struts Action files: C...

Handle UTF-8 DataString ( Velocity/Struts )

Hey guys, lately, I use the combination of Struts and Velocity frameworks to create some website, the problem is that when I tried to input UTF-8 Japanese character, say, a field name, which I putted in the value of "索", then I click submit ( using ), the data would be passed to an AddForm, which I have the String name field to handle t...

XSS security issue

When using Cross Site Scripting - XSS in a J2EE struts 2.0.9 application . When I put <Script> tag in the URL it is executing the JavaScript which is a security threat. Is there any solution to overcome this problem apart from moviing to higher version of Struts. ...

Take survey using struts

I want to design survey project using struts. When super admin post survey mean it will be display to all users. But when sub admin post survey mean it will be display to particular group users like team1/team2 etc..please anybody help me? ...

Struts 2's inbuit Validations on List items

<s:iterator value="listOfValues" status="row"> <s:textfield name="listOfVoObjects[${row.index}].itemId"/> <s:textfield name="listOfVoObjects[${row.index}].itemName"/> </s:iterator> In this scenario, does anybody know how to do validations on each itemId and itemName in the listOfValues when the form is submitted using the XML v...

Learning Struts, Spring and Hibernate

I'm trying to learn Struts, Spring and Hibernate, I was just wondering if anyone knows any good sources or some examples that makes use of all the technologies (like a small web application). Thanks. ...

Sed script for find/replace inside .jsp files. (from Struts to JSTL EL syntax)

I want a sed script that I can use for 1) finding instances, and 2) printing this string: <bean:write name='iframesrcUrl'/> <bean:write name="iframesrcUrl"/> <bean:write name="currentPage" property="title" filter="false"/> or similar. name and property values can differ. property and filter attributes are optional. Both single quotes...

hibernate creates problem for table with composite primary key while generating hibernate classes with eclipse

Hello friends, I have 2 tables as given below. feedback_answer question_id number(primary key) answer_id number (primary key) answer_en varchar2(255) answer_it varchar2(255) user_feedback verification_id number(primary key) question_id number(foreign key - feedback_answer) answer_id number(foreign key - feedback_answer) ...

How to customize ActionServlet in struts

In which situation we should consider the customization of ActionServlet and how we will customize the ActionServlet. ...

convert integer(long) to double in jsp

Hi, i want to do arithmetic operation on jsp . I am using struts tag lib tag following is the code : <s:set name="value1" value ="%{0.0}" /> <s:set name="value2" value ="%{0.0}" /> <s:set name="percent" value ="%{0.0}" /> <s:iterator> <s:set name="value1" value ="%{#value1+ someIntegerValue1}" /> ...

does spring framework mvc replace struts? or am I confused?

is struts (1 or 2?) used strictly for MVC type architecture or is there more to it? reason I am asking is I am looking at a web application and they seem to be using both spring and struts. ...