This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

peter wong ka chon

Ranch Hand
+ Follow
since Jul 28, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by peter wong ka chon

Hello, is this exam still in beta ?

Thanks.
I have an idea like pass the current page (page="user") as parameter to LocaleAction and the LocaleAction will redirect to the respective page.

I had solved it using the above idea with static mapping on each jsp and lookup using LocaleAction then based on the param return the appropriate string result. Any better idea?
7 years ago
I had implemented Struts2 localization from Localization 1 and Localization 2 but both of these tutorial only show how to redirect to the index.jsp which different from my requirement.

My requirement is when user clicks the localization link at addCustomer.jsp, user will redirect to addCustomer.jsp with selected locale rather than to default pages (index.jsp).

How to achieve this?

Thanks.
7 years ago

Runrioter Wung wrote:Hi,I think you should add a file named "struts.xml" in the path of "WEB-INF/classes"



I using annotation approach rather than xml mapping approach.
7 years ago
Hello to all, i tried to code the following simple struts but encounter this error during run time.



index.jsp


LoginAction.java


web.xml


Besides the runtime error, there is deployment error which is


AFAIK, the scanning methodology of struts will scan the default packages named struts2 for any annotated class but i have instructed struts2 to scan in com.peter.action using init-param but still unable to find the class. It is pretty weird.

Please help.

Thanks.
7 years ago

I'm tried to develop a Java EE application that connect to Oracel database fromw eb service class but there is SQLException: No suitable driver found for jdbc:oracle:thin:@//localhost:1521/orcl.

I have the ojdbc6.jar in the class path and i verified this in the jboss as deployment folder.

My application is EAR composes a war.

What wrong (root cause) with this?

Please help.

Thanks.
Hello to all, I'm tried to develop a web service application that utilize EJB function inside web service class but the EJB object is null during run time.

I'm configure the web service using Spring Application Context. Is there any problem with it?

Code:


Web.xml


Beans.xml


What is the reason the ejb ojbect is null? Is it relate to Spring DI of CreditCardService class but does not instantiate the ejb object?

What is the purpose of CXF servlet? Is it use to handle web service request?

Please help.

Thanks.










7 years ago
Problem solve by remove the generation of RequestWrapper and deployment success.
7 years ago
I'm tried to add the IBM Websphere V8.5 Full profile but it say cannot enable security on the server and must use the IBM JRE 6 above. Please help to solve this problem
7 years ago
I had tried to develop a web service using eclipse indigo but there is error after generating wsdl file (java2ws) it display error on Test Service Explorere wizard which result previous generate wsdl file been erase. Thus, I'm manually copy the wsdl file to temp folder and copy back to the desire folder but following error is display when invoke from browser.

Error: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. org.apache.cxf.jaxws.ServiceImpl.(ServiceImpl.java:149) org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:90) javax.xml.ws.Service.(Service.java:57) javax.xml.ws.Service.create(Service.java:687) com.peter.client.CreditCardServiceClient.createServiceClient(CreditCardServiceClient.java:43) com.peter.controller.CreditCardController.doPost(CreditCardController.java:106) javax.servlet.http.HttpServlet.service(HttpServlet.java:754) javax.servlet.http.HttpServlet.service(HttpServlet.java:847) root cause

org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. org.apache.cxf.wsdl11.WSDLServiceFactory.(WSDLServiceFactory.java:94) org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:203) org.apache.cxf.jaxws.ServiceImpl.(ServiceImpl.java:147) org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:90) javax.xml.ws.Service.(Service.java:57) javax.xml.ws.Service.create(Service.java:687) com.peter.client.CreditCardServiceClient.createServiceClient(CreditCardServiceClient.java:43) com.peter.controller.CreditCardController.doPost(CreditCardController.java:106) javax.servlet.http.HttpServlet.service(HttpServlet.java:754) javax.servlet.http.HttpServlet.service(HttpServlet.java:847) root cause

javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'localhost:8080/CreditCardService/CreditcardService?WSDL'.: java.io.FileNotFoundException: localhost:8080/CreditCardService/CreditcardService?WSDL com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source) com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:239) org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:186) org.apache.cxf.wsdl11.WSDLServiceFactory.(WSDLServiceFactory.java:92) org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:203) org.apache.cxf.jaxws.ServiceImpl.(ServiceImpl.java:147) org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:90) javax.xml.ws.Service.(Service.java:57) javax.xml.ws.Service.create(Service.java:687) com.peter.client.CreditCardServiceClient.createServiceClient(CreditCardServiceClient.java:43) com.peter.controller.CreditCardController.doPost(CreditCardController.java:106) javax.servlet.http.HttpServlet.service(HttpServlet.java:754) javax.servlet.http.HttpServlet.service(HttpServlet.java:847) root cause

java.io.FileNotFoundException: localhost:8080/CreditCardService/CreditcardService?WSDL sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1434) org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:986) org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:143) org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:802) org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768) org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230) org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285) com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source) com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:239) org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:186) org.apache.cxf.wsdl11.WSDLServiceFactory.(WSDLServiceFactory.java:92) org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:203) org.apache.cxf.jaxws.ServiceImpl.(ServiceImpl.java:147) org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:90) javax.xml.ws.Service.(Service.java:57) javax.xml.ws.Service.create(Service.java:687) com.peter.client.CreditCardServiceClient.createServiceClient(CreditCardServiceClient.java:43) com.peter.controller.CreditCardController.doPost(CreditCardController.java:106) javax.servlet.http.HttpServlet.service(HttpServlet.java:754) javax.servlet.http.HttpServlet.service(HttpServlet.java:847) note The full stack trace of the root cause is available in the JBoss Web/7.0.13.Final logs.

Is there a way to generate wsdl manually?

I tried typing the java2s but it say the command is not recognize as internal program.

Please help.

Thanks.

http://stackoverflow.com/questions/12072001/cxf-web-service-wsdl-file-not-found-exception
7 years ago
Hello to all, I tried to start the Websphere server but due to unable to switch on the security on Websphere server. Thus, unable to start the server.

It say uses the IBM jre 6 but i uses the default jre from the Websphere installation folder.

Please help.

Thanks.
7 years ago
Hello to all, I tried to add the IBM WAS V8.5 to eclipse Indigo but it failed with following error message:

Missing lib/features folder when i select the C:\Program Files\IBM\WebSphere\AppServer path in eclipse.

I had installed the IBM Websphere WAS Liberty Profile Adapter into eclipse.

Please help.
7 years ago