Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Servlet Configuration with Tomcat (HTTP Status 404)

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a tomcat server hosting a site for me, so I want to create a Login system where you need a certain username and password to see the site. When I run my setup on Eclipse, it works as intended. However, when I run this on my Amazon ec2 linux instance and go onto the actual site, after entering in the username and password I get this error:

I'm not sure what I have set up right in Eclipse that doesn't translate over to my linux server, so any ideas on why this is happening?


index.jsp


LoginCheck.java


LoginWorked.jsp


LoginFailed.jsp

 
Rancher
Posts: 4117
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you say it worked under Eclipse, I assume this was the built in Tomcat?

Did you try and deploy to a local standalone Tomcat to ensure that deployment would work?
 
Spalding Latham
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dave Tolls wrote:When you say it worked under Eclipse, I assume this was the built in Tomcat?

Did you try and deploy to a local standalone Tomcat to ensure that deployment would work?



Yes, inside Eclipse I ran my index.jsp on a server configured to Tomcat 9. Could you explain what you mean by a local standalone tomcat?
 
Dave Tolls
Rancher
Posts: 4117
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean, download Tomcat and start it up.
Deploy your app to Tomcat.

That way I know when I deploy to Tomcat elsewhere it'll work, and Eclipse isn't hiding an issue.

 
Spalding Latham
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dave Tolls wrote:I mean, download Tomcat and start it up.
Deploy your app to Tomcat.

That way I know when I deploy to Tomcat elsewhere it'll work, and Eclipse isn't hiding an issue.



My app works when just deploying the LoginWorked.JSP file, but if you have access to the link you can access the site info. So I want to add a login check around this page so you can only access it with a username and password
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!