Two Laptop Bag
The moose likes JSP and the fly likes Calling class in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Calling class in jsp" Watch "Calling class in jsp" New topic

Calling class in jsp

Naadir Peterson
Ranch Hand

Joined: Sep 22, 2004
Posts: 37
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...

sanjeevmehra mehra
Ranch Hand

Joined: Aug 21, 2004
Posts: 75
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,
[ September 29, 2004: Message edited by: sanjeevmehra mehra ]

thanks & regards,<br />Sanjeev.
Naadir Peterson
Ranch Hand

Joined: Sep 22, 2004
Posts: 37
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

Joined: Feb 13, 2004
Posts: 243
Could you post the code you are having trouble with??
Prathiba Kalirengan

Joined: Aug 30, 2004
Posts: 12
For using JSP beans u need to have a constructor with no arguments..
Is this the problem?

Senthil B Kumar
Ranch Hand

Joined: Feb 09, 2004
Posts: 160
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 ?

Work like you don't need the money. Love like you've never been hated. Dance like nobody's watching. Sing like nobody's listening. Live like it's Heaven on Earth.
Currently I Reside Here WEBlog
Consider Paul's rocket mass heater.
subject: Calling class in jsp
It's not a secret anymore!