How to Embbed Tomcat in Java Application
Hi
At the moment i have the basic setup of applicatoin like this
first i run the file "Tomcat.bat" that start the tomcat server, in a specific directory and also the webservice is enabled.
Secondly then i run the Program.java that uses the web service started in the first step.
However, now i want to start the webservice (Apache Tomcat) from with in the Java Application. So that whenever, i need to i can start it. I also need the control over ports, so as to which port should the tomcat run on...
So at the end of the my simple question is how to run tomcat from with in a java application. At the moment i can not use the Runtime.exec() since this is a real time application and using Runtime.exec() causes some problems over the locking of threads...
Any Help would be greatly appreciated.
Thanks for looking.
i looked at the my catalina.sh script file and see that java runs "org.apache.catalina.startup.Bootstrap" class first so that i think by instaitating that class and preparing the parameters that needed will start the tomcats "org.apache.catalina.startup.Bootstrap" class and that class will load all the needed parts and start serving request.
and how to change starting port ? i thought that you can generate the server.xml on fly and after creating that file you can start tomcat.
these are my opinion but i think these are true,i have no time to try this if i can i will write here.or if somebody can try write here.
Similar Messages
-
How to embed/perform a Java Swing form into webased Swing form
How to embed/perform a Java Swing form into webased Swing form or any alternative.
Suppose i have 2 or more swing forms which are desktop applications but i want those forms to be now webbased..so how can i do this.Will i need to change the swing coding or will have to keep the swing design same.what can be the best Solution.You can launch your existing desktop app via the web using [Java Web Start|http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp]
-
How can I run a java-application on starting of Windows 2000
How can I run a java-application without any user on starting of Windows 2000?
For example, if the computer is restarted and nobody enter into it yet, my java-application should run anyway.
How can I do that?Hi, you have to put it in a Windows service.
To do this you have a program, Srvany.exe that allow to insert a .exe or .bat program in a Windows service.
For example, i develop a program, TomcatGuardian and i put it in a service because i need to run it in a server without Administrator logged in.
Regards,
Ivan. -
How to show superscript in ,java application?
how to show superscript in ,java application? in command prompt and using JOptionPane.showMessageDialog()
JOptionPane.showMessageDialog(null,"<html>4<sup>2</sup> = 16</html>");
-
How to send attachments using java application and outlook
Hi ,
I created an application in java which is as
on the Conference Tab i can schedule a conference and with the send command on page it map all the scheduled data to outlook(with all conference details) and using outlook send option the mails are send to appropriate user.
but now i want to modify this application such as when i use the send command from my jsp page it should attach the file that is in .vcs or .ics format for auto updation of user calender.
can any one know how to send attachment using java application .Last time I checked, SMS was a service between carriers and doing SMS yourself was really tricky. Some services existed to let you do it but as I recall they wanted non-trivial money.
However, most phone carriers provide an email-to-SMS bridge of some kind.
So the easiest thing is just to send an email.
That's sending from a non-phone to a phone. There's a J2ME library to send/receive SMS from/to a phone.
However, this is from memory, and a little out of date, so I could be entirely wrong. Hope it helps anyway. -
How can i get a java application
how can i get a java application on my mac pro?
I'm not sure I understand the question. If the application is a standalone applet, you download it as you would any other application or file. If the applet is embedded in a web site, just go to the appropriate web page.
If you can provide more specifics about what it is you are trying to download/accomplish, perhaps we can be of more specific assistance.
Regards. -
How can I debug webdynpro java application?
hi,
How can I debug webdynpro java application?
ThanksCheck this document
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0cb32c5-36a7-2910-2c9b-ba4a5bbdbb56
Also check this sdn thread Re: DeBugginng The WebDynPro Application particularly shailesh kumar posting
/padmanaban
Edited by: Padmanaban on Sep 26, 2008 1:55 AM -
How can i let my java application closes the other opened windows
how can i let my java application closes the other opened windows: like any other Microsoft Internet Explorer windows ... provided that my java application is not the one i used to open those other windows.... thanks in advance
you'll have to use JNI to access the windowAPI
then you need a list of window handles ... I think there was a function called getWindow and in order to close them you use sendMessage .... for details check out msdn (microsoft developer network)
somwhere I saw a tool called JUtil, which might help you getting started on accessing the win api from java
regards
Spieler -
One of them uses Enterprise Java Beans implemented with a SUN NetDynamics application server. The other is a straight Java application. Ideally I want the second application to remotely invoke methods on the existing Java beans, so the existing business logic will not be duplicated.
This would seem to be simple, but NetDynamics appears to substitute some proprietary code for part of the EJB interface, and it is not immediately obvious how to let "foreign" java programs access the beans.
I would appreciate it if anyone is able to provide any information on how to achieve this. If you know of any sample code that I could look at, that would be a help too. This may (or may not) be known to SUN as a "stand alone java client".hi,
can someone help me how to implement logging for method entry parameters and
method exit return value.
can someone help me how to use log4j and integrate it to the method entry
logging and method exit logging.
Here what i need is without writing the log statements for the method entry and
method exit i need to log it to the file
along with other log4j debug statements i provide in the file.I should be able
to configure whether to enable/disable the logging
for method entry and method exit. In method entry i should be able to log the
parameters the method take and in method exit
i should be able to log te return value to the log file, before the method is
returned to the callee.
i hope i am clear
Thanks in advance. -
How can i built a java application using java debug class on Log4J
Hi,
As java API support the MethodEntryEvent, using which I can get the automatic logging statements when the method is entered or exited as HelloExample.main(with argument type).
Where HelloExample is the class name.
Main is the method entered with its argument types.
In some cases I have the o/p as
-- VM Started --
====== main ======
main -- HelloExample
callerMethod -- HelloExample
====== main end ======
-- The application exited --
By using Log4J is there any possibility of getting these sort of o/p along with the loggers supported by Log4J. i mean to say can i built an java application which supports the MethodEntryEvent and MethodExitEvent from java API and also uses the Log4J debugging. I took an e.g. trace example, which (in J2SE 1.4.x or 5.x) will be found in $JAVA_HOME/demo/jpda/examples.jar and unpacking it by
jar -xvf $JAVA_HOME/demo/jpda/examples.jar i found the com/sun/tools/example/trace/Trace.java and passed the class constructed with logger taken from Log4J. In this case the logging message is displayed on the console. As per the requirement i need to transfer the whole o/p to an output file along with Log4J logger statements. in this case i should not give any command in the cosule except compiling and executing the programme. the programm also should able to run without the main() as i need to integrate Log4J with an application and the code must me application server independent. i need the output as i got using MethodEnteryEvent (shown as above) in case of java application built using Log4J.
Can any one help me in this regard. can any one give me some suggestion or any programme of this sort. All suggestions are welcomed.
Thanks & Regards,hi,
can someone help me how to implement logging for method entry parameters and
method exit return value.
can someone help me how to use log4j and integrate it to the method entry
logging and method exit logging.
Here what i need is without writing the log statements for the method entry and
method exit i need to log it to the file
along with other log4j debug statements i provide in the file.I should be able
to configure whether to enable/disable the logging
for method entry and method exit. In method entry i should be able to log the
parameters the method take and in method exit
i should be able to log te return value to the log file, before the method is
returned to the callee.
i hope i am clear
Thanks in advance. -
How to play videos in java application
Hi... every one
I want to write a java application to play videos ....Please guide me how to go about it..
Thanks in advance...
Rgrds
Ravi. N[http://www.cs.odu.edu/~cs778/spring04/lectures/jmfsolutions/examplesindex.html]
-
How To Open Word In Java Application
Hello
How To Open Ms-Word Or Ms-Excel Or Any Other Format In Java Application
According To Their Own ForMatThe best is to know which program you like to execute. Make those many strings available. Suppose you like to execute M$ Word and M$ Excel. Now do like this..
String word = ""; // null
String excel = ""; //null
/* In the File Class you can find out the methods that can search these files and return thier
absolute and relative paths. Save those paths in uppe String(s) word and excel and place them in
runtime.exec( word/excel)...etc. Place this code before a tolbar button and click that..*/ -
How to run a pure java application client with ear deployed on 9ias
Hello all,
We want to run a pure java application client which is packed with target bean in the same ear file. In the application-client.xml we refer to some EJBs.
We deployed the ear file which contains ejb jar module and application client module to oracle 9ias 904 through enterprise manager on unix. The jndi.properties we used looks like this
java.naming.factory.initial=com.evermind.server.rmi.ApplciationClientInitialContextFactory
java.naming.provider.url=opmn:ormi://opmn_host:opmn_port:oc4j_instance_name/application_name
java.naming.security.principal=test
java.naming.security.credentials=test
Is there anybody knows how to run such an application client? Do we need to provide such a jndi.properties or not at all?
Thanks,
9ias userRefer OpenEJB User - Oracle ADF Essential and TomEE+
Also refer Bug in tomee 1.5.2. Fixed in 1.6.
https://issues.apache.org/jira/browse/TOMEE-756 -
How to call webservice from Java application
Hi XI gurus
Pls let me know how to call a webservice from Java application.
I wanted to build synchronous interface from Java Application to SAP using SAP XI
For example, i need to create Material master from Java application and the return message from SAP, should be seen in Java application
Regards
MDHi,
If your JAVA Application is Web based application, you can expose it as Webservice.
JAVA People will pick the data from Dbase using their application and will send the data to XI by using our XI Details like Message Interface and Data type structure and all.
So we can Use SOAP Adapter or HTTP in XI..
If you use HTTP for sending the data to XI means there is no need of Adapter also. why because HTTP sits on ABAP Stack and can directly communicate with the XI Integration Server Directly
If you are dealing with the Webservice and SAP Applications means check this
Walkthrough - SOAP XI RFC/BAPI
REgards
Seshagiri -
How to use Entrust with java application on unix platform
Hi all,
i have question regarding the use of Entrust with java application on unix
1)I want to use Entrust for encryption/decryption of the file in my core java application on unix platform.
What should be requiremnet for the same and how it is implemented?.
2) I want to Use Entrust for Authentication purpose in my java based web application on unix platform.
What are requirements for Entrust Authentication and how it is implemented ?any one has solution?
Maybe you are looking for
-
How do you pair an apple wireless Keyboard and Mouse to use at the sametime?
1. I paired an apple keyboard but it's not fully functioning? 2. How do I add a second device(mouse) its not discoverable?
-
I need to install Mozella Firefox 2.0 to fill out a form that is not supported to input info from the newer version that is installed on my PC. Do I need to delete the newer version before using the older version? If so, how do I delete the new versi
-
HT3819 home share setup question
i just enabled home share for the first time (on my new iMac) but received the message that 4 of 5 devices are allocated (i am guessing that the list may include old iPods?) where can i review / edit the list of devices that are candidates for home s
-
Dear SAPGURUs , i have a quirey regarding j1iex , i can change duty values in J1iex ( in change mode ) but for Bill of Entry ( import - cvd values ) i am unable to change .......As in tab " duty rates " , the check box - calculate excise duties based
-
I am using Firefox 3.6. I need to log on as an administrator. I don't ever remember creating an administrator account or password for Firefox. What can I do so that I can either find my current administrator password or create a new password and/or a