Struts Section Index
I have expresion and it does not work Can somebody sugest how to write corectlly?
bean:message inside Struts tag
I have expresion and it does not work
Can somebody sugest how to write corectlly?
<pran:hello name="<bean:message key="menu.home"/>" />
Thanks a lotmore
No errors are forwarded when redirect is set to true
No errors are forwarded when redirect is set to true
I use the following code to send a forward:
forward = mapping.findForward("cancel");
if (forward!=null) {
ActionErrors errors = new ActionErr...more
Opening new window or going back
Opening new window or going back
I have a form (reportForm) with two different
buttons. "Print" and "Cancel". When clicking 'Print'
I want to open a new window, that prints a report
using a bea...more
Exceptions that occur in an Action class can be catched in the Action class or handled by registered handlers, in the struts-config.xml file, that route control to specified error pages.
Exceptions that occur in an Action class can be catched in the Action class or
handled by registered handlers, in the struts-config.xml file,
that route control to specified error pages.
Exceptio...more
I'm trying to use the ActionError facility in Struts 1.1-b3. I create and save my error in my action.
I'm trying to use the ActionError facility in Struts 1.1-b3. I create and save my error in my action. But when I try to render my error page, using this tag <html:errors/> I get this error me...more
Dynamic values for hidden fields
Dynamic values for hidden fields
I'm trying to set the values of hidden fields dynamicly, eg:
<form:hidden property="employeeName" value="<%= employeeBean.getName() %>" />
I get compi...more
How can I use a variable that contains HTML?
If you have a variable like this:
example="This is a <strong> text </strong>";
Use this in the output jsp:
<bean:write property="example" filter="false">
more
How do you get a password field with html:text? In HTML it's quite easy i.e. type=password. Tried the same using an html:form, but it doesn't recognise "type=password". Any ideas?
<html:password/> is the one to go for
How does struts handle the input element if it is hidden? For example I have an input tag inside my form <input type=hidden value="" name="order">
Struts accepts this, just like any other textfield in your form. To be fully Struts-compatible, you might want to use the html:hidden tag: <html:hidden property="order" />
Struts and javascript. I just started to learn struts and I found that we cannot name a form. So i want to know how to give name to a struts form and how to access and retrive data from struts form ( <html:form> - - - -<html:form> )elements using the java script ?
Struts and javascript
I just started to learn struts and I found that we cannot name a form. So i want to know how to give name to a struts form and how to access and retrive data from struts form...more
User Specific Language settings
User Specific Language settings
I have a requirement to capture the language preference of the user and Based on the settings of the user I need to load the specific application resource file. F...more
My problem is that I cannot figure out how to represent an 'OR' condition with Struts. I want to display a section of HTML if Condition1 OR Condition2 are met. I can represent an AND condition by nesting two <logic:equals> tags.
"OR" Condition
My problem is that I cannot figure out how to represent an 'OR' condition with Struts. I want to display a section of HTML if Condition1 OR Condition2 are met. I can represent an ...more
In my struts application, how do i maintain session, if a user closes the windows browser instead of clickin on logout button? I am using JSP for for client operations.
The Session will stay alive for 20 minutes (defined in web.xml). You can create a SessionListener that logs a person out when the session gets invalidated, ie expires... There is no way you can lo...more
Validate HashMap?
Validate HashMap?
I wrote a MapForm extends ValidatorForm as below:
import java.util.*
import javax.servlet.http.*;
import org.apache.struts.action.*;
import org.apache.struts.validator.*;
//impo...more
I have this code in my JSP page. I need to have name = "questionList" for the form because i am using java script if(document.questionList.yesno1.options[1].selected)... in the JSP page.
problem with html:form
I have this code in my JSP page. I need to have name = "questionList" for the form because i am using java script
if(document.questionList.yesno1.options[1].selected)... in...more