Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

tomcat administrtor

Hi,

I am trying to save a Servlet in tomcat webapps --->ServetExamples folder
i am getting no permission.

I am administrator on my personal laptop. How can i bypass attached error and save above servlet to run from command prompt. please advise
ServletEx.png
Avatar of gudii9
gudii9
Flag of United States of America image

ASKER

import java.io.*;
]import javax.servet.*;

public clas LifeCycleServlet extends GenericServlet{
	

	public void init(ServletConfit config)throws ServletException{
    System.out.println("inside init");

	}

	public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException{
	System.out.println("inside service");
	}
	public void destroy(){
	System.out.println("instide destroy");
	}
}

Open in new window

above is servlet code
ASKER CERTIFIED SOLUTION
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gudii9

ASKER

start your editor as administrator by right clicking on the editor on your taskbar and choose 'run as administrator' - you will be able to save then.

you mean tomcat?
.Java file in a tomcat deployment folder?

under classes folder of webapps/myproject
so that i can run from command prompt
Avatar of gudii9

ASKER

start your editor as administrator

you mean notepad++ or editplus etc
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gudii9

ASKER

no tool. just command prompt for this exersises
Avatar of gudii9

ASKER

how to start notepad or notepad++ as administrator?
Avatar of gudii9

ASKER

probably instead of installing tomcat to below

C:\Program Files\Apache Software Foundation\Tomcat 9.0

just installl to C directory may be wise thing to do to avoid these issues?
Avatar of gudii9

ASKER

i uninstalled tomcat


i just downloaded 32/64bit installer of tomcat 9 from
http://tomcat.apache.org/download-90.cgi

i installed at
C:\Users\xyz\Tomcat 9.0
i see
under
C:\Users\xyz\Tomcat 9.0\webapps folders like

docs
manager
ROOT
examples
host-manager



from command prompt i went to below bin directory and gave tomcat9 to start tomcat tomcat9.exe

C:\Users\xyz\\Tomcat 9.0\bin>tomcat9

i see attached user access control from windows 10 iguess on my laptop and when i say yes it quickly closes the window without starting tomcat.

anything restricting tomcat starting on my window laptop
IMG_20170118_220226603.jpg
Avatar of gudii9

ASKER

https://www.jamf.com/jamf-nation/articles/117/starting-and-stopping-tomcat
above link says
On Windows:
1. Open the JSS Setup Utility on the JSS host server.
Note: If the User Account Control setting are enabled, you must be logged in as the built-in Administrator.
not sure how to login as administrator?
Avatar of gudii9

ASKER

big lesson for me always get 64 bit tomcat zip and install

change port, username and password if needed
C:\gpSoftwares\apache-tomcat-9.0.0.M17-windows-x64\apache-tomcat-9.0.0.M17
http://localhost:50000/gpProjects/sample
worked.png