ODOT-PTS / TNExT

a web-based software tool developed for the visualization, analysis, and reporting of regional and statewide transit networks in the state of Oregon
16 stars 4 forks source link

Web.xml servlet mapping #41

Closed BenFields22 closed 7 years ago

BenFields22 commented 7 years ago

Do the servlet url mappings need to be updated?

BenFields22 commented 7 years ago

web.xml.txt

ed-g commented 7 years ago

Hi Ben,

Good question.

I think the file is fine as-is.

There are no references to OSU's server only relative paths.

<!-- webapp/WEB-INF/web.xml -->
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns="http://java.sun.com/xml/ns/javaee" 
    xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
    id="WebApp_ID" 
    version="2.5">
    <display-name>TNAtoolAPI-Webapp</display-name>
    <servlet>       
        <servlet-name>Queries</servlet-name>
        <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
        <init-param>
          <param-name>com.sun.jersey.config.property.packages</param-name>
          <param-value>com.webapp.api</param-value>
        </init-param>
        <init-param>
            <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
            <param-value>true</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>       
        <servlet-name>DbUpdate</servlet-name>
        <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
        <init-param>
          <param-name>com.sun.jersey.config.property.packages</param-name>
          <param-value>com.webapp.modifiers</param-value>
        </init-param>
        <init-param>
            <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
            <param-value>true</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Queries</servlet-name>
        <url-pattern>/TNAtoolAPI-Webapp/queries/*</url-pattern>     
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>DbUpdate</servlet-name>
        <url-pattern>/TNAtoolAPI-Webapp/modifiers/*</url-pattern>       
    </servlet-mapping>
    <servlet>
        <description></description>
        <display-name>FileUpload</display-name>
        <servlet-name>FileUpload</servlet-name>
        <servlet-class>com.webapp.modifiers.FileUpload</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>FileUpload</servlet-name>
        <url-pattern>/TNAtoolAPI-Webapp/FileUpload</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>TNAtoolAPI-Webapp/index.jsp</welcome-file>
    </welcome-file-list>

<security-role>
<role-name>admin</role-name>
</security-role>
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>adminTool.html</web-resource-name>
    <url-pattern>nimda/ppabeW-IPAlootANT/</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>admin</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Administrative Interface</realm-name>
    </login-config> 
</web-app>
ed-g commented 7 years ago

Ed,

I spoke to one of the previous people who worked on the project.Based on my conversation ,all the problems that we are facing are all due to the configuration of the servlets. This configuration is in the web.xml file.Please see if you can fix this.I will also look into this and give you an update tomorrow during the meeting.

Regards, Srinivas

ed-g commented 7 years ago

Srinivas,

I need more specific information that that.

Who did you talk with and what was their specific advice regarding web.xml.

Ben brought this up earlier, but to me the web.xml file appears only to map between URLs and java classes.

I can think of no reason why these should change between OSU's server and Trilliums. So if there's a reason that's what I need to know.

Thanks for looking into this!

Ed

BenFields22 commented 7 years ago

@ed-g Has the state of this file been confirmed. Does it in fact need new mappings or did this get taken care of in on of the other fixes. Looks like you have been working on a number of issues since this morning.

ed-g commented 7 years ago

@BenFields724

Thanks for checking back!

I'd like to hear from the person on OSU's team who suggested that we're running into servelet configuration issues and they can be resolved by editing the web.xml file.

Given that the software is in Java and thus configured by dozens of xml files, I wonder if they meant that we needed to edit xml files in general, which we have been.

But rather than assuming that, I'd like to talk with them and find out specifically what they think the problem might be.

So the action item here is one of two things

Ed

srinivas13794 commented 7 years ago

@ed-g Basically the problem with the web.xml file that was suggested was the configuration of the url in the file since we removed the TNA-Webapp from the main url.But it seems that you have fixed the errors pertaining to the mapping of most of the servlets,so this might not be an issue.

BenFields22 commented 7 years ago

@ed-g We had previously hard coded two of the errors that were showing up, but after switching back to the original code just now the error no longer shows up. Seems one of the fixes yesterday solved this problem. There seems to be one issue with one of the queries running, which we are trying to figure out now.

ed-g commented 7 years ago

@BenFields724

You mean https://github.com/pouyalireza/TNAST_MAVEN/issues/46 or a different query?

If different, please paste a link to the query you are referring to.

ed-g commented 7 years ago

@BenFields724 would you please link to the hard code fix for the errors? Was this a git commit or did you edit a file directly on the server?

ed-g commented 7 years ago

@srinivas13794 Ok that makes sense. That would be the other way to correct the path besides installing to a ROOT.war file. I think we can close this issue.

ed-g commented 7 years ago

Ben: yes #46

BenFields22 commented 7 years ago

@ed-g It was hard coded onto the server. Lines 21 and 64 of client.js.