Home > front end >  WEB - under the INF JSP iframe access problems
WEB - under the INF JSP iframe access problems

Time:10-13

IFRAME within a JSP page used to reference multiple JSP page, click on the button switch of different pages, the premise is all pages in the WEB - under the INF:

How to achieve just good ah?

Java web front-end chicken dish one, help you a great god ~ ~ ~

CodePudding user response:

With Spring MVC

CodePudding user response:

Switch the iframe SRC
Or use the TAB, only your option card is the iframe.
For example, directly on the body inside, randomly link several pages and see the results
 
<style type="text/css">
# main {
Width: 40%; 30% margin: 0 auto; Height: 200 px; overflow: hidden;
}
The iframe {display: none; width: 100%; height: 100%; }
Span {width: 25%; display: inline-block; Background - color: red; }
</style>

1 2 3 4 & lt;/span>


<iframe SRC="https://bbs.csdn.net/topics/lesson1.txt" width="100%" height="100%" style="display: block;"> </iframe>
<iframe SRC="https://bbs.csdn.net/topics/lesson2.txt" width="" height=" "& gt; </iframe>
<iframe SRC="https://bbs.csdn.net/topics/TAB. HTML" width="" height=" "& gt; </iframe>
<iframe SRC="" width=" "height=" "& gt; </iframe>

<script type="text/javascript">
$(" # main span "). Click (function () {
Var len=$(this). PrevAll (.) length
The console. The log ($(this). PrevAll (.) length)
$(" # main> Iframe: eq (" + len + ") "). The show (). The siblings (' iframe). Hide ()
})
</script>

CodePudding user response:

How to access can be, in struts, spring MVC, servlet, just remember that web - under the inf files cannot be made public access (http://domain/web-inf/jsp/index.jsp), but the program code can access to

CodePudding user response:

refer to the second floor qq_29594393 response:
switching iframe SRC
Or use the TAB, only your option card is the iframe.
For example, directly on the body inside, randomly link several pages and see the results
 
<style type="text/css">
# main {
Width: 40%; 30% margin: 0 auto; Height: 200 px; overflow: hidden;
}
The iframe {display: none; width: 100%; height: 100%; }
Span {width: 25%; display: inline-block; Background - color: red; }
</style>

1 2 3 4 & lt;/span>


<iframe SRC="https://bbs.csdn.net/topics/lesson1.txt" width="100%" height="100%" style="display: block;"> </iframe>
<iframe SRC="https://bbs.csdn.net/topics/lesson2.txt" width="" height=" "& gt; </iframe>
<iframe SRC="https://bbs.csdn.net/topics/TAB. HTML" width="" height=" "& gt; </iframe>
<iframe SRC="" width=" "height=" "& gt; </iframe>

<script type="text/javascript">
$(" # main span "). Click (function () {
Var len=$(this). PrevAll (.) length
The console. The log ($(this). PrevAll (.) length)
$(" # main> Iframe: eq (" + len + ") "). The show (). The siblings (' iframe). Hide ()
})
</script>


But the iframe in the display page load when not to come out, can't find the page,,,

CodePudding user response:

reference 4 floor u010839697 response:
but the iframe in the display page load when not to come out, can't find the page,,,

Check whether the path is correct,

CodePudding user response:

reference 5 floor qq_29594393 reply:
Quote: refer to 4th floor u010839697 response:


But the iframe in the display page load when not to come out, can't find the page,,,

Check whether the path is correct,


My this page is from Spring through the login page jump of the controller in view of the parser

I am the controller address: SRC/QRS/controller/XX. Java;

The JSP page address: web/web - INF/views/XX. JSP; Iframe reference page is also in the views below

How can I jump to the JSP page views below?

CodePudding user response:

<iframe SRC="https://bbs.csdn.net/WEB-INF/jsp/purchase/purchase_apply_detail.jsp"
Id="testFrame" name="testFrame" style="width: 100%; Height: 60%;"
Frameborder="0" marginwidth="0" marginheight="0" height="100%"
Scrolling="no" allowtransparency="true" & gt; </iframe>
Try this path

CodePudding user response:

In the web. The XML configuration about


Welcome

/WEB - INF/views/welcome. Jsp


Welcome
/welcome. Jsp


And then in the views folder underneath can use so
<iframe SRC='https://bbs.csdn.net/topics/welcome.jsp' frameborder="0" scrolling="yes" & gt; </iframe>

  • Related