Package jmri.web.servlet.frameimage
Class JmriJFrameServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
jmri.web.servlet.frameimage.JmriJFrameServlet
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
@WebServlet(name="FrameServlet",
urlPatterns="/frame")
public class JmriJFrameServlet
extends javax.servlet.http.HttpServlet
A simple servlet that returns a JMRI window as a PNG image or enclosing HTML
file.
The suffix of the request determines which.
- .html
- Returns a HTML file that displays the frame enabled for clicking via server side image map; see the .properties file for the content
- .png
- Just return the image
- no name
- Return an HTML page with links to available images
The associated .properties file contains the HTML fragments used to form replies.
Parts taken from Core Web Programming from Prentice Hall and Sun Microsystems Press, http://www.corewebprogramming.com/. © 2001 Marty Hall and Larry Brown; may be freely used or adapted.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclickOnEditorPane(Component c, int x, int y, JmriJFrame f) protected voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected voiddoGetOnSwing(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) populateParameterMap(Map<String, String[]> map) (package private) voidMethods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
-
Constructor Details
-
JmriJFrameServlet
public JmriJFrameServlet()
-
-
Method Details
-
sendClick
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doGetOnSwing
protected void doGetOnSwing(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Throws:
javax.servlet.ServletExceptionIOException
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
populateParameterMap
-
clickOnEditorPane
-