Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Removing Embeded Tomcat

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,

I am currently trying to remove embedded tomcat from my code, and run it externally. So I dont have update it inside the code each time they come out with a new Tomcat version. When I try to drop my code into the webapp directory and run it this error shows up


org\apache\jsp\Index_jsp.java:3: package javax.servlet does not exist
import javax.servlet.*;

of coures this happens for more then javax.servlet. Does anyone have any ideas on what I should do, I have read many forms on this but none of them have proven to be useful.
 
Ranch Hand
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does the below line means?

I am currently trying to remove embedded tomcat from my code,



org\apache\jsp\Index_jsp.java:3: package javax.servlet does not exist
import javax.servlet.*;




To avoid the above error include servlet-api, jsp-api jar files in the classpath.
 
John Lark
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ill try adding those to my .classPath if they are not already there thanks! As for what the first linke meant I am currently using and embedded version of tomcat and am trying to move to an external version. So right now tomcat is within my program in this case it works flawlessly its when I try to run it with an external version of tomcat that I have the issues. However, Ill post back as to if your suggestion worked.
 
John Lark
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am still suffereing from the same issue, but think your right about the class path... whats the best way to determine if my class path is right or wrong? Files keep getting moved and changed and manipulated and to be frank I have no idea whats going on at this point. I am compeltley and utterly confused Tomcat is angry, mean and vicous as the name would suggest LOL! Also, would anyone know where a good Tomcat tutrial for struts is? Prefferbly not the one on the Apache website it hasnt been a tremendously large amount of help...
 
John Lark
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another quick question, do I need to be using the servlet-api in Tomcats library or the one I have created? If it isnt to much trouble I would also like to ask why?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

do I need to be using the servlet-api in Tomcats library or the one I have created?



Yes you need to use the servlet-api.jar to compile if you are using the official servlet API and Tomcat.

If you are trying to find a servlet container that is smaller and simpler than Tomcat, they certainly exist.

Grizzly is a high performance container that is well thought of.

Jetty is another that has been around quite a while. The latest release implements servlet version 3.0.

Bill

 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic