From javawebserver to tomcat
Hi!
I used to use java web server, but now I need to migrate my application (JSP and servlets) from java web server to tomcat.
I installed tomcat for windows, can you tell me where to put classes and JSPs?? and if there is some configurations that I have to do to set-up my application in tomcat
Let us assume, your Tomcat home is C:\Tomcat.
1. Create a folder 'your_application_name' in the Tomcat\webapps dir.
2.Copy the examples dir and rename it with your application name.
3. Delete all the contents in the sub directories except web.xml in the web-inf directory. (if at all if it ias there).
4.Copy all your jsp files into jsp dir. and servlets into web-inf\classes dir.
5.Edit the startup.bat (it is catalina.bat in tomcat 4.0.1, I think) in bin dir and add SET JAVA_HOME="your_jdk_home".
6.Set the context path in server.xml in \conf directory for your application.
7.You need to map your servlets (if you want) in the web.xml file. You can look at examples' web.xml to know how to do it.
8.Start the server and start working with it.
Hope this helps.
Have a nice time.
Sudha
Similar Messages
-
Can I send email using Java from my localhost(Tomcat) with Internet connect
Hi friends,
Please tell me can I send email from my localhost (Tomcat) using Java when my computer is connected to Internet?
I don't have any SMTP username or password or the like, as I found in some codes available in net.
Please suggest and any simple code if possible.
Please don't send me the link of JavaMail API to read.
---SujoyThank you for the link. Though I have not tested the provided code, I will test it.
--Sujoy -
Opening an attachment from outside the tomcat context
I am creating a simple mail software. In my incoming message screen i'm showing all the Attachments as hyperlinks. I want that when the user clicks the hyperlink the Attachment should open in a new browser window.
My problem is that the attachments are there in a folder outside the tomcat context i.e. in a folder outside the tomcat's folder on the server's c:/Attachments folder.
If I put the attachments in the root folder of my application under webapps folder it is working properly. But I want to open it from the outside folder c:/Attachments, and also I can't hardcode this path in my code. It can be any path outside tomcat.
Please help me, if u have any solution.Make that path a parameter in web.xml
<context-param>
<param-name>beginyear</param-name>
<param-value>2004</param-value>
<description>starting year of the application</description>
</context-param> -
Debugging LCDS Data Management from Flexbuilder3 on Tomcat does not work
I have a sample with Data Management and when i use it on my tomcat it works fine. But i can´t debug it from flexbuilder 3. When i start it from the flexbuilder i get the connection and then i crashed with "No registered fault handler or token responder - throwing an error for destination:"
It is the same tomcat i use to run standalone.
is it a problem with the context.xml?
[SWF] /flexine/dataService_wt2.swf - 1.422.965 bytes after decompression
'cds-consumer-sandwich-null' consumer set destination to 'sandwich'.
Configuration for destination='sandwich':
New DataService for destination: sandwich
DataService.fill() called for destination: sandwich with args: []
'4A853118-F24B-5FE2-BF01-FCDFF6C93161' producer set destination to 'sandwich'.
Creating a new independent data store for destination: sandwich
Adding data service: sandwich to the data store: null initialized: false
Finished validating destination: sandwich loadOnDemand/paged associations: [] sub-types:
data store: null is initialized
'my-rtmp' channel endpoint set to rtmp://localhost:2038
'my-rtmp' channel settings are:
'ds-producer-sandwich' producer sending message '52AF7949-7B16-7C8E-3B87-FCDFF6F8D3A2'
'my-rtmp' channel got connect attempt status. (Object)#0
code = "NetConnection.Connect.Success"
description = "Connection succeeded."
details = (null)
DSMessagingVersion = 1
id = "E35ECC7A-710F-4D9B-A507-330FDD83B283"
level = "status"
objectEncoding = 3
'my-rtmp' channel is connected.
'my-rtmp' channel sending message:
(mx.messaging.messages::CommandMessage)
body=(Object)#0
clientId=(null)
correlationId=""
destination="sandwich"
headers=(Object)#0
messageId="CDC66303-F24B-1E87-4103-FCDFF8211298"
operation="client ping"
timeToLive=0
timestamp=0
'my-rtmp' channel sending message:
(mx.data.messages.DataMessage)
messageId = '52AF7949-7B16-7C8E-3B87-FCDFF6F8D3A2'
operation = fill
destination = sandwich
identity = (null)
body = []
headers = {}
'ds-producer-sandwich' producer connected.
'ds-producer-sandwich' producer acknowledge of 'CDC66303-F24B-1E87-4103-FCDFF8211298'.
'ds-producer-sandwich' producer acknowledge of '52AF7949-7B16-7C8E-3B87-FCDFF6F8D3A2'.
'ds-producer-sandwich' producer fault for '52AF7949-7B16-7C8E-3B87-FCDFF6F8D3A2'.
Dispatching fault event for destination: sandwich
No registered fault handler or token responder - throwing an error for destination: sandwich
[RPC Fault faultString="There was an unhandled failure on the server. javax/transaction/SystemException" faultCode="Server.Processing" faultDetail="null"]
at mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent()[C:\depot\flex\branches\enterprise_corfu_b2\frameworks\projects\data\src\mx\data\ConcreteDataService.as:2401]
at DataListRequestResponder/fault()[C:\depot\flex\branches\enterprise_corfu_b2\frameworks\projects\data\src\mx\data\ConcreteDataService.as:6970]
at mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103]
at NetConnectionMessageResponder/statusHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:523]
at mx.messaging::MessageResponder/status()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:222]Here's an update for future victims doing google searches :-)
The issue appears to be related to compiz. When I'm doing basic 2D desktop with metacity everything simply rocks: the machine suspends/resumes with no issues.
When compiz is enabled, there is about 10 second delay after resume, during which the screen is black and you better not touch the keyboard! If I sit and wait for 8-12 seconds, the dark screen goes away GDM login dialog shows up. But if I touch the keyboard or the touchpad, it will either freeze or become exceptionally slow. -
Calling a external Java method from JSP - using Tomcat server
Hi all,
I am trying to call a method in an external Java file from my JSP. I am using Tomcat server.
I have my class within the package package "mypackage" and it is called myclass.class. It has only one static method mymethod() which reads from a file and writes to a file.
I compiled the java class and I put the class file under webapps/ROOT/web-inf/classes/mypackage/myclass.class
I am trying to say something like this from my JSP file(which is under webapps/ROOT) :
<%@ page import = "mypackage.myclass"%>
<% myclass.mymethod(); %>
I am not instatiating the class as its a static method.
This is what I get while accessing my jsp file :
javax.servlet.ServletException: try to access class mypackage.myclass from class org.apache.jsp.index_005ftest_jsp
To put my problem in a nutshell, Can someone guide me how to access a method of an external class from a JSP page? I have a bunch of pages doing the same operation so I thought I would have it in a method and call it from every page. Even though I tried to put the file under web-inf/classes, The JSP is not able to see the class.
Please help.
Thanks
-UdayI have a situation that is a bit similar. I have successfully used beans for storing methods used in JSPs and used by other methods in the same class as was suggested above. Now I would like to break some methods into another (utility) class since they are lower level and can be used by lots of things. They are for database operations (given a String query and String dbname, it queries and returns ResultSet for example). I want to have them in a separate class for reusability and OOP.
I am having problems calling those public static methods in the public class from my bean that communicates with the JSP. I can't compile the class that calls the method in the database ops class. I get an error like :
loginHelper.java:45: cannot find symbol
symbol : variable sqlHelper
location: class dbHelperBean.loginHelper
and when I include the package name in the call I get
loginHelper.java:45: cannot find symbol
symbol : class sqlHelper
location: package dbHelperBean
That's strange since the package of both classes is dbHelperBean and the class is indeed called sqlHelper. I tried to compile it in the same directory as sqlHelper as well. What am I doing wrong?
Thanks for any help. -
Can't forward request from Apache to Tomcat on second instance
Hi,
I am trying to create 2 separate environments (dev and test) on one powerful
Unix server which has 2 network cards, 2 IP addresses, 2 server names...
Using Apache 2.0.43 and Tomcat 4.1.29/JBoss 3.0.7, mod_jk 2.0.43
on Solaris 9, Intranet environment.
Everything is fine on the first instance,
but on the second instance when I do http://server2,
Apache still can't redirect to second Tomcat/JBoss:
"Forbidden
You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.48 (Unix) mod_jk2/2.0.2 Server at mopppgctxat1.pfizer.com Port 80"
If I do http://server2:8080, getting it all right.
I made all internal ports on the second instance different from the first:
e.g. 8080->8180, 8009->8109, etc.
Even tried to change "Listen <ip2>:80" to 81, same error.
Curiously, jk2.properties is totally commented out.
I haven't compiled mod_jk, just copied the binary from the 1st instance.
Can that be a problem ?
Any help is very appreciated.
Thank you,
Oleg.By trying and trying I got it to work .... long hours
I removed the queue to queue option and the subscriber name from the subscriptions definition. And then I removed the destination-queue on the propagation schedule. Then it worked.
Mette -
Hi everybody,
I really need your expertise and help!!!
We had a server using resin, then they decided to move the application to Tomcat.
The server admin moved every thing by basically coping the JSP and JAVA files over.
Then he stopped working on it and they gave it to me :-(
and of course I have no expereince with this (No clue)
I managed to get the connection to the database with help from the web.
My problem is that I have two packages (mdx and sto) Both on the same level under classes folder.
(They CANNOT see each other) convertFunctions.java Class is in mdx package
******************Part of the error ********************
# javac convertFunctions.java
convertFunctions.java:3: package sto does not exist
import sto.*;
^
convertFunctions.java:12: package javax.mail does not exist
import javax.mail.*;
^
convertFunctions.java:13: package javax.mail.internet does not exist
import javax.mail.internet.*;
^
When I run the page on the we I get this error
"Error: HTTP Status 500 -" (It cannot see the methods inside the class)
convertMenus is inside convertFunctions
******************Part of the error ********************
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 26 in the jsp file: /includes/admin_left_nav.jsp
Generated servlet error:
The method convertMenus(String, String) is undefined for the type convertFunctions
I can post any code you want.
Note that the same application/code is working great on resin.
Please help; I cannot explain how much I need your help
Any help would be greatly appreciated
Thank you in advanceI did what asked me to do then stop/start tomcat. It did not work.
I noticed that most of the errors are from changes I made to the classes: convertFunctions.java and UploadFile.java
I made the changes using (JDeveloper) on my windows machine and SSH (FTP) files to the SUN server.
Here is how I set the CLASSPATH on the sun box:
set CLASSPATH .:/usr/jakarta-tomcat-5.5.9/common/lib/servlet-api.jar:
/usr/jakarta-tomcat-5.5.9/common/lib/jsp-api.jar:
/usr/jakarta-tomcat-5.5.9/common/lib/servlet.jar $CLASSPATH
Here is my classpath after I tried to change it (No difference)
CLASSPATH=.://export/home/oracle/oracle/product/10.2.0/db_1/jdbc/lib:/usr/jakarta-tomcat-5.5.9/common/lib:/usr/jakarta-tomcat-5.5.9/server/lib:/lib:/usr/jakarta-tomcat-5.5.9/shared/lib:/usr/jakarta-tomcat-5.5.9/server/lib/servlet.jar:../../.:/usr/jakarta-tomcat-5.5.9/server/lib/classes12.jar
I really appreciate your help
Thank you in advance -
Access Datasource from Servlet Engine (Tomcat)
Hi,
I'm using datasource connections in my beans and event in servlets.. It works fine in JRun 3.1 environment.
But when I port to J2EE1.3 its throwing this exception...
I just want to understand whether it is a limitation in J2EE1.3 & Tomcat environment or it is a security problem or do I have to change any configuration file so that I can make the datasource connection available outside the J2EE environment.
java.lang.IllegalArgumentException: Unknown component type at com.sun.enterprise.naming.NamingManagerImpl.getComponentType(NamingManagerImpl.java:670) at com.sun.enterprise.naming.NamingManagerImpl.getMangledIdName(NamingManagerImpl.java:708) at com.sun.enterprise.naming.NamingManagerImpl.getComponentIdInternal(NamingManagerImpl.java:680) at com.sun.enterprise.naming.NamingManagerImpl.getComponentId(NamingManagerImpl.java:313) at com.sun.enterprise.naming.java.javaURLContext.getComponentContext(javaURLContext.java:397) at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:51) at javax.naming.InitialContext.lookup(InitialContext.java:350) at com.camilion.env.ejb.EjbEnvironment.getJDBCConnection(EjbEnvironment.java:105) at com.camilion.report.servlet.ReportServlet.service(ReportServlet.java:49) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:428) at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:197) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:995) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1088) at java.lang.Thread.run(Thread.java:484)I'm getting the same problem trying to lookup a datasource from a JSP with J2EE 1.3 reference implementation.
-
Exception from crimson in Tomcat
Hi,
I am facing a very strange senario while using Tomcat3.2.4. When I ran a WebApp under the Tomcat, I got an exception, please see below:
With the following stack trace: java.lang.NullPointerException at org.apache.crimson.tree.TextNode.cloneNode(TextNode.java:222) at org.apache.crimson.tree.ElementNode2.createCopyForImportNode(ElementNode2.java:167) at org.apache.crimson.tree.ElementNode2.createCopyForImportNode(ElementNode2.java:164) at org.apache.crimson.tree.XmlDocument.importNode(XmlDocument.java:1260) at idea.xmldocument.flatfile.XMLDataCache._$31523(XMLDataCache.java:492) at ...
The strange thing is that I don't have any org.apache.crimson package in classpath, even in my whole computer.
1. Before I started tomcat my classpath is empty.
2. I only have "ant.jar", "jasper.jar", "servlet.jar", "webserver.jar" in the lib folder of my Tomcat.
3. I only have xalan_2.0.1.jar and xerces_1.3.0.jar in the WEB-INF/lib folder of my web app.
And the interesting thing is that when I moved xalan_2.0.1.jar and xerces_1.3.0 from WEB-INF/lib folder of my web app to lib folder of tomcat, the exception is not present any more.
It is so weird.
Does anyone have some idea? I would very appriecate.
Thanks in adavance!
Louis
2002/10/17if you use JDK 1.4, then you have Crimson embedded into it as the default parser of JAXP.
apparently you want to use Xerces instead of Crimson, so maybe you are creating nodes with JAXP/Crimson then try to use them with Xerces (or the contrary)... -
Last Java update from Apple broke Tomcat
Hi,
I ran the most recent Apple Java upgrade last week, and now Tomcat (which is part of my development environment) won't start up. I get the error:
Nov 1, 2010 8:58:54 AM org.apache.catalina.startup.Bootstrap initClassLoaders
SEVERE: Class loader creation threw exception
java.lang.NoSuchFieldError: IS_DIR
at org.apache.catalina.startup.Bootstrap.createClassLoader(Bootstrap.java:167)
at org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java:92)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:207)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:391)
From the error, it appears that things are missing from the update (or at least one field is). Has anyone else seen this? Is there a known work-around?
Thanks,
Rob Tanner
Linfield CollegeThe Java upgrade available via Software Update was the runtime environment. The developer libraries (Java for Mac OS X 10.5 Update 8 Developer Package) dated October 20th also needs to be installed, from connect.apple.com if you're using Developer stuff. (This bit me too in the context of fink.)
Hope this fixes your problem; it did mine.
DMW -
Deploying BIBeansOBE (from oc4j) to tomcat
i use the example that otn publishes in http://otn.oracle.com/obe/obe9051jdev/BIBeansOBE/BIBeansOBE.htm
I tried to deploying my application to tomcat, when i run my application , it generates the following error :
javax.servlet.jsp.JspException: data attribute evaluates to null
oracle.jbo.html.jsp.graph.GraphTag.doStartTag(GraphTag.java:212)
org.apache.jsp.ResTituMen_jsp._jspService(ResTituMen_jsp.java:193)
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)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:228)
please, do you tell me , what is the solution?
ThanksDid you copy all your persentations, calculations and saved selections to the remote BI Beans catalog? If not, from JDeveloper you need to take all the objects you created within the BIDesigner and copy them to the BI Beans remote catalog that should have been installed in your database instance. There is documentation on the BI Beans OTN home page that explains how to install the BI Beans catalog and how to copy objects to the catalog.
Keith
Oracle Business Intelligence Product Management
BI on Oracle: http://www.oracle.com/bi/
BI on OTN: http://www.oracle.com/technology/products/bi/
BI Beans http://www.oracle.com/technology/products/bib/index.html
Discoverer: http://www.oracle.com/technology/products/discoverer/
BI Software: http://www.oracle.com/technology/software/products/ias/devuse.html
Documentation: http://www.oracle.com/technology/documentation/appserver1012.html
BI Samples: http://www.oracle.com/technology/products/bi/samples/
Blog: http://oraclebi.blogspot.com/ -
Deploying BIBeansOBE (from oc4j) to tomcat 5
i tried to deploying my application to tomcat 5
i use the example that otn publishes in http://otn.oracle.com/obe/obe9051jdev/BIBeansOBE/BIBeansOBE.htm - and when i tried to run my application , it generates the following error :
javax.servlet.jsp.JspException: data attribute evaluates to null
oracle.jbo.html.jsp.graph.GraphTag.doStartTag(GraphTag.java:212)
org.apache.jsp.ResTituMen_jsp._jspService(ResTituMen_jsp.java:193)
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)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:228)
please, Do you tell me wath is the solution?
thanksDid you copy all your persentations, calculations and saved selections to the remote BI Beans catalog? If not, from JDeveloper you need to take all the objects you created within the BIDesigner and copy them to the BI Beans remote catalog that should have been installed in your database instance. There is documentation on the BI Beans OTN home page that explains how to install the BI Beans catalog and how to copy objects to the catalog.
Keith
Oracle Business Intelligence Product Management
BI on Oracle: http://www.oracle.com/bi/
BI on OTN: http://www.oracle.com/technology/products/bi/
BI Beans http://www.oracle.com/technology/products/bib/index.html
Discoverer: http://www.oracle.com/technology/products/discoverer/
BI Software: http://www.oracle.com/technology/software/products/ias/devuse.html
Documentation: http://www.oracle.com/technology/documentation/appserver1012.html
BI Samples: http://www.oracle.com/technology/products/bi/samples/
Blog: http://oraclebi.blogspot.com/ -
Calling external programs from within a Tomcat application
I've got a fairly complex existing Tomcat application (which is packaged and built as a .war file) which I'm trying to edit so that it calls a Perl script part way through the processing, which will generate an XML file used later on. I think I've worked out how to call external scripts from within Java, but at the moment when I try and access the application via Tomcat the application either hangs or bails out (I don't know which, as the log files unhelpfully don't give any error messages).
The code which is causing the problem looks like this:
System.err.println("Calling runtime...");
Runtime runtime = Runtime.getRuntime();
System.err.println("Executing process...");
Process process = runtime.exec("/path/to/ysearch.pl 'News' '\"search query\"' 'file");
System.err.println("Waiting for process...");
int exitVal = process.waitFor();
System.out.println("Exited with error code: " + exitVal);The code gets as far as "Executing process..", beyond that there is nothing in the log file so I presume the runtime.exec() call is where the problem is. I'm not interested in reading the output from the script (there shouldn't be any), so that's not an issue, and the permissions on it allow anyone to read or execute ysearch.pl so I don't think there's a problem in that area.
Does anyone have any suggestions which I could try to get this to work? I've only been using Tomcat for a week (I'm picking up on someone else's code) so I might have made a beginner's mistake. I'm using Tomcat 5 on Fedora Core 7, and Java 1.5.0_01 (I can't easily change any of those).I'm not sure, but I thing that overhead caused by calling du cannot be big enough to matter even on older machines.
But, when calling du from Perl script you are also invoking shell, and this can be a little bit more 'heavy'. -
From netbeans to tomcat.
Hi all.
I downloaded netbeans and
I wrote a website using JSP and Servlets.
Now, I don't need the netbeans so ...
I downloaded only tomcat.
I entered the project's folder -> build -> web -> *.*
and copied all files and folders in this directory to webapps\Web1\
(Web1 is my project name).
Anyway, I can run and see the JSP files but I can't run the servlets.
I tried to compile all java files but..
When I'm compiling the files it says :
StepOneServlet.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
StepOneServlet.java:16: cannot find symbol
symbol: class HttpServlet
public class StepOneServlet extends HttpServlet {
^
StepOneServlet.java:18: cannot find symbol
symbol : class HttpServletRequest
location: class StepOneServlet
And theres alot more...
what should I do ?well ...
netbeans makes it so easy !
Everything works great under netbeans !
my jsps, my servlets and jdbc.
Until now, I didn't need to set a CLASSPATH variable.
The problem is : netbeans takes memory !
To save memory I want to run only the tomcat server.
I know there is a tomcat server under netbeans
and I know where is my project's web.xml.
Anyway, I setup the CLASSPATH -> Tomcat's common/lib directory.
The errors gone but new errors appeared.
Here are few samples:
FinalServlet.java:4: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
FinalServlet.java:15: cannot find symbol
symbol: class HttpServlet
public class FinalServlet extends HttpServlet {
There is one type of error I can't understand.
under the folder "Source" I have my servlets..
Inside the folder "Source", there is another folder "beans"
with two java files in it (these file are my project's beans).
I tried without compiling the beans, I tried once after I compiled the beans and I keep getting these errors.
When I run from the folder "Source" the command javac *.java
It says:
FinalServlet.java:30: package beans does not exist
beans.Message m = (beans.Message)
request.getSession().getAttribute ("messageBean");
^
I tried put the *.class in the folder "source"
but I keep getting this errors and I don't know why !
Thank you all in advance. -
Unable to deploy the war file generated from jdeveloper to tomcat
Hi
I was able to deploy the war file after modification in the web.xml but unable to run the servlet application
Please Help
DolphyAfter going thru all the steps specified in online help to deploy the web application in Tomcat server.
I am getting the following error
first the webapps could not be deployed because of url pattern
<servlet-mapping>
<servlet-name>mypackage1.BIController1</servlet-name>
<url-pattern>mypackage1.BIController1</url-pattern>
</servlet-mapping>
which when i change to
<servlet-mapping>
<servlet-name>mypackage1.BIController1</servlet-name>
<url-pattern>\mypackage1\BIController1</url-pattern>
</servlet-mapping>
deploys the application
but i get the following errors in the tomcat log file
2004-05-03 10:34:12 StandardContext[balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2004-05-03 10:34:12 StandardContext[jsp-examples]ContextListener: contextInitialized()
2004-05-03 10:34:12 StandardContext[jsp-examples]SessionListener: contextInitialized()
2004-05-03 10:34:13 StandardContext[servlets-examples]ContextListener: contextInitialized()
2004-05-03 10:34:13 StandardContext[servlets-examples]SessionListener: contextInitialized()
2004-05-03 10:34:13 StandardContext[webapp1]Marking servlet uix as unavailable
2004-05-03 10:34:13 StandardContext[webapp1]Error loading WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
StandardClassLoader
delegate: true
repositories:
file:C:\tomcat\shared\classes\
----------> Parent Classloader:
StandardClassLoader
delegate: true
repositories:
file:C:\tomcat\common\classes\
file:C:\tomcat\common\endorsed\xercesImpl.jar
file:C:\tomcat\common\endorsed\xmlParserAPIs.jar
file:C:\tomcat\common\lib\ant.jar
file:C:\tomcat\common\lib\commons-collections.jar
file:C:\tomcat\common\lib\commons-dbcp-1.1.jar
file:C:\tomcat\common\lib\commons-el.jar
file:C:\tomcat\common\lib\commons-pool-1.1.jar
file:C:\tomcat\common\lib\jasper-compiler.jar
file:C:\tomcat\common\lib\jasper-runtime.jar
file:C:\tomcat\common\lib\jmx.jar
file:C:\tomcat\common\lib\jsp-api.jar
file:C:\tomcat\common\lib\naming-common.jar
file:C:\tomcat\common\lib\naming-factory.jar
file:C:\tomcat\common\lib\naming-java.jar
file:C:\tomcat\common\lib\naming-resources.jar
file:C:\tomcat\common\lib\servlet-api.jar
----------> Parent Classloader:
sun.misc.Launcher$AppClassLoader@4afa9e
oracle.cabo.servlet.UIXServlet
java.lang.ClassNotFoundException: oracle.cabo.servlet.UIXServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1383)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1230)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:979)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3959)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4284)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:320)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:727)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1134)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:521)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
at org.apache.catalina.startup.Catalina.start(Catalina.java:594)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
2004-05-03 10:34:13 StandardContext[webapp1]Servlet /webapp1 threw load() exception
javax.servlet.ServletException: Wrapper cannot find servlet class oracle.cabo.servlet.UIXServlet or a class it depends on
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:989)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3959)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4284)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:320)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:727)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1134)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:521)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
at org.apache.catalina.startup.Catalina.start(Catalina.java:594)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
----- Root Cause -----
java.lang.ClassNotFoundException: oracle.cabo.servlet.UIXServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1383)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1230)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:979)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3959)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4284)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:320)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:727)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1134)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:521)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
at org.apache.catalina.startup.Catalina.start(Catalina.java:594)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
Thanks
Dolphy
Maybe you are looking for
-
This happened once before, but i fixed it by shutting my phone off and turning it back on. However that doesnt seem to work this time and i would like to buy some songs, except the itunes app keeps crashing Please help! -thanks:)
-
Some InDesign CS5.5 files won't open until force quit and relaunch application (Mac). It seems that this occurs rarely, but once it does it on a file, it happes every time. Any suggestions?
-
Same Valuation class with diff valuation group with same valauation area
Dear Expert, We r having two material XYZ and ABC with same valuation class and in the same plant(valuation Area) For consumption VBR general modifier we want to assign two different gl codes to different material XYZ & ABC. Is it possible in OMWD ca
-
Why does my CC app say "Your Home Feed is empty"?
In addition, I'm being asked to buy (again) the apps I already pay over $50 a month for, or they revert to 30-day trial versions! It's bad enough Adobe allowed our personal info into the wild, but now to go through this sort of BS is reprehensible! A
-
Missing agent, trap,security tabs in snmp service tab!
Missing agent, trap,security tabs in snmp service tab after installing snmp from powershell script!! I run the script on win server 2008 and 2012 Could someone help.. Thanks for the help in advance Ashwini