can I change jsessionid cookie name on weblogic en masse - weblogic11g

belatedly realised that hosting related applications on 2 separate weblogic clusters was not good news for users with multi tabbed browsers.
An answer I believe is to give the applications different jsessionid cookie. I understand this can be specified on an application basis in weblogic.xml, but this is going to be timeconsuming and error prone.
Is there any robust way to enforce this on all applications within a cluster?

You can override session cookie name (configured in your weblogic.xml deployment descriptor) using a deployment plan.
This allows you to use the default JSSESSIONID in all your apps in your development topology (usually just an Admin Server with all apps deployed) and customized your cookies names per app/cluster without editing your war file.
You can easily automate your deployments including your plan XML file as an extra argument in the deploy WLST command:
wls:/mydomain/serverConfig/Servers> deploy('App1',
'/apps/app1/App1.ear', targets='myserver', planPath='/apps/app1/plan/stage-plan.xml')
You can find an Oracle Tutorial about Deployment Plans and WLS 12c in
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/09-DeployPlan--4464/deployplan.htm?cid=6114&ssid=4153751345526#top

Related

Creating a local environment from an existing GAE installation

I have a website that is currently running under GAE... unfortunately, I, nor anyone on the team, does not have access the local environment that it was created from.... Is it possible to create a local environment or at least get a copy of the application files and database from an existing GAE installation?
What you need is the application source code, not the "local environment".
Ideally this source code would be on a version control system (ie GIT,SVN), Google cloud platform provides free GIT repositories for your projects so you might try looking there first. There's also a tool for both Java and python that allow you to download the source of a deployed version, provided you are authenticated as either the dev who uploaded it or a project owner. EDIT: as stated by Dan Cornilescu this feature can be disabled.
As for the database info there's plenty of tools available to "export" your GAE datastore info, just consider for your project that it might be easier to do the queries manually than actually implementing this tools.
Thanks for help... But unfortunately, this code is not in GIT. Furthermore,
being new to Google hosting, I wasn't clear on my setup... My web instance is actually running within Compute Engine not Application Engine. Be that as it may, with some additional search, I was first able to find out how to browse my filesystem by accessing the VM Instances menu option under the Compute Engine section of the Google Cloud Platform interface. On the VM Instances page, it will show your instance and an option to the left side of the instance to connect with a drop down box that will allow you to open a browser window that shows the instance's file system. In addition to this, I found this link https://www.youtube.com/watch?v=9ssfE6ODpak that shows how to configure Filezila FTP client to access your server instance - very helpful. From there, I was able to download all of my site files from the var/www directory. Now, onto extracting my data... Thanks again!

How to access mysql database from android application in order to create login and logout using Java i.e., without php?

I have made the android app for my college. In that I have made the Login Activity page. Also, I have designed one web portal for my college consisting of the details of students such as their name, admission no., roll no, contact no. etc. using Mysql workbench. Now I want to access this Mysql database from my android application in so that I can login into the application using roll no. as the username and contact no. as the password.
I want to do this whole thing using Java and without php.
You may consider developing a Servlet to run on a container (e.g. TOMCAT). The Servlet (which is developed in Java) would access the database. Here you have an example of how this is done.
EDIT:
First, you need to add to your app the ability to send HTTP(S) requests. Plenty of examples in the Web.
Second, you need to deploy a Servlet container software product (I suggest TOMCAT).
Third develop a simple Servlet to handle post requests and access MySQL (again, plenty of examples in the Web, including some that you can almost copy-paste as-is).
Fourth, create a WAR file of the Servlet and deploy it into your Servlet container (if TOMCAT, under the folder webapps).
You will have to fine-tune configurations, but it should be straightforward.
Good luck!!!

How to export a project from IBM Bluemix PaaS to anywhere else as a Docker?

