• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Deploying a Visual Web Pack Application from Netbeans 5.5.1 to Tomcat 5.5

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings, I'm trying to create a simple web application using the Visual Web pack in NetBeans 5.5.1. I have setup Apache Tomcat 5.5 under Ubuntu 7.10. When I deploy the application, I get a 404 error saying, "The requested resource (/junkApp/) is not available."

Now, if I create a simple web application without the use of the Visual Web Pack, it works. What's the difference? I would prefer to create my application with the Visual Web pack. Does this have anything to do with Tomcat only being a Servlet container? If so, why does the bundled Tomcat work when I deploy my app?

Thanks in advance for the help.
 
Gabe Lopez
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So figured out that if I remove the UploadFilter from my Servlet Filters, which is found in the web.xml file, my war package will deploy properly and the Visual Web App will run under Apache Tomcat5.5.

Does anyone know how to make the UploadFilter load properly in Tomcat5.5? I hate to remove it everytime and since I might need it in the near future, it would be nice to know how to get it working. I have tried packaging the webui.jar in the WEB-INF/lib directory, but this still doesn't work.
 
Gabe Lopez
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to my Tomcat Log, it looks like the UploadFilter is loading; however, there's some kind of AccessControlException being thrown. Anyone know what this is about?

Here are the first few lines of my Tomcat5.5 Log:
 
Gabe Lopez
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After much digging, I have the solution for this error.

For Apache/Tomcat5.5 under Ubuntu Linux 7.10, the following line needs to be added to the policy file 04webapps.policy (for the default policy setting for all webapps) in order for the UploadFilter to work:



This makes sense to have a read and write permission since you are allowing uploads. All Tomcat 5.5 policy files can be found at:
/usr/share/tomcat5.5/conf/policy.d

Next, you need to stop Tomcat if you haven't already:
sudo /etc/init.d/tomcat5.5 stop

Then, you have to run:
sudo /usr/share/tomcat5.5/bin/catalina start -security

Finally, Start-Up Tomcat:
sudo /etc/init.d/tomcat5.5 stop

If you run into problems such as "JAVA_HOME not found" be sure to add the following line to your /etc/environment file:



The above line assumes you have Java6 installed using:
sudo apt-get install sun-java6-jdk sun-java6-jre

If you need to figure out where your JAVA_HOME is located, you should try typing:

update-java-alternatives -l

Good Luck!
 
Gabe Lopez
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you add the line:


Be sure to also add:


I kept getting exceptions thrown and was able to trace it to the line above.

Finally, restart the server from a cold boot ... just to be sure you have everything.
 
Alas, poor Yorick, he knew this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic