Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 11th, 2003, 09:59 PM
vincent88 vincent88 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 1 vincent88 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy org.apache.jasper.JasperException

Hi,
I encounter a problem.
I using J2SDK 1.4.0 and Apachea Tomcat 4.1.
I write my servlet program which it will verify my user ID and password and output a jsp (usr02a.jsp) to show the name of the user.

My program able to verify & output the jsp fine. But if I include the
the below line in my program it show error as below:
org.apache.jasper.JasperException: usr

The line I added which cause error is:
<tr>
<td><strong>Name</strong></td>
<td><input type="text" name="@Name" value="
<%= ((usr) session.getAttribute("UserProfile")).getName()%> "
size=30 maxlength=30 > &nbsp;</td>
</tr>
<tr>

The JSP tag I put in is to get the previous session attribute name
to include in the JSP output.

If I take out the whole thing as below show :
<tr>
<td><strong>Name</strong></td>
<td><input type="text" name="@Name" value=""
size=30 maxlength=30 > &nbsp;</td>
</tr>
<tr>

The JSP output can show without error but my purpose to show
the user name is not achieved.

the usr is a class which I compiled in C:\Program Files\Apache Group\Tomcat 4.1\webapps\examples\WEB-INF\classes\env\
(the purpose is to verify id and password and get the values
of name(in getName() method))


I using Windows XP and I have set the classpath for above directory in windows XP environment variable in control-> system.

The above error message post is when my servlet try to
catch the exception do below portion: ( see the SendErrorPage line )

try
{
HttpSession session = request.getSession(true);
session.setAttribute("UserProfile", UsrC);
RequestDispatcher rd
= getServletContext().getRequestDispatcher
("/jsp/usr02a.jsp");
rd.forward(request, response);
}
catch(Exception e)
{
try
{
doGet(request, response, e.toString()); // SendErrorPage
}
catch(Exception e1)
{}


I greatly appreciate if any Servlet / JSP expert can help me on
this. I have try to check the problem a few months but still
unable to solve it.

Best regard.

Reply With Quote
  #2  
Old May 14th, 2003, 04:20 PM
digitsnake's Avatar
digitsnake digitsnake is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Orlando FL
Posts: 130 digitsnake User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via Yahoo to digitsnake
Couple things I can spot here.

First, you are casting getName() object into your usr class. I am not sure that is way you want to use the usr class if your intension is to verify authentication. Try to creat usr class object and call your verification method by passing the getName() object maybe?

Second, (you probably did, but did posted?) you should declared your usr class with package env. Then either import that into the jsp page, or use a fully quilify path name for the class.

Hope this help.
__________________
Help me, help you, help others...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > org.apache.jasper.JasperException


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT