hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Register an app with Tomcat
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

Register an app with Tomcat

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 06-28-2007, 12:55 PM
DavidV DavidV is offline
Junior Guru Wannabe
 
Join Date: Feb 2003
Posts: 83

Register an app with Tomcat


Hey everyone, how do you register an app with Tomcat? My site is in java and I want to install a java forum. I need to register it with Tomcat though.

Thanks in advance.

Reply With Quote


Sponsored Links
  #2  
Old 06-28-2007, 01:05 PM
stdunbar stdunbar is offline
Web Hosting Master
 
Join Date: Aug 2002
Location: Superior, CO, USA
Posts: 633
Quote:
Originally Posted by DavidV View Post
Hey everyone, how do you register an app with Tomcat? My site is in java and I want to install a java forum. I need to register it with Tomcat though.

Thanks in advance.
I'm not sure what you mean. In Tomcat there are a few ways of running a web application. The simplest way is to put it in the webapps directory of the Tomcat install. In that case though you will have to access your forum with a prefix. So, for example, if you put your forum in $CATALINA_BASE/webapps/forum then you will access your forum at http://hostname:8080/forum (by default).

However, there are other ways of doing this too. You could define a virtual host with a context that points to your directory. That would allow you to skip the /forum part of the URL but it requires other things like getting DNS setup correctly.

Can you provide a bit more detail on what it is you're trying to do? Are you doing this via a control panel or by hand?

__________________
Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums.

Reply With Quote
  #3  
Old 06-28-2007, 01:10 PM
DavidV DavidV is offline
Junior Guru Wannabe
 
Join Date: Feb 2003
Posts: 83
I'm using cPanel. My site is running under the "apps" directory. Beneath it I did create a Forum directory.

Here is the error message I get when trying to access the url which has the install file:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet jforum threw exception
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:691)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:658)
org.apache.jsp.forum.jforum.install_jsp._jspService(install_jsp.java:43)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

net.jforum.exceptions.ForumStartupException: Error while starting jforum
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
com.mysql.jdbc.Connection.execSQL(Connection.java:3124)
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1149)
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1262)
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
net.jforum.dao.generic.GenericCategoryDAO.selectAll(GenericCategoryDAO.java:104)
net.jforum.repository.ForumRepository.loadCategories(ForumRepository.java:782)
net.jforum.repository.ForumRepository.start(ForumRepository.java:128)
net.jforum.ForumStartup.startForumRepository(ForumStartup.java:100)
net.jforum.JForum.init(JForum.java:114)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:691)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:658)
org.apache.jsp.forum.jforum.install_jsp._jspService(install_jsp.java:43)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache Tomcat/5.0.30 logs.
Apache Tomcat/5.0.30

Reply With Quote
Sponsored Links
  #4  
Old 06-28-2007, 01:18 PM
Burhan Burhan is offline
Community Guide
 
Join Date: Jul 2003
Location: Kuwait
Posts: 5,100
Seems like a permissions issue with SQL?

__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise

Reply With Quote
  #5  
Old 06-28-2007, 01:40 PM
DavidV DavidV is offline
Junior Guru Wannabe
 
Join Date: Feb 2003
Posts: 83
Does it? Do you think perhaps I entered the wrong database name/user/password?

Reply With Quote
  #6  
Old 06-28-2007, 02:53 PM
stdunbar stdunbar is offline
Web Hosting Master
 
Join Date: Aug 2002
Location: Superior, CO, USA
Posts: 633
Yes, I would agree with fyrestrtr. Specifically you have:

Code:
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
which means that the JDBC driver is creating an Exception to be thrown. I would take a look at the Tomcat error logs as they may have more information. JForum is developed on MySQL so it should work on there with no issues.

__________________
Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums.

Reply With Quote
  #7  
Old 06-28-2007, 04:26 PM
DavidV DavidV is offline
Junior Guru Wannabe
 
Join Date: Feb 2003
Posts: 83
I checked the database settings and they all seem to be set properly. I had read somewhere on JForum's site that the "app has to be registered with Tomcat". I looked for further information, but couldn't find it.

Basically, it seems that I have to let Tomcat know to also run JForum.

Reply With Quote
  #8  
Old 06-28-2007, 04:42 PM
Biju Biju is offline
Big fan of RajiniKanth!!!
 
Join Date: Sep 2004
Location: Chennai , India
Posts: 4,502
Take a look at this and tell me if it did help you.

http://www.jajakarta.org/tomcat/tomc...ev/source.html


Basically ,

The registration of servlets is done by editing your .WAR file (or exploded .WAR file)'s WEB-INF/web.xml file, putting in the appropriate <servlet> and <servlet-mapping> tags.

Reply With Quote
  #9  
Old 06-28-2007, 05:07 PM
stdunbar stdunbar is offline
Web Hosting Master
 
Join Date: Aug 2002
Location: Superior, CO, USA
Posts: 633
Perhaps you need to start with some very basic web applications before jumping into JForum.

As I stated above, there isn't a registration process per se. There are two common ways that Tomcat runs a Java EE web app - as a virtual host or as a Context element within a virtual host.

If you do not have permission to modify your $CATALINA_HOME/conf/server.xml or add Context elements under the Tomcat conf directory then you will not be able to accomplish what you want.

Again, what did the Tomcat error logs have? If you don't know where they're at then you may want to back up a bit before installing a large Java EE application like a forum. It isn't hard but some basic debugging techniques may need to be used.

Quote:
Originally Posted by DavidV View Post
I checked the database settings and they all seem to be set properly. I had read somewhere on JForum's site that the "app has to be registered with Tomcat". I looked for further information, but couldn't find it.

Basically, it seems that I have to let Tomcat know to also run JForum.
JForum already ships as a webapp with the correctly configured web.xml. It cannot run as a war file.

Quote:
Originally Posted by Biju
The registration of servlets is done by editing your .WAR file (or exploded .WAR file)'s WEB-INF/web.xml file, putting in the appropriate <servlet> and <servlet-mapping> tags.

__________________
Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
HostingCon 2013 Web Hosting Events 2013-06-04 11:41:43
CIO Cloud Summit 2013 Web Hosting Events 2013-05-02 18:33:05
50d06161-3b3c-4709-86b4-6b2245a799de Listing 2013-03-05 18:23:52
Web Host MochaHost Adds New Features to Linux VPS Hosting Plans Web Hosting News 2012-08-01 15:52:14
MochaHost Enhances Server Performance with Tomcat Native Library Accelerator Web Hosting News 2012-08-01 15:35:20


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?