I've been looking into how to call methods from an EJB via a JSP page. SO far
I haven't had much lucky. The furthest I've got so far is finding that WebLogic
has a tool to create custom tag libraries (EJB2JSP), and then getting errors using
it :(
Could somebody please either :
a) Point me towards some good tutorials on how to use EJB's from JSP pages.
In simple terms, would be good.
b) Tell me what this error means. This is from the EJB2JSP tool.
compilation failed:
---
java.io.IOException: CreateProcess: javac -classpath C:\j2sdk1.4.1_02\lib;C:\java\AppProp;C:\bea\weblogic700\server\lib\weblogic.jar;C:\bea\user_projects\ltdev\libs\cabinClassInfo.jar;C:\SourceCode\jbproject\BeanTester\BeanTester\WEB-INF\classes
-d C:\SourceCode\jbproject\BeanTester\BeanTester\WEB-INF\classes @C:\DOCUME~1\Theobl\LOCALS~1\Temp\compileList47659.tmp
error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:63)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:491)
at java.lang.Runtime.exec(Runtime.java:457)
at weblogic.utils.Executable.exec(Executable.java:208)
at weblogic.utils.Executable.exec(Executable.java:133)
at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:572)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:373)
at weblogic.servlet.ejb2jsp.Utils.compile(Utils.java:112)
at weblogic.servlet.ejb2jsp.gui.Main.doCompile(Main.java:261)
at weblogic.servlet.ejb2jsp.gui.Main$6.run(Main.java:577)
at weblogic.servlet.ejb2jsp.gui.MainWorker.run(Main.java:757)
at java.lang.Thread.run(Thread.java:536)
---
java.io.IOException: Compiler failed executable.exec(java.lang.String[javac, -classpath,
C:\j2sdk1.4.1_02\lib;C:\java\AppProp;C:\bea\weblogic700\server\lib\weblogic.jar;C:\bea\user_projects\ltdev\libs\cabinClassInfo.jar;C:\SourceCode\jbproject\BeanTester\BeanTester\WEB-INF\classes,
-d, C:\SourceCode\jbproject\BeanTester\BeanTester\WEB-INF\classes, @C:\DOCUME~1\Theobl\LOCALS~1\Temp\compileList47659.tmp])
Thanks for any help
Lee,
There's lots of ways to do it. You could write java code either in your
JSP, a servlet, a tag library etc that calls the EJB. If you're going
this route, you might want to look at something like struts to abstract
your code a bit better.
Another means is to use the ejb2jsp tool which will generate a tag
library for your ejb.
>
> b) Tell me what this error means. This is from the EJB2JSP tool.
>
I suspect the problem is javac is not in your path.
-- Rob
#define ENOENT 2 /* No such file or directory */
--dejan
I doubt it could be that, but I'll check when I get back in the office tomorrow.
Cheers all for the help,
Lee :)