aspose file tools*
The moose likes Tomcat and the fly likes Configuring tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Configuring tomcat " Watch "Configuring tomcat " New topic
Author

Configuring tomcat

Rohit Badhwar
Greenhorn

Joined: Dec 27, 2007
Posts: 1
I have to deploy my application named storage which under webapps folder

I am using Tomcat 5.5.23 and Hibernate 3 as orm tool.
I want to access my jsp page through the url like this
https://localhost:80/web/jsp/login.jsp

for this I have made changes in server.xml file
changed the ssl port from 8443 to 80 and redirection port for nonssl to 80 and changed the appbase to webapps/storage which was by default webapps

But when i try to acess my jsp page through the above mentyioned url i am getting this error HibernateUtil cannot be Resolved.

The error is a below
n error occurred at line: 6 in the jsp file: /jsp/login.jsp
HibernateUtil cannot be resolved
3: import="org.json.*,java.util.*,com.hgi.util.*,java.io.*,org.hibernate.*,com.hgi.entities.*,org.hibernate.criterion.*,java.util.regex.Pattern,java.util.regex.*,java.util.Random,java.text.*"
4:
5:
6: HibernateUtil.init("/usr/local/apache-tomcat-5.5.53/webapps/storage/hibernate");
7:
8:
9: String logout = request.getParameter("logout");


An error occurred at line: 18 in the jsp file: /jsp/login.jsp
HibernateUtil cannot be resolved
15: String password = request.getParameter("password");
16: if(username!=null && !("").equals(username) && password!=null && !("").equals(password))
17: {
18: Session sess = HibernateUtil.currentSession();
19: Transaction tx = null;
20:
21: String hql = " from LoginImpl login where login.username= :username and login.password= :password and login.status= :status";


An error occurred at line: 27 in the jsp file: /jsp/login.jsp
LoginImpl cannot be resolved to a type
24: query.setString("password",password);
25: query.setString("status","E");//LoginImpl.STATUS_ENABLE);
26: List users = query.list();
27: LoginImpl login = null;
28: if(users.size()>0)
29: {
30: login = (LoginImpl) users.get(0);


An error occurred at line: 30 in the jsp file: /jsp/login.jsp
LoginImpl cannot be resolved to a type
27: LoginImpl login = null;
28: if(users.size()>0)
29: {
30: login = (LoginImpl) users.get(0);
31: Global userInfo = new Global();
32: userInfo.username = login.getUsername();
33: userInfo.userRole = login.getRole();


An error occurred at line: 31 in the jsp file: /jsp/login.jsp
Global cannot be resolved to a type
28: if(users.size()>0)
29: {
30: login = (LoginImpl) users.get(0);
31: Global userInfo = new Global();
32: userInfo.username = login.getUsername();
33: userInfo.userRole = login.getRole();
34: userInfo.userSet = login.getUser().getSetNo();


An error occurred at line: 31 in the jsp file: /jsp/login.jsp
Global cannot be resolved to a type
28: if(users.size()>0)
29: {
30: login = (LoginImpl) users.get(0);
31: Global userInfo = new Global();
32: userInfo.username = login.getUsername();
33: userInfo.userRole = login.getRole();
34: userInfo.userSet = login.getUser().getSetNo();


An error occurred at line: 35 in the jsp file: /jsp/login.jsp
UserImpl cannot be resolved to a type
32: userInfo.username = login.getUsername();
33: userInfo.userRole = login.getRole();
34: userInfo.userSet = login.getUser().getSetNo();
35: userInfo.firstName = ((UserImpl)login.getUser()).getFirstName();
36:
37: userInfo.homeDir = Global.commonBase + userInfo.userSet + File.separator + userInfo.username + File.separator;
38: userInfo.thumbnailBase = userInfo.homeDir + "thumbnails" + File.separator;


An error occurred at line: 37 in the jsp file: /jsp/login.jsp
Global.commonBase cannot be resolved to a type
34: userInfo.userSet = login.getUser().getSetNo();
35: userInfo.firstName = ((UserImpl)login.getUser()).getFirstName();
36:
37: userInfo.homeDir = Global.commonBase + userInfo.userSet + File.separator + userInfo.username + File.separator;
38: userInfo.thumbnailBase = userInfo.homeDir + "thumbnails" + File.separator;
39: userInfo.fileBase = userInfo.homeDir + "data" + File.separator;
40: userInfo.tempDir = userInfo.homeDir + "temp" + File.separator;

But if appBase is not changed then it working fine..
Can anybody let me know where i am going wrong...
Sivaraman Lakshmanan
Ranch Hand

Joined: Aug 02, 2003
Posts: 231
Hi,
The error seems like the hibernate jar is not loaded by the server. Did you drop all the necessary jar files required by your application in to the lib folder under the WEB-INF directory of your application?

Hope this helps


Regards,
Sivaraman.L
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Configuring tomcat