Parametry se předávají jako atributy tagu embed. <embed java_version='1.6+' SessionID='ashdgalsjdgalsjdg' pluginspage=' http://java.com/en/download/index.jsp' contextPath='/xxxxxx' jnlp_href=' applet-ef-505.jnlp' java_codebase='/xxxxxx/applet' SSID=' 1un84fWHfI91mFK1EqOe2bnet7itIOCU' submitPath='/servlet/epsubmit' type=' application/x-java-applet;version=1.6'></embed> Třeba takhle předáváme do appletu parametry SessionID, SSID, contextPath a submitPath.
Filip Jirsák 2014-05-28 20:04 GMT+02:00 Lucie Rút Bittnerová <lu...@mathan.cz>: > Diky za odpoved, > > sice jsem to rozchodila i bez JNLP (nakonec staci, kdyz se do manifestu > vsech knihoven prida Trusted-Library: true a vsechny se podepisi, idealne > s nejakym oficialnim certifikatem), ale rada bych, aby to fungovalo i s > JNLP kvuli nastaveni presne minimalni verze Javy vcetne cisla updatu. A u > JNLP jsem narazila na to, ze kdyz tam predavam parametry pres detske > elementy param, tak se do apletu nepredaji. Jaky je spravny zpusob > predavani parametru v elementu embed? > > Lucie > > Dne 19.5.2014 13:36, Filip Jirsák napsal(a): > > Zdravím, > pro plugin nové generace by měl být i applet definován JNLP souborem. Aby > byla aplikace považována za důvěryhodnou, musí pak být JNLP soubor v > nezměněné podobě součástí hlavního podepsaného JARu v souboru > JNLP-INF/APPLICATION.JNLP Ten JNLP soubor může vypadat např. takhle: > > <?xml version="1.0" encoding="UTF-8"?> > <jnlp spec="1.0+" href="applet-ef-505.jnlp" codebase="https://…"<https://…> > > > <information> > <title>…</title> > <vendor>…</vendor> > </information> > <security> > <all-permissions/> > </security> > <resources> > <j2se href="http://java.sun.com/products/autodl/j2se" version="1.6+"/> > <jar href="epd_applet_boot-505.jar" main="true"/> > <jar href="epd_applet-505.jar"/> > <jar href="epd_applet_ef-505.jar"/> > <jar href="commons-httpclient-3.0.1.jar"/> > <jar href="commons-codec-1.6.jar"/> > <jar href="slf4j-api-1.7.5.jar"/> > <jar href="epd_applet_boot-505.jar"/> > </resources> > <applet-desc height="500" name="…" width="500" > main-class="cz.….applet.boot.Applet"/> > </jnlp> > > V HTML kódu je pak applet vložen takto: > <embed serverHost='https://…' java_version='1.6+' pluginspage=' > http://java.com/en/download/index.jsp' jnlp_href='applet-ef-505.jnlp' > java_codebase='/context/applet' > type='application/x-java-applet;version=1.6'></embed> > > Filip Jirsák > > > 2014-05-19 10:09 GMT+02:00 Lucie Rút Bittnerová <lu...@mathan.cz>: > >> Ahoj, >> >> nemate nejaky postup, jake atributy dat do manifestu a co kde nastavit, >> aby fungoval aplet, ktery potrebuje i pro jary knihoven all-permissions, i >> na Jave 1.7u51 a vyssi? Zatim mi aplet funguje pouze v IE, kdyz v Java >> Control Panelu nemam zaskrtnuto "Enable the next-generation Java Plug-in". >> Jak jsem pochopila, toto nastaveni pro Chrome a Firefox nema zadny efekt, >> takze bych potrebovala zaridit, aby aplet prosel i se zaskrtnutym "Enable >> the next-generation Java Plug-in". Aplikace se sklada z hlavniho jaru a >> nekolika knihoven. Hlavni jar se nacte, ale pri pokusu o nacteni tridy z >> jaru knihovny se vyhodi NoClassDefFaund exception, a to i kdyz jar knihovny >> podepisu s pouzitim stejneho certifikatu, jako pouzivam k podpisu hlavniho >> jaru (certifikat zalozeny na vlastni CA, jejiz korenovy certifikat jsem >> pridala pres Java Control Panel k duveryhodnym certifikatum). V manifestu >> hlavniho jaru mam Permissions: all-permissions, Trusted-Library: true, >> Codebase: *, Application-Library-Allowable-Codebase: *, >> Caller-Allowable-Codebase: *. Do jaru knihovny jsem zkousela pridat ruzne >> kombinace Permissions a Trusted-Library. >> >> Jedine reseni, co me napada, ze by mohlo fungovat, je prebalit vsechny >> jary do jednoho, ale do toho se mi nechce, musi to prece jit i jinak. >> >> Lucie >> >> Vypis z Java Console: >> >> Java Plug-in 10.55.2.13 >> Using JRE version 1.7.0_55-b13 Java HotSpot(TM) Client VM >> User home directory = C:\Users\hobit >> ---------------------------------------------------- >> c: clear console window >> f: finalize objects on finalization queue >> g: garbage collect >> h: display this help message >> l: dump classloader list >> m: print memory usage >> o: trigger logging >> q: hide console >> r: reload policy configuration >> s: dump system and deployment properties >> t: dump thread list >> v: dump thread stack >> x: clear classloader cache >> 0-5: set trace level to <n> >> ---------------------------------------------------- >> Trace level set to 5: all ... completed.security: User has granted the >> privileges to the code for this session only >> security: Saving certificates in Deployment session certificate store >> security: Saved certificates in Deployment session certificate store >> security: SHA-256Certificate finger print: >> 36F270CCE07A4ED7BD7B079E76E878116569D9E35E246195CA999631B17D5886 >> security: Decision time stored for ai: Appinfo: >> type = 2 >> title = PdfSigner >> vendor = null >> from = http://localhost:8080/pdfsigner/lib/ami-crypto-1.0.jar >> security = 0 >> lapURL = http://localhost:8080/pdfsigner/lib//testapplet-object >> appArgs = ##docbase: >> http://localhost:8080/pdfsigner/##Parameters:{pluginspage=http://java.com/download/, >> java_arguments=, width=200, launchjnlp=, >> code=cz.ami.crypto.applet.PdfSignApplet, java_version=1.7.0_55, embedded=, >> __applet_ssv_version=1.7.0.55, id=testapplet-object, input= >> http://localhost:8080/pdfsigner/potvrzeni.pdf, height=50, >> __applet_relaunched=false, name=testapplet-object, >> archive=ami-crypto-1.0.jar, pdfbox-1.8.4.jar, commons-logging-1.0.4.jar, >> commons-collections-3.2.1.jar, bcprov-jdk15on-150.jar, >> bcpkix-jdk15on-150.jar, bcmail-jdk15on-150.jar, TableLayout.jar, output= >> http://adresa uploadu, codebase=/pdfsigner/lib} >> security: Grant socket perm for >> http://localhost:8080/pdfsigner/lib/ami-crypto-1.0.jar : >> java.security.Permissions@a7624e ( >> ("java.net.SocketPermission" "localhost" "connect,accept,resolve") >> ) >> >> security: Validate the certificate chain using CertPath API >> basic: Plugin2ClassLoader.getPermissions CeilingPolicy allPerms >> security: Validate the certificate chain using CertPath API >> ruleset: Non-jnlp rule id: >> title: testapplet-object >> location: http://localhost:8080/pdfsigner/ >> jar location: http://localhost:8080/pdfsigner/lib/ >> jar version: null >> isArtifact: true >> ruleset: finding Deployment Rule Set for >> title: testapplet-object >> location: http://localhost:8080/pdfsigner/ >> jar location: http://localhost:8080/pdfsigner/lib/ >> jar version: null >> isArtifact: true >> ruleset: no rule applies, returning Default Rule >> security: SSV validation: >> running: 1.7.0_55 >> requested: 1.7.0.55 >> range: null >> javaVersionParam: 1.7.0_55 >> Rule Set version: null >> network: Created version ID: 1.7.0.55 >> network: Created version ID: 1.7.0.55 >> security: continue with running version >> network: Created version ID: 1.7.0.55 >> network: Created version ID: 1.7 >> network: Created version ID: 2.2.55 >> preloader: Delivering: AppletInitEvent[type=CallConstructor] >> preloader: Start progressCheck thread >> security: blacklist: hasBeenModifiedSince 1400077393487 (we have >> 1399994886099) >> network: Cache entry found [url: >> http://localhost:8080/pdfsigner/lib/pdfbox-1.8.4.jar, version: null] >> prevalidated=false/0 >> cache: Adding MemoryCache entry: >> http://localhost:8080/pdfsigner/lib/pdfbox-1.8.4.jar >> cache: Resource http://localhost:8080/pdfsigner/lib/pdfbox-1.8.4.jar has >> expired. >> network: Connecting http://localhost:8080/pdfsigner/lib/pdfbox-1.8.4.jarwith >> proxy=DIRECT >> network: Connecting http://localhost:8080/ with proxy=DIRECT >> network: ResponseCode for >> http://localhost:8080/pdfsigner/lib/pdfbox-1.8.4.jar : 304 >> network: Encoding for >> http://localhost:8080/pdfsigner/lib/pdfbox-1.8.4.jar : null >> network: Disconnect connection to >> http://localhost:8080/pdfsigner/lib/pdfbox-1.8.4.jar >> cache: Read manifest for >> http://localhost:8080/pdfsigner/lib/pdfbox-1.8.4.jar: read=2794 >> full=43320 >> cache: Loading full manifest for >> http://localhost:8080/pdfsigner/lib/pdfbox-1.8.4.jarcache: Reading >> Signers from 4526 http://localhost:8080/pdfsigner/lib/pdfbox-1.8.4.jar | >> C:\Users\hobit\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\1\bfe4fc1-3fc24490.idx >> cache: Done readSigners( >> http://localhost:8080/pdfsigner/lib/pdfbox-1.8.4.jar) >> security: Trust for: http://localhost:8080/pdfsigner/lib/pdfbox-1.8.4.jarhas >> ended: Thu Jan 01 01:00:00 CET 1970 >> ruleset: Non-jnlp rule id: >> title: testapplet-object >> location: http://localhost:8080/pdfsigner/ >> jar location: >> http://localhost:8080/pdfsigner/lib/pdfbox-1.8.4.jar >> jar version: null >> isArtifact: true >> ruleset: finding Deployment Rule Set for >> title: testapplet-object >> location: http://localhost:8080/pdfsigner/ >> jar location: >> http://localhost:8080/pdfsigner/lib/pdfbox-1.8.4.jar >> jar version: null >> isArtifact: true >> ruleset: no rule applies, returning Default Rule >> security: Validate the certificate chain using CertPath API >> basic: exception: java.lang.NoClassDefFoundError: >> org/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureInterface. >> java.lang.RuntimeException: java.lang.NoClassDefFoundError: >> org/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureInterface >> at >> com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.instantiateApplet(Unknown >> Source) >> at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source) >> at >> sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown >> Source) >> at java.lang.Thread.run(Unknown Source) >> Caused by: java.lang.NoClassDefFoundError: >> org/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureInterface >> at java.lang.ClassLoader.defineClass1(Native Method) >> at java.lang.ClassLoader.defineClass(Unknown Source) >> at java.security.SecureClassLoader.defineClass(Unknown Source) >> at java.net.URLClassLoader.defineClass(Unknown Source) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >> at java.lang.reflect.Method.invoke(Unknown Source) >> at sun.plugin2.applet.Plugin2ClassLoader.defineClassHelper(Unknown >> Source) >> at sun.plugin2.applet.Plugin2ClassLoader.access$100(Unknown Source) >> at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source) >> at java.security.AccessController.doPrivileged(Native Method) >> at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown >> Source) >> at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) >> at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source) >> at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source) >> at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source) >> at java.lang.ClassLoader.loadClass(Unknown Source) >> at java.lang.Class.getDeclaredMethods0(Native Method) >> at java.lang.Class.privateGetDeclaredMethods(Unknown Source) >> at java.lang.Class.getDeclaredMethod(Unknown Source) >> at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) >> at java.awt.Component.access$500(Unknown Source) >> at java.awt.Component$3.run(Unknown Source) >> at java.awt.Component$3.run(Unknown Source) >> at java.security.AccessController.doPrivileged(Native Method) >> at java.awt.Component.checkCoalescing(Unknown Source) >> at java.awt.Component.<init>(Unknown Source) >> at java.awt.Container.<init>(Unknown Source) >> at java.awt.Panel.<init>(Unknown Source) >> at java.awt.Panel.<init>(Unknown Source) >> at java.applet.Applet.<init>(Unknown Source) >> at javax.swing.JApplet.<init>(Unknown Source) >> at cz.ami.crypto.applet.PdfSignApplet.<init>(PdfSignApplet.java:24) >> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native >> Method) >> at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown >> Source) >> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown >> Source) >> at java.lang.reflect.Constructor.newInstance(Unknown Source) >> at java.lang.Class.newInstance(Unknown Source) >> at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter$1.run(Unknown >> Source) >> at java.awt.event.InvocationEvent.dispatch(Unknown Source) >> at java.awt.EventQueue.dispatchEventImpl(Unknown Source) >> at java.awt.EventQueue.access$200(Unknown Source) >> at java.awt.EventQueue$3.run(Unknown Source) >> at java.awt.EventQueue$3.run(Unknown Source) >> at java.security.AccessController.doPrivileged(Native Method) >> at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown >> Source) >> at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown >> Source) >> at java.awt.EventQueue$4.run(Unknown Source) >> at java.awt.EventQueue$4.run(Unknown Source) >> at java.security.AccessController.doPrivileged(Native Method) >> at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown >> Source) >> at java.awt.EventQueue.dispatchEvent(Unknown Source) >> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) >> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) >> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) >> at java.awt.EventDispatchThread.pumpEvents(Unknown Source) >> at java.awt.EventDispatchThread.pumpEvents(Unknown Source) >> at java.awt.EventDispatchThread.run(Unknown Source) >> Caused by: java.lang.ClassNotFoundException: >> org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface >> at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) >> at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source) >> at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source) >> at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source) >> at java.lang.ClassLoader.loadClass(Unknown Source) >> ... 59 more >> Ignored exception: java.lang.RuntimeException: >> java.lang.NoClassDefFoundError: >> org/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureInterface >> ui: missing resource: java.util.MissingResourceException: Can't find >> resource for bundle com.sun.deploy.resources.Deployment, key OK >> ui: missing resource: java.util.MissingResourceException: Can't find >> resource for bundle com.sun.deploy.resources.Deployment, key OK >> ui: missing resource: java.util.MissingResourceException: Can't find >> resource for bundle com.sun.deploy.resources.Deployment, key More >> Information... >> basic: Dialog type is not candidate for embedding >> ui: Pushing modality for applet ID 1 with dialog >> javax.swing.JDialog[dialog0,382,248,516x228,layout=java.awt.BorderLayout,TOOLKIT_MODAL,title=ApplicationError,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,3,23,510x202,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true] >> preloader: Stop progressCheck thread >> > > >