5 Foods for a Better Mood
1) Oatmeal
Oatmeal may help if you find yourself feeling irritable and cranky. It is rich in soluble fiber, which helps to smooth out blood sugar levels by slowing the absorption of sugar into the blood.
Oatmeal is also a great food to help you stick with your diet plan, because the soluble fiber in oatmeal forms a gel that slows the emptying of your stomach so you don't feel hungry quickly.
Other foods high in soluble fiber are: beans, peas, barley, citrus fruits, strawberries and apples.
What to try:
Add tasty toppings to oatmeal, such as:
* Low-fat granola and skim milk
* Coarsely chopped apple or unsweetened chunky applesauce with cinnamon
* Strawberries and sliced almonds
2) Walnuts
Walnuts have long been thought of as a "brain food" because of their wrinkled, bi-lobed (brainlike) appearance. But now we know that walnuts are an excellent source of omega-3 essential fatty acids, a type of fat that's needed for brain cells and mood-lifting neurotransmitters to function properly and possible help some people with depression.
Other foods rich in omega-3 fatty acids include salmon, sardines, flaxseeds, and omega-3 fortified eggs.
What to try:
* Instead of reaching for a muffin as a snack, try walnuts and an apple. The fiber and good fat will also curb your appetite for longer.
* Try mixing crushed walnuts into yogurt as a snack.
* Sprinkle walnuts over salads.
3) Tea
Although caffeine has been shown to lead to a more positive mood and improved performance, it's a fine line.
Too much caffeine can make you dependent and make you nervous, irritable, hypersensitive or bring on headaches.
What to try:
* A good strategy is to limit yourself to no more than one 8 oz. cup of coffee a day. Instead of that second cup, try making a cup of green tea. You can find it in teabag form in most grocery stores.
* Another option: chai. It's an Indian tea made with regular black tea plus spices such as cardamom and cinnamon. The spices also add a natural sweetness to the tea, which may help you cut back on sugar and sweeteners.
* If you're in the mood to try a new herbal tea, consider rooibos. Rooibos is a reddish brown tea that tastes more like regular black tea than other herbal teas.
Like chai, rooibos also has a hint of natural sweetness, which makes it a good option for people trying to lose weight.
Try hot rooibos tea plain, with a wedge of lemon, or with milk. It also makes a great iced tea.
Rooibos can be found in health food stores, some grocery stores, online, and increasingly, in cafes and restaurants that serve herbal tea.
4) Salmon
In the past few years, research has suggested that vitamin D may increase the levels of serotonin, one of the key neurotransmitters influencing our mood, and that it may help to relieve mood disorders.
We get vitamin D mainly through exposure to sunlight and in lesser amounts, through food.
But a recent study found that in Boston, exposure to sunlight during the months of November through February does not produce any significant amounts of vitamin D in skin.
What to try:
* Canned salmon with bones is rich in vitamin D. It is also an excellent source of omega-3 fatty acids.
* Instead of tuna for your sandwiches, opt for canned Alaskan pink or sockeye salmon with bones. Choose water-packed salmon, which is lower in calories than the oil-packed.
* Other foods high in vitamin D are fortified milk and fortified soy milk.
5) Lentils
A member of the legume family, lentils are an excellent source of folate, a B vitamin that appears to be essential for mood and proper nerve function in the brain.
Low levels of folate have been linked to depression. In fact, a Harvard study showed that 38 percent of depressed women are deficient in folate.
Although researchers don't yet fully understand the connection, folate deficiency appears to impair the metabolism of serotonin, dopamine, and noradrenaline, neurotransmitters important for mood.
A cup of cooked lentils provides 90% of the recommended daily allowance of folic acid. A healthy bonus: lentils contain protein and fiber, which are filling and help to stabilize blood sugar.
Other sources of folate include: fortified breakfast cereals, green vegetables such as spinach and broccoli, liver, and beans.
What to try:
* Toss cooked lentils with cherry tomatoes, sliced bell peppers, and carrots for an easy salad.
* Try making lentil soup.
* If beans make you gassy, use Beano.
About Me
Blog Archive
-
►
2012
(2)
- ► 08/19 - 08/26 (2)
-
►
2011
(1)
- ► 01/02 - 01/09 (1)
-
►
2010
(7)
- ► 08/29 - 09/05 (5)
- ► 08/22 - 08/29 (2)
-
▼
2008
(14)
- ► 12/14 - 12/21 (1)
- ► 12/07 - 12/14 (1)
-
▼
11/02 - 11/09
(12)
- 5 Foods for a Better
- rpm stands for Redhat Package Manager.
- Apache Tomcat Directory Traversal Vulnerability
- What is the difference between UTF-8, UTF-16?
- How do I get UTF-8?
- What can I do with a UTF-8 string?
- How to you handle UTF-8?
- What is the UTF-8 encoding?
- What is the definition of UTF-8?
- Top 10 Ways to Be Happy at Work
- How to run Tomcat on a different port number
- tomcat bind exception
Followers
Friday, November 7, 2008
Wednesday, November 5, 2008
rpm stands for Redhat Package Manager.
MySQL installation with RPMMySQL installation with RPM. rpm stands for Redhat Package Manager. It is a utility which makes it easy to add, remove, or update software from your system. ...
www.phaget4.org/Nomad/rpminstall.html - 4k - Cached - Similar pages
www.phaget4.org/Nomad/rpminstall.html - 4k - Cached - Similar pages
Tuesday, November 4, 2008
Apache Tomcat Directory Traversal Vulnerability
Title: Apache Tomcat Directory Traversal Vulnerability
Author: Simon Ryeo(bar4mi (at) gmail.com, barami (at) ahnlab.com)
Severity: High
Impact: Remote File Disclosure
Vulnerable Version: prior to 6.0.18
Solution:
- Best Choice: Upgrade to 6.0.18 (http://tomcat.apache.org)
- Hot fix: Disable allowLinking or do not set URIencoding to utf8 in order to avoid this vulnerability.
- Tomcat 5.5.x and 4.1.x Users: The fix will be included in the next releases. Please apply the hot fix until next release.
References:
- http://tomcat.apache.org/security.html
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2938
History:
- 07.17.2008: Initiate notify (To Apache Security Team)
- 08.02.2008: Responsed this problem fixed and released new version
- 08.05.2008: Notify disclosure (To Apache Tomcat Security Team)
- 08.10.2008: Responsed with some suggestions.
Description
As Apache Security Team, this problem occurs because of JAVA side.
If your context.xml or server.xml allows 'allowLinking'and 'URIencoding' as
'UTF-8', an attacker can obtain your important system files.(e.g. /etc/passwd)
Exploit
If your webroot directory has three depth(e.g /usr/local/wwwroot), An
attacker can access arbitrary files as below. (Proof-of-concept)
http://www.target.com/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/foo/bar
# milw0rm.com [2008-08-11]
Author: Simon Ryeo(bar4mi (at) gmail.com, barami (at) ahnlab.com)
Severity: High
Impact: Remote File Disclosure
Vulnerable Version: prior to 6.0.18
Solution:
- Best Choice: Upgrade to 6.0.18 (http://tomcat.apache.org)
- Hot fix: Disable allowLinking or do not set URIencoding to utf8 in order to avoid this vulnerability.
- Tomcat 5.5.x and 4.1.x Users: The fix will be included in the next releases. Please apply the hot fix until next release.
References:
- http://tomcat.apache.org/security.html
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2938
History:
- 07.17.2008: Initiate notify (To Apache Security Team)
- 08.02.2008: Responsed this problem fixed and released new version
- 08.05.2008: Notify disclosure (To Apache Tomcat Security Team)
- 08.10.2008: Responsed with some suggestions.
Description
As Apache Security Team, this problem occurs because of JAVA side.
If your context.xml or server.xml allows 'allowLinking'and 'URIencoding' as
'UTF-8', an attacker can obtain your important system files.(e.g. /etc/passwd)
Exploit
If your webroot directory has three depth(e.g /usr/local/wwwroot), An
attacker can access arbitrary files as below. (Proof-of-concept)
http://www.target.com/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/foo/bar
# milw0rm.com [2008-08-11]
What is the difference between UTF-8, UTF-16?
ISO
UTF-8 uses variable byte to store a Unicode. In different code range, it has its own code length, varies from 1 byte to 6 bytes. Because it varies from 8 bits (1 byte), it is so called "UTF-8". UTF-8 is suitable for using on Internet, networks or some kind of applications that needs to use slow connection. Unicode (or UCS) Transformation Format, 16-bit encoding form
UTF-8 uses variable byte to store a Unicode. In different code range, it has its own code length, varies from 1 byte to 6 bytes. Because it varies from 8 bits (1 byte), it is so called "UTF-8". UTF-8 is suitable for using on Internet, networks or some kind of applications that needs to use slow connection. Unicode (or UCS) Transformation Format, 16-bit encoding form
How do I get UTF-8?
Tomcat FAQ - Miscellaneous Questions
It is not broken, your tag probably is. Many bug reports have been filed about this. Here is the bug report with all the gory details.
It is not broken, your tag probably is. Many bug reports have been filed about this. Here is the bug report with all the gory details.
What can I do with a UTF-8 string?
Perl-XML Frequently Asked Questions
You could obviously convert a UTF-8 encoded string to some other encoding, but before we get on to that, let's look at what you can do with it in its 'natural state'. If you wish to display the string in a web browser, no conversion is necessary. Modern browsers can understand UTF-8 directly, as can be seen on this page on the kermit project web site (some characters in the page will not display correctly without the correct fonts installed but that's a font issue rather than an encoding issue).
You could obviously convert a UTF-8 encoded string to some other encoding, but before we get on to that, let's look at what you can do with it in its 'natural state'. If you wish to display the string in a web browser, no conversion is necessary. Modern browsers can understand UTF-8 directly, as can be seen on this page on the kermit project web site (some characters in the page will not display correctly without the correct fonts installed but that's a font issue rather than an encoding issue).
How to you handle UTF-8?
Grapeshot - Developer - FAQs
Grapeshot has a very professional approach to a multitude of character sets. Grapeshot indexing routines identify the character set in use within a document and introduces appropriate stemming routines as part of tokenising the words or phrases within the incoming text. Tokenisation includes word splitting or character separation, as well as dealing with the ideosyncracies of punctuation within each language.
Grapeshot has a very professional approach to a multitude of character sets. Grapeshot indexing routines identify the character set in use within a document and introduces appropriate stemming routines as part of tokenising the words or phrases within the incoming text. Tokenisation includes word splitting or character separation, as well as dealing with the ideosyncracies of punctuation within each language.
What is the UTF-8 encoding?
Java Internationalization FAQ
UTF-8 stands for Unicode (or UCS) Transformation Format, 8-bit encoding form. It is a transmission format for Unicode that uses 8-bit code units.
UTF-8 stands for Unicode (or UCS) Transformation Format, 8-bit encoding form. It is a transmission format for Unicode that uses 8-bit code units.
What is the definition of UTF-8?
What is the definition of UTF-8?
FAQ - UTF-8, UTF-16, UTF-32 & BOM
UTF-8 is the byte-oriented encoding form of Unicode. For details of its definition, see Section 2.5 “Encoding Forms” and Section 3.9 “ Unicode Encoding Forms ” in the Unicode Standard. See, in particular, Table 3-5 UTF-8 Bit Distribution and Table 3-6 Well-formed UTF-8 Byte Sequences, which give succinct summaries of the encoding form. Also see sample code which implements conversions between UTF-8 and other encoding forms
FAQ - UTF-8, UTF-16, UTF-32 & BOM
UTF-8 is the byte-oriented encoding form of Unicode. For details of its definition, see Section 2.5 “Encoding Forms” and Section 3.9 “ Unicode Encoding Forms ” in the Unicode Standard. See, in particular, Table 3-5 UTF-8 Bit Distribution and Table 3-6 Well-formed UTF-8 Byte Sequences, which give succinct summaries of the encoding form. Also see sample code which implements conversions between UTF-8 and other encoding forms
Monday, November 3, 2008
Top 10 Ways to Be Happy at Work
Top 10 Ways to Be Happy at Work
By Susan M. Heathfield, About.com
See More About:happy at workemployee motivationworking with peopleWorking at Google sounds very cool. I'd be the first to tout Google as a motivating employer: free food, engineers who are enabled to spend 20 percent of their time on their own projects, and a work environment that fosters play and creative thinking. At Google, Genentech and other Fortune magazine top 100 companies, employers provide the best workplaces.
At the same time, perks that enable employees to spend all of their time at work exploit people and destroy work - life balance. So, even the best employer may not be best for everyone. These are the factors that will help you find happiness at work.
1. Choose to Be Happy at Work
Happiness is largely a choice. I can hear many of you arguing with me, but it's true. You can choose to be happy at work. Sound simple? Yes. But, simplicity is often profoundly difficult to put into action. I wish all of you had the best employer in the world, but, face it, you may not. So, think positively about your work. Dwell on the aspects of your work you like. Avoid negative people and gossip. Find coworkers you like and enjoy and spend your time with them. Your choices at work largely define your experience. You can choose to be happy at work.
Image: Copyright Rasmus Rasmussen
2. Do Something You Love Every Single Day
You may or may not love your current job and you may or may not believe that you can find something in your current job to love, but you can. Trust me. Take a look at yourself, your skills and interests, and find something that you can enjoy doing every day. If you do something you love every single day, your current job won't seem so bad. Of course, you can always make your current job work or decide that it is time to quit your job.
3. Take Charge of Your Own Professional and Personal Development
A young employee complained to me recently that she wanted to change jobs because her boss was not doing enough to help her develop professionally. I asked her whom she thought was the person most interested in her development. The answer, of course, was her. You are the person with the most to gain from continuing to develop professionally. Take charge of your own growth; ask for specific and meaningful help from your boss, but march to the music of your personally developed plan and goals. You have the most to gain from growing - and the most to lose, if you stand still.
4. Take Responsibility for Knowing What Is Happening at Work
People complain to me daily that they don't receive enough communication and information about what is happening with their company, their department's projects, or their coworkers. Passive vessels, they wait for the boss to fill them up with knowledge. And, the knowledge rarely comes. Why? Because the boss is busy doing her job and she doesn't know what you don't know. Seek out the information you need to work effectively. Develop an information network and use it. Assertively request a weekly meeting with your boss and ask questions to learn. You are in charge of the information you receive.
5. Ask for Feedback Frequently
Have you made statements such as, "My boss never gives me any feedback, so I never know how I'm doing." Face it, you really know exactly how you're doing. Especially if you feel positively about your performance, you just want to hear him acknowledge you. If you're not positive about your work, think about improving and making a sincere contribution. Then, ask your boss for feedback. Tell him you'd really like to hear his assessment of your work. Talk to your customers, too; if you're serving them well, their feedback is affirming. You are responsible for your own development. Everything else you get is gravy.
6. Make Only Commitments You Can Keep
One of the most serious causes of work stress and unhappiness is failing to keep commitments. Many employees spend more time making excuses for failing to keep a commitment, and worrying about the consequences of not keeping a commitment, than they do performing the tasks promised. Create a system of organization and planning that enables you to assess your ability to complete a requested commitment. Don't volunteer if you don't have time. If your workload is exceeding your available time and energy, make a comprehensive plan to ask the boss for help and resources. Don't wallow in the swamp of unkept promises.
7. Avoid Negativity
Choosing to be happy at work means avoiding negative conversations, gossip, and unhappy people as much as possible. No matter how positively you feel, negative people have a profound impact on your psyche. Don't let the negative Neds and Nellies bring you down. Take a look at:
How to Deal With a Negative Coworker: Negativity Matters.
Dealing With Difficult People at Work.
And, keep on singing in the car on your way to work - or start.
8. Practice Professional Courage
If you are like most people, you don't like conflict. And the reason why is simple. You've never been trained to participate in meaningful conflict, so you likely think of conflict as scary, harmful, and hurtful. Conflict can be all three; done well, conflict can also help you accomplish your work mission and your personal vision. Conflict can help you serve customers and create successful products. Happy people accomplish their purpose for working. Why let a little professional courage keep you from achieving your goals and dreams? Make conflict your friend.
9. Make Friends
In their landmark book, First, Break All The Rules: What the World’s Greatest Managers Do Differently (Compare Prices), Marcus Buckingham and Curt Coffman list twelve important questions. When employees answered these questions positively, their responses were true indicators of whether people were happy and motivated at work. One of these key questions was, "Do you have a best friend at work?" Liking and enjoying your coworkers are hallmarks of a positive, happy work experience. Take time to get to know them. You might actually like and enjoy them. Your network provides support, resources, sharing, and caring.
10. If All Else Fails, Job Searching Will Make You Smile
If all of these ideas aren't making you happy at work, it's time to reevaluate your employer, your job, or your entire career. You don't want to spend your life doing work you hate in an unfriendly work environment. Most work environments don't change all that much. But unhappy employees tend to grow even more disgruntled. You can secretly smile while you spend all of your non-work time job searching. It will only be a matter of time until you can quit your job - with a big smile.
By Susan M. Heathfield, About.com
See More About:happy at workemployee motivationworking with peopleWorking at Google sounds very cool. I'd be the first to tout Google as a motivating employer: free food, engineers who are enabled to spend 20 percent of their time on their own projects, and a work environment that fosters play and creative thinking. At Google, Genentech and other Fortune magazine top 100 companies, employers provide the best workplaces.
At the same time, perks that enable employees to spend all of their time at work exploit people and destroy work - life balance. So, even the best employer may not be best for everyone. These are the factors that will help you find happiness at work.
1. Choose to Be Happy at Work
Happiness is largely a choice. I can hear many of you arguing with me, but it's true. You can choose to be happy at work. Sound simple? Yes. But, simplicity is often profoundly difficult to put into action. I wish all of you had the best employer in the world, but, face it, you may not. So, think positively about your work. Dwell on the aspects of your work you like. Avoid negative people and gossip. Find coworkers you like and enjoy and spend your time with them. Your choices at work largely define your experience. You can choose to be happy at work.
Image: Copyright Rasmus Rasmussen
2. Do Something You Love Every Single Day
You may or may not love your current job and you may or may not believe that you can find something in your current job to love, but you can. Trust me. Take a look at yourself, your skills and interests, and find something that you can enjoy doing every day. If you do something you love every single day, your current job won't seem so bad. Of course, you can always make your current job work or decide that it is time to quit your job.
3. Take Charge of Your Own Professional and Personal Development
A young employee complained to me recently that she wanted to change jobs because her boss was not doing enough to help her develop professionally. I asked her whom she thought was the person most interested in her development. The answer, of course, was her. You are the person with the most to gain from continuing to develop professionally. Take charge of your own growth; ask for specific and meaningful help from your boss, but march to the music of your personally developed plan and goals. You have the most to gain from growing - and the most to lose, if you stand still.
4. Take Responsibility for Knowing What Is Happening at Work
People complain to me daily that they don't receive enough communication and information about what is happening with their company, their department's projects, or their coworkers. Passive vessels, they wait for the boss to fill them up with knowledge. And, the knowledge rarely comes. Why? Because the boss is busy doing her job and she doesn't know what you don't know. Seek out the information you need to work effectively. Develop an information network and use it. Assertively request a weekly meeting with your boss and ask questions to learn. You are in charge of the information you receive.
5. Ask for Feedback Frequently
Have you made statements such as, "My boss never gives me any feedback, so I never know how I'm doing." Face it, you really know exactly how you're doing. Especially if you feel positively about your performance, you just want to hear him acknowledge you. If you're not positive about your work, think about improving and making a sincere contribution. Then, ask your boss for feedback. Tell him you'd really like to hear his assessment of your work. Talk to your customers, too; if you're serving them well, their feedback is affirming. You are responsible for your own development. Everything else you get is gravy.
6. Make Only Commitments You Can Keep
One of the most serious causes of work stress and unhappiness is failing to keep commitments. Many employees spend more time making excuses for failing to keep a commitment, and worrying about the consequences of not keeping a commitment, than they do performing the tasks promised. Create a system of organization and planning that enables you to assess your ability to complete a requested commitment. Don't volunteer if you don't have time. If your workload is exceeding your available time and energy, make a comprehensive plan to ask the boss for help and resources. Don't wallow in the swamp of unkept promises.
7. Avoid Negativity
Choosing to be happy at work means avoiding negative conversations, gossip, and unhappy people as much as possible. No matter how positively you feel, negative people have a profound impact on your psyche. Don't let the negative Neds and Nellies bring you down. Take a look at:
How to Deal With a Negative Coworker: Negativity Matters.
Dealing With Difficult People at Work.
And, keep on singing in the car on your way to work - or start.
8. Practice Professional Courage
If you are like most people, you don't like conflict. And the reason why is simple. You've never been trained to participate in meaningful conflict, so you likely think of conflict as scary, harmful, and hurtful. Conflict can be all three; done well, conflict can also help you accomplish your work mission and your personal vision. Conflict can help you serve customers and create successful products. Happy people accomplish their purpose for working. Why let a little professional courage keep you from achieving your goals and dreams? Make conflict your friend.
9. Make Friends
In their landmark book, First, Break All The Rules: What the World’s Greatest Managers Do Differently (Compare Prices), Marcus Buckingham and Curt Coffman list twelve important questions. When employees answered these questions positively, their responses were true indicators of whether people were happy and motivated at work. One of these key questions was, "Do you have a best friend at work?" Liking and enjoying your coworkers are hallmarks of a positive, happy work experience. Take time to get to know them. You might actually like and enjoy them. Your network provides support, resources, sharing, and caring.
10. If All Else Fails, Job Searching Will Make You Smile
If all of these ideas aren't making you happy at work, it's time to reevaluate your employer, your job, or your entire career. You don't want to spend your life doing work you hate in an unfriendly work environment. Most work environments don't change all that much. But unhappy employees tend to grow even more disgruntled. You can secretly smile while you spend all of your non-work time job searching. It will only be a matter of time until you can quit your job - with a big smile.
How to run Tomcat on a different port number
How to run Tomcat on a different port number
Tomcat web server by default runs on port number 8080, which is also the default port number used by some other popular servers like JBoss, JavaEE SDK, Sun Java System Application Server. When this port number is already used by another process, you will get the following error:logs/catalina.2007-01-09.log:...INFO: Starting Servlet Engine: Apache Tomcat/5.5.20Jan 11, 2007 9:36:12 AM org.apache.catalina.core.StandardHost startINFO: XML validation disabledJan 11, 2007 9:36:13 AM org.apache.coyote.http11.Http11BaseProtocol startSEVERE: Error starting endpointjava.net.BindException: Address already in use: JVM_Bind:8080 at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297) at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:312) at org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:150) at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:75) at org.apache.catalina.connector.Connector.start(Connector.java:1089) at org.apache.catalina.core.StandardService.start(StandardService.java:459) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551)To use a different port number, back up and edit the port attribute value of Connector element in ($CATALINA_HOME/conf/server.xml:Connector port="8081" maxHttpHeaderSize="8192"Restart Tomcat ($CATALINA_HOME/bin/startup.sh on Unix or %CATALINA_HOME%\bin\startup.bat on Windows), and check server status at URL http://localhost:8081)
Tomcat web server by default runs on port number 8080, which is also the default port number used by some other popular servers like JBoss, JavaEE SDK, Sun Java System Application Server. When this port number is already used by another process, you will get the following error:logs/catalina.2007-01-09.log:...INFO: Starting Servlet Engine: Apache Tomcat/5.5.20Jan 11, 2007 9:36:12 AM org.apache.catalina.core.StandardHost startINFO: XML validation disabledJan 11, 2007 9:36:13 AM org.apache.coyote.http11.Http11BaseProtocol startSEVERE: Error starting endpointjava.net.BindException: Address already in use: JVM_Bind:8080 at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297) at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:312) at org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:150) at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:75) at org.apache.catalina.connector.Connector.start(Connector.java:1089) at org.apache.catalina.core.StandardService.start(StandardService.java:459) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551)To use a different port number, back up and edit the port attribute value of Connector element in ($CATALINA_HOME/conf/server.xml:Connector port="8081" maxHttpHeaderSize="8192"Restart Tomcat ($CATALINA_HOME/bin/startup.sh on Unix or %CATALINA_HOME%\bin\startup.bat on Windows), and check server status at URL http://localhost:8081)
tomcat bind exception
How to solve Address or Port already in use error in java?
http://www.digitalprank.org/how-to-solve-address-or-port-already-in-use-error-in-java/
java.net.BindException: Address already in use: JVM Bind is one of the most popular error among java developers and guys who do socket programming in some other language too. But with respect to java this error is much familiar with socket programming and during web development. This error happens for ports 80 (HTTP) , 1098 (RMI) when it is used by other applications that is running on the same PC or server. So I am going to explain how to debug and solve this problem.
Step I : Finding the ports that are in use:
1. You can use the tool CurrPorts to solve this problem. You can read about the tool in my previous post How to find open ports in your PC?
2. If you are using windows XP you can use the netstat command to view which processing is occupying the port. If you use Windows 2000 then you cannot use the ‘ netstat -o ‘ in your netstat command which tells you the process ID that is using the port. So in windows 2000 use the tool CurrPorts which is free.
eg) netstat -ano
window.google_render_ad();
Note:
If you have problem with port 1098 then check whether outlook or firefox is currently in use and close the same to free the port. This is just an example and for a better report you can use the tools mentioned above.
Step II : Free up the port:
You can free up the port by 3 ways,
1. If you use CurrPorts tool then you can find the application that is using it and you can close it down or kill the process by right clicking in the tool.
2. In windows you can use the command ‘ taskkill /PID 828 ‘ to kill the appropriate process.
3. Making your program to use a different port. For instance if you are encountering this error with JBOSS Application server for port 80, then you can go to server.xml in the appropriate directory say server/default/deploy/jbossweb-tomcatXX.sar/server.xml and change the port to 8080 to avoid the conflict. In case of Tomcat look for server.xml in the conf directory
Subscribe to:
Comments (Atom)
