tyte kyat

Ranch Hand
+ Follow
since May 17, 2011
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by tyte kyat

First you have to check your file name first. I hope you already did that. which is as follow

Second, you have to check whether you have registered validation interceptor for that particular action or not.


And, finally, you have to make sure in struts.xml file that you actually are pointing to the same page when your validation return "input".
11 years ago
I am also a newbie here.

But, I think I can point out your problem here.

you said you did mapping as follow

If I am right resource is used to map another XML format file. Here in your case, you have to use as follow

Hi, seniors

I got a problem which I could not figure it out.

I got a simple application, which use hibernate 3.xx and struts 2.xx

Every thing is working fine. but one problem, which is when I restart my application for the first time or after some time when there is gap between the previous request of the page and the future coming request, I am having the following error.

after reading some similar problems, it is assumed (I guest) because of the connection which is dead after some period. and suggest to use connection pooling. So, I tried but not succeed yet.

So, if someone already come across to this point or know how to figure it out. please let me know.

This post is uploaded after reading similar problems and uploaded after this post.
Thanks in advance.
by the way, it does not happen in my development environment using eclipse IDE. It only happen when I upload and deploy it.
11 years ago
Hi, someone
I got the following error. can you please help me with that ...

when I fine the following error on google. some people say that someone who got that sort of error, should add javaassit.jar,
that I already added. and some people suggest to have getter and setter that I also have already.

and My problem occur only on first access and when I press F5 or refresh, it is working fine.

and, by the way, I am using full hibernate plugin.

So, Please, I am dying for the answer.
by the way, it does not happen in my development environment using eclipse IDE. It only happen when I upload and deploy it.
thanks in advance.

and the following is my java file.

11 years ago
I am a Java/J2EE developer based in UK. I am currently looking for a graduate or junior developer position. My skill set is Java, JSP, Servlet, Struts, Hibernate, JavaScript, HTML, CSS, SQL.

If you need my service, do let me know and I will contact you with more details.

The following is the example of my work.



11 years ago
Have you try this,

without --> com.rajesh.


without changing anything and if you put the following line

System.out.println("size = "+plist.size());

before calling Iterator it=plist.iterator();

what have you got?
11 years ago
sorry, too much desire make me blind...

11 years ago
I got the following NPE for the first time I log in to my application. after the first time, it is working fine
and when I refresh the error page, it is also working fine.
Can someone please point me out why is it happening and where did I make it wrong?

Thanks in advance.

11 years ago
I got it working...
and I have to change my struts.xml file as follow

This is intend for those who are like me(newbie) in Struts and Hibernate...

You see no 1 and 5 is required as I am using full hibernate plugin. And according to the rule, there should be basic stack or default stack in your newly created stack.
without that you will get nullPointerException.

you see no 2 is required this is because ( you might need to go above of this page and look for "CustomerAction", which is implemented using modeldriven.)
for that reason you need it. again if you do not turn on ModelDriven Interceptor, you will get NullPointerException.

you see no 3 is required this is because somewhere in my application (which you can not have a reference here), username and password is required and that params interceptor is required for that reason.
without that again NPE.

and No 4 is the validation which is required to validate against user input.
that is all ...

(if i state something wrong here, I will happily take any suggestion and improvement.)
11 years ago
I am using predefine interceptor .
11 years ago

It turns out that it is not because of Session, it is somewhere @ value stack or at struts.xml file.

when I implement the following code in my struts.xml file (without validation interceptor)

and insert customer as named "p". I got the following at concole meaning that it is working perfectly.

and in my debug mode at my jsp page. I got the following information.

Now, what i believe is , due the implementation of "validation" interceptor, my value stack become empty or having null.
why is that so?
11 years ago
Hi there I got a Null pointer Exception when trying to save an obj...
what actually happen is when I implemented validation interceptor while inserting customer obj into DB, I got the NPE .
if I remove that interceptor, it works fine.

But, I need validation implemented. so, how can i bypass?


the following is my action class

and this is my struts.xml file

My dao class is as follow

my validation xml is as follow

11 years ago
or you can simply just do that in your jsp

<s:select list="{'single','married','other'}" name="status" label="Marital Status"></s:select>

12 years ago
Thanks Kunal, Steve and Seetharaman
I got the idea and solved it out now

the reason is I did not create an Object at first and the second is where I do in my DAOImpl class I have to modified it as follow.

instead of using

thanks you all
12 years ago