• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP loading a dll  RSS feed

 
Tempora Telora
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am trying to do a system.load(D:\this\that\blah.dll)

When i do this it says that "JSPG0059E: Unable to compile class for JSP ". This is running on a webbased platform obviously should i have some type of http in front of it? I know my location of this load command is in the wrong place. In which jsp should I be trying ot load this dll?

Randy
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. The path to the DLL should not have a HTTP: in front of it - you are loading a native library from the server's file system - not accessing a resource through a URL.

2. Is the path to the DLL correct? If you are using "\", remember this is the start of an escape sequence in Java - use "\\" or "/" instead.

3. Is there any further information on why the JSP was unable to be compiled? This would probably help you figure out what was not working...

4. JSPs are supposed to just provide presentation... loading a DLL in one doesn't seem like the best design decision...
 
Tempora Telora
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am just trying to load the dll to see if this is going to work. I was thrown on mid of the project and I noticed that this dll is not getting loaded.

1. When loading the dll it is a string so java should not have a problem with it.

2. There are no other errors in my code. If i comment the line out it works.. If i uncomment it doesnt work.

I dont really know why it will not load the dll though. I am use an absolute path and i have tried using hte system.loadlibrary command as well.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry - I think I misunderstood - when you wrote "some type of http in front of it" I thought you meant putting "http://" in front of the path to the DLL... did you mean what you should put around the code in the page instead?

You should use a JSP declaration tag (<%! ... %>) to include the code to load the library in your page, something like:



(Though again, doing this in a JSP isn't a good design decision...)
[ June 05, 2006: Message edited by: Nathan Pruett ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66306
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've moved this to Java in General (intermediate) since doing this from a JSP (I'll echo that I don't think that's a good idea) is no different from any other Java program.
 
Tempora Telora
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Error 500: com/sun/xml/rpc/client/BasicService

Is my current error. It occurs when I try and warp and call a class using the (Service)class.forname(etc)

I have googled everywhere but, this is throwing me for a loop and i didnt want to repost
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!