Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How to run DOS command, get and display local folder image on JSP page?

Avatar of techques
techques asked on
JSPJava EE
4 Comments1 Solution982 ViewsLast Modified:
Hi

I need to run the following dos command in jsp:

1. exec C:\Graphviz\bin\dot.exe

2. java GM_Show_Graph list allProductList //list out all product in sequential order under product folder

3. java GM_Show_Graph productid + id graphFile productid //where id is a get parameter when <a href=graph.jsp?id=<10>>click</a>

4. run dot to create jpg image on local folder under C:\tmp

Process process = Runtime.getRuntime().exec("dot -Tjpg -o + Graph_FILE_NAME + ".jpg " + Graph_FILE_NAME);
process.waitFor();
}

5. Display the C:\tmp\Graph_FILE_NAME.jpg on jsp page

How should I write the servlet code inside <% %> to run the DOS command and display the image on jsp page?
ASKER CERTIFIED SOLUTION
Avatar of -epoch-
-epoch-Flag of South Africa image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answers