[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3704
  • Last Modified:

Endorsed directory in Tomcat 7

I am trying to install an application (Shibholeth IDP) on Tomcat 7 in windows and there is this line i can't figure out how to carry out.

Tomcat 6 has removed automatic inclusion of the endorsed directory so you have to add it by adjusting the -Djava.endorsed.dirs= parameter of your launch scripts.

My question is how do i adjust the -Djava.endorsed.dirs= parameter in Tomcat 7?
0
speak2ab
Asked:
speak2ab
  • 7
  • 6
3 Solutions
 
xtermCommented:
I'm not entirely familiar with Windows, but in the Unix environment there is an init file which actually starts tomcat, where you can set your various parameters and flags.

You could probably find what the equivalent is by looking at the registry items for services that are started at boot time, or perhaps even just going to the properties of anything in your Startup folder.  Regardless, there will be a file called perhaps just "tomcat" or "tomcat.init" or something of that nature that you should be able to open, and find the actual java command that starts the server.  Start by browsing through the installation folder for Tomcat.

Hopefully it will already have the -Djava.endorsed.dirs= parameter in there, and then you can just add after the = "C:\path\to\my\endorsed\folder"  If not, you will need to experiment with where it goes in the java command.
0
 
speak2abAuthor Commented:
Yeah i know there should be a file that i can edit to set these parameter but the problem is i don't know which file??
0
 
xtermCommented:
It is probably startup.bat in the tomcat installation directory, but you can use the FindStr command to search for the string "endorsed" in all the files in the installation directory.

So at a DOS prompt:

C:\tomcat>  FindStr /I endorsed *

(the /I makes it case-insensitive)
0
A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

 
speak2abAuthor Commented:
Thanks xterm but that does not help out. I get no file returned.

 I have transferred the issue to the organisation that wrote the installation manual for the procedure to do this. Once i get a solution i will post it here.
0
 
xtermCommented:
Can you not just find the java command in the init file and add:

   -Djava.endorsed.dirs=C:\path\to\my\endorsed\directory

to it?

0
 
speak2abAuthor Commented:
This is supposed to be simple but so far, I still can't get it to work. If you can give me a step by step directions on where to locate the necessary file. I will be glad.
Thanks for standing by.
0
 
xtermCommented:
Find the file that starts tomcat.  Look for the line that starts with "java ".  Add to the existing flags (of which there will likely be several -this and -that) the -Djava.endorsed.dirs=C:\path\to\endorsed

It's kind of hard to be clearer than that.  If you do not know what file starts Tomcat, perhaps you can find it in your Startup folder, and check properties.
0
 
speak2abAuthor Commented:
The file that starts my Tomcat 7 is an exe file. I have also confirmed that from the startup options in windows. There is no startup.bat anywhere in the whole Tomcat Directory that i could have edited. The exe file is apparently not editable. On linux this is not as challenging as the scripts to edit are visible, in windows i can't for the life of me figure out what should be edited.
Do you have any idea what other file i can edit to get the endorsed folder registered or even if there is another approach to achieve this?
0
 
xtermCommented:
Are you sure this isn't just a hidden file or something?  Everything I googled seems to indicate that there is a startup.bat file in the installation directory.
0
 
speak2abAuthor Commented:
I thought so too and i have enabled view hidden files and yet searching through all the folders both manually and with the search tool reveals no startup.bat.

I am sure there should be a file to edit to configure the endorse folder in Tomcat 7 but i don't get why even Tomcat documentation is all silent about this.
0
 
xtermCommented:
http://www.coderanch.com/t/508532/Tomcat/starting-tomcat

Look about 1/2 way down, comment by William Brogden.

This seems to indicate that you have to download the version that doesn't run as a service if you want to do any tweaking, and it will have the startup script in it.
0
 
speak2abAuthor Commented:
oh thanks! I guess that explains it. Funny though because i got that site but did not read to that point.

The challenge this brings now is how do i move from my existing Tomcat installation to the version with the startup.bat? Can i just copy the startup.bat file into the bin folder of my current tomcat or do i need to uninstall and reinstall?

I have already installed quite a lot of apps on this current Tomcat and i do not wish to reinstall them all over again. With regards.
0
 
xtermCommented:
I would suggest downloading the other one and just snagging the startup.bat file and putting it in your existing installation.

Then you will need to stop and disable the running Tomcat instance, and then see if startup.bat fires up everything as you expect it to.

If that works, then I'd add your endorsed parameter.

However, if it doesn't work, then regrettably, its possible you might need to start over, but lets try the harmless method first?
0

Featured Post

Cyber Threats to Small Businesses (Part 2)

The evolving cybersecurity landscape presents SMBs with a host of new threats to their clients, their data, and their bottom line. In part 2 of this blog series, learn three quick processes Webroot’s CISO, Gary Hayslip, recommends to help small businesses beat modern threats.

  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now