Leijun Zheng

Greenhorn
+ Follow
since Feb 22, 2010
Merit badge: grant badges
For More
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Leijun Zheng

Thanks for everyone's help, I figured out the problem.

I was re-working this existing app, and originally they had the context root as ROOT, which means http://servername/*.jsp to access the page, and that's why /servlet/ViewSVG works, now that I have added a context root for this app, I have to use /contextRoot/servlet/ViewSVG in order to access the same servlet.
14 years ago
I am working on a web app that is deployed on Tomcat 5.0, and I have the following entry in web.xml

<servlet>
<servlet-name>ViewSVG</servlet-name>
<display-name>ViewSVG</display-name>
<servlet-class>com.company.ViewSVG</servlet-class>
</servlet>


<servlet-mapping>
<servlet-name>ViewSVG</servlet-name>
<url-pattern>/servlet/ViewSVG</url-pattern>
</servlet-mapping>


and in my jsp page, I have

<EMBED NAME="inter1_01" WIDTH="<%=adSquareWidth%>" HEIGHT="<%=adSquareHeight%>" SRC="/servlet/ViewSVG?adId=<%=id%>" TYPE="image/svg+xml" PLUGINSPAGE="http://www.adobe.com/svg/viewer/install/"/>


Now the problem is that the app doesn't goto that servlet class, as if it doesn't understand the servlet mapping at all.
If I put SRC="http://localhost:8080/appName/servlet/ViewSVG?adId=<%=id%>" , it works fine.

did I miss something about url path?
14 years ago