Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling class in jsp

 
Naadir Peterson
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i made a class thar take 3 arguments in the constructor.. which inturn writes this to a log file on the c: drive...

userLog ul = new userLog(arg1, arg2, arg3);

when i test it using small program i wrote it works fine..
but when i import the class on a jsp page and try to use it nothing happens... the file isnt created or nothing gets appended to the file...

thanks
 
sanjeevmehra mehra
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
may be you are not able to catch the exception which is getting raised either before using that class or while using that class.
it's just a wild guess.


thanks & regards,
sanjeev.
[ September 29, 2004: Message edited by: sanjeevmehra mehra ]
 
Naadir Peterson
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nothing happens...

i put it in a try catch block and it never caught anything...

it does work wen i use it in a normal java program...
 
Vijay Vaddem
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you post the code you are having trouble with??
 
Prathiba Kalirengan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For using JSP beans u need to have a constructor with no arguments..
Is this the problem?
 
Senthil B Kumar
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i guess there is some problem with the path in which your file is created. just check it. its an relative path or an absolute path, how are you doing it ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic