Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Urgent! The field <jnlp>codebase has an invalid value: $$codebase

843802Nov 26 2007 — edited Nov 27 2007
Hello All,

1. I am trying to run a java web start application, i am using tomcat 5.5.20 server. I am using the JnlpDownloadServlet to use the $$codebase and $$name to dynimically code the path to the jar's and the jnlp file.

Here is what i have done:

Here i have a JnlpDownloadServlet in a seperate folder called (D:/apache-tomcat-5.5.20/webapps/online/server1/WEB-INF/lib/jnlp-servlet.jar).

2. Now i am placing my .jnlp and my application jar's in a seperate folder called *"client1"* (D:/apache-tomcat-5.5.20/webapps/online/client1/)

I need to have the client1 and server1 folders and i have to map the servlet to the jnlp file, because i want to keep my jars's and the servlet in a seperate folders.
3. I have the web.xml file in WEB-INF folder.

4. web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<servlet>
<servlet-name> JnlpDownloadServlet</servlet-name>
<servlet-class>jnlp.sample.servlet.JnlpDownloadServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>JnlpDownloadServlet</servlet-name>
*<url-pattern>../client1/*.jnlp</url-pattern>* *<!-- /* I am having problem here, i think */ -->*
</servlet-mapping>
</web-app>


Myapp.jnlp:

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+"
codebase="$$codebase"
href="$$name">
<information>

</information>
<resources>
<j2se version="1.6+"/>
<jar href="$$codebase/XXXXXX.jar" main="true" download="eager"/>
<jar href="$$codebase/XXXX.jar" download="eager"/>
<jar href="$$codebase/XXXXX.jar" download="eager"/>

<nativelib href="$$codebase/XXX.jar" />
</resources>

</jnlp>

While i run the application. i get the following error:

Error occured when trying to run a Java web start application
BadFieldException[ The field <jnlp>codebase has an invalid value: $$codebase,$$codebase]
at com.sun.javaws.jnl.XMLUtils.getAttributeURL(Unknown Source)
at com.sun.javaws.jnl.XMLUtils.getAttributeURL(Unknown Source)
at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 25 2007
Added on Nov 26 2007
4 comments
1,693 views