struts

What are the valid elements and attribute values I should use in an XML file?

For a Struts 2 application I have used validations using the validation.xml. In that I use various elements. How do I know what are the elements, subelements are there, and what are the attributes for them, what are the values I should use for the attributes? I have looked in the DTD URL mentioned in DOCTYPE but there is no detailed in...

Struts Validation.xml Problem

Hi , I want to do a validation of password length specifying minlength should be 15 ,i am using struts validtion.xml to do this,i am able to validate required fields but not length ,where i am going wrong.The code is like validation.xml <formset> <form name="LoginForm"> <field property="password" depends="required,minlen">...

To which part should I add Spring

I'm building a simple web application that handles a simple database using struts and hibernate (so far the application works just fine with these two frameworks), Now I want to add Spring to this application. I have some basic knowledge of how Spring works, but I don't know to which part I need to add Spring's capabilities. Application...

Lift filter to force ssl

Hi, in a struts application, I have a filter that forces certain pages to be accessed only over https via redirection. I'm thinking in porting it to lift so my question is: In the this environment, is there a "lift" way to implement such filter or is it similar/the same as in struts ? Thanks ...

Can you recommend a standard, cool environment for Java web application coding?

I'm a beginner coding a Java web application. I used to code Ruby On Rails. Can you recommend a standard, cool environment for Java web application coding? Is Java+Tomcat+Struts+Eclipse standard? ...

Best way to get client's connection speed using java

Hi, I want to know what is the best way to calculate the download speed of the clients using Java. I have searched on the internet and found that I have to download a file from the server and calculate the time before and after the download completes and to make it more specific - repeat this action for 3 times so I can have an average ...

How to programmatically set the FormBean of the next Action to be executed?

Hi all, I wish to forward an action to the next configured action but prior to that to create a new ActionForm instance and have it associated with the forwarded action: Psuedo code follows : public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception ...

request.getQueryString() should not be null?

I'm debugging an old Struts 1.2 w/ Tiles application running on Oracle App Server 10.1.3. There are some scenarios in which request.getQueryString() seems to improperly return null and it seems to have started doing this without any changes to the application code, indicating that server patching may be a factor. I added some scriptlet c...

<html:errors> not working..

Hello, I am little stuck with . It is not populating the errors for me, rather it is loading the page without . Attaching my code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "struts-config_1_2.dtd"> <struts-con...

Custom Interceptor not being called

I'm new to Struts2 (Struts 2) and trying to get my custom interceptor to work. I think I set it up correctly. It's init method is called so I know that the interceptor exists. The action's execute method is called, so I know that the action is right. But for some reason the intercept() method on the interceptor is not called. struts...

in JSP is there a way to pass HttpServletRequest object as an attribute to another HttpServletRequest object

I am using Struts/JSP for a webapp. I have a page A where I am collecting user defined parameters (as request parameters can't make them session params) and then I go to page B to ask yes/no kind of a question to the user. In case of yes I need to come back to page A and continue regular processing. But obviously the request object for p...

Maintaining a list of Objects on a JSP page

Hi, I have been developing a piece of simulation software using Struts 1.3/JSP. I am trying to find a way to display of list of objects on my JSP page which can be added to/deleted from. I actually have a list of chemical steps, each step has a list of product and reactant species (species is also a java object) This is the Step class...

Jsp Expression Language Problem

I have a jsp in which there is something like this ${pageContext.request.parameterMap.instanceNo[0]} I want to iterate through each of its value. I tried the below code but doesn't work <s:iterator id="test" var="" value="${pageContext.request.parameterMap.instanceNo[0]}"> Hello </s:iterator> ...

What's the difference between Struts and Spring?

How do Struts and Spring differ, and which one is more appropriate for developing a web application? ...

Iterating over a map and displaying in a jsp

I have to display a map of objects in a page. The Struts action class is as follows: public class DonorListAction extends Action{ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Ex...

Adding another item to collection object

State: <html:select property="product.stateId" size="1" onchange="loadProducts();loadProducts2();"> <html:options collection="stateList" property="id" labelProperty="name"/> </html:select> I want to add another option to the list of states such as, "Please select state," in the drop down menu. I think I need to modify the Java col...

struts2 full hibernate plugin

Hi, I was wondering how can I validate fields in action classes' validate method? Because full-hibernate-plugin requires default package to extend "hibernate-default". So, would param intercept and validate? http://code.google.com/p/full-hibernate-plugin-for-struts2/wiki/2_Hibernate_Validator_integration public class Services { @S...

struts2 + convention plugin issues

I have two issues with struts2 that are somewhat related. I should also mention that all of my jsps are in WEB-INF so they can't be directly accessed by typing in ../page.jsp, but they CAN be accessed by typing in ../page. First, lets say I want to implement Registration functionality in my website. I have register-form.jsp. This i...

JSP Redirection and passing value

Hi , I have a JSP in which i am redirecting to another jsp like ,i dont have any other data in that jsp,i want to pass a value from this jsp(index.jsp) to the redirected jsp(login.jsp),how will i do this? Here "logonInput" is defined in struts-config.xml index.JSP is like <%@ page language="java" contentType="text/html;charset=UTF-...

Struts | assign a value to a logic tag using Javascript

How do I assign a value to a struts logic tag using Javascript, I have tried many ways but never worked out. here's the sample code: <logic:equal name="myName" property="myId" value="idValue" > Thanks. ...