Search Results

Search found 10 results on 1 pages for 'webcontext'.

Page 1/1 | 1 

  • Multiple Jira instances on a single Tomcat 6 server?

    - by davidhayes
    I have a feeling this is a stupid question but I can't find the answer anywhere... I need to deploy 2 Jira instances on asingle Tomcat server, I can't figure out how to pass in the jira.home property The documentation says I need to:- Add a web context property called 'jira.home' — this property is set in different files depending on your application server. For example, for Tomcat (and therefore for JIRA Standalone), you will need to configure the server.xml file. For other application servers you may need to configure the web.xml file, or set 'Context parameter' options on the deployment UI of the application server, etc. Note that If you have specified a JIRA home in jira-application.properties (ie. the recommended method), it will override your web context property. I was hoping something like this would work. <Context jira.home="d:/jira/data" path="" docBase="D:\Jira\atlassian-jira-enterprise-4.1\dist-tomcat\tomcat-6\atlassian-jira-4.1.war" debug="0"> <Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource" username="sa" password="*****" driverClassName="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sqlserver://*****:1433/jira41_519;user=****;password=****" /> <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction" factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/> <Manager pathname=""/> </Context> Any ideas??

    Read the article

  • Converting JBOSS annotations to xml

    - by sixtyfootersdude
    Good Morning, I was just hoping that someone could point me to a reference that defines about what JBOSS annotations are equivalent to what xml tags. I am particularly interested in these tags: @WebContext in org.jboss.ws.annotation.WebContext and @SecurityDomain in org.jboss.annotation.security.SecurityDomain

    Read the article

  • Running Powershell from within SharePoint

    - by Norgean
    Just because something is a daft idea, doesn't mean it can't be done. We sometimes need to do some housekeeping - like delete old files or list items or… yes, well, whatever you use Powershell for in a SharePoint world. Or it could be that your solution has "issues" for which you have Powershell solutions, but not the budget to transform into proper bug fixes. So you create a "how to" for the ITPro guys. Idea: What if we keep the scripts in a list, and have SharePoint execute the scripts on demand? An announcements list (because of the multiline body field). Warning! Let us be clear. This list needs to be locked down; if somebody creates a malicious script and you run it, I cannot help you. First; we need to figure out how to start Powershell scripts from C#. Hit teh interwebs and the Googlie, and you may find jpmik's post: http://www.codeproject.com/Articles/18229/How-to-run-PowerShell-scripts-from-C. (Or MS' official answer at http://msdn.microsoft.com/en-us/library/ee706563(v=vs.85).aspx) public string RunPowershell(string powershellText, SPWeb web, string param1, string param2) { // Powershell ~= RunspaceFactory - i.e. Create a powershell context var runspace = RunspaceFactory.CreateRunspace(); var resultString = new StringBuilder(); try { // load the SharePoint snapin - Note: you cannot do this in the script itself (i.e. add-pssnapin etc does not work) PSSnapInException snapInError; runspace.RunspaceConfiguration.AddPSSnapIn("Microsoft.SharePoint.PowerShell", out snapInError); runspace.Open(); // set a web variable. runspace.SessionStateProxy.SetVariable("webContext", web); // and some user defined parameters runspace.SessionStateProxy.SetVariable("param1", param1); runspace.SessionStateProxy.SetVariable("param2", param2); var pipeline = runspace.CreatePipeline(); pipeline.Commands.AddScript(powershellText); // add a "return" variable pipeline.Commands.Add("Out-String"); // execute! var results = pipeline.Invoke(); // convert the script result into a single string foreach (PSObject obj in results) { resultString.AppendLine(obj.ToString()); } } finally { // close the runspace runspace.Close(); } // consider logging the result. Or something. return resultString.ToString(); } Ok. We've written some code. Let us test it. var runner = new PowershellRunner(); runner.RunPowershellScript(@" $web = Get-SPWeb 'http://server/web' # or $webContext $web.Title = $param1 $web.Update() $web.Dispose() ", null, "New title", "not used"); Next step: Connect the code to the list, or more specifically, have the code execute on one (or several) list items. As there are more options than readers, I'll leave this as an exercise for the reader. Some alternatives: Create a ribbon button that calls RunPowershell with the body of the selected itemsAdd a layout pageSpecify list item from query string (possibly coupled with content editor webpart with html that links directly to this page with querystring)WebpartListing with an "execute" columnList with multiselect and an execute button Etc!Now that you have the code for executing powershell scripts, you can easily expand this into a timer job, which executes scripts at regular intervals. But if the previous solution was dangerous, this is even worse - the scripts will usually be run with one of the admin accounts, and can do pretty much anything...One more thing... Note that as this is running "consoleless" calls to Write-Host will fail. Two solutions; remove all output, or check if the script is run in a console-window or not.  if ($host.Name -eq "ConsoleHost") { Write-Host 'If I agreed with you we'd both be wrong' }

    Read the article

  • Can Camel Jetty proxy URL share the webapplication context

    - by user1750353
    I am struggling with Camel Jetty Proxy Routes. At times, the routes exhibits inconsistent behavior. My Proxy app deployed with context root "Proxy", however, if give that as the context path for my proxy URL I get service not found error. If change the Proxy to an arbitrary context such as "Dummy" then the route works. Is that how camel jetty component works? From Path: jetty:http://0.0.0.0:6080/Proxy/PurchaseOrder/?matchOnUriPrefix=true&disableStreamCache=true&traceEnabled=true To Path: jetty:http://localhost:7001/Provider/PurchaseOrder/?bridgeEndpoint=true&throwExceptionOnFailure=false Another issue i noticed with jetty is If deploy both Proxy and Provider on the same app container(same listening port), then the route completely stops working saying "Provider/PurchaseOrder/" service not found. The only way the routes work is, both routes have to run different ports and the from route shouldn't share the webcontext path. I have requirement that if required I should be a able run both Proxy and Provider on the same container. Any help appreciated. Thanks,

    Read the article

  • debugging loadwith has subnodes in domainservice, but not when called in viewmodel

    - by Jakob
    Hi, I'm trying to use the .LoadWith method I have these lines of code in my domainservice: public IEnumerable<Subject> GetSubjectList(Guid userid) { DataLoadOptions loadopts = new DataLoadOptions(); loadopts.LoadWith<Subject>(s => s.Notes); this.DataContext.LoadOptions = loadopts; return this.DataContext.Subjects; } I can see debugging that a list of subjects get loaded, and that the Subjects.Notes property which is a List is also populated with subitems, but when I do ctx.Load(ctx.GetSubjectListQuery(WebContext.Current.User.UserId), lo => { serverdata = ctx.Subjects; }, null); I only get a flat list of subjects loaded into serverdata, and no note subitems are loaded to subject.notes

    Read the article

  • spring or jetty.xml?

    - by Justin
    I have a spring web application (currently packaged as a war file) which I would like to be able to launch from jetty in a stand-alone configuration (small scale all-in-one deployment, and for launching in the development environment). Since I am already using spring, it seems like what I want to do is create my jetty Server and WebContext objects, and initial JNDI context using spring. However this seems to overlap with the jetty.xml method of configuring the same environment. Is one approach better? Is the does jetty.xml offer anything easier than I can get using spring?

    Read the article

  • Silverlight logging out causes "Object reference not set to an instance"

    - by Alex
    I am using the Silverlight 4 Business Application Template. I've created a DomainDataSource in XAML like so: <riaControls:DomainDataSource x:Name="LogData" QueryName="GetLogs" AutoLoad="True" LoadSize="20" > <riaControls:DomainDataSource.DomainContext> <local:AdminDomainContext /> </riaControls:DomainDataSource.DomainContext> <riaControls:DomainDataSource.QueryParameters> <riaControls:Parameter ParameterName="UserLoginID" Value="{Binding Path=User.UserLoginID, Source={StaticResource WebContext}}" /> </riaControls:DomainDataSource.QueryParameters> </riaControls:DomainDataSource> The problem I'm experiencing is that whenever I log out, I get: Load operation failed for query 'GetLogs'. Object reference not set to an instance of an object. I assume that because I've logged out, User.UserLoginID is now null and is causing the exception. So... anybody know a good way for me to solve this? I don't really want to set the QueryParameter programmatically.

    Read the article

  • Dependencyproperty doesn't have value on load

    - by Jakob
    My problem is this, I have a UC called profile that contains another UC called FollowImageControl. In my Profile.xaml i declaretively bind a property of FollowImageControl called FollowerId to a CurrentUserId from Profile.xaml.cs. Problem is that I CurrentUserId is assigned in Profile.xaml.cs; the Profile.xaml code-behind. This means that I do not initially get the FollowerId. I have these methods in the FollowImageControl.xaml.cs: public static readonly DependencyProperty _followUserId = DependencyProperty.Register("FollowUserId", typeof(Guid), typeof(FollowImageControl), null); public Guid FollowUserId { get { return (Guid)GetValue(_followUserId); } set { SetValue(_followUserId, value); } } public FollowImageControl() { // Required to initialize variables InitializeComponent(); LoggedInUserId = WebContext.Current.User.UserId; var ctx = new NotesDomainContext(); if (ctx.IsFollowingUser(LoggedInUserId, FollowUserId).Value) SwitchToDelete.Begin(); } private void AddImg_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (LoggedInUserId != FollowUserId) { var ctx = new NotesDomainContext(); ctx.FollowUser(FollowUserId, LoggedInUserId); ctx.SubmitChanges(); } } THE WEIRD THING IS that when i insert breakpoints the FollowerUserId in FollowImageControl() is 0, but it has a value in AddImg_MouseLeftButtonDown, and there is no inbetween logic that sets the value of it. How is this??? Here's a little more code info: This is my binding from profile.xaml <internalCtrl:FollowImageControl FollowUserId="{Binding ElementName=ProfileCtrl, Path=CurrentUserId}" /> this is my constructor in profile.xaml.cs wherein the CurrentUserId is set public static readonly DependencyProperty _CurrentUserId = DependencyProperty.Register("CurrentUserId", typeof(Guid), typeof(Profile), null); public Guid CurrentUserId { get { return (Guid)GetValue(_CurrentUserId); } set { SetValue(_CurrentUserId, value); } } public Profile(Guid UserId) { CurrentUserId = UserId; InitializeComponent(); Loaded += new RoutedEventHandler(Profile_Loaded); } I'm seriously dumbfound that one minute the FollowerId has no value, and the next it holds the right, without me having changed the value in the code-behind.

    Read the article

  • Custom property editors do not work for request parameters in Spring MVC?

    - by dvd
    Hello, I'm trying to create a multiaction web controller using Spring annotations. This controller will be responsible for adding and removing user profiles and preparing reference data for the jsp page. @Controller public class ManageProfilesController { @InitBinder public void initBinder(WebDataBinder binder) { binder.registerCustomEditor(UserAccount.class,"account", new UserAccountPropertyEditor(userManager)); binder.registerCustomEditor(Profile.class, "profile", new ProfilePropertyEditor(profileManager)); logger.info("Editors registered"); } @RequestMapping("remove") public void up( @RequestParam("account") UserAccount account, @RequestParam("profile") Profile profile) { ... } @RequestMapping("") public ModelAndView defaultView(@RequestParam("account") UserAccount account) { logger.info("Default view handling"); ModelAndView mav = new ModelAndView(); logger.info(account.getLogin()); mav.addObject("account", account); mav.addObject("profiles", profileManager.getProfiles()); mav.setViewName(view); return mav; } ... } Here is the part of my webContext.xml file: <context:component-scan base-package="ru.mirea.rea.webapp.controllers" /> <context:annotation-config/> <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <value> ... /home/users/manageProfiles=users.manageProfilesController </value> </property> </bean> <bean id="users.manageProfilesController" class="ru.mirea.rea.webapp.controllers.users.ManageProfilesController"> <property name="view" value="home\users\manageProfiles"/> </bean> <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" /> However, when i open the mapped url, i get exception: java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [ru.mirea.rea.model.UserAccount]: no matching editors or conversion strategy found I use spring 2.5.6 and plan to move to the Spring 3.0 in some not very distant future. However, according to this JIRA https://jira.springsource.org/browse/SPR-4182 it should be possible already in spring 2.5.1. The debug shows that the InitBinder method is correctly called. What am i doing wrong?

    Read the article

  • View bound to paged collection view not updating all of the time.

    - by Thomas
    I new to silverlight and trying to make a business application using the mvvm pattern and ria services. I have a view model class that contains a PagedCollectoinView and it is set to the item source of a datagrid. When I update the PagedCollectionView the datagrid is only updated the first time then after that subsequent changes to the data to not reflect in the view until after another edit. Things seem to be delayed one edit. Below is a summarized example of my xaml and code behind. This is the code for my view model public class CustomerContactLinks : INotifyPropertyChanged { private ObservableCollection<CustomerContactLink> _CustomerContact; public ObservableCollection<CustomerContactLink> CustomerContact { get { if (_CustomerContact == null) _CustomerContact = new ObservableCollection<CustomerContactLink>(); return _CustomerContact; } set { _CustomerContact = value; } } private PagedCollectionView _CustomerContactPaged; public PagedCollectionView CustomerContactPaged { get { if (_CustomerContactPaged == null) _CustomerContactPaged = new PagedCollectionView(CustomerContact); return _CustomerContactPaged; } } private TicketSystemDataContext _ctx; public TicketSystemDataContext ctx { get { if (_ctx == null) _ctx = new TicketSystemDataContext(); return _ctx; } } public void GetAll() { ctx.Load(ctx.GetCustomerContactInfoQuery(), LoadCustomerContactsComplete, null); } private void LoadCustomerContactsComplete(LoadOperation<CustomerContactLink> lo) { foreach (var entity in lo.Entities) { CustomerContact.Add(entity as CustomerContactLink); } } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; private void RaisePropertyChanged(string propertyName) { if (PropertyChanged != null) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } #endregion } Here is the basics of my XAML <Data:DataGrid x:Name="GridCustomers" MinHeight="100" MaxWidth="1000" IsReadOnly="True" AutoGenerateColumns="False"> <Data:DataGrid.Columns> <Data:DataGridTextColumn Header="First Name" Binding="{Binding Customer.FirstName}" Width="105" /> <Data:DataGridTextColumn Header="MI" Binding="{Binding Customer.MiddleName}" Width="35" /> <Data:DataGridTextColumn Header="Last Name" Binding="{Binding Customer.LastName}" Width="105"/> <Data:DataGridTextColumn Header="Address1" Binding="{Binding Contact.Address1}" Width="130"/> <Data:DataGridTextColumn Header="Address2" Binding="{Binding Contact.Address2}" Width="130"/> <Data:DataGridTextColumn Header="City" Binding="{Binding Contact.City}" Width="110"/> <Data:DataGridTextColumn Header="State" Binding="{Binding Contact.State}" Width="50"/> <Data:DataGridTextColumn Header="Zip" Binding="{Binding Contact.Zip}" Width="45"/> <Data:DataGridTextColumn Header="Home" Binding="{Binding Contact.PhoneHome}" Width="85"/> <Data:DataGridTextColumn Header="Cell" Binding="{Binding Contact.PhoneCell}" Width="85"/> <Data:DataGridTextColumn Header="Email" Binding="{Binding Contact.Email}" Width="118"/> </Data:DataGrid.Columns> </Data:DataGrid> <DataForm:DataForm x:Name="CustomerDetails" Header="Customer Details" AutoGenerateFields="False" AutoEdit="False" AutoCommit="False" CommandButtonsVisibility="Edit" Width="1000" Margin="0,5,0,0"> <DataForm:DataForm.EditTemplate> </DataForm:DataForm.EditTemplate> </DataForm:DataForm> And here is my code behind public Customers() { InitializeComponent(); BusyDialogIndicator.IsBusy = true; Loaded += new RoutedEventHandler(Customers_Loaded); CustomerDetails.BeginningEdit += new EventHandler(CustomerDetails_BeginningEdit); } void CustomerDetails_BeginningEdit(object sender, System.ComponentModel.CancelEventArgs e) { CustomerContacts.CustomerContactPaged.EditItem(CustomerDetails.CurrentItem); } private void Customers_Loaded(object sender, RoutedEventArgs e) { CustomerContacts = new CustomerContactLinks(); CustomerContacts.GetAll(); GridCustomers.ItemsSource = CustomerContacts.CustomerContactPaged; GridCustomerPager.Source = CustomerContacts.CustomerContactPaged; GridCustomers.SelectionChanged += new SelectionChangedEventHandler(GridCustomers_SelectionChanged); BusyDialogIndicator.IsBusy = false; } void GridCustomers_SelectionChanged(object sender, SelectionChangedEventArgs e) { CustomerDetails.CurrentItem = GridCustomers.SelectedItem as CustomerContactLink; } private void SaveChanges_Click(object sender, RoutedEventArgs e) { if (WebContext.Current.User.IsAuthenticated) { bool commited = CustomerDetails.CommitEdit(); if (commited && (!CustomerDetails.IsItemChanged && CustomerDetails.IsItemValid)) { CustomerContacts.Update(CustomerDetails.CurrentItem as CustomerContactLink); CustomerContacts.ctx.SubmitChanges(); CustomerContacts.CustomerContactPaged.CommitEdit(); CustomerContacts.CustomerContactPaged.Refresh(); (GridCustomers.ItemsSource as PagedCollectionView).Refresh(); } } }

    Read the article

1