Reputation: 1804
I am trying to modify my copy of a network monitoring tool so I can hook my php scripts onto it for my personal use. The network monitoring tool is Service Desk Plus. It is written in Java's struts..I am not familiar with struts..Here is the struts-config.xml http://pastebin.com/HN4bEZyq
I want to change the html so that I can add an additional option in the menu so that I can hook my php scripts to that..Dashboard.jsp is a jsp I was told by a friend might be the one generating the html for the dashboard tab..After 1 week of searching through the files and folder I found dashboard_jsp.class, this is the closest I have been to "dashboard" and folders inside and around this are named the majority of the tabs so I have a strong feeling this is the right place to change that html...Problem is I have no idea how to..I thought these files were suppose to end in .jsp but all of the files have name_jsp.class. I understand .class is a java file but aren't these suppose to be .jsp? How can I open these and modify the html?!
![jsp folder1
Upvotes: 0
Views: 171
Reputation: 70929
In a servlet container (like Tomcat) the items that are managed are servlets. Servlets are compiled java code which accepts java representations of HTTP requests and return data (typically HTML) in response to those requests.
Servlets are written in Java, with print statements which emit (typically) HTML.
JSPs are a way of writing servlets, in which you write HTML embedding a few Java commands. A JSP compiler will read the JSP file, convert it to a Java Servlet, and then compile the servlet. So with JSP you will still have .class files.
This means that Tomcat works quite differently than PHP. Take a few moments to read up on Servlets and then read up on JSP. It's a lot harder to learn the technology if you attempt to reverse those two steps.
Upvotes: 0
Reputation: 88727
JSPs are basically Java files that can contain HTML code and are compiled before being displayed. All HTML/JavaScript etc. in that file, which is not Java, will be compiled to statements that write the corresponding strings to the output stream. Thus you have those .class files, which are the compiled JSPs.
If you don't have access to the source JSP it might get very hard to change it and there might be a good reason for not delivering the JSP source.
I understand .class is a java file but aren't these suppose to be .jsp
Just to reemphasize: .jsp is the source version, .class is the compiled version that gets executed. You can either deliver precompiled JSPs in their .class form or let the application server compile them itself.
Upvotes: 2