I lead a web/mobile project and I still need to know the tools we will be using for development.
We have a 6 months access to IBM Bluemix, and its security check tools, CloudFoundry, and others may appear really useful.
However, we don't want to rely on a solution that would trap our project without any possibility of migration if needed.
I looked up on the internet how to export a project from Bluemix as a docker, with elements created from IBM. I didn't find anything relevant (I might be bad at googling, but all I can find is "how to export to Bluemix/how to work locally").
Does Bluemix allow to export the entire project onto another hoster, does it depend on the services we used in the project ?
Thank you in advance.
If you package your application in a container you can run it on any provider that supports Docker. That could be another cloud, in a local datacenter or on your own laptop.
If you are planning to use Bluemix services as part of that application then you will have two options if moving your application off Bluemix.
Keep using the services in Bluemix but connect to them remotely from wherever you're now hosting your appliaction. This will require internet connectivity and you'll have to hard code the service credentials in to your application (not good practice).
Migrate the services as well as the application. This will only be possible for the non-unique services IBM offer e.g. Redis, Mongo, Elasticsearch etc.. You'll need to refactor your application to accept the new provider of these services.
If your service/app is dockerized, and is being hosted as a container on Bluemix.
You can pull the container image of your service/app in your own docker enabled cloud or local environment. Following steps can be followed for the same:
install bluemix-container cli package https://www.ng.bluemix.net/docs/containers/container_cli_ov.html
do cf ic login using your bluemix credentials
check for your images using cf ic images command
pull the image in your environment using docker pull <image-registry-url>
run the container with required parameters using docker run
Hope it helps. Thanks.

MVC File Download asking for Authentication

I encountered a weird scenario. I have created an MVC2 Application and deployed it to IIS7, to 2 web sites (Default Web Site and another manually created "Test Web Site" ... they are using different application pools targeting v2.0). I am using SQL 2008 R2 Filestream feature to store files.
The problem I have is that I have a feature where the user browsing the site can download a document. The document is created in the server and the server then streams that to the client. The problem is, Default Web Site asks for authentication when user tries to download.
This doesn't happen for Test Web Site and it downloads fine.
Now, I do not have a clue what setting I need to change? The only different things I recall is that I manually created Test Web Site compared to just reusing the Default Web Site and also that I allowed inbound connections to Test Web Site (it was on port 8080).
What are the configurations needed to change so that user can download files from Default Web Site without going through authentication?
Try changing authentication settings in IIS Site->Authentication->Anonymous Authentication set to Enable
Turns out it was conflicting with the SQL Server Reports Manager.
Found this out from here: source

DNN / WebMatrix / Localhost / Multiple Sites

It seems that DNN is undergoing an upgrade and I cannot access the forums or many of the docs. Needing an answer soon, and Google providing too many varied types of hits (none of which are helpful or most of which post to the DNN site that is undergoing that upgrade), I had a few questions about setting up DNN.
First, I am coming from Orchard. There I was able to use Webmatrix - I downloaded the web version, opened as administrator, created modules, messed with themes, etc. Using the Orchard Docs, I was able to set up a multi-tenant site and run it on local host (IIS express through Webmatrix) - this included modifying the host/config files to view the multi-tenant sites. I could then publish to my own server running IIS 7. On the server I set up the landlord site then bound the tenants with no problem.
Being new to DNN (and things not being readily available at the moment on their site), I was hoping I could get some guidance on how to set up DNN similar to what I did with Orchard.
First question is obviously whether or not that is possible (i.e., no IIS, only IIS Express (Webmatrix) on my local machine).
Here would be my other questions:
If I can run it locally, can I just download the 7.1.0 new install package, and open Webmatrix (as Admin) on the folder I unzipped it in?
Assuming I just "Run" the website, I will then set up the "Landlord" instance of DNN on the following screens, correct? (i.e., where it asks for credentials and what DB setup I can use)
Can I then go ahead and create sub-tenant sites (alias/portal)? If so, do I go about manually updating my host/config files to run those tenants (depending on the port)?
Assume all of the above is correct, do I have to "reinstall" the 7.1.0 package on my webserver, or will a simple publish from Webmatrix do (with the proper credentials in Settings)? If so, I can handle pointing to the landlord on my server and then binding my subtenants in IIS.
Sorry for the n00b questions. Thanks!
On the Download page on dnnsoftware.com, there's a link to click which will start the install process within WebMatrix: http://www.microsoft.com/web/gallery/install.aspx?appsxml=www.microsoft.com%2fweb%2fwebpi%2f2.0%2fWebApplicationList.xml&appid=106
When you create a new portal, you can specify that it uses a URL which is a subdirectory of the current URL (i.e. a child portal alias), so that you don't have to use different ports. I'm not especially familiar with IIS Express, so I would expect that you could point multiple ports to the site, and map those as different portal aliases, but not sure exactly how you could do that, if you don't want to make use of child portal aliases.
To publish a site, you should just need to push the file system and database, and setup IIS.

Resources