Jump to content

Recommended Posts

  • Replies 37
  • Created
  • Last Reply

Top Posters In This Topic

  • chinni005

    19

  • Thingarodu

    8

  • chandu1987

    3

  • ChampakDas

    2

Popular Days

Top Posters In This Topic

Posted

how load .properties file in assume Service class in Java in servlets :)

Posted

[url="http://stackoverflow.com/questions/12507016/load-properties-file-in-servlet-jsp"]http://stackoverflow.com/questions/12507016/load-properties-file-in-servlet-jsp[/url]

Posted

[quote name='CITI' timestamp='1352432893' post='1302767565']
[url="http://stackoverflow.com/questions/12507016/load-properties-file-in-servlet-jsp"]http://stackoverflow...-in-servlet-jsp[/url]
[/quote]
ivem work avatle :( nullpointer Exception osthundhi :(

Posted

[size=4][background=transparent]properties[/background][/size][size=4][background=transparent].[/background][/size][size=4][background=transparent]load[/background][/size][size=4][background=transparent]([/background][/size][size=4][background=transparent]getServletContext[/background][/size][size=4][background=transparent]().[/background][/size][size=4][background=transparent]getResourceAsStream[/background][/size][size=4][background=transparent]([/background][/size][color=#800000][size=4][background=transparent]"/WEB-INF/properties/sample.properties"[/background][/size][/color][size=4][background=transparent]));[/background][/size]

Posted

[quote name='Hava5' timestamp='1352432999' post='1302767567']
ivem work avatle :( nullpointer Exception osthundhi :(
[/quote]

[url="http://www.jcp.org/en/jsr/detail?id=116"]http://www.jcp.org/en/jsr/detail?id=116[/url] idhedho expert group anta try to post ur questions

Posted

[quote name='Hava5' timestamp='1352432999' post='1302767567']
ivem work avatle :( nullpointer Exception osthundhi :(
[/quote]

properties file location endi???

Posted

[quote name='Thingarodu' timestamp='1352433039' post='1302767571']
[size=4][background=transparent]properties[/background][/size][size=4][background=transparent].[/background][/size][size=4][background=transparent]load[/background][/size][size=4][background=transparent]([/background][/size][size=4][background=transparent]getServletContext[/background][/size][size=4][background=transparent]().[/background][/size][size=4][background=transparent]getResourceAsStream[/background][/size][size=4][background=transparent]([/background][/size][color=#800000][size=4][background=transparent]"/WEB-INF/properties/sample.properties"[/background][/size][/color][size=4][background=transparent]));[/background][/size]
[/quote]
[size=4][background=transparent]getServletContext[/background][/size][size=4][background=transparent]() e method use cheyyalante na class HttpServlet class ni extend cheyyala? :o[/background][/size]
I don't have this method in my code :(
[size=4][background=transparent]I'm[/background][/size]

Posted

[quote name='Thingarodu' timestamp='1352433097' post='1302767575']

properties file location endi???
[/quote]
src file lo undhi right now..

I tried moving to web-INF too but it didn't work :(

Posted

[quote name='Hava5' timestamp='1352433201' post='1302767576']
[size=4][background=transparent]getServletContext[/background][/size][size=4][background=transparent]() e method use cheyyalante na class HttpServlet class ni extend cheyyala? :o[/background][/size]
I don't have this method in my code :(
[size=4][background=transparent]I'm[/background][/size]
[/quote]

no "getSerlvetContext()" is part of "GenericServlet" class. u can directly use that method for all the servlets

Posted

[quote name='Thingarodu' timestamp='1352433391' post='1302767584']
no "getSerlvetContext()" is part of "GenericServlet" class. u can directly use that method for all the servlets
[/quote]
nenu ee properties anni Service ane separate class lo raskuni akkada load chydaaniki try chesthunna.. ipudu e method ee separate class lo use cheyyalante compiler is asking to create getServletContext() metod first

Posted

[quote name='Hava5' timestamp='1352433523' post='1302767586']
nenu ee properties anni Service ane separate class lo raskuni akkada load chydaaniki try chesthunna.. ipudu e method ee separate class lo use cheyyalante compiler is asking to create getServletContext() metod first
[/quote]

ante nuvvu servlet lo load cheyyadaniki kada adigedi???

Posted

[quote name='Thingarodu' timestamp='1352433961' post='1302767606']

ante nuvvu servlet lo load cheyyadaniki kada adigedi???
[/quote]
servlets kaadhu.. properties file lo dbdrivers url and username pwrod unnayi :o

Posted

[quote name='Hava5' timestamp='1352434035' post='1302767608']
servlets kaadhu.. properties file lo dbdrivers url and username pwrod unnayi :o
[/quote]

asalu mee code lo servlets vunnaya??? oka vela vunte nuvvu create chesina servlet ni instantiate chesi, aa instantiate chesina servlet object nunchi "getServletContext()" method call cheyyi....

×
×
  • Create New...