Question: I have an war osgi bundle that I have created from a legacy web application. The problem I have is that in the spring configuration there are references to files that reside on the classpath (see below) which are fine when the legacy war was deployed to tomcat as they could be found on thr filesystem. However, as osgi has no concept of a file system then these files cannot be located and I get a file not found exception. can anyone please tel me if I can continue to load classpth resources in this or a similar way. Or do I have to load them programmaticlly using the org.springframework.osgi.io.OsgiBundleResource for exmple.

```
<bean id="manager" class="com.xyz.abc.Manager" depends-on="workflowCache">
    <property name="configuration" value="classpath:com/xyz/abc/resource/workflow.xml"/>
</bean>

```

Thanks in advance.

Answer: 
Use [JSTL](http://download.oracle.com/javaee/5/jstl/1.1/docs/tlddocs/) [`c:url`](http://download.oracle.com/javaee/5/jstl/1.1/docs/tlddocs/c/url.html) with [`c:param`](http://download.oracle.com/javaee/5/jstl/1.1/docs/tlddocs/c/param.html).

```
<c:url var="url" value="http://www.me-me.com/index.jsp">
    <c:param name="application" value="${myBean.application}" />
    <c:param name="appId" value="${myBean.appId}" />
</c:url>

<a href="${url}">LINK</a>

```

No need to hassle with old fashioned *scriptlets*.
URL-encoding the values would be the right thing to do.

```
href='www.me-me.com/index.jsp?application=<%=
  URLEncoder.encode(myBean.getApplication(), "UTF-8")
%>&appId=<%=
  URLEncoder.encode(myBean.getAppId(), "UTF-8") 
%>'>LINK 

```

You can transport any string value as an URL parameter, but you *must* properly encode it or your URLs will break, just like you are experiencing it.

You'd need a

```
<%@ page import="java.net.*" %>

```

statement in your page, because that's where `URLEncoder` is defined.