Nandish Sri

Ranch Hand
+ Follow
since Jan 19, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nandish Sri

Thanks David. Your solution resolved my issue. I removed convention plugin jar file. Thanks a lot.
11 years ago
Thanks David for your response.
I am not sure, why I am using convention plugin. Shall I remove struts2-convention-plugin-2.1.6.jar from my application or is it referring somewhere internally ?
And in web.xml, struts1 you mean, referring of logic tags ? I will remove struts.jar also, not sure why I am using this older and newer version both !
11 years ago
Please see struts.xml in above post. I am using customized interceptor stack. Is there any problem with that usage ? I am confused. The same application is working perfectly in my local system. I am using same tomcat version 6.0 as in server, but error only in server. This is strange.... I am blank on this.
11 years ago
I am getting the below error in server. I hosted this application in server. There getting below error, but in local it is working fine.
And in the error, its logging something strange which is not related to my application at all..
Is it related to conflicting with some other application on the server with same namespace ???
I am trying to solve this issue since 2 days.. Anyone please help me.....

struts.xml

Here is the error:


Web.xml


Libraries:
11 years ago

I am using struts 2 textfield tag to display values with label. Sometimes these tags may have value or sometimes empty string or null.
I want to display these values ONLY when they are having values [Non Empty]. Currently if it contains blank values, only labels are displaying. I want to avoid this.
Is there any configuration for this ? If Yes please let me know. If no, what is the alternative for this ?


11 years ago

I am getting below error. Using DisplayTag for pagination with Struts 2.
And one more strange problem I am facing is, after navigating here & there, by clicking Export [Excel], it will display in the same page. But initially it was working fine. Able to export to excel sheet.
I tried by changing to Connection pool also. No use And if I open new Browser window and click Export to Excel, it will work fine initially and after some time all results will be displayed in same window.

Attached results image also, just for reference.






Result Retrieve part in custDAO.java:

Hibernate Connection configuration:

11 years ago
Thanks for your response. Now I am handling using Like below..

MyException


Struts.xml



DAO Code


Like above I am passing message. Is it the right way ?

Can you please let me know how will you set status_message in jsp from DAO. Using same getter/setter from a bean ?

11 years ago
After adding/updating any value in DB, I want to display the same message like "Updated Successfully" in an alert box or a dialog page. I am using Struts2, Tiles and Hibernate.
I want a generic jsp page which can accept a message. This message will be passed by other pages like add.jsp or update.jsp using String return values.
How I can do this ?
I implemented this by using my own exception. Is it the right way ?
Please let me know how to do this.
11 years ago
Yes David, your guess is correct
Actually there was a Login-validation.xml file which I created long back. I forgot about that. Just now only I saw as per your comments.
This solved my problem Thanks a lot David
11 years ago
I do not have any validation code in my jsp/action class. Please let me know what information I need to provide.
I am very much confused. I tried by putting @Override after extending ActionSupport on execute method. No results
11 years ago
After clicking Submit in Login.jsp page, Action is not calling IFFFF I extends ActionSupport.
If I remove the extends ActionSupport, it is working fine, it is calling execute method.

Please explain why it is happening like this ???

Struts action config:

Login.jsp:


Struts action class:


LoginInfo.java


Tiles:

11 years ago
After adding getCustInfoVOList method in Action, its working. I was thinking, jsp can take custInfoVOList value from VO itself.
David, Thanks for your solution
11 years ago
Result Page where I need to populate all customers:

In this jsp, nothing is populating.. please help. Here is my code

customerList.jsp:


My value object:



business file:


Log File:



tiles.xml


struts.xml



Hibernate.xml

11 years ago
Please help me why I am getting this error: Column 'cust_code' cannot be null

Here is my code:

Database Info:

CREATE TABLE `collection` (
`cust_code` varchar(10) NOT NULL,
`collection_code` int(10) NOT NULL auto_increment,
`paidDate` date default NULL,
`paidAmount` double(10,0) default NULL,
`viewMonth` varchar(10) default NULL,
`viewYear` varchar(4) default NULL,
`paidMonth` varchar(10) default NULL,
`paidYear` varchar(4) default NULL,
PRIMARY KEY (`collection_code`),
CONSTRAINT `cust_code` FOREIGN KEY (`cust_code`) REFERENCES `cust_info` (`code`)
) ENGINE=MyISAM AUTO_INCREMENT=95 DEFAULT CHARSET=utf8;


CREATE TABLE `cust_info` (
`code` varchar(10) NOT NULL,
`name` varchar(20) default NULL,
`amount` double(10,0) default NULL,
`contactNbr` varchar(12) default NULL,
`address` varchar(50) default NULL,
`comments` varchar(100) default NULL,
`status` varchar(10) default NULL,
PRIMARY KEY (`code`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



Errors I am getting are:
in localhost-date.log


System.out.put log:




CustMonthlyUpdate.java


CustMonthlyUpdate.js



CustDAO.updateCardInfo method:


CustInfoVO.java [Omitted other getter/setter methods]


He he... Thanks for your responses. Now I added getUserList in my Action class. Able to retrieve object members in jsp file.
Thanks a lot
11 years ago