Display Oracle query result from a servlet to jsp - database

what i like to do is to have a jsp page.
This page has a menu bar.
When the user clicks on an item in the menu bar, a piece of java code should be called in a servlet.
This java code should query the db.
The result from this query should be added to request.setattribute()
So it can be displayed in the jsp page.
Someone who can set me up with this?

Just link to the servlet with the data in the query string.
Link text

Related

SSRS 2016 Toolbar Back Button

I am trying to figure out in SSRS 2016 why the back button goes missing and how to get it back. I am adding the report into an iFrame of another application - I do not have access to that application's code, I just get to put in a URL.
If I put in a URL like this:
http://sqlservername/Reports/report/Cityworks%20Reports/Parks/ParksReport?rs:embed=true
I get the back button, however the report does not scroll horizontally very well.
If I put the URL in like this, the report scrolls horizontally very well however the back button goes missing:
http://sqlservername/ReportServer/Pages/ReportViewer.aspx?Cityworks+Reports%2fParks%2fParksReport&rs:Command=Render
I have tried to see what other options are available and am stumped at the moment. Has anyone come across this and know a solution?
Try add to the wanted URL the follow parameter
&rc:showbackbutton=true
One URL is for the Report manager, and the other for Browsing. The URL with YourServer\ReportServer is the browser landing page; there's therefore no "need" for the back button as it's purely a browsing page. If you go to http://YourServerName/ReportServer you'll see you have a page that very much looks like one you get with IIS with folder browsing enabled. Normally you only land on these pages when you receive a report by email, which contains a link to the report; or you are an end user.
The other URL YourServer\Reports is the report manager. It makes more sense here to have a back button, as you are navigating a management portal. As a result you could have come from other pages other than the folder browser page.

Scraping Data from AngularJS loaded page

I am trying to scrape data from a public site PINNACLE page.
The page contains a div which when I fetch from Apps Script shows empty. I understand that it is because the data is loaded over ajax after page is loaded.
On checking the page, I came to know that they using AngularJS. I checked using Chrome Developer Tools but could not find the ajax URL for the same.
Could anyone help me on this. I need to fetch the data shown in table below using Google Apps Script.
Thank you all for looking into it.
I figured out the URL as shown in below image. The URL is https://www.pinnacle.com/webapi/1.17/api/v1/GuestLines/Deadball/4/487?callback=angular.callbacks._0

AngularJS navigation et reload tabbed page

In my application I have a page that display several tabs. All the informations are gathered with a single HTTP request. Every tab contains an HTML form. By default on the load of the page we load the first tab. After a modification within any tab we reload the page for informations refresh (following en INSERT/UPDATE in a backend database). What we want: if before any update we were on a particular tab (any other than the first one), to return on the same tab.
I thought at several solutions:
To use different URL for different tabs (panes), namely URL routing. For example, domain.ext/page/tab. There, I have a problem because the URL must update following user trace. If the user click on a 3rd tab, we have to change the URL to domain.ext/page/3rd-tab using $location.path() which triggers page reloading.
To use the same URL (what we have now) and anchors in the page managed by $location.search() and reloadOnSearch = false. For example, domain.ext/page?pane=tab. There, I have another problem because the query string (that is managed by $location.search()) is kept at service level and when the user goes on another page, the query string is the same (domain.ext/another-page?pane=tab). I would like to delete the query string when the user leaves the page.
To use ui-route. This solution change lot of the actual structure of the application.
IMHO the 2nd solution seems better except that I don’t know where and when to reset query string.
I’d like your opinions on this topic.
Thanks.

how to make a connection to datastore inside jstl tags

I'm making a project on Google App Engine and in one of my jsp files, I want to search an entry in my datastore. I normally do this search by clicking on a button on this jsp page, then I make the connection to datastore in a servlet and then I send the query results to jsp back . Well, I want to query datastore without clicking this button. When I load the page, I want to see the query results on my page. When I was using EL tag lib, I could do that by just typing <% %>, now I'm using jstl tag lib. So is there any way to do ? After using jstl tags, I'm not able to use EL tags.
Well, I want to query datastore without clicking this button
Create a servlet which performs the job in doGet() method, forwards to a JSP which presents the result and just call the servlet's URL instead of the JSP's URL. It's exactly the same as you would do in a doPost() when a form was submitted, but then without the need to pass/collect request parameters.
See also:
Our Servlets wiki page - the 2nd Hello World example does exactly what you want.
Unrelated to the concrete problem, those <% %> things ("scriptlets") have definitely nothing to do with EL. EL is those ${} things.
See also:
Our JSTL wiki page
Our EL wiki page

Help for using (exernal images) from the website with SSRS

I have a small web site where i maintain users data. I maintain the users data in table and store there images like /images/users/user_id.jpeg on the server.
I am using the ReportViewer control in the asp.net page to show the reports from SSRS in the web application.
Now user want reports where they can see the users image in the report so that they can export it as pdf and get it printed.
In report i tried html image tag with full and relative url with option to render HTML however its not working. Also i tried the image control in the toolbox with external url and that too appears to be now working.
Can someone please help me get around this problem or guide me to some helpful links.
Thanks all,
It will be a lot easier to set up the report so that your users can see the image, if you can see the image in preview in Report Designer.
Make sure you have a working URL that takes you to one of your images. Test it, by pasting the URL into the address bar of your browser and ensure that the image is displayed in the browser.
Delete the existing image from your report. Insert a new image into the report object (normally a list or table) you are using to display your table. (This should be where the old image was.)
Specify Web as the image source, and enter your working URL as the URL of the image.
Preview the report in the report designer. You should be able to see the image (with the hardcoded URL) displayed correctly in the report.
Assuming all images are stored in the same directory on your server, switch to the layout tab of your report designer and click on the image object. In the Properties window, the value attribute should be the harcoded URL.
Click on the <Expression...> option from the dropdown menu for the Value attribute. Edit the expression so that it says ="your URL, without the filename" & Fields!your image filename data field name.Value
Preview the report in the report designer. You should be able to see the appropriate image for your data displayed correctly in the report.
If everything has gone correctly up to this point, deploy the report and try viewing it in the Report Manager. You should be able to see the appropriate image for your data displayed correctly in the report.
At this point, your users should now be able to see the report images.
I tried everything!!! It wasn't working in BIDS, Web Browser nor a Winform Report Viewer control.
I ended up hard-coding the image and it still didn't work:
="http://MyServer/Reports_SQL2008/Pages/Resource.aspx?ItemPath=%2fProjectReporting%2fBRAND_Logo.png&RetrieveResource=True"
I am pretty sure the problem was something to do with Active Directory Group Policy propagation. I suggest to leave it overnight if you have the same problem and have tried everything you can think of:
Setup Unattended Execution Account in SSRS Config with a service account who's password wont expire:
Permissions (both on image and also at Site Settings):
Can navigate to the image successfully, but it still doesn't show in the report.
Have the SSRS Image Properties set correctly, with the equal sign and url enclosed in double quotes, ie: ="url"
Even clear your browsers cache and tried different browsers, etc, etc
Anyway next morning I tried and the hardcoded path works and now this dynamic URL works too:
http://MyServer/Reports_SQL2008/Pages/Resource.aspx?ItemPath=%2fProjectReporting%2f" & First(Fields!Brand.Value, "ClientAndBrandByAccount") & "_Logo.png&RetrieveResource=True"
The XML in the RDL file is HTML encoded and looks like this:
<Image Name="Logo">
<Source>External</Source>
<Value>="http://MyServer/Reports_SQL2008/Pages/Resource.aspx?ItemPath=%2fProjectReporting%2f" & First(Fields!Brand.Value, "ClientAndBrandByAccount") & "_Logo.png&RetrieveResource=True"</Value>
I tried to make the Server URL dynamic as Alex Z shows, though I had to use this Replace code:
=Replace(Globals!ReportServerUrl,"/ReportServer_","/Reports_") & "/Pages/Resource.aspx?ItemPath=%2fProjectReporting%2f" & First(Fields!Brand.Value, "ClientAndBrandByAccount") & "_Logo.png&RetrieveResource=True"
Create a relative url using the expression and global variable Globals!ReportServerUrl
= Globals!ReportServerUrl + "your path to image"

Resources