Why does JAXRS Jersey create temp directories on the app server? - weblogic

I am running Jersey on a weblogic server and I noticed a few extra folders were created. The folders look like this,
n179u/.tld_cache/jersey-server-1.0.3.1.jar/META-INF/taglib.tld
and contain the files
crc.ser and des.ser
So, my question is what are these directories used for and is it possible to tell jersey to create them in a different location?

Just looking at the extension .ser of the files in the folder, my guess is that it is serializing state.

Related

Asp.net Core SQLite Database Location

In ASP.NET Core when using SQLite database the file blogger.db is stored at the root of my project.
I was wondering where the file should go in production? I know it's a bad idea to put it the wwwroot folder.
Thank you.
I know it's a bad idea to put it the wwwroot folder.
Indeed, because otherwise, it would be potentially accessible as a static file since only those files in wwwroot may be served by Static Files Middleware.
I was wondering where the file should go in production?
The simplest way is to put it in App_Data folder.
However, there is no single recommendation on where to store it. Basically, you may put it wherever you want, once you had some restrictions on the .db file access.
For instance, you may store it at C:\data and have the access to that folder to be restricted only to the account which the application is running under.

Where should additional files be put when writing my own magento extension?

I'm writing my magento extension and came up with a question. The main extension files/directory structure is quite clear. We have dirs for extension configuration files, models, helpers, database resources, frontend and backend scripts and stylesheets etc.
But what if my extension uses some files that aren't classes or resources to be included to frontend or backend?
For instance: image files that will only be attached to emails and will never be retrieved by a browser directly.
Should/could I just create a directory /app/code/community/MyNamespace/MyExtensionName/images?
The same dir tree for better readability:
app
code
community
MyNamespace
MyExtensionName
images
Or is there any other correct/recommended way to achieve that?
There's never been clear guidance on how to do this from Magento Inc. itself, and Magento's module structure doesn't offer clear guidance. The approach I've always taken is
Pretend I'm on the Magento core team
Pretend my fellow team members are sociopaths who don't care if anything I've done breaks
If you're adding frontend files for public consumption (to js, skin, etc), I always create a folder that's a lowercase version of my full module name, and drop all files in there
/js/namespace_modulename/file.js
In the case of files that aren't going to be served publicly (i.e. you only need access to them via PHP), creating a folder in the root of your module (as you've done above) is appropriate. I'd suggest something like
app
code
community
MyNamespace
MyExtensionName
assets
images
You never know when there'll be something else you want to add, and having everything under one folder will help keep the module structure clean.
There's even sort of a precedent for this in Magento's core code. Take a look at the
app/code/core/Mage/Sales/doc
folder.
Create a folder into media directory and place your files/images into that folder
media
MyExtensionName
images
And access them like
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'/MyExtensionName/images/pic.jpg';

Changing the WebLogic Domain location

I am currently setting up a new dev environment, and have come to the final stage where I am trying to run a build.
However, one of the ANT targets is trying to create a directory, which is currently set to "C:\workspace\domains\Online" however for security reasons (they say anyway...) we do not have full access to the C: drive, so I have my domain setup in an alternate location. Where is this Domain Home/Root variable kept?
Well in my own domain there is in file <domain>/bin/setDomainEnv.bat the following line:
set DOMAIN_HOME=D:\Oracle\Middleware\user_projects\domains\domain_name
However since you are using some Ant build file to create your domain, maybe something is hardcoded in them or is one of the properties passed to this file.
An ANT build file that had been supplied by somebody else had been hardcoded! Not sure why they couldn't follow the convention! It just so happened that the location that had been hardcoded was the same as my old workspace, thus the confusion.
Thanks all.

how to upload site to the server

I have a question....I'm using FileZilla to upload my eclipse project to the server. Now, it's the first time I do that and I don't know where to start. (I really don't want to do disasters)
in this image there is the composition of folders: on the left there is my project and on the right there is the server's folders.
http://img22.imageshack.us/img22/2519/jbecagca.png
In the folder WebContent I have also my 4 html files and one of these is index.html that is the page that has to be shown when I write the url of the site.
Now the question is... Where do I have to put my servlets? where my classes? where my sql dump of my database? where my html pages? where my js files?
I really have no idea.
thanks for any help!!
Go to your web host ask address for sql database you need to make a database on any of their server then it can be used you cant just use by uploading .
js files and classes will be used same hierarchy you used time of development.
If you're uploading a project, you should probably keep the project's folder structure. You should upload the whole project folder as is to the webroot, so you can access it from your browser

JBoss 7 - using *.properties files from filesystem

I have a webapplication (maven,spring,,hibernate) which contains different *.properties files which can be found within src/main/resource. Now my customer want to edit this files (e.g. change email address..) --> whats the best solution/ best practise? exclude *.properties from .war file and put it into filesystem? Jboss modules?
Can someone give me a hint?
If I were you I'd move these properties from static files to a persistent storage (i.e. DB) and then provide a UI to end user to modify their values.
Writing a custom module might work. This isn't as bad as it sounds, check out HowToPutAnExternalFileInTheClasspath.
See also migration-issues-to-jboss-7-1 and Where to put property file in JBOSS 7 or Glassflish? (Best practice)