Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Web Service response problem  RSS feed

Kieran Neeson
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have created a java web service but I have a problem I do not understand.

The function I am calling is:
public String calculateCCS(@QueryParam("pdbID") String pdbID, @QueryParam("tolerance") double tol, @QueryParam("radius") double rad)

and within my html client I use a form
<form method="GET" action="http://localhost:8080/CCSCalcApp/resources/ccscalc" name="f1" id="f1">
<h1>Calculate CCS</h1>
<td><label for="pdbID">PDB ID:</label></td>
<td><input type="text" name="pdbID" id="pdbID" size="5" value=""></input></td>
<td><label for="tolerance">CCS tolerance:</label></td>
<td><input type="text" name="tolerance" id="tolerance" size="5" value="1.0"></input>%</td>
<td><label for="radius">Gas radius:</label></td>
<td><input type="text" name="radius" id="radius" size="5" value="1.0"></input></td>
<div id="form-content-button">
<input type="submit" value="Calculate CCS" name="b2" class="ccsbutton"></input>

Everything works and the response is as I expect it:
<!DOCTYPE html>
<title>CCS Calc</title>
<meta content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" name="viewport" />
<LINK REL=StyleSheet HREF="style/style.css" TYPE="text/css" MEDIA=screen>
<div id="container">
<div id="header">
<div id="logoBar">
<div id="logoBarLeft">
<img src="images/logo1.png"/>
<div id="logoBarRight">
<img src="images/Waters.png"/>
<ul class="highlight blue">
<li><a href="home.html"><img src="images\calc.png" alt="Calc"/></a></li>
<li><a href="keyword.html"><img src="images\key.png" alt="Keyword"/></a></li>
<li><a href="info.html"><img src="images\info.png" alt="Info"/></a></li>
<li><a href="contact.html"><img src="images\contact.png" alt="Contact"/></a></li>
<div id="content">

However when the response returns it looks like this in my browser - see attachments.
Why do the images and styles referenced in the response not visible?
What am I doing wrong or am I expecting the wrong thing?



William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome ...

You forgot the attachment, and please use code formatting tags in the future.

From a quick scan it looks like you may have a backslash/forward slash issue.


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!