Pl help ! ! Opening a servlet URL using stand aline java application
Hi Guys, I have a standalone java application. This application will get executed after some by some thread. What I want to do is when this java application is executed, automatically open a URL in internet explorer which is of my servler/jsp and pass the parameters to this servlet/jsp. This servler jsp will intern use EJB and other services to get the data and display it.
How should I automatically open a IE window and pass parameters using this standalone application.
Pl help ! ! !
thanks , Ava
do you want to open internet explorer, or just access the servlet without internet explorer?
if you want to use internet explorer, you'd want to use
Runtime.exec,
if you want to access the Servlet w/o ie, you would use
URL, and HttpURLConnection classes
Similar Messages
-
Open Internet Explorer URL using MII Transaction
Hello All,
I wanted to know if there is a way to open internet explorer URL using MII transaction. I know how to do it using irpt but was wondering if there is a way of doing it using MII transaction action blocks. I was planning to provide access to provide path for iexplorer.exe and then open url like "http://www.google.com" on it.
I appreciate your help with it.
Thanks,
KiranHi Kiran,
You want to load a page into a transaction? for this you can use the action block called HTML_Loader and link www.google.com with HTML_Loader_0.SourceUrl.
Danilo Santos -
How to call a stand alone java application from ADF BC JSP, struts or JSF
Hi,
My requirement is that there are utilities or stand alone java applications that I want to call from our existing applications.
We have two seperate applications one ADF BC Struts application we developed using JDeveloper 10.1.2 and another ADF BC JSF application we developed using JDeveloper 10.1.3.2.
We want to integrate applications like JTwain and others to help us in scanning. The application will be placed on the same server as our application. How can I do this without loosing all the current session information.
Please help.
Thanks and regards,There are two possible solutions.
First, if the tool or application you want to integrate, has an Java-API you can use this api and integrate the tool in your application (using one or more jars you add to the classpath).
Second, if the tool has no java api, you can call the tool via runtime.exec(...) as a shell process. This way you open a command shell in you application and execute the tool like you do on a normal command shell.
For tide integration and control I recommend the first approach. The second one is only for those tools which don't offer a java api.
Timo -
Tutorial to use JFreeChart in Java Application
Dear Friends,
Can anyone Please help me to provide a complete tutorial on using JFreeChart in Java Applicaion.That is, How can I use JFreeChart in Java Application.
Thank u.http://www.jfree.org/jfreechart/devguide.html
-
Http post to a url from a WebDynpro (Java) application
Hi,
I want to send http post parameters to a url from a WebDynpro (Java) component. I need to do this to send OCI catalog data back to SAP SRM.
I found this thread:
HTTP Post
which suggests to use the the Suspend plug for this purpose.
<quote>
Sending POST parameters with Web Dynpro Suspend Plugs
1) Define a an additional Suspend Plug parameter (besides 'Url' of type String) with name 'postParams' and of type Map
</quote>
After adding the postParams parameter of type java.util.Map to the Suspend-plug the WebDynpro gives the following error during build:
Outbound plug (of type 'Suspend') 'suspend_plug' may have at most two parameters: 'url' of type 'string' and 'postParams' of type 'Map'.
I use SAP NetWeaver Developer Studio version 7.0.16.
Does someone know a solution? I would highly appreciate it.
Thanks in advance.
EricHi,
Please have a look at this thread,
Pass Table as Input to Adaptive RFC
Regards,
Saravanan K -
How to use pda with java application
hi all,
i m new to J2ME technology. i have never worked on it. now i want to create java application which communicates with PDA.
can anyone pls provide me the tutorial link for the same. i m looking in the google but till now i have not got any thing which will give me example of java applicatiion with PDA.
pls help me out guys.
thnx in adv.
regards
rituhello all,
i am new to PDA developemt
i want to create a application in java for PDA using win CE tomcatspring framework
pls send me some site that have sample code for creating applincation for PDA using java.
thanks -
Can we wrap a RFC as webservice and use from external java application ?
Hi Friends ,
Our scenario is call a webservice ( wrapped form of RFC) from a external java application which will pass the input to that webservice and get back the result .
How XI will play a role here ?
Can we wrap a rfc as web service ?
Any blogs for that ?
Can you please give a brief details about this ?
Expecting yoour asap
Best Regards .,
V.RangarajanHi
Can we wrap a rfc as web service ?
Yes.
<i>To use the SAP Web AS 6.40 you need to build a wrapper in the 6.40 system. This is a remote function call (RFC) enabled function module with the same interface or a similar interface that internally calls the required RFC-enabled function module in the old 4.6x system via RFC. The wrapper then can be exposed to the outside world as a Web service. Another option is to use the Integration Broker capabilities for calling Web services in an older system.</i>
How XI will play a role here ?
XI will pass the input to the external java application and get back the result to the webservice
regards
krishna -
How to use Entrust with java application on unix platform
Hi all,
i have question regarding the use of Entrust with java application on unix
1)I want to use Entrust for encryption/decryption of the file in my core java application on unix platform.
What should be requiremnet for the same and how it is implemented?.
2) I want to Use Entrust for Authentication purpose in my java based web application on unix platform.
What are requirements for Entrust Authentication and how it is implemented ?any one has solution?
-
Using wget in java application
Hello.
I want use 'wget' command from my Java application
for 'wget' i created command as String type.
Here is it
String url_str=wget --post-data "year=2009&month=08&day=01&time=0&profile=1&start=0&stop=1000&step=50&par=&format=0&vars=01&vars=02" http://testsite.com/cgi/script.cgi -O /home/user/test_wget.txt
then i use it in exec method
try{
Runtime rt = Runtime.getRuntime();
Process p = rt.exec(url_str);
p.waitFor();
BufferedReader r = new BufferedReader(
new InputStreamReader(p.getErrorStream()));
String s;
while ((s = r.readLine())!=null) {
System.out.println( s );
r.close();
catch (IOException e){
// TODO Auto-generated catch block
e.printStackTrace();
catch ( InterruptedException e ) {
e.printStackTrace();
after running the file test_wget.txt hold
Error
Wrong key: not alpha/numerical characters
however, if i use my url_str from Linux command line
test_wget.txt is hold usefull data.
So, how working correct with wget from Java application?
Thanks for any replysSo, how working correct with wget from Java application?You don't use it; you use Apache HttpClient in stead which can do exactly the same and more without you needing to call platform specific command line tools.
In any case if you must go down this path, read this article front to back:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html -
Reducing memory use in large Java application
Hello,
I've read through many of the threads on memory optimization in Java and am still puzzled about one thing:
I've got a large Java application that uses around 45,000 kb of memory (according to the Windows Task Manager) when it first starts up. If I reduce the program window and then restore it, the memory use comes down to about 25,000 kb, and stays down, even when the program is in regular use.
Two questions about this:
1) Why does reducing and restoring the program have this effect?
2) Is there any way I can duplicate this effect automatically, so that the program starts off using the smaller amount of memory?
And a final question: does anyone have any recommendations regarding the several commercial products that are available for optimizing memory use in Java apps?
Many thanks!
David Porterthis effect (minimize application window, rsize it again) is not a Java but a Windows problem. It also works for pure WIndows applications - try it out!
reducing memory size is not a question of 3rd party java apps or APIS but the JVM and the coding style of the application programmer. -
Need Help Badly on Shopping Cart Using JSP And Java Servlet
Hi All,
This is the 1st time i am trying to create a shopping cart using JSP and Servlet.
I have read through a few acticles but i still do not get the whole idea of how it works.
Please guide me as i need help very badly.
Thanks.
This is one of the jsp page which displays the category of products user would like to buy : Products.jsp
<html>
<head>
<title>Purchase Order</title>
</head>
<body topmargin="30">
<table border="0" width="100%" id="table1" cellpadding="2">
<tr>
<td bgcolor="#990000" width="96">
<p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
Code</font></b></td>
<td bgcolor="#990000" width="260">
<p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
Description </font></b></td>
<td bgcolor="#990000" width="130">
<p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">Brand
</font></b></td>
<td bgcolor="#990000" width="146">
<p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">UOM
</font></b></td>
<td bgcolor="#990000" width="57">
<p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">Unit<br>
Price </font></b></td>
<td bgcolor="#990000" width="62">
<p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
Carton<br>
Price </font></b></td>
<td bgcolor="#990000" width="36">
<p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
Qty</font></b></td>
<td bgcolor="#990000" width="65">
<p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">Add<br>
To Cart</font></b></td>
</tr>
<tr>
<td align="center" width="96" bgcolor="#CCCCCC">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">123</font>
</td>
<td align="center" width="260" bgcolor="#CCCCCC">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">Tom Yam</font>
</td>
<td align="center" width="130" bgcolor="#CCCCCC">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">Nissin</font>
</td>
<td align="center" width="146" bgcolor="#CCCCCC">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">12 x 10's</font>
</td>
<td align="center" width="57" bgcolor="#CCCCCC">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">$3.85</font>
</td>
<td align="center" width="62" bgcolor="#CCCCCC">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">$46.2</font>
</td>
<td align="center" width="36" bgcolor="#CCCCCC">
<!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" -->
<p align="center"><input type="Integer" name="Q10005" size="1"></p>
</td>
<td align="center" width="65" bgcolor="#CCCCCC">
<p><input type="checkbox" name="checkbox" value="123"></p>
</tr>
<tr>
</table>
<table border="0" width="100%" id="table2">
<tr>
<td>
<div align="right">
<input type="hidden" name="hAction" value="AddToCart"/>
<input type=submit name="submit" value="Add To Cart"/>
</div>
</td>
</tr>
</table>
</body>
</html>
After user has make his selection by entering the qty and ticking on the check box, he would click the "Add To Cart" button ... and this would call my servlet : AddToAddControlSerlvet.java
import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
public class AddToCartControlServlet extends HttpServlet
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException,IOException
String action = req.getParameter("hAction");
if (action.equals("AddToCart"))
addToCart(req,res);
public void addToCart(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
try
String url = "";
String[] addList = req.getParameterValues("checkbox");
HttpSession sess = req.getSession(true);
//String sessionID = sess.getId();
DBClass dbClass = new DBClass();
ArrayList cartList = new ArrayList();
for (int i = 0; i < addList.length; i++)
String productCode = (String)addList;
int qty = Integer.parseInt(req.getParameter("Q"+productCode));
Products product = dbClass.getProductDetail(productCode);
double totalUnitAmt = qty * product.getUnitPrice();
double totalCartonAmt = qty * product.getCartonPrice();
Order order = new Order(product.getProductCode(),product.getProductDesc(),product.getBrandName(),product.getUom(),qty,product.getUnitPrice(),product.getCartonPrice(),totalUnitAmt,totalCartonAmt);
cartList.add(order);
sess.setAttribute("cartList", cartList);
url = "/Cart/CartDetails.jsp";
ServletContext sc = getServletContext();
RequestDispatcher rd = sc.getRequestDispatcher(url);
rd.forward(req, res);
catch (Exception e)
System.out.println(e);
From here, i would get the list of items which user has selected and add to the cartList, then i would direct the user to CartDetails.jsp which displayed the items user has selected.
From there, user would be able to remove or to continue shopping by selecting other category.
How i do store all the items user has selected ... everytime he would wan to view his cart ...
As i would be calling from jsp to servlet .. or jsp to servlet ... and i do not know how i should go about in creating the shopping cart.Hi !
Yon can use a data structure as vector and store the items selected by the user into the vector . Keep the vector in session using session object , so the user can access the entire shopping cart from anywhere in the application .
Then , you can change the cart accordingly .
Hope this works.
Cheers ,
Pranav -
Printing PDF by using ActiveX in java application
Hi All,
I'm working on an application that creates pdf documents. The aim is to make a silent printing of these documents so without any user action.
I tried several solution. I tried PrintJob from javax.print and Desktop from java.awt. I'm not satisfy by these both solution.
So now I would like to use Acrobat through the COM interface.
Could you indicate to me where I can find a documentation or some examples of implementtion about this interface and its usage into java. I googled but I found not example of implementaiton ?
Thanks
S.Ok .... .
I tried in java by using jacob the following code to use Acrobat but I found no information regarding the call of the Acrobat functions (open file, print file, ...)
My exemple is :
ComThread.InitSTA();
ActiveXComponent oAcroPDF = new ActiveXComponent("AcroPDF.PDF");
try {
oAcroPDF.invoke("LoadFile", fileName);
oAcroPDF.invoke("PrintAll"); -
Probleme with my InterMedia used in my JAVA application
Hi,
I wanted to import my OrdImage to my Java code using this code :
OrdImage imgObj = (OrdImage) rset.getORAData(1, OrdImage.getORADataFactory() );
But it doesnt know the method OrdImage.getORADataFactory(), when I checked all the methods available in my OrdImage Class, there is no getORADataFactory(), there is only getFactory() which didnt work, is there other methods or codes to deal with my probleme ?
ThanksTry to reset the phone by holding the sleep and home button for about 10sec, until the Apple logo comes back again. You will not lose any data by resetting, but it can cure some glitches.
If this does not help, setting it up as new device would be the next step:
How to erase your iOS device and then set it up as a new device or restore it from backups -
How to use beans in java application server 8.1?
i created a bean to use in a jsp page. then i copied the jsp page to "domains/domain1/docroot " directory and the class file to the "domains/domain1/lib/classes" folder. But now i can only access the jsp page the bean is not included in it. how can i do this without using deploying tool?
Can you repost this question in the AppServer forum?
http://swforum.sun.com/jive/category.jspa?categoryID=35 -
Help on accessing tables of SAP from the Java Application
Hi All
I want to access some tables available in SAP through my Java program. Do I have to write any code for database connectivity or straightaway I can write SQL statements in my Java code?
Can anyone please suggest the sample code for this?
Thanks in Advance,
Vijay.the above one is with out connection pool, check this with connection pool.
import com.sap.mw.jco.*;
public class JcoTest {
private static JCO.Client theConnection;
private static IRepository theRepository;
private static final String POOL_NAME = "myPool";
public static void main(String[] args) {
JCO.Pool connPool = JCO.getClientPoolManager().getPool(POOL_NAME);
if (connPool == null) {
JCO.addClientPool(POOL_NAME,
5, //number of connections in the pool
"client",
"username",
"paswword",
"EN",
"hostname",
"00");
theConnection = JCO.getClient(POOL_NAME);
retrieveRepository();
try {
JCO.Function function = getFunction("RFC_READ_TABLE");
JCO.ParameterList listParams = function.getImportParameterList();
listParams.setValue("BSAUTHORS", "QUERY_TABLE");
theConnection.execute(function);
JCO.Table tableList = function.getTableParameterList().getTable("DATA");
if (tableList.getNumRows() > 0) {
do {
for (JCO.FieldIterator fI = tableList.fields();
fI.hasMoreElements();)
JCO.Field tabField = fI.nextField();
System.out.println(tabField.getName()
+ ":t" +
tabField.getString());
System.out.println("n");
while (tableList.nextRow() == true);
catch (Exception ex) {
ex.printStackTrace();
JCO.releaseClient(theConnection);
private static void retrieveRepository() {
try {
theRepository = new JCO.Repository("saprep", theConnection);
catch (Exception ex)
System.out.println("failed to retrieve repository");
public static JCO.Function getFunction(String name) {
try {
return theRepository.getFunctionTemplate(name.toUpperCase()).getFunction();
catch (Exception ex) {
ex.printStackTrace();
return null;
Regards
vijay
Maybe you are looking for
-
Disclaimer: You try any and all troubleshooting at YOUR OWN RISK!! Here is my unofficial guide to the K8t Neo fisr2 If you Like It give it a thumbs up so it will stick out. I will warn you it is long and I will edit off and on. to add as needed. firs
-
The button is using javascript. I know I could use underscores and hyphens, but spaces would be best. All I see is how you can't use spaces in URLs, but this is a file name, so I don't understand why it converts it to %20.
-
Shared photo stream wrong / strange date
When adding photo's to a shared photo stream sometimes strange dates appear. The problem happens with scanned negatives. In my libarary I sort all photo's on date, so I have changed the date of all these scanned negatives and applied them to the orig
-
Here is my problem: 1. My images are slow to render in finder and every other program that uses finder. When you click on the file I have to wait for a long time for the photos to render. I'm getting a lot of beach balls. -Most of my images are RAW
-
Additional question: Can you share files on a Windows Network?
Is it possible to share your files on an iPad across my Windows network?