Hello Ikai,
While, I moved file to new location "WEB-INF/ssma_std.txt", It worked. Thank you so much. Nick On Jun 7, 2:38 pm, "Ikai L (Google)" <[email protected]> wrote: > Can you try placing the file into WEB-INF and setting filename to > "WEB-INF/ssma_std.txt"? > > > > On Sat, Jun 5, 2010 at 4:42 PM, Nick <[email protected]> wrote: > > Hi, > > > I'm new to GoogleAppEngine, > > please help me on resolving following erro... > > > 1. I would like to read a "ssma_stud.txt" file as an input file. > > This file resides in a path " web/ssma_stud.txt" > > > 2. As well, updated "appengine-web.xml" with following... > > <system-properties> > > <property name="com.google.gdata.DisableCookieHandler" > > value="true"/> > > </system-properties> > > > 3. My objective is to read a text file and generate a HashMap which I > > can use into my servlet > > > Code: > > String fileName = "/ssma_stud.txt"; > > > ArrayList arrayListLineReadData = new > > ArrayList(); > > try > > { > > BufferedReader inBuffReader = new > > BufferedReader(new > > FileReader(fileName)); > > if (!inBuffReader.ready()) > > throw new IOException(); > > > 4. on this line "BufferedReader inBuffReader = new > > BufferedReader(new FileReader(fileName));" > > I get following error..: > > > java.security.AccessControlException: access denied > > (java.io.FilePermission \ssma_stud.txt read) > > at > > > java.security.AccessControlContext.checkPermission(AccessControlContext.java: > > 323) > > at > > java.security.AccessController.checkPermission(AccessController.java: > > 546) > > at java.lang.SecurityManager.checkPermission(SecurityManager.java: > > 532) > > at com.google.appengine.tools.development.DevAppServerFactory > > $CustomSecurityManager.checkPermission(DevAppServerFactory.java:166) > > at java.lang.SecurityManager.checkRead(SecurityManager.java:871) > > at java.io.FileInputStream.<init>(FileInputStream.java:100) > > at java.io.FileInputStream.<init>(FileInputStream.java:66) > > at java.io.FileReader.<init>(FileReader.java:41) > > at > > > com.lgframe.design.C_Stud_Comb_Axial_Bend_Servlet.getArrayListLineReadData(C_Stud_Comb_Axial_Bend_Servlet.java: > > 411) > > at > > > com.lgframe.design.C_Stud_Comb_Axial_Bend_Servlet.doPost(C_Stud_Comb_Axial_Bend_Servlet.java: > > 114) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) > > at > > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: > > 511) > > at org.mortbay.jetty.servlet.ServletHandler > > $CachedChain.doFilter(ServletHandler.java:1166) > > at > > > com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java: > > 51) > > at org.mortbay.jetty.servlet.ServletHandler > > $CachedChain.doFilter(ServletHandler.java:1157) > > at > > > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: > > 43) > > at org.mortbay.jetty.servlet.ServletHandler > > $CachedChain.doFilter(ServletHandler.java:1157) > > at > > > com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java: > > 122) > > at org.mortbay.jetty.servlet.ServletHandler > > $CachedChain.doFilter(ServletHandler.java:1157) > > at > > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: > > 388) > > at > > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: > > 216) > > at > > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: > > 182) > > at > > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: > > 765) > > at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: > > 418) > > at > > > com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java: > > 70) > > at > > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: > > 152) > > at com.google.appengine.tools.development.JettyContainerService > > $ApiProxyHandler.handle(JettyContainerService.java:349) > > at > > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: > > 152) > > at org.mortbay.jetty.Server.handle(Server.java:326) > > at > > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: > > 542) > > at org.mortbay.jetty.HttpConnection > > $RequestHandler.content(HttpConnection.java:938) > > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755) > > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) > > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) > > at > > org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: > > 409) > > at org.mortbay.thread.QueuedThreadPool > > $PoolThread.run(QueuedThreadPool.java:582) > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine for Java" group. > > To post to this group, send email to > > [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<google-appengine-java%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-appengine-java?hl=en. > > -- > Ikai Lan > Developer Programs Engineer, Google App Engine > Blog:http://googleappengine.blogspot.com > Twitter:http://twitter.com/app_engine > Reddit:http://www.reddit.com/r/appengine -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
