This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

error in compilation of jsp  RSS feed

 
kiran bejai
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Am getting few errors while running the webapp that is being deployed successfully using Websphere community edition. Can any one please suggest me some ways so that i can come up with a solution?
the errors are as follows..

19:16:12,046 WARN [FormAuthenticator] Unexpected error forwarding to login page
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 4 in the jsp file: /menu.jspf
Map cannot be resolved to a type
1: <%@page import="java.util.*"%>
2: <%@page import="java.lang.*"%>
3: <%!
4: Map<String,String> menuItems =new LinkedHashMap<String,String>();
5:
6: public void jspInit()
7: {

An error occurred at line: 4 in the jsp file: /menu.jspf
LinkedHashMap cannot be resolved to a type
1: <%@page import="java.util.*"%>
2: <%@page import="java.lang.*"%>
3: <%!
4: Map<String,String> menuItems =new LinkedHashMap<String,String>();
5:
6: public void jspInit()
7: {

and so on......
Thanks in advance....

regards
Kiranbejai
 
Paul Clapham
Sheriff
Posts: 22472
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to import the class properly. This is true in all JSP implementations so let's just move this to the JSP forum.
 
Kapil Mishra
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey kiran, you are not providing a blank space between "<%@" and "page"......import util package like:-


<%@ page import="java.util.*"%>

hope this helps-
Kapil
 
avi sinha
Ranch Hand
Posts: 453
Google Web Toolkit Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please post the code inside code tag so that we can understand the problem. and welcome to javaRanch

avi sinha
 
kiran bejai
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey thanks fo ryour reply guys....

I tried providing a blank space as said by kapil but still am not able to solve the error.

My application is deploying and working fine in geronimo but am getting the above mentioned errors while i run the application in WASCE2.1.3
and moreover its not giving any error while deploying the application in WASCE2.1.3

Hope you guys got me right...

here is my menu.jspf code........



kiranbejai
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!