| | |
how to increase users in tomcat-users.xml file automatically not manually
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Aug 2007
Posts: 63
Reputation:
Solved Threads: 0
Hi guys, I am trying to restrict users to access the sources of my application so I have used tomcat-users.xml file , but later I will be facing a problem which is how if I have a lot of authorized users , so I will add each one to that file manually , i think it is not efficient way . Furthermore , I am having an application that lets users used its resources based on the user account in database. if the user has an account in database he/she can login to the application and use the resources , so how can I use this idea with tomcat-users.xml just to avoid the increase number of authorized users in tomcat-users.xml
I hope you understand my question . I don't mind to repeat it again if you have any question
please help me guys because I want to prevent unathorized users to access directly using URL in my application
thank you very very very much
I hope you understand my question . I don't mind to repeat it again if you have any question
please help me guys because I want to prevent unathorized users to access directly using URL in my application
thank you very very very much
0
#2 20 Days Ago
•
•
•
•
I want to prevent unathorized users to access directly using URL in my application
JSP Syntax (Toggle Plain Text)
String username; String password; // check the database to see if the user is valid. if (yes) { request.getSession().setAttribute("USER",username); }
When the user logs out do you do this:
JSP Syntax (Toggle Plain Text)
request.getSession().setAttribute("USER",null);
And my suggestion would be to put this check in all of your pages:
JSP Syntax (Toggle Plain Text)
String username = (String)request.getSession().getAttribute("USER"); if (username==null) { // unauthorized user // redirect to log in page }
Check out my New Bike at my Public Profile at the "About Me" tab
![]() |
Similar Threads
- Create XML File DYnamically Using ASP.Net C# (ASP.NET)
- How to open PDF file (Python)
- how to display XML file in textBox or Treeview using C# (C#)
- create buttons configured from xml file (C#)
- [urgent] HTML form => XML file (JSP)
- Displayind data in XML file using HTML (RSS, Web Services and SOAP)
- How to re-organized XML file and call XML file from my software (RSS, Web Services and SOAP)
- Parsing xml file (Python)
Other Threads in the JSP Forum
- Previous Thread: Help with GET method please
- Next Thread: JSP Page Interaction
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web






