Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!

Spalding Latham

+ Follow
since May 29, 2019
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Spalding Latham

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
1 year ago

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?
1 year ago
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?




1 year ago

Tim Holloway wrote:I haven't done raw JSP pages in a while, but I think that the more appropriate way to do that is via a useBean element.

As for the "File Not Found", double-check your path and MAKE SURE that there aren't any differences between uppercase and lowercase between the name in the error message and the actual pathname in the file system. Windows is not case-sensitive, but Java is.

Also, Tomcat does have to have file read access rights to that file. When running Tomcat from Eclipse, that generally means that the userid that Eclipse is running under has to have those rights, since Tomcat would generally be running under the same userid as Eclipse.

File names are correct, just double checked. As for the permissions, where would I go to look if Tomcat has access to read rights?
1 year ago

Dave Tolls wrote:Where does the filename come from?

As an aside, I notice you seem to be doing a lot of your work in a JSP page.
That work should really be in a servlet.

I need to parse through 3 different files, so I have my getXML(String fileName) and I call that 3 times with each different file. Also this is the entirety of my JSP file:

All it does is call the getFormattedMetrics() method, my DataAccessor class is doing all of the work.
1 year ago
I'm trying to access xml files from my computer, parse through them and extract useful info, then push this info to a webpage and upload on tomcat server. It all works fine until the last step, and tomcat gives me this error

That directory exists and I can print what I need to on Eclipse, but how can I access it differently to where Tomcat can use it? Right now I am using

to access the file, with the path being sent through the fileName parameter.
1 year ago