struts

how to display a table retrieved from database to a jsp page via a controller page in Struts framework

i have created a model class to connect with database with a function that retrives a table data.now this function should return whole resultset back to a Controller action page. further controller action should send the data to jsp page for client viewing. or simply how to hold Resultset data from query like..select * from table ...

One account, multiple users, multiple shopping cart in a web application

I received a somewhat unusual request (imo) for a transactional web site. I have to implement the possibility of having multiple shopping cart for the same user. Those really are shopping carts, not order templates. I.E: A store with several departments ordering under the same account, but with a different person placing orders for a ...

Create a Modal Dialog box containing a form using struts2

Hi, In my application I have a part of form which should allow details of a n number of persons. i.e, Field1 Field2 field3 now a button Details of persons on button click it open a modal dialog box containg a form with 3 fields about person.When I click save. the details of persons sections should update...This should repeat on eve...

File upload help in JSP /Struts 1.2

Hi All, I have seen lot of reviews and have not been able to figure out how I can solve my problem.. Problem: Currently we have a page to upload the file from local machine to the respositry. It is currently using Struts upload. Now the current requirment is, Since users upload around 1gb of file, they are made to wait for a long tim...

how to add hindi language support to struts webapplication.

Hi, I am creating Web application using the struts 1.2. On which I have to add the Hindi language support to my Web application.I have created the Application_hi.properties file in which I have key equal to Hindi word. But it is giving the error like "some character cannot be map using ISO-8859-1 character encoding". thanks in advance....

Can't access a property with <html:checkbox property="..."> when iterating a list

Hi. In my Struts form I've got a list. In a JSP I iterate over it like this: <c:forEach items="${MyForm.auspraegungen}" var="auspraegung"> <tr> <td>${auspraegung.name}</td> <td>${auspraegung.forced}</td> <td>${auspraegung.cbx_uebernehmen}</td> <html:checkbox property="auspraegung.cbx_uebernehmen" /> ...

Is it possible to access say the 3rd element in a collection with Struts?

Hi. Is there a way to do the following thing in Struts / JSP? <html:checkbox property="list.get(0).checked" /> Thank you in advance. ...

Populate <html:text> field from a <bean:write> tag.

I want to populate a field from a session bean. I attempted this: `<html:text property="docId" value="<bean:write name="queryResponseBean" property="queryResults" />" />` but to no avail. thanks. ...

Any way to anticipate session timeout ?

Hi, Is there a way to "catch" the session timeout event, so as to retrieve data from HttpSession before its invalidated ? We're implementing the Filter Interface, and in the doFilter method, the user we stored in the session object at login is null when session times out. Thanks in advance. ...

Struts i18n app

can anyone provide me sample code to develop a struts i18n application containing two jsp pages with two buttons(a single toggle button) to switch b/t two languages... i am a new to struts thnx in adv............... ...

Struts 1 Date Format Tag

Is there any tag in the Struts 1 tag library which can format a java.util.Date object? In Struts 2, I can use the s:date tag, but I can't find the Struts 1 equivalent. ...

How to set the default value for textarea in struts2

I would like to know how the default value can be set in textarea , the scenario would be after a page refresh , or fail of validation bedore save operation. <s:textarea name="desc" value="" theme="xhtml" required="true" cssClass="text textarea small"/> value="<%= "Default" %>" , this code is not working out. ...

StrutsTestCase test and "error" returned from Struts2 action class

Hi all, I'm trying to use StrutsTestCase for testing my Struts2 actions, but I'm getting always the "error" value back while executing the "execute()" method from the proxy. Here's the example: public void testSpike() throws Exception{ request.addHeader("param1", "param"); ActionProxy proxy = getActionProxy("/action/to/tes...

Migrating from Struts 1.x to GWT 2.x

This is a rather open ended question since I'm only in the beginning of my research, but I'm having trouble finding resources on how to mix GWT into a Struts application with the eventual goal of removing Struts. So, I was hoping someone out there could either point me to a good reference or if they could be that reference here. The clos...

I want to create a payment gateway for my project ..how it can be done?

In my web appliction there is one line transaction system for online resrvation. i have no idea on how to implement it i.e when an end user wants to do reservation ,an form has to open show different banks ,by selecting bank ,user is allowed to enter his debit/credit card info and i have to send this to third party payment gateway vendo...

Struts | Type casting error

I'm trying to save a data in a simple form through Hibernate using struts as the controller the problem, but there's error occurring when I submit the form Cannot invoke com.myapp.struts.form.EmployeeEditForm.setEmpdob - argument type mismatch I assume this is because of the type conflict, because the form field (refer to date of bir...

Can struts 1.1 post to a relative path

I have a Struts application and I build by form <html:form action="companyProvAdd"> ....</html:form> which renders the html as <form name="companyProvAddForm" method="post" action="/ebig/companyProvAdd.do"> ...</form> Is there a way to have the post go to a relative URL? <form name="companyProvAddForm" method="post" action="c...

Spring or Struts web based tool to list content of database tables

Hi, Is there an open source web based tool preferably based on Spring(or struts) and Hibernate that will list the contents of a database table? I can write one but there are hundreds of tables so im wondering if i can use an existing open source tool that will list the contents of the table based on what i select. Basically all i wan...

Hibernate | Data Exception

I'm getting an exception when I try to save a batch data (using hibernate as the persistence layer), Here's the exception: org.hibernate.exception.DataException: could not insert: [hbm.Employee] here's my business logic to save the data: (DusinessDAO.class) public void saveEmployee(Employee employee) { Session session = nul...

refresh a part of a page using struts without using ajax .

Guys, is it possible to refresh a part of a page in struts without using ajax. kindly let me know. ...