• Post Reply Bookmark Topic Watch Topic
  • New Topic

send data to jsp from swings

 
johny sill
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want send arraylist to jsp,

I write code like this


menu=new JPopupMenu();
if(flag==true)
{
menu.add(new AbstractAction("Registration")
{
public void actionPerformed(ActionEvent e)
{
NewWindow("http://localhost:8888/prototype/Reception/reception_registration_ipregistration.jsp"); }
});
menu.addSeparator();
menu.add(new AbstractAction("Allocation")
{
public void actionPerformed(ActionEvent e) { NewWindow("http://localhost:8888/prototype/Clinicalwards/wards_bedmanagement_badallocation.html"); }
});
menu.addSeparator();
menu.add(new AbstractAction("Change Status")
{
public void actionPerformed(ActionEvent e) { NewWindow(""); }
});
menu.show(moe.getComponent(),moe.getX(), moe.getY());


void NewWindow(String str)
{
try{
URL url=new URL(str);
AppletContext context=getAppletContext();
context.showDocument(url,"_blank");
}
catch(Exception e)
{
e.printStackTrace();
}
}

i set all html in tomcat server,

my swing application is in Jboss.

How to send arraylist to jsp which is in tomcat,

Help me,

Thanks in advance
 
Ajit Malleri
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Send the values in the query string.

e.g.

http://localhost:8888/prototype/Reception/reception_registration_ipregistration.jsp?array1=383&array2=583

and get the parameters in your jsp.

Regards,

Ajit
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!