wood burning stoves*
The moose likes Servlets and the fly likes RequestDispatcher error(again) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "RequestDispatcher error(again)" Watch "RequestDispatcher error(again)" New topic
Author

RequestDispatcher error(again)

Girish Vasmatkar
Ranch Hand

Joined: Apr 24, 2008
Posts: 201
my problem is not solved yet.this time i am posting the whole code of login.java servlet





[ June 25, 2008: Message edited by: David O'Meara ]

[ June 25, 2008: Message edited by: Girish Vasmatkar ]
[ June 25, 2008: Message edited by: Girish Vasmatkar ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

When I see a question with more than 2 or 3 lines of unformatted code, I usually just skip it and look for a question that would be quicker (and thus, easier) to read.

Using code tags will help.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Girish Vasmatkar
Ranch Hand

Joined: Apr 24, 2008
Posts: 201
Sorry sir but see this problem is taking toll on mymind.I have also gone through other forums for the same problem and one of them says that this may be due to Tomcat server version.Also when you look at the code you will see that i have checked to see if there are any null object present.I can't figure out which null object the stackTrace is talking about.Also if the condition in the if test evaluates to be true then everything goes right.All the bean values are getting printed correctly.Also the next page the profile.jsp contains code segments like this...


<jsp:useBean id="userBean" scope="session" class="snw.login" />
</jsp:useBean>

<jsp:getProperty name="userBean" property="designation" />


Thank You Very Much...
Girish Vasmatkar
Ranch Hand

Joined: Apr 24, 2008
Posts: 201
Sorry sir but see this problem is taking toll on mymind.I have also gone through other forums for the same problem and one of them says that this may be due to Tomcat server version.Also when you look at the code you will see that i have checked to see if there are any null object present.I can't figure out which null object the stackTrace is talking about.Also if the condition in the if test evaluates to be true then everything goes right.All the bean values are getting printed correctly.Also the next page the profile.jsp contains code segments like this...


<jsp:useBean id="userBean" scope="session" class="snw.login" />
</jsp:useBean>

<jsp:getProperty name="userBean" property="designation" />


Thank You Very Much...
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

There's no need to be sorry.
My point is that you'll probably get more and better help if you add code tags to your question.

You can always go back and edit your original post by clicking on the icon in that post.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Originally posted by Girish Vasmatkar:
I can't figure out which null object the stackTrace is talking about.
I don't want to read your unformatted code, either (I note you still haven't made it readable with the code tags). But fortunately I don't have to. The stack trace should tell you what line of code threw the exception. So have a look at that. If you don't know how to interpret it, then post it here.
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

Hi Girish, please use proper indention for your code and then use the tags as suggested by Ben, you can do this by editing your original post.
Or post the stack trace as suggested by Paul.

As a wild guess, I think one of the database values seems to be null, which you are trying to set to the bean property. Its just a guess maybe the problem lies somewhere else.


Hope this helps


SCJP, SCWCD.
|Asking Good Questions|
 
 
subject: RequestDispatcher error(again)