Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Troubles Calling An EJB From A JSP Page

0 views
Skip to first unread message

Lee Theobald

unread,
May 28, 2003, 1:22:09 PM5/28/03
to

HI,

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,

Rob Woollen

unread,
May 28, 2003, 1:10:58 PM5/28/03
to
Lee Theobald wrote:
> HI,
>
> 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.

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

Deyan D. Bektchiev

unread,
May 28, 2003, 7:10:04 PM5/28/03
to
>
>
>>>b) Tell me what this error means. This is from the EJB2JSP tool.
>>>
>>>I suspect the problem is javac is not in your path.
>>>
>>>
>
>I doubt it could be that, but I'll check when I get back in the office tomorrow.
>
It is probably that since the definition in errno.h is:

#define ENOENT 2 /* No such file or directory */


--dejan

Lee Theobald

unread,
May 28, 2003, 7:45:15 PM5/28/03
to

>>b) Tell me what this error means. This is from the EJB2JSP tool.
>>
>>I suspect the problem is javac is not in your path.

I doubt it could be that, but I'll check when I get back in the office tomorrow.

Lee Theobald

unread,
May 29, 2003, 5:29:13 AM5/29/03
to

Yep you were right. My PATH variable was a bit screwed up - missing semicolon
screwing things up.

Cheers all for the help,

Lee :)

0 new messages