Is there any way to setup Tomcat server so whenever I make changes to Java class or JSP page the change is visible on browser refresh.
I'm bored stopping and starting Tomcat. I want to configure Tomcat like the way WAMP works [where you can see the PHP code change upon browser refresh]
If it's for development mode that's ok. Don't use it for production stuff.
You don't have to restart the server. You can restart the app through the Tomcat Manager.
You can even do this directly as: http://[hostname]:[port]/manager/reload?path=[/path/to/your/webapp]
or
Define your context as reloadable
Be careful: It is NOT recommended to place elements directly in the server.xml file
Check out the Tomcat configuration guide
For java classes: reloadable
Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. You can use the Manager web application, however, to trigger reloads of deployed applications on demand.
NOTE - The value for this property will be inherited from the reloadable attribute you set on the surrounding Context component, and any value you explicitly set here will be replaced.
(http://tomcat.apache.org/tomcat-7.0-doc/config/loader.html)
For JSP: development ($CATALINA_BASE/conf/web.xml)
development - Is Jasper used in development mode? If true, the frequency at which JSPs are checked for modification may be specified via the modificationTestInterval parameter.true or false, default true.
Hope this helps
Related
I'm working with WSO2 Identity Server and I'm curious if there is a way to run the product in developer mode without building each component of identity server. I found a way to start the "My Account" component in dev mode by following this tutorial ( https://is.docs.wso2.com/en/5.11.0/develop/setting-up-my-account-in-a-dev-environment/ )
but I want to be able to modify different components such as recovery-portal and authentication-portal by forking and cloning the required github repositories and starting the entire app in developer mode in order to see the code changes in real-time.
AFAIK the developer mode will work only for the MyAccount and Console. You can refer to the doc for more details on that.
The recovery portal, the authentication portal etc. cannot be tried with the developer mode. However, there are two ways that you can try this.
Build the war files manually and add them to the WebApps directory. If the server is running, war file changes will automatically get deployed. If the server is not running, you have to delete the existing directory and restart the server.
You can do the changes to the JSPs that are deployed inside the pack. Once the changes are done, you can save the changes and the changes will automatically get deployed.
I'm a semi-experienced developer but a total noob to writing web apps. My question is: would it be possible to have a web app perform some sort of task while it is not opened by any user? For my purposes, I want it to send out text messages to users based on provided phone numbers, but this task must perform when the app is not opened by the user. At a high level, how exactly would I go about doing this? Thanks.
At a high level: The web server on which the application is being hosted will need to run, regardless of user activity. Therefore, it is plausible to also run either a service or scheduled job from this server, or to host a separate application that runs at a fixed interval. That is the high level answer at least :)
The short answer is no, and yes. Depends on your definition of "web server".
If you're talking about the service (e.g. Apache) then no. If you're just talking about the server that your web server is on then yes.
Basically you will need a companion app that runs as a service on the parent OS. It can be written in a language of your choice. The key is in getting your web app and companion app communicating.
The simplest way is to have your web app and companion app use a shared database like MySQL or Mongo. If you need real time communication between your app's users and the companion app you may want to investigate using a messaging service like RabbitMQ or ActiveMQ.
It should be easily possible, but it depends on your environment.
As Example:
When using Java/[Tomcat/Jetty/or whatever] you could create an Servlet which is automatically loaded when your "App" is being loaded.
You can put your "tasks-code" into this servlets init-Method.
Edit:
in web.xml you can configure, which of your servlets should be automatically loaded.
Im looking at using New Relic for monitoring our coldfusion sites. however it uses the web application display name defined in web.xml to define applications in its admin.
As far as I can work out coldfusion only have the one web.xml file in:
...\ColdFusion9\wwwroot\WEB-INF\web.xml
What is the purpose of this file? and can elements of it be overwritten on a site by site basis?
It looks like New Relic is a tool for monitoring Java (and other) apps. ColdFusion is a Java application. And the way you have it installed (standard) it is a single application with a single web.xml. Regardless of how many ColdFusion sites (apps) you run on it, it is still a single web application.
If you have CF Enterprise you can set up a multi-server install where you can deploy each of your sites as a separate Java app, but the way you have it set up now, you'll probably only be able to monitor CF as a whole vs each individual site.
I'm trying to interact with the Siebel Communications activex web application.We have an existing web app that needs to interact with elemets in the siebel activex's
Trying to add the Siebel app in an iframe is not effective,I can't script that iframe,it's on a different doamain.
The approach I'm considering :
Wrtitng another activex with a web browser control to load the siebel app.
Any idea's?
There is a COM interface to support client-side integration with Siebel. In order to use it, the EnableWebClientAutomation parameter needs to be set to TRUE in the application configuration file. Setting that parameter makes sure the Siebel desktop integration object (ActiveX control) gets downloaded to your client machines.
[SWE]
EnableWebClientAutomation = TRUE
I don't have any experience in doing this type of integration, and there's not a whole lot of info in Siebel Bookshelf about it, but I'm pretty sure this is how Mercury LoadRunner integrates with Siebel for automated load testing.
I hope this helps.
I'm not sure that you can interact with the Active X control directly - you probably have to go direct to the Siebel application via a Siebel Business Server, and control the action from there.
The standard way to interact with Siebel from a desktop application is through the Siebel web client automation server - lots more info here: http://download.oracle.com/docs/cd/B31104_02/books/OIRef/OIRefProgramming21.html#wp1004834
B
Active X is a dead component after IE 8.0. I would not suggest this. Elements of ActiveX is not open to public. these are stored under Siebsrvr\webtempl folder. these basically provides option to use HighInteractive Client. after OpenUI has come, these are obsolete to be used
I need to deploy an old style .asmx asp.net web service (not WCF) on a windows 7 machine for test reasons. However it seems that just deploying it on a virtual directory or new web site on IIS won't cut like it used to back in xp.
What should I do? I need to test the service locally prior to deploying it, and so far it's giving me a hard time.
Any help will be greatly appreciated
Thanks
Deploying to a Virtual Directory should work just like it did in XP...with one minor change.
The default behavior in IIS7 is to use 'Integrated' Managed Pipeline Mode for your Application Pools. More than likely, you just need to change that to 'Classic' Managed Pipeline Mode (or switch your Web Service over to use the built-in 'Classic ASP.NET' App Pool).