Win a copy of Event Streams in Action this week in the Java in General forum!

alper kopuz

Greenhorn
+ Follow
since Mar 30, 2016
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by alper kopuz

I tried many things to send ID from view to controller but failed at Spring MVC. Could you please help me to fix it ? I think I catch a small thing.

View :
1 week ago
Hello

When I try to add dependency below to pom.xml such like below , it does not work ?

<dependency>
   <groupId>com.octo.captcha</groupId>
   <artifactId>jcaptcha</artifactId>
   <version>2.0-alpha-1</version>
</dependency>

Do you think jcaptcha does not work with the following version ?


Regards
Alper
2 years ago
Hello

I am using SpringMVC with thymeleaf library. Our all pages are in html format and we have to implement taglib tag to html. Do you think I can add

<%@taglib prefix="botDetect" uri="https://captcha.com/java/jsp"%>`
to html page.

Is there a way to add tag lib prefix and uri to simple html page ?

( <%@taglib prefix="botDetect" uri="https://captcha.com/java/jsp"%>)
to html page ?

Regards,
2 years ago
Hello

I can not see my image as a favIcon. I tried many things such like  converting it to png to ico, trying other conversion tools and tried to manipulate the code to get the favIcon. But still no success.

I guess problem is not related with the code because some images can be seen as a favIcon except my image. I do not know  how to convert it properly or to do to see my image as favIcon. You can see the snippet that I put between header in order to see the favIcon.

As I mentioned before, I can see the some icons as favIcon without any problem except my image. Please help.


2 years ago
I have a simple maven project (not a maven web project) and I want to use spring annotations in my code. I have successfully used spring-context and spring-core in my pom.xml and I defiened applicationContext.xml with . But I can not find or use org.springframework.stereotype (Service, Autowired Annotations) in my code. It is not possible to use such kind of Spring basic annotations if my project is not a web based project ?

Cheers

"Does not work" means it gives compile error . this is pom.xml 's dependency :

    <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-core</artifactId>
       <version>${spring.version}</version>
   </dependency>
   <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-context</artifactId>
       <version>${spring.version}</version>
   </dependency>
and this is my import which does not work

import org.springframework.stereotype
2 years ago
When I want to display an EXCEL file by SWT OleClient I get following error . Please help me



Error Message :

Exception in thread "main" org.eclipse.swt.SWTException: Class ID not found in registry
at org.eclipse.swt.ole.win32.OLE.error(OLE.java:317)
at org.eclipse.swt.ole.win32.OLE.error(OLE.java:283)
at org.eclipse.swt.ole.win32.OleClientSite.<init>(OleClientSite.java:226)
at infina.accounting.reports.views.ExcelDonusturView.main(ExcelDonusturView.java:438)
2 years ago
Hello Stefan

Thanks for your help.

Exactly it is same with "There is no application associated with the given file name extension". When I right click the html file, it does not have print operation on its context menu but it shows a print operation when it is txt file.

What I need to do to see print operation on its context menu when it comes to html file ? I can resolve it by showing default print operation to html files ?

Best Regards
Alper
2 years ago
Hello Stefan

Yes, I meant java.awt.desktop .

You are right but I did not give the full link of the test.html.Normally I write it like that, and it still gives same error. It means the error is not related with the path of the file but it is related with the type of the file called "html". It is able to print file when it is "txt"  but gives "a devices attached to the system is not functioning " error when type of the file is html.

Regards
Alper


Desktop desktop = Desktop.getDesktop();
FileSystem fileSystem   = FileSystem.getDefault();
File file  = new File("C:\test.html")
desktop.print(file);
2 years ago
When I try to print a html file by using Desktop.print I come across with the following error. I have seen similar and sometimes same questions in the forum but unfortunately noone provided an answer for the problem.Any help is appreciated.It is fine when you try to print a txt file but when it comes to print a html file, it gives following error.

Regards

Alper

     Desktop desktop = Desktop.getDesktop();
     desktop.print("test.html");


"Error message: A device attached to the system is not functioning."
2 years ago

alper kopuz wrote:When I try to print my document I come across with that error :

" A device attached to the system is not functioning.

Could you please help me to fix this issue ? Here is the code that I use for print:

         

2 years ago
When I try to print my document I come across with that error :

" A device attached to the system is not functioning.

Could you please help me to fix this issue ? Here is the code that I use for print:

             Desktop desktop = Desktop.getDesktop();
if (desktop.isSupported(Desktop.Action.PRINT)) {
desktop.print(new File(dosyaURL));
}
2 years ago
Hello

I come across with the following error when I try to sign my document. The reason is about security or something else ? I am using JRE 8 .

Could you please help me to fix this issue ?

Regards Alper

  Caused by: java.security.ProviderException: Initialization failed
at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:376)
at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:107)
... 72 more
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_FUNCTION_FAILED
at sun.security.pkcs11.wrapper.PKCS11.C_Initialize(Native Method)
at sun.security.pkcs11.wrapper.PKCS11$SynchronizedPKCS11.C_Initialize(PKCS11.java:1545)
at sun.security.pkcs11.wrapper.PKCS11.getInstance(PKCS11.java:157)
at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:330)
... 73 more
2 years ago
I need to read from an html page and print out it. This html page includes lots of xml values such like Doc1. I can view html file successfully in HTML and print it without any problem from browser. When I try to print out it by Java code, it prints out but unfortunately I come across with xml codes such like Doc . What I need to do to print out it as a clear page such like I printed out it from browser? Here is the sample code that I use for print out. I appreciate your help from now on. Thanks guys

Thanks
Alper


2 years ago
Thanks god. We have been looking such kind of a book for ages.

Alper Kopuz
Hello

I have been trying to work my SprinHibernate Web Sample in eclipse by tomcat. Unfortunately,  I got following warning.


WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/SpringMVCHibernate/] in DispatcherServlet with name 'appServlet'


What I need to do for the warning ? As far as I see , I could not see an exact solution for that. I will be appreciated if you can help me.

This is my web.xml





This is servelet-context.xml