Suresh Kumar

Greenhorn
+ Follow
since May 26, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Suresh Kumar

Hi Vijai,

This may occur when the attribute 'subscriber_id' does not exist on the session. It will be better to ensure that subscriber_id always exists on session before trying to use it.


Suresh.
16 years ago
JSP
Hi Pranav,

It will be useful if you post the code in Action class which sets the DeatilForm as request/session attribute also.



Regards,
Suresh.
16 years ago
Hi,

For comparing two request parameters, you can use

<logic:equal parameter="password" value="${ param.userName }">
Hi User, Thanks for visiting!!!
</logic:equal>

You can also compare attributes of a bean against constant values/rumtime expressions.

<logic:equal name="loginForm" property="username" value="user001">
Hi user001, Thanks for visiting!!!
</logic:equal>

Hope it is useful.

Suresh.
16 years ago
Hi,

You can find out the exact name of the forward in forward tag under the corrosponding action mapping of your struts-config.xml.

<global-forwards>
<forward name="failure" path="/failure.jsp"></forward>
</global-forwards>
<action-mappings>
<action path="/test" name="testForm" type="com.action.TestAction">
<forward name="success" path="/welcome.jsp"></forward>
<forward name="error" path="/error.jsp"></forward>
</action>
</action-mappings>

success is the forward name if you want the request to be forwarded to welcome.jsp.

If there are no forward tags under corrosponding action mapping, then global-forwards will be checked.

Hope it is helpful.

Suresh.
16 years ago
Hi,

You can use MessageResources to read the properties file in Action class.
In execute method, you can give like this..
MessageResources msgResource = getResources(request);
This will read the message resource file specified in struts-config.xml
(<message-resources parameter="ApplicationResources"/>

Then you can use getMessage() method on MessageResources to fetch the messages.

Regards,
Suresh.
16 years ago
Hi Vishnu,

The form-bean definition for TestAction is still missing in you struts-config.xml. ie,
<form-bean name="TestAction" type="src.rose.net.TestActionForm"> is missing.

It would be better if you paste the error message also.

Regards,
Suresh.
16 years ago