简体   繁体   中英

How to embed java application into a jsp page

I have a simple java application and want to embed it into a jsp page. At the minute it takes a parameter at the command line, is it possible to pass the parameter from the web page, if so how?

Thanks

~ Kyle G

It's not clear whether you want to make this an applet (I'm guessing you do).

If so, Sun's applet tutorial has a section on converting applications to applets.

This should be the link to your little app:

www.yourpage.com/index.jsp?item=myitem

and in your index.jsp you can get it in this way:

...
This is the item passed by GET:
<%= request.getParameter("item") 
//your code here
%>
...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM