• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

execute class form from jsp

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

I have a class named main_form.class that i would like to call on button click of my JSP page. How would i do that... any ideas...???

Please help..
[ March 20, 2005: Message edited by: Bear Bibeault ]
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is your main_form Class a Servlet? If it isn't then you can't call it in respose to an HTTP request (your button click).
 
Rekha Pande
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my main_form is a normal java class and not any servlet or JSP.


i dont know whether this would be the right approach but if i call the Runtime execution in my JSP and execute the program my passing the command line string to execue my java class file..then will it not work...?

I don't have much idea about it..

Is it possible that i make my java class file an exe .. and then run the exe on my button click in JSP...???
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does your main_form class do?
 
Ranch Hand
Posts: 489
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does your main_form.class do ?
Surely there should be better approaches than invoking a java class that's not a servlet on form submit (if such is possible at all, in first case)

ram.
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Originally posted by Paul Sturrock
----------------------------------
What does your main_form class do?
----------------------------------



oops, looks like Paul beat me to it

ram.
 
Rekha Pande
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

ok..it was just some thing new that i was trying on a test basis and its working now.

I have this jsp page where their are many links and around 6 buttons. On each button click the page gets fwd to another JSP page. For the last button.. i.e. the change personal information button i wanted to call a GUI form which i created through the main_form.class ..
and in this form the users personal details are displayed where if he wants he can change it.

Well i have been able to call the class form on the button click in my JSP.
Now im facing only one problem .. hope some one out there can help me..

When i click on the button, the form is opened, but it doesnot come as the top most form. It is minimized. But on subsequent click on the Button that is there in my JSP, the form is displayed on screen.

Can any one tell me, how can i make my class form to come in front of the user, rather than it being displayed in minimized way.

Thanxs
 
Rekha Pande
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im facing another problem. When i click on the JSP button on MY pc ... every thing seems to be working fine, but now when i try to access the JSP page from another persons PC.. then , at that time, If i try to access the GUI form, it opens on MY PC and not on the users Pc. Y is it so..???

Please help..!
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to combine a Java GUI (Swing or AWT) with HTML in a web environment, you will need to use applets. It's working on your own machine because the webapp and the gui code are on the same machine. How would a client fire up a GUI screen if the application is not on their machine?
 
Rekha Pande
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok let me try doing it from an applet...and see what happens...!
 
Those who dance are thought mad by those who hear not the music. This tiny ad plays the bagpipes:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